Fleet UI: Back to host from details page keeps filters applied (#7027)

This commit is contained in:
RachelElysia 2022-08-04 13:03:18 -04:00 committed by GitHub
parent a26d53931a
commit 44bbaebf68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 10 deletions

View file

@ -0,0 +1 @@
* Back to host from host details keeps filters

View file

@ -1,5 +1,5 @@
import React, { useContext, useState, useCallback, useEffect } from "react";
import { Link } from "react-router";
import { browserHistory } from "react-router";
import { Params, InjectedRouter } from "react-router/lib/Router";
import { useQuery } from "react-query";
import { useErrorHandler } from "react-error-boundary";
@ -541,10 +541,18 @@ const HostDetailsPage = ({
<MainContent className={baseClass}>
<div className={`${baseClass}__wrapper`}>
<div>
<Link to={PATHS.MANAGE_HOSTS} className={`${baseClass}__back-link`}>
<img src={BackChevron} alt="back chevron" id="back-chevron" />
<span>Back to all hosts</span>
</Link>
<Button
variant={"text-icon"}
onClick={() => {
browserHistory.goBack();
}}
className={`${baseClass}__back-link`}
>
<>
<img src={BackChevron} alt="back chevron" id="back-chevron" />
<span>Back to all hosts</span>
</>
</Button>
</div>
<HostSummaryCard
statusClassName={statusClassName}

View file

@ -369,11 +369,6 @@
text-decoration: none;
}
#back-chevron {
width: 16px;
margin-right: $pad-small;
}
&__device_mapping {
.device_mapping--tooltip {
flex-direction: column;