@@ -97,7 +97,7 @@ export class ApiManageComponent implements OnInit {
9797 const site_common_objs = [ "ap" , "gateway" , "switch" , "assets" , "wlan" , "tags" , "psk" , "tunnels" , "clients" , "guestclients" , "sdkclients" , "wiredclients" , "wxlan" , "security" , "switchconfig" , "pcap" , "siteedge" , "cellularedges" ]
9898 const org_evpn_re = / h t t p s : \/ \/ ( m a n a g e | i n t e g r a t i o n | m a n a g e - s t a g i n g ) \. (?< host > [ a - z 0 - 9 . ] * ( m i s t | m i s t s y s | m i s t - f e d e r a l ) \. c o m ) \/ a d m i n \/ \? o r g _ i d = (?< org_id > [ 0 - 9 a - f - ] { 36 } ) # ! e v p n \/ o r g ( \/ (?< topology_id > [ 0 - 9 a - f - ] { 36 } ) ) ? / yis;
9999 const org_common_re = / h t t p s : \/ \/ ( m a n a g e | i n t e g r a t i o n | m a n a g e - s t a g i n g ) \. (?< host > [ a - z 0 - 9 . ] * ( m i s t | m i s t s y s | m i s t - f e d e r a l ) \. c o m ) \/ a d m i n \/ \? o r g _ i d = (?< org_id > [ 0 - 9 a - f - ] { 36 } ) # ! (?< obj > [ a - z A - Z ] + ) \/ ? ( (?< detail > d e t a i l | s i t e | a d m i n | e d g e d e t a i l | c l u s t e r d e t a i l | n e w | v i e w | t e m p l a t e | r f T e m p l a t e | p r o v i d e r ) \/ ) ? ( [ 0 - 9 ] \/ ) ? (?< obj_id > [ 0 - 9 a - z _ - ] * ) \? ? (?< query_params > [ 0 - 9 a - z _ = & - ] * ) ? / yis;
100- const org_common_objs = [ "orgtags" , "misttunnels" , "templates" , "switchtemplate" , "gatewaytemplates" , "hubs" , "deviceprofiles" , "org" , "orgpsk" , "configuration" , "auditlogs" , "apinventory" , "adminconfig" , "subscription" , "edge" , "vpns" , "template" , "rftemplates" , "services" , "networks" , "applicationpolicy" , "authpolicylabels" , "naccertificates" , "nacpolicy" , "nacidentityproviders" , "onboardingworkflow" , "sdk" , "premiumanalytics" , "private5g" , "securityevents" , "nacclients" , "nacendpoints" ] ;
100+ const org_common_objs = [ "orgtags" , "misttunnels" , "templates" , "switchtemplate" , "gatewaytemplates" , "hubs" , "deviceprofiles" , "org" , "orgpsk" , "configuration" , "auditlogs" , "apinventory" , "adminconfig" , "subscription" , "edge" , "vpns" , "template" , "rftemplates" , "services" , "networks" , "applicationpolicy" , "authpolicylabels" , "naccertificates" , "nacpolicy" , "nacidentityproviders" , "onboardingworkflow" , "sdk" , "premiumanalytics" , "private5g" , "securityevents" , "nacclients" , "nacendpoints" , "sitetemplates" ] ;
101101 const base_re = / h t t p s : \/ \/ ( m a n a g e | i n t e g r a t i o n | m a n a g e - s t a g i n g ) \. (?< host > [ a - z 0 - 9 . ] * ( m i s t | m i s t s y s | m i s t - f e d e r a l ) \. c o m ) \/ a d m i n \/ \? o r g _ i d = (?< org_id > [ 0 - 9 a - f - ] { 36 } ) # ! / yis;
102102 const msp_re = / h t t p s : \/ \/ ( m a n a g e | i n t e g r a t i o n | m a n a g e - s t a g i n g ) \. (?< host > [ a - z 0 - 9 . ] * ( m i s t | m i s t s y s | m i s t - f e d e r a l ) \. c o m ) \/ m s p \/ \? m s p _ i d = (?< msp_id > [ 0 - 9 a - f - ] { 36 } ) # ! (?< obj > o r g s | a d m i n s | a u d i t L o g s | m s p I n f o | l a b e l s ) \/ ? (?< detail > a i o p s | d e t a i l s | d e t a i l | i n v i t e ) ? \/ ? (?< obj_id > [ 0 - 9 a - z _ - ] * ) / yis; ;
103103 var regexp_result ;
@@ -173,7 +173,7 @@ export class ApiManageComponent implements OnInit {
173173 if ( ! ui_name ) {
174174 ui_name = this . obj_name ;
175175 }
176- if ( detail && detail != "new" ) {
176+ if ( detail && detail != "new" || this . obj_id ) {
177177 // set QUICK LINK
178178 url = "https://api." + host + "/api/v1/orgs/" + this . org_id + "/" + obj_name + "/" + this . obj_id ;
179179 this . quick_links . push ( { url : url , name : ui_name } ) ;
@@ -199,11 +199,17 @@ export class ApiManageComponent implements OnInit {
199199
200200 forgeOrgObjectEvents ( obj_name : string , host : string , detail : string , extra_param : string | undefined = undefined ) : void {
201201 let url = "" ;
202+ let filter = "" ;
202203 if ( detail && detail != "new" && this . obj_id ) {
203204 // MAC
204205 const mac = this . getMac ( this . obj_id ) ;
206+ if ( obj_name == "mxedges" ) {
207+ filter = "mxedge_id=00000000-0000-0000-1000-" + mac ;
208+ } else {
209+ filter = "mac" + mac ;
210+ }
205211 // set QUICK LINK
206- url = "https://api." + host + "/api/v1/orgs/" + this . org_id + "/" + obj_name + "/events/search?limit=1000&mac= " + mac ;
212+ url = "https://api." + host + "/api/v1/orgs/" + this . org_id + "/" + obj_name + "/events/search?limit=1000&" + filter ;
207213 if ( ! extra_param ) {
208214 url += "&duration=1d" ;
209215 } else {
@@ -538,7 +544,7 @@ export class ApiManageComponent implements OnInit {
538544 this . obj_name = "mxedge" ;
539545 this . forgeOrgObject ( "mxedges" , host , detail ) ;
540546 this . forgeOrgObjectStats ( "mxedges" , host , detail ) ;
541- this . forgeSiteObjectEvents ( "mxedges" , "mxedge ", host , detail ) ;
547+ this . forgeOrgObjectEvents ( "mxedges" , host , detail ) ;
542548 } else if ( detail == "clusterdetail" ) {
543549 this . obj_name = "mxcluster" ;
544550 this . forgeOrgObject ( "mxclusters" , host , detail ) ;
@@ -823,6 +829,7 @@ export class ApiManageComponent implements OnInit {
823829 if ( this . missing_fields . length == 0 ) {
824830 this . forgeSiteObject ( "mxedges" , res ?. groups ?. host , res ?. groups ?. detail ) ;
825831 this . forgeSiteObjectStats ( "mxedges" , res ?. groups ?. host , res ?. groups ?. detail ) ;
832+ this . forgeSiteObjectEvents ( "mxedges" , "mxedge" , res ?. groups ?. host , res ?. groups ?. detail ) ;
826833 }
827834 break ;
828835 case "tunnels" :
@@ -1000,6 +1007,7 @@ export class ApiManageComponent implements OnInit {
10001007 this . forgeOrgObject ( "licenses" , res ?. groups ?. host , res ?. groups ?. detail ) ;
10011008 break ;
10021009 case "edge" :
1010+ console . log ( res ?. groups )
10031011 this . setName ( "mxedge" , res ?. groups ?. detail ) ;
10041012 this . forgeEdge ( res ?. groups ?. host , res ?. groups ?. detail )
10051013 break ;
@@ -1017,7 +1025,9 @@ export class ApiManageComponent implements OnInit {
10171025 case "deviceprofiles" :
10181026 case "gatewaytemplates" :
10191027 case "networks" :
1020- this . setName ( res ?. groups ?. obj . substr ( 0 , res ?. groups ?. obj . length - 1 ) , res ?. groups ?. detail ) ;
1028+ case "sitetemplates" :
1029+ // TODO: fix name when detail/obj_id
1030+ this . setName ( res ?. groups ?. obj . substring ( 0 , res ?. groups ?. obj . length - 1 ) , res ?. groups ?. detail ) ;
10211031 this . forgeOrgObject ( res ?. groups ?. obj . toLowerCase ( ) , res ?. groups ?. host , res ?. groups ?. detail ) ;
10221032 break ;
10231033 case "applicationpolicy" :
0 commit comments