@@ -18,10 +18,8 @@ import React, { useCallback, useEffect, useState } from "react";
18
18
import { createStyles , Theme , withStyles } from "@material-ui/core/styles" ;
19
19
import {
20
20
Button ,
21
- FormControlLabel ,
22
21
LinearProgress ,
23
22
Paper ,
24
- Switch ,
25
23
Table ,
26
24
TableBody ,
27
25
TableCell ,
@@ -30,10 +28,7 @@ import {
30
28
TableRow ,
31
29
} from "@material-ui/core" ;
32
30
import Grid from "@material-ui/core/Grid" ;
33
- import InputBoxWrapper from "../Common/FormComponents/InputBoxWrapper/InputBoxWrapper" ;
34
- import { RadioGroupSelector } from "../Common/FormComponents/RadioGroupSelector/RadioGroupSelector" ;
35
31
import { modalBasic } from "../Common/FormComponents/common/styleLibrary" ;
36
- import { IElementValue } from "../Configurations/types" ;
37
32
import { User } from "../Users/types" ;
38
33
import ModalWrapper from "../Common/ModalWrapper/ModalWrapper" ;
39
34
import { Policy , PolicyList } from "./types" ;
@@ -50,6 +45,9 @@ interface ISetPolicyProps {
50
45
const styles = ( theme : Theme ) =>
51
46
createStyles ( {
52
47
...modalBasic ,
48
+ buttonContainer : {
49
+ textAlign : "right" ,
50
+ } ,
53
51
} ) ;
54
52
55
53
const SetPolicy = ( {
@@ -59,23 +57,6 @@ const SetPolicy = ({
59
57
open,
60
58
} : ISetPolicyProps ) => {
61
59
//Local States
62
- const [ useConnectionString , setUseConnectionString ] = useState < boolean > (
63
- false
64
- ) ;
65
- const [ connectionString , setConnectionString ] = useState < string > ( "" ) ;
66
- const [ host , setHostname ] = useState < string > ( "" ) ;
67
- const [ dbName , setDbName ] = useState < string > ( "" ) ;
68
- const [ port , setPort ] = useState < string > ( "" ) ;
69
- const [ user , setUser ] = useState < string > ( "" ) ;
70
- const [ password , setPassword ] = useState < string > ( "" ) ;
71
- const [ sslMode , setSslMode ] = useState < string > ( "require" ) ;
72
-
73
- const [ table , setTable ] = useState < string > ( "" ) ;
74
- const [ format , setFormat ] = useState < string > ( "namespace" ) ;
75
- const [ queueDir , setQueueDir ] = useState < string > ( "" ) ;
76
- const [ queueLimit , setQueueLimit ] = useState < string > ( "" ) ;
77
- const [ comment , setComment ] = useState < string > ( "" ) ;
78
-
79
60
const [ records , setRecords ] = useState < Policy [ ] > ( [ ] ) ;
80
61
const [ loading , setLoading ] = useState < boolean > ( false ) ;
81
62
const [ error , setError ] = useState < string > ( "" ) ;
@@ -175,25 +156,24 @@ const SetPolicy = ({
175
156
</ Table >
176
157
</ TableContainer >
177
158
</ Grid >
178
- < Grid item xs = { 12 } className = { classes . buttonContainer } >
179
- < Button
180
- type = "submit"
181
- variant = "contained"
182
- color = "primary"
183
- size = { "small" }
184
- onClick = { ( ) => {
185
- closeModalAndRefresh ( ) ;
186
- } }
187
- >
188
- Cancel
189
- </ Button >
190
- </ Grid >
191
- { loading && (
192
- < Grid item xs = { 12 } >
193
- < LinearProgress />
194
- </ Grid >
195
- ) }
196
159
</ Grid >
160
+ < Grid item xs = { 12 } className = { classes . buttonContainer } >
161
+ < Button
162
+ type = "submit"
163
+ variant = "contained"
164
+ color = "primary"
165
+ onClick = { ( ) => {
166
+ closeModalAndRefresh ( ) ;
167
+ } }
168
+ >
169
+ Cancel
170
+ </ Button >
171
+ </ Grid >
172
+ { loading && (
173
+ < Grid item xs = { 12 } >
174
+ < LinearProgress />
175
+ </ Grid >
176
+ ) }
197
177
</ ModalWrapper >
198
178
) ;
199
179
} ;
0 commit comments