@@ -46,6 +46,7 @@ import CheckboxWrapper from "../Common/FormComponents/CheckboxWrapper/CheckboxWr
4646import PageHeader from "../Common/PageHeader/PageHeader" ;
4747import api from "../../../common/api" ;
4848import BackLink from "../../../common/BackLink" ;
49+ import PageLayout from "../Common/Layout/PageLayout" ;
4950
5051const 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 {
93118const 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} ;
0 commit comments