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