18
18
import React , { ChangeEvent , useEffect , useState } from 'react' ;
19
19
import { LabIcon } from '@jupyterlab/ui-components' ;
20
20
import LeftArrowIcon from '../../style/icons/left_arrow_icon.svg' ;
21
- import 'semantic-ui-css/semantic.min.css' ;
22
21
import 'react-toastify/dist/ReactToastify.css' ;
23
- import { Input , Radio , Select } from 'semantic-ui-react' ;
24
22
import {
25
23
API_HEADER_BEARER ,
26
24
API_HEADER_CONTENT_TYPE ,
@@ -55,7 +53,10 @@ import { ClipLoader } from 'react-spinners';
55
53
import { toast } from 'react-toastify' ;
56
54
import ErrorPopup from '../utils/errorPopup' ;
57
55
import errorIcon from '../../style/icons/error_icon.svg' ;
58
- // import { set } from 'lib0/encoding';
56
+ import { Select } from '../controls/MuiWrappedSelect' ;
57
+ import { Input } from '../controls/MuiWrappedInput' ;
58
+ import { Radio } from '@mui/material' ;
59
+ // import { Dropdown } from '../controls/MuiWrappedDropdown';
59
60
60
61
type Project = {
61
62
projectId : string ;
@@ -556,9 +557,7 @@ function CreateBatch({
556
557
response
557
558
. json ( )
558
559
. then ( ( responseResult : { clusters : Cluster [ ] } ) => {
559
- let transformClusterListData = [ ] ;
560
-
561
- transformClusterListData = responseResult . clusters . filter (
560
+ let transformClusterListData = responseResult . clusters . filter (
562
561
( data : Cluster ) => {
563
562
if ( data . status . state === STATUS_RUNNING ) {
564
563
return {
@@ -568,11 +567,9 @@ function CreateBatch({
568
567
}
569
568
) ;
570
569
571
- const keyLabelStructure = transformClusterListData . map ( obj => ( {
572
- key : obj . clusterName ,
573
- value : obj . clusterName ,
574
- text : obj . clusterName
575
- } ) ) ;
570
+ const keyLabelStructure = transformClusterListData . map (
571
+ obj => obj . clusterName
572
+ ) ;
576
573
setClustersList ( keyLabelStructure ) ;
577
574
} )
578
575
. catch ( ( e : Error ) => {
@@ -746,13 +743,7 @@ function CreateBatch({
746
743
response
747
744
. json ( )
748
745
. then ( ( responseResult : { subnetworks : string [ ] } ) => {
749
- let transformedSubNetworkList = [ ] ;
750
- /*
751
- Extracting subnetworks from Network
752
- Example: "https://www.googleapis.com/compute/v1/projects/{projectName}/global/networks/subnetwork",
753
- */
754
-
755
- transformedSubNetworkList = responseResult . subnetworks . map (
746
+ let transformedSubNetworkList = responseResult . subnetworks . map (
756
747
( data : string ) => {
757
748
return {
758
749
subnetworks : data . split (
@@ -799,9 +790,7 @@ function CreateBatch({
799
790
response
800
791
. json ( )
801
792
. then ( ( responseResult : { services : Service [ ] } ) => {
802
- let transformClusterListData = [ ] ;
803
-
804
- transformClusterListData = responseResult . services . filter (
793
+ let transformClusterListData = responseResult . services . filter (
805
794
( data : Service ) => {
806
795
return {
807
796
name : data . name
@@ -843,8 +832,7 @@ function CreateBatch({
843
832
response
844
833
. json ( )
845
834
. then ( ( responseResult : { projects : Project [ ] } ) => {
846
- let transformedProjectList = [ ] ;
847
- transformedProjectList = responseResult . projects . map (
835
+ let transformedProjectList = responseResult . projects . map (
848
836
( data : Project ) => {
849
837
return {
850
838
value : data . projectId ,
@@ -881,8 +869,7 @@ function CreateBatch({
881
869
response
882
870
. json ( )
883
871
. then ( ( responseResult : { items : Region [ ] } ) => {
884
- let transformedRegionList = [ ] ;
885
- transformedRegionList = responseResult . items . map (
872
+ let transformedRegionList = responseResult . items . map (
886
873
( data : Region ) => {
887
874
return {
888
875
value : data . name ,
@@ -1196,8 +1183,8 @@ function CreateBatch({
1196
1183
setKeySelected ( data . value ) ;
1197
1184
} ;
1198
1185
1199
- const handleClusterSelected = ( event : any , data : any ) => {
1200
- setClusterSelected ( data . value ) ;
1186
+ const handleClusterSelected = ( event : any , value : any ) => {
1187
+ setClusterSelected ( value ) ;
1201
1188
} ;
1202
1189
const handleManualKeySelected = ( event : ChangeEvent < HTMLInputElement > ) => {
1203
1190
const inputValue = event . target . value ;
@@ -1292,6 +1279,7 @@ function CreateBatch({
1292
1279
< div >
1293
1280
< div className = "create-batch-radio" >
1294
1281
< Radio
1282
+ size = "small"
1295
1283
className = "select-batch-radio-style"
1296
1284
value = "mainClass"
1297
1285
checked = { selectedRadio === 'mainClass' }
@@ -1339,6 +1327,7 @@ function CreateBatch({
1339
1327
< div >
1340
1328
< div className = "create-batch-radio" >
1341
1329
< Radio
1330
+ size = "small"
1342
1331
className = "select-batch-radio-style"
1343
1332
value = "mainJarURI"
1344
1333
checked = { selectedRadio === 'mainJarURI' }
@@ -1833,6 +1822,7 @@ function CreateBatch({
1833
1822
< div >
1834
1823
< div className = "create-batch-radio" >
1835
1824
< Radio
1825
+ size = "small"
1836
1826
className = "select-batch-radio-style"
1837
1827
value = "googleManaged"
1838
1828
checked = { selectedEncryptionRadio === 'googleManaged' }
@@ -1849,6 +1839,7 @@ function CreateBatch({
1849
1839
< div >
1850
1840
< div className = "create-batch-radio" >
1851
1841
< Radio
1842
+ size = "small"
1852
1843
className = "select-batch-radio-style"
1853
1844
value = "googleManaged"
1854
1845
checked = { selectedEncryptionRadio === 'customerManaged' }
@@ -1876,6 +1867,7 @@ function CreateBatch({
1876
1867
< div >
1877
1868
< div className = "create-batch-encrypt" >
1878
1869
< Radio
1870
+ size = "small"
1879
1871
className = "select-batch-encrypt-radio-style"
1880
1872
value = "mainClass"
1881
1873
checked = { selectedRadioValue === 'key' }
@@ -1930,6 +1922,7 @@ function CreateBatch({
1930
1922
< div className = "manual-input" >
1931
1923
< div className = "encrypt" >
1932
1924
< Radio
1925
+ size = "small"
1933
1926
className = "select-batch-encrypt-radio-style "
1934
1927
value = "mainClass"
1935
1928
checked = { selectedRadioValue === 'manually' }
0 commit comments