Skip to content

Commit 347c6ab

Browse files
Ux Tools screens (#1261)
Co-authored-by: Daniel Valdivia <[email protected]>
1 parent 4008925 commit 347c6ab

File tree

10 files changed

+735
-693
lines changed

10 files changed

+735
-693
lines changed

portal-ui/src/screens/Console/Common/FormComponents/DateTimePickerWrapper/DateTimePickerWrapper.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ const styles = (theme: Theme) =>
9595
fontWeight: "bold",
9696
color: "#081C42",
9797
},
98+
"@media (max-width: 900px)": {
99+
width: 103,
100+
},
98101
},
99102
dateSelectorFormOverride: {
100103
width: "100%",

portal-ui/src/screens/Console/Common/FormComponents/common/styleLibrary.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,3 +1166,39 @@ export const deleteDialogStyles = {
11661166
},
11671167
},
11681168
};
1169+
1170+
export const advancedFilterToggleStyles: any = {
1171+
advancedButton: {
1172+
flexGrow: 1,
1173+
alignItems: "flex-end",
1174+
display: "flex",
1175+
justifyContent: "flex-end",
1176+
},
1177+
advancedConfiguration: {
1178+
color: "#2781B0",
1179+
fontSize: 10,
1180+
textDecoration: "underline",
1181+
border: "none",
1182+
backgroundColor: "transparent",
1183+
cursor: "pointer",
1184+
alignItems: "center",
1185+
display: "flex",
1186+
float: "right",
1187+
1188+
"&:hover": {
1189+
color: "#07193E",
1190+
},
1191+
1192+
"& svg": {
1193+
width: 10,
1194+
alignSelf: "center",
1195+
marginLeft: 5,
1196+
},
1197+
},
1198+
advancedOpen: {
1199+
transform: "rotateZ(-90deg) translateX(-4px) translateY(2px)",
1200+
},
1201+
advancedClosed: {
1202+
transform: "rotateZ(90deg)",
1203+
},
1204+
};

portal-ui/src/screens/Console/Heal/Heal.tsx

Lines changed: 117 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import CheckboxWrapper from "../Common/FormComponents/CheckboxWrapper/CheckboxWr
4646
import PageHeader from "../Common/PageHeader/PageHeader";
4747
import api from "../../../common/api";
4848
import BackLink from "../../../common/BackLink";
49+
import PageLayout from "../Common/Layout/PageLayout";
4950

