Skip to content

Commit 32c7363

Browse files
committed
adding EVPN Topology quick links
1 parent ed55e9c commit 32c7363

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

.DS_Store

0 Bytes
Binary file not shown.

src/angular/src/app/pages/api/manage/manage.component.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export class ApiManageComponent implements OnInit {
6565
const alarm_re = /https:\/\/(manage|integration)\.(?<host>[a-z0-1.]*(mist|mistsys)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]*)#!alerts\/?(?<scope>org|site)?\/?(?<uuid>[0-9a-z-]*)\/?(?<period>[0-9a-z]*)?\/?(?<start>[0-9]*)?\/?(?<stop>[0-9]*)?\/?(?<show_ack>true|false)?\/?(?<group>[a-z%0-9]*)?\/?(?<show_crit>true|false)?\/?(?<show_warn>true|false)?\/?(?<show_info>true|false)?\/?(?<site_id>[0-9a-z-]*)?/iys;
6666
const events_re = /https:\/\/(manage|integration)\.(?<host>[a-z0-1.]*(mist|mistsys)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]*)#!marvis\/?(?<scope>org|site)?\/?(?<period>[0-9a-z]*)?\/?(?<start>[0-9]*)?\/?(?<stop>[0-9]*)?\/?(?<site_id>[0-9a-z-]*)?/iys;
6767
const floorplans_re = /https:\/\/(manage|integration)\.(?<host>[a-z0-1.]*mist\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]*)#!cliLocation\/(?<detail>view|config|validationPath|wayfinding)?\/?(?<uuid>[0-9a-f-]*)\/?(floorplan|beaconsAndZones)?\/?(?<site_id>[0-9a-f-]*)?/iys;
68+
const evpn_re = /https:\/\/(manage|integration)\.(?<host>[a-z0-1.]*(mist|mistsys)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]*)#!evpn\/site\/?([0-9]\/)?(?<site_id>[0-9a-z_-]*)?(\/(?<topology_id>[0-9a-f-]*))?/yis;
6869
const site_common_re = /https:\/\/(manage|integration)\.(?<host>[a-z0-1.]*(mist|mistsys)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]*)#!(?<obj>[a-z]+)\/?((?<detail>detail|site|admin|edgedetail|clusterdetail|new|view)\/)?([0-9]\/)?((?<obj_id>[0-9a-z_-]*)\/)?(?<site_id>[0-9a-f-]*)?/yis;
6970
const site_common_objs = ["ap", "gateway", "switch", "assets", "wlan", "tags", "psk", "tunnels", "clients", "sdkclients", "wiredclients", "wxlan", "security", "switchconfig", "pcap"]
7071
const org_common_re = /https:\/\/(manage|integration)\.(?<host>[a-z0-1.]*(mist|mistsys)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]*)#!(?<obj>[a-z]+)\/?((?<detail>detail|site|admin|edgedetail|clusterdetail|new|view|template|rfTemplate)\/)?([0-9]\/)?((?<obj_id>[0-9a-z_-]*))/yis;
@@ -75,6 +76,7 @@ export class ApiManageComponent implements OnInit {
7576
const sle = sle_re.exec(this.tabUrl);
7677
const insights = insights_re.exec(this.tabUrl);
7778
const alarm = alarm_re.exec(this.tabUrl);
79+
const evpn = evpn_re.exec(this.tabUrl);
7880
const events = events_re.exec(this.tabUrl);
7981
const floorplans = floorplans_re.exec(this.tabUrl);
8082
const site_common = site_common_re.exec(this.tabUrl);
@@ -89,6 +91,8 @@ export class ApiManageComponent implements OnInit {
8991
this.insightsUrl(insights);
9092
} else if (alarm) {
9193
this.alarmUrl(alarm);
94+
} else if (evpn) {
95+
this.evpnUrl(evpn);
9296
} else if (events) {
9397
this.eventsUrl(events);
9498
} else if (floorplans) {
@@ -691,6 +695,27 @@ export class ApiManageComponent implements OnInit {
691695
}
692696
////////////////////////////////////////////////////////////////////////////////////
693697
////////////////////////////////////////////////////////////////////////////////////
698+
////////////////////// EVPN URL FUNCTION DISPATCHER
699+
evpnUrl(res: RegExpExecArray): void {
700+
this.org_id = res.groups.org_id;
701+
this.site_id = res.groups.site_id;
702+
let extra_params = "";
703+
if (res.groups.topology_id) {
704+
this.obj_id = res.groups.topology_id;
705+
this.quick_links.push({
706+
url: "https://api." + res.groups.host + "/api/v1/sites/" + this.site_id + "/evpn_topologies/" + this.obj_id,
707+
name: "EVPN Topology"
708+
})
709+
} else {
710+
this.quick_links.push({
711+
url: "https://api." + res.groups.host + "/api/v1/sites/" + this.site_id + "/evpn_topologies",
712+
name: "Site EVPN Topologies"
713+
})
714+
}
715+
716+
}
717+
////////////////////////////////////////////////////////////////////////////////////
718+
////////////////////////////////////////////////////////////////////////////////////
694719
////////////////////// EVENTS URL FUNCTION DISPATCHER
695720
eventsUrl(res: RegExpExecArray): void {
696721
this.org_id = res.groups.org_id;

0 commit comments

Comments
 (0)