diff --git a/ui/src/components/MetricsFetchControls.tsx b/ui/src/components/MetricsFetchControls.tsx index 678ca58..242847e 100644 --- a/ui/src/components/MetricsFetchControls.tsx +++ b/ui/src/components/MetricsFetchControls.tsx @@ -58,7 +58,9 @@ const useStyles = makeStyles((theme) => ({ marginLeft: theme.spacing(1), }, buttonGroupRoot: { - height: 30, + height: 29, + position: "relative", + top: 1, }, endTimeShiftControls: { padding: theme.spacing(1), @@ -93,7 +95,6 @@ const useStyles = makeStyles((theme) => ({ }, controlDurationSelector: { width: "50%", - marginLeft: theme.spacing(2), }, radioButtonRoot: { paddingTop: theme.spacing(0.5), @@ -106,9 +107,19 @@ const useStyles = makeStyles((theme) => ({ }, buttonLabel: { textTransform: "none", + fontSize: 12, }, formControlRoot: { width: "100%", + margin: 0, + }, + formLabel: { + fontSize: 14, + fontWeight: 500, + marginBottom: theme.spacing(1), + }, + customInputField: { + marginTop: theme.spacing(1), }, })); @@ -441,54 +452,20 @@ function MetricsFetchControls(props: Props) { margin="dense" classes={{ root: classes.formControlRoot }} > - End Time + + End Time + - - } - label="Real Time" - /> - - } - label="Freeze at now" - /> - - } - label="Custom End Time" - /> + + + -
+
- Duration + + Duration + - - } - label="1h" - /> - - } - label="6h" - /> - - } - label="1 day" - /> - - } - label="8 days" - /> - - } - label="30 days" - /> - - } - label="Custom Duration" - /> + + + + + + -
+
+ } + label={props.label} + /> + ); +} + interface ShiftButtonProps extends ButtonProps { text: string; onClick: () => void; @@ -662,14 +595,18 @@ interface ShiftButtonProps extends ButtonProps { } const useShiftButtonStyles = makeStyles((theme) => ({ - root: { minWidth: 40, fontWeight: 400 }, + root: { + minWidth: 40, + fontWeight: (props: ShiftButtonProps) => (props.dense ? 400 : 500), + }, label: { fontSize: 12, textTransform: "none" }, iconRoot: { marginRight: (props: ShiftButtonProps) => - props.direction === "left" && props.dense ? -8 : 0, + props.direction === "left" ? (props.dense ? -8 : -4) : 0, marginLeft: (props: ShiftButtonProps) => - props.direction === "right" && props.dense ? -8 : 0, - color: theme.palette.grey[700], + props.direction === "right" ? (props.dense ? -8 : -4) : 0, + color: (props: ShiftButtonProps) => + props.color ? props.color : theme.palette.grey[700], }, }));