-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #522 from metrico/feat/faro-logs
fix: default timerange to five minutes
- Loading branch information
Showing
54 changed files
with
1,860 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import React from "react"; | ||
import { WebVitalsStore } from "./store"; | ||
import CustomSwitch from "@ui/qrynui/CustomSwitch/CustomSwitch"; | ||
import { css, cx } from "@emotion/css"; | ||
import useTheme from "@ui/theme/useTheme"; | ||
import { QrynTheme } from "@ui/theme/types"; | ||
import Tooltip from "@mui/material/Tooltip"; | ||
const WebVitalStyles = (theme: QrynTheme) => css` | ||
display: flex; | ||
align-items: center; | ||
p { | ||
font-size: 0.75em; | ||
color: ${theme.contrast}; | ||
} | ||
`; | ||
|
||
export const WebVitals: React.FC = () => { | ||
const { | ||
webVitalsActive, | ||
httpPerformanceActive, | ||
setWebVitalsActive, | ||
setHttpPerformanceActive, | ||
qrynInstance | ||
} = WebVitalsStore(); | ||
|
||
const theme = useTheme(); | ||
const onWebVitalsActivate = () => { | ||
setWebVitalsActive(webVitalsActive); | ||
}; | ||
const onHttpPerformanceRequestActivate = () => { | ||
setHttpPerformanceActive(httpPerformanceActive) | ||
} | ||
|
||
return ( | ||
<div className={cx(WebVitalStyles(theme))}> | ||
<Tooltip title="Monitor Web vitals sending data to Qryn"> | ||
<p>Monitor WebVitals</p> | ||
</Tooltip> | ||
<CustomSwitch | ||
onChange={onWebVitalsActivate} | ||
defaultActive={webVitalsActive} | ||
/> | ||
<Tooltip title="Monitor HTTP Requests sending data to Qryn"> | ||
<p>Monitor HTTP Requests</p> | ||
</Tooltip> | ||
<CustomSwitch | ||
onChange={onHttpPerformanceRequestActivate} | ||
defaultActive={httpPerformanceActive} | ||
/> | ||
<Tooltip title="Your qryn-view instance tag to monitor statistics"> | ||
<p>Instance: {qrynInstance ?? ""}</p> | ||
</Tooltip> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.