File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ export default function IndexPage() {
9595 useEffect ( ( ) => {
9696 getClusters ( ) ;
9797 getSeedPeerClusters ( ) ;
98+ getSecGroups ( ) ;
9899 } , [ ] ) ;
99100
100101 const getSchedulers = async ( v : number ) => {
@@ -197,6 +198,12 @@ export default function IndexPage() {
197198
198199 // console.log(res);
199200 getSchedulerByClusterId ( res [ 0 ] . id , 1 ) ;
201+ res [ 0 ] . security_group_id = Number ( res [ 0 ] . security_group_id ) ;
202+ if ( res [ 0 ] . seed_peer_clusters . length > 0 ) {
203+ res [ 0 ] . seed_peer_cluster_id = res [ 0 ] . seed_peer_clusters [ 0 ] . id ;
204+ } else {
205+ res [ 0 ] . seed_peer_cluster_id = 0 ;
206+ }
200207 setClusters ( res ) ;
201208 }
202209 } ;
@@ -398,7 +405,11 @@ export default function IndexPage() {
398405 key : 'state' ,
399406 width : 120 ,
400407 render : ( v : string ) => {
401- return < Tag color = { v === 'active' ? 'green' : 'cyan' } > { v . toUpperCase ( ) || '-' } </ Tag > ;
408+ return (
409+ < Tag color = { v === 'active' ? 'green' : 'cyan' } >
410+ { v . toUpperCase ( ) || '-' }
411+ </ Tag >
412+ ) ;
402413 } ,
403414 } ,
404415 {
@@ -673,7 +684,7 @@ export default function IndexPage() {
673684 labelStyle = { {
674685 width : '140px' ,
675686 alignItems : 'center' ,
676- flex : '0 0 140px'
687+ flex : '0 0 140px' ,
677688 } }
678689 >
679690 { sub . parent ? (
@@ -886,6 +897,9 @@ export default function IndexPage() {
886897 >
887898 { formSchema . map ( ( sub : any ) => {
888899 const Content = comsKeys [ sub . type || 'input' ] ;
900+ if ( sub . type === 'select' ) {
901+ sub . props . options = formOps [ sub . key ] || [ ] ;
902+ }
889903 if ( sub . title ) {
890904 return < h3 > { sub . en_US } </ h3 > ;
891905 } else if ( ! sub . hide && sub . tab === '1' ) {
You can’t perform that action at this time.
0 commit comments