5051
const styles = (theme: Theme) =>
5152
createStyles({
@@ -69,6 +70,7 @@ const styles = (theme: Theme) =>
6970
border: "#EAEDEE 1px solid",
7071
borderRadius: 3,
7172
padding: "19px 38px",
73+
marginTop: 15,
7274
},
7375
scanInfo: {
7476
marginTop: 20,
@@ -79,8 +81,31 @@ const styles = (theme: Theme) =>
7981
scanData: {
8082
fontSize: 13,
8183
},
84+
noMinWidthLabel: {
85+
fontWeight: 400,
86+
},
87+
formBox: {
88+
padding: 15,
89+
border: "1px solid #EAEAEA",
90+
},
91+
buttonBar: {
92+
display: "flex",
93+
alignItems: "center",
94+
justifyContent: "flex-end",
95+
},
96+
bucketField: {
97+
flex: 1,
98+
},
99+
prefixField: {
100+
...searchField.searchField,
101+
marginLeft: 10,
102+
flex: 1,
103+
},
104+
actionsTray: {
105+
...actionsTray.actionsTray,
106+
marginBottom: 0,
107+
},
82108
...inlineCheckboxes,
83-
...actionsTray,
84109
...searchField,
85110
...containerForHeader(theme.spacing(4)),
86111
});
@@ -93,7 +118,6 @@ interface IHeal {
93118
const SelectStyled = withStyles((theme: Theme) =>
94119
createStyles({
95120
root: {
96-
width: 450,
97121
lineHeight: "50px",
98122
marginRight: 15,
99123
"label + &": {
@@ -107,7 +131,6 @@ const SelectStyled = withStyles((theme: Theme) =>
107131
height: 50,
108132
fontSize: 13,
109133
lineHeight: "50px",
110-
width: 450,
111134
},
112135
})
113136
)(InputBase);
@@ -248,97 +271,99 @@ const Heal = ({ classes, distributedSetup }: IHeal) => {
248271
return (
249272
<React.Fragment>
250273
<PageHeader label="Heal" />
251-
<Grid container className={classes.container}>
252-
<Grid item xs={12}>
253-
<BackLink to="/tools" label="Return to Tools" />
254-
</Grid>
255-
<Grid item xs={12} className={classes.actionsTray}>
256-
<FormControl variant="outlined">
257-
<Select
258-
id="bucket-name"
259-
name="bucket-name"
260-
value={bucketName}
274+
<BackLink to="/tools" label="Return to Tools" />
275+
<PageLayout>
276+
<Grid xs={12} className={classes.formBox}>
277+
<Grid item xs={12} className={classes.actionsTray}>
278+
<FormControl variant="outlined" className={classes.bucketField}>
279+
<Select
280+
label="Bucket"
281+
id="bucket-name"
282+
name="bucket-name"
283+
value={bucketName}
284+
onChange={(e) => {
285+
setBucketName(e.target.value as string);
286+
}}
287+
className={classes.searchField}
288+
input={<SelectStyled />}
289+
displayEmpty
290+
>
291+
<MenuItem value="" key={`select-bucket-name-default`}>
292+
Select Bucket
293+
</MenuItem>
294+
{bucketNames.map((option) => (
295+
<MenuItem
296+
value={option.value}
297+
key={`select-bucket-name-${option.label}`}
298+
>
299+
{option.label}
300+
</MenuItem>
301+
))}
302+
</Select>
303+
</FormControl>
304+
<TextField
305+
label="Prefix"
306+
className={classes.prefixField}
307+
id="prefix-resource"
308+
disabled={false}
309+
InputProps={{
310+
disableUnderline: true,
311+
}}
312+
onChange={(e) => {
313+
setPrefix(e.target.value);
314+
}}
315+
variant="standard"
316+
/>
317+
</Grid>
318+
<Grid item xs={12} className={classes.inlineCheckboxes}>
319+
<CheckboxWrapper
320+
name="recursive"
321+
id="recursive"
322+
classes={classes}
323+
value="recursive"
324+
checked={recursive}
325+
onChange={(e) => {
326+
setRecursive(e.target.checked);
327+
}}
328+
disabled={false}
329+
label="Recursive"
330+
/>
331+
<CheckboxWrapper
332+
name="forceStart"
333+
id="forceStart"
334+
classes={classes}
335+
value="forceStart"
336+
checked={forceStart}
261337
onChange={(e) => {
262-
setBucketName(e.target.value as string);
338+
setForceStart(e.target.checked);
263339
}}
264-
className={classes.searchField}
265-
input={<SelectStyled />}
266-
displayEmpty
340+
disabled={false}
341+
label="Force Start"
342+
/>
343+
<CheckboxWrapper
344+
name="forceStop"
345+
id="forceStop"
346+
classes={classes}
347+
value="forceStop"
348+
checked={forceStop}
349+
onChange={(e) => {
350+
setForceStop(e.target.checked);
351+
}}
352+
disabled={false}
353+
label="Force Stop"
354+
/>
355+
</Grid>
356+
<Grid item xs={12} className={classes.buttonBar}>
357+
<Button
358+
type="submit"
359+
variant="contained"
360+
color="primary"
361+
disabled={start}
362+
onClick={() => setStart(true)}
267363
>
268-
<MenuItem value="" key={`select-bucket-name-default`}>
269-
Select Bucket
270-
</MenuItem>
271-
{bucketNames.map((option) => (
272-
<MenuItem
273-
value={option.value}
274-
key={`select-bucket-name-${option.label}`}
275-
>
276-
{option.label}
277-
</MenuItem>
278-
))}
279-
</Select>
280-
</FormControl>
281-
<TextField
282-
placeholder="Prefix"
283-
className={classes.searchField}
284-
id="prefix-resource"
285-
label=""
286-
disabled={false}
287-
InputProps={{
288-
disableUnderline: true,
289-
}}
290-
onChange={(e) => {
291-
setPrefix(e.target.value);
292-
}}
293-
variant="standard"
294-
/>
295-
<Button
296-
type="submit"
297-
variant="contained"
298-
color="primary"
299-
disabled={start}
300-
onClick={() => setStart(true)}
301-
>
302-
Start
303-
</Button>
304-
</Grid>
305-
<Grid item xs={12} className={classes.inlineCheckboxes}>
306-
<CheckboxWrapper
307-
name="recursive"
308-
id="recursive"
309-
value="recursive"
310-
checked={recursive}
311-
onChange={(e) => {
312-
setRecursive(e.target.checked);
313-
}}
314-
disabled={false}
315-
label="Recursive"
316-
/>
317-
<CheckboxWrapper
318-
name="forceStart"
319-
id="forceStart"
320-
value="forceStart"
321-
checked={forceStart}
322-
onChange={(e) => {
323-
setForceStart(e.target.checked);
324-
}}
325-
disabled={false}
326-
label="Force Start"
327-
/>
328-
<CheckboxWrapper
329-
name="forceStop"
330-
id="forceStop"
331-
value="forceStop"
332-
checked={forceStop}
333-
onChange={(e) => {
334-
setForceStop(e.target.checked);
335-
}}
336-
disabled={false}
337-
label="Force Stop"
338-
/>
339-
</Grid>
340-
<Grid item xs={12}>
341-
<br />
364+
Start
365+
</Button>
366+
</Grid>
342367
</Grid>
343368
<Grid item xs={12} className={classes.graphContainer}>
344369
<HorizontalBar
@@ -370,7 +395,7 @@ const Heal = ({ classes, distributedSetup }: IHeal) => {
370395
</div>
371396
</Grid>
372397
</Grid>
373-
</Grid>
398+
</PageLayout>
374399
</React.Fragment>
375400
);
376401
};

portal-ui/src/screens/Console/HealthInfo/HealthInfo.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import { setServerDiagStat, setSnackBarMessage } from "../../../actions";
4747
import CircularProgress from "@mui/material/CircularProgress";
4848
import BackLink from "../../../common/BackLink";
4949
import TestWrapper from "../Common/TestWrapper/TestWrapper";
50+
import PageLayout from "../Common/Layout/PageLayout";
5051

5152
const styles = (theme: Theme) =>
5253
createStyles({
@@ -133,7 +134,7 @@ const HealthInfo = ({
133134
const [diagStarted, setDiagStarted] = useState<boolean>(false);
134135
const [downloadDisabled, setDownloadDisabled] = useState(true);
135136
const [localMessage, setMessage] = useState<string>("");
136-
const [title, setTitle] = useState<string>("Start new Diagnostic");
137+
const [title, setTitle] = useState<string>("New Diagnostic");
137138

138139
useEffect(() => {
139140
if (serverDiagnosticStatus === DiagStatInProgress) {
@@ -242,11 +243,9 @@ const HealthInfo = ({
242243
return (
243244
<Fragment>
244245
<PageHeader label="Diagnostic" />
246+
<BackLink to="/tools" label="Return to Tools" />
245247

246-
<Grid container className={classes.container}>
247-
<Grid item xs={12}>
248-
<BackLink to="/tools" label="Return to Tools" />
249-
</Grid>
248+
<PageLayout>
250249
<Grid item xs={12} className={classes.boxy}>
251250
<TestWrapper title={title} advancedVisible={false}>
252251
<Grid container className={classes.buttons}>
@@ -306,7 +305,7 @@ const HealthInfo = ({
306305
disabled={startDiagnostic}
307306
onClick={() => setStartDiagnostic(true)}
308307
>
309-
Start new Diagnostic
308+
Start New Diagnostic
310309
</Button>
311310
</Grid>
312311
</Fragment>
@@ -316,7 +315,7 @@ const HealthInfo = ({
316315
</Grid>
317316
</TestWrapper>
318317
</Grid>
319-
</Grid>
318+
</PageLayout>
320319
</Fragment>
321320
);
322321
};

0 commit comments

Comments
 (0)