Merge pull request #1473 from aroy114/certificate
Move certificate expiry to a card #1327
This commit is contained in:
1 file changed
+14
-51
@@ -58,7 +58,7 @@ const DetailsPage = () => {
|
|||||||
setAnchorEl(null);
|
setAnchorEl(null);
|
||||||
};
|
};
|
||||||
|
|
||||||
const dateFormat = dateRange === "day" ? "MMM D, h A" : "MMM D";
|
const dateFormat = dateRange === "day" ? "MMM D, YYYY h A" : "MMM D";
|
||||||
const uiTimezone = useSelector((state) => state.ui.timezone);
|
const uiTimezone = useSelector((state) => state.ui.timezone);
|
||||||
|
|
||||||
const fetchMonitor = useCallback(async () => {
|
const fetchMonitor = useCallback(async () => {
|
||||||
@@ -210,56 +210,7 @@ const DetailsPage = () => {
|
|||||||
alignSelf: "flex-end",
|
alignSelf: "flex-end",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IconBox
|
|
||||||
mr={theme.spacing(4)}
|
|
||||||
onClick={openCertificate}
|
|
||||||
sx={{
|
|
||||||
cursor: "pointer",
|
|
||||||
"& svg": {
|
|
||||||
width: 23,
|
|
||||||
height: 23,
|
|
||||||
top: "52%",
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<CertificateIcon />
|
|
||||||
</IconBox>
|
|
||||||
<Popover
|
|
||||||
id="certificate-dropdown"
|
|
||||||
anchorEl={anchorEl}
|
|
||||||
open={Boolean(anchorEl)}
|
|
||||||
onClose={closeCertificate}
|
|
||||||
disableScrollLock
|
|
||||||
marginThreshold={null}
|
|
||||||
anchorOrigin={{
|
|
||||||
vertical: "bottom",
|
|
||||||
horizontal: "center",
|
|
||||||
}}
|
|
||||||
transformOrigin={{
|
|
||||||
vertical: "top",
|
|
||||||
horizontal: "center",
|
|
||||||
}}
|
|
||||||
slotProps={{
|
|
||||||
paper: {
|
|
||||||
sx: {
|
|
||||||
mt: theme.spacing(4),
|
|
||||||
py: theme.spacing(2),
|
|
||||||
px: theme.spacing(4),
|
|
||||||
width: 140,
|
|
||||||
backgroundColor: theme.palette.background.accent,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Typography variant="body2">Certificate Expiry</Typography>
|
|
||||||
<Typography
|
|
||||||
component="span"
|
|
||||||
fontSize={13}
|
|
||||||
color={theme.palette.text.primary}
|
|
||||||
>
|
|
||||||
{certificateExpiry}
|
|
||||||
</Typography>
|
|
||||||
</Popover>
|
|
||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
@@ -302,6 +253,18 @@ const DetailsPage = () => {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<StatBox
|
||||||
|
heading="certificate expiry"
|
||||||
|
subHeading={
|
||||||
|
<Typography
|
||||||
|
component="span"
|
||||||
|
fontSize={13}
|
||||||
|
color={theme.palette.text.primary}
|
||||||
|
>
|
||||||
|
{certificateExpiry}
|
||||||
|
</Typography>
|
||||||
|
}
|
||||||
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Box>
|
<Box>
|
||||||
<Stack
|
<Stack
|
||||||
|
|||||||
Reference in new issue
Block a user