@@ -873,6 +873,54 @@ export default {
873873 }
874874 ]
875875 } ,
876+ {
877+ name : 'asnumbers' ,
878+ title : 'label.asnumbers' ,
879+ icon : 'partition-outlined' ,
880+ permission : [ 'listASNumbers' ] ,
881+ show : ( ) => {
882+ if ( ! store . getters . zones || store . getters . zones . length === 0 ) {
883+ return false
884+ }
885+ const AdvancedZonesWithRoutedmode = store . getters . zones . filter ( zone => zone . routedmodeenabled )
886+ if ( isAdmin ( ) && ( AdvancedZonesWithRoutedmode && AdvancedZonesWithRoutedmode . length > 0 ) ) {
887+ return true
888+ }
889+ return false
890+ } ,
891+ filters : [ 'all' , 'allocatedonly' , 'free' ] ,
892+ columns : [ 'asnumber' , 'allocationstate' , 'asnrange' , 'associatednetworkname' , 'vpcname' , 'allocated' , 'account' , 'domain' , 'zonename' ] ,
893+ searchFilters : [ 'zoneid' , 'associatednetworkid' , 'account' , 'domainid' ] ,
894+ resourceType : 'ASNumber' ,
895+ actions : [
896+ {
897+ api : 'releaseASNumber' ,
898+ icon : 'delete-outlined' ,
899+ label : 'label.action.release.asnumber' ,
900+ message : 'message.action.release.asnumber' ,
901+ show : ( record ) => { return record . allocationstate === 'Allocated' } ,
902+ args : [ 'zoneid' , 'asnumber' ] ,
903+ mapping : {
904+ zoneid : {
905+ value : ( record ) => { return record . zoneid }
906+ } ,
907+ asnumber : {
908+ value : ( record ) => { return record . asnumber }
909+ }
910+ } ,
911+ dataView : true ,
912+ groupAction : true ,
913+ popup : true ,
914+ groupShow : ( selectedItems , storegetters ) => {
915+ return selectedItems . length === 1 && selectedItems [ 0 ] . allocationstate === 'Allocated'
916+ } ,
917+ groupMap : ( selectedId , values , records ) => {
918+ const record = records . filter ( x => { return x . id === selectedId [ 0 ] } )
919+ return record
920+ }
921+ }
922+ ]
923+ } ,
876924 {
877925 name : 'privategw' ,
878926 title : 'label.private.gateway' ,
0 commit comments