mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
fix: change query reset (#2001)
This commit is contained in:
parent
8262372d72
commit
042570584f
1 changed files with 12 additions and 3 deletions
|
@ -4,6 +4,7 @@ import {ExecutionControls} from "../Home/Configurator/Time/ExecutionControls";
|
|||
import {DisplayTypeSwitch} from "../Home/Configurator/DisplayTypeSwitch";
|
||||
import Logo from "../common/Logo";
|
||||
import makeStyles from "@mui/styles/makeStyles";
|
||||
import {setQueryStringWithoutPageReload} from "../../utils/query-string";
|
||||
|
||||
const useStyles = makeStyles({
|
||||
logo: {
|
||||
|
@ -11,7 +12,10 @@ const useStyles = makeStyles({
|
|||
display: "flex",
|
||||
alignItems: "center",
|
||||
color: "#fff",
|
||||
transition: ".2s textDecoration",
|
||||
cursor: "pointer",
|
||||
"&:hover": {
|
||||
textDecoration: "underline"
|
||||
}
|
||||
},
|
||||
issueLink: {
|
||||
position: "absolute",
|
||||
|
@ -32,16 +36,21 @@ const Header: FC = () => {
|
|||
|
||||
const classes = useStyles();
|
||||
|
||||
const onClickLogo = () => {
|
||||
setQueryStringWithoutPageReload("");
|
||||
window.location.reload();
|
||||
};
|
||||
|
||||
return <AppBar position="static">
|
||||
<Toolbar>
|
||||
<Box display="grid" alignItems="center" justifyContent="center">
|
||||
<Link href="/" className={classes.logo}>
|
||||
<Box onClick={onClickLogo} className={classes.logo}>
|
||||
<Logo style={{color: "inherit", marginRight: "6px"}}/>
|
||||
<Typography variant="h5">
|
||||
<span style={{fontWeight: "bolder"}}>VM</span>
|
||||
<span style={{fontWeight: "lighter"}}>UI</span>
|
||||
</Typography>
|
||||
</Link>
|
||||
</Box>
|
||||
<Link className={classes.issueLink} target="_blank"
|
||||
href="https://github.com/VictoriaMetrics/VictoriaMetrics/issues/new">
|
||||
create an issue
|
||||
|
|
Loading…
Reference in a new issue