Skip to content

Commit b524734

Browse files
committed
new QL
* new MDM QL from the NAC Identity Providers page * support for the new Live View page
1 parent f416c9b commit b524734

9 files changed

Lines changed: 82 additions & 26 deletions

File tree

.DS_Store

0 Bytes
Binary file not shown.

angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mist-extension",
3-
"version": "5.5.2",
3+
"version": "5.6.0",
44
"description": "Generated with @larscom/ng-mist-extension",
55
"scripts": {
66
"start": "npm run watch",

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

Lines changed: 54 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,17 @@ export class ApiManageComponent implements OnInit {
9292
const insights_re = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]{36})#!dashboard\/(?<detail>insights|insights-full-stack)\/((?<obj>[a-z]+)\/)?((?<obj_id>[a-z0-9-]+)\/)?((?<period>[a-z0-9]+)\/)?((?<start>[0-9]*)\/)?((?<stop>[0-9]*)\/)?(?<site_id>[0-9a-f-]{36})?/iys;
9393
const alarm_re = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]{36})#!alerts\/?(?<site_id>[0-9a-z-]*)\??(?<query_param>.*)?$/iys;
9494
const events_re = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]{36})#!marvis\/?(?<site_id>[0-9a-z-]*)\??(?<query_param>.*)?$/iys;
95-
const floorplans_re = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]{36})#!cliLocation\/(?<detail>view|config|validationPath|wayfinding)?\/?(?<uuid>[0-9a-f-]{36})\/?(floorplan|beaconsAndZones)?\/?(?<site_id>[0-9a-f-]{36})?/iys;
95+
const floorplans_re = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]{36})#!(cliLocation|liveView)\/(?<detail>view|config|validationPath|wayfinding)?\/?(?<uuid>[0-9a-f-]{36})\/?(floorplan|beaconsAndZones)?\/?(?<site_id>[0-9a-f-]{36})?/iys;
9696
const site_evpn_re = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]{36})#!evpn\/site\/?([0-9]\/)?(?<site_id>[0-9a-z_-]*)?(\/(?<topology_id>[0-9a-f-]{36}))?/yis;
9797
const site_wlan_template_re = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]{36})#!wlan\/orgWlanDetail\/(?<template_id>[0-9a-z_-]*)\/(?<wlan_id>[0-9a-f-]{36})\/(?<site_id>[0-9a-f-]{36})/is;
9898
const site_common_re = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]{36})#!(?<obj>[a-z]+)\/?((?<detail>detail|site|admin|edgedetail|clusterdetail|new|view|band|list)\/)?(?<inter>[0-9]*\/)?((?<obj_id>[0-9a-z_-]*)\/)?(?<site_id>[0-9a-f-]{36})?/yis;
9999
const site_common_objs = ["ap", "gateway", "switch", "assets", "wlan", "tags", "psk", "tunnels", "clients", "guestclients", "sdkclients", "wiredclients", "wxlan", "security", "switchconfig", "pcap", "siteedge", "cellularedges", "rrm"]
100100
const org_evpn_re = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]{36})#!evpn\/org(\/(?<topology_id>[0-9a-f-]{36}))?/yis;
101101
const org_inventory = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]{36})#!apinventory\/?(?<detail>aps|switches|wan_edges|mist_edges)?\/?(?<site_id>[0-9a-z_-]*)/yis;
102+
const org_identityProviders = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]{36})#!nacIdentityProviders(\/oauth\/(?<provider>[a-z]+)\/(?<obj_id>[0-9a-z_-]+))?/yis;
103+
const org_upgrade = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]{36})#!upgrade\/?(?<device_type>ap|switch|gateway|mxedge)?/yis;
102104
const org_common_re = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]{36})#!(?<obj>[a-zA-Z]+)\/?((?<detail>detail|site|admin|edgedetail|clusterdetail|new|view|template|rfTemplate|provider|nacportals|pskportals)\/)?([0-9]\/)?(?<obj_id>[0-9a-z_-]*)\??(?<query_params>[0-9a-z_=&-]*)?/yis;
103-
const org_common_objs = ["orgtags", "misttunnels", "templates", "switchtemplate", "gatewaytemplates", "hubs", "deviceprofiles", "org", "orgpsk", "configuration", "auditlogs", "adminconfig", "subscription", "edge", "vpns", "template", "rftemplates", "services", "networks", "applicationpolicy", "authpolicylabels", "naccertificates", "nacpolicy", "nacidentityproviders", "onboardingworkflow", "sdk", "premiumanalytics", "private5g", "securityevents", "nacclients", "nacendpoints", "sitetemplates"];
105+
const org_common_objs = ["orgtags", "misttunnels", "templates", "switchtemplate", "gatewaytemplates", "hubs", "deviceprofiles", "org", "orgpsk", "configuration", "auditlogs", "adminconfig", "subscription", "edge", "vpns", "template", "rftemplates", "services", "networks", "applicationpolicy", "authpolicylabels", "naccertificates", "nacpolicy", "onboardingworkflow", "sdk", "premiumanalytics", "private5g", "securityevents", "nacclients", "nacendpoints", "sitetemplates"];
104106
const base_re = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/admin\/\?org_id=(?<org_id>[0-9a-f-]{36})#!/yis;
105107
const msp_re = /https:\/\/(manage|integration|manage-staging)\.(?<host>[a-z0-9.]*(mist|mistsys|mist-federal)\.com)\/msp\/\?msp_id=(?<msp_id>[0-9a-f-]{36})#!(?<obj>orgs|admins|auditLogs|mspInfo|labels)\/?(?<detail>aiops|details|detail|invite)?\/?(?<obj_id>[0-9a-z_-]*)/yis;;
106108
var regexp_result;
@@ -129,8 +131,12 @@ export class ApiManageComponent implements OnInit {
129131
this.eventsUrl(regexp_result);
130132
} else if (regexp_result = org_inventory.exec(this.tabUrl)) {
131133
this.orgInventoryUrl(regexp_result);
134+
} else if (regexp_result = org_upgrade.exec(this.tabUrl)) {
135+
this.orgUpgradeUrl(regexp_result);
132136
} else if (regexp_result = floorplans_re.exec(this.tabUrl)) {
133137
this.floorplansUrl(regexp_result);
138+
} else if (regexp_result = org_identityProviders.exec(this.tabUrl)) {
139+
this.orgNacIdentityProvidersUrl(regexp_result);
134140
} else if ((regexp_result = site_common_re.exec(this.tabUrl)) && regexp_result["groups"] && site_common_objs.includes(regexp_result["groups"]["obj"].toLowerCase())) {
135141
this.commonSiteUrl(regexp_result);
136142
} else if ((regexp_result = org_common_re.exec(this.tabUrl)) && regexp_result["groups"] && org_common_objs.includes(regexp_result["groups"]["obj"].toLowerCase())) {
@@ -1013,10 +1019,10 @@ export class ApiManageComponent implements OnInit {
10131019
const url = "https://api." + res?.groups?.host + "/api/v1/orgs/" + this.org_id + "/inventory";
10141020
if (res?.groups?.host && this.org_id && this.site_id) {
10151021
this.quick_links.push({ url: url, name: "site inventory" });
1016-
this.quick_links.push({ url: url + "?site_id="+this.site_id+"&type=ap", name: "site aps inventory" });
1017-
this.quick_links.push({ url: url + "?site_id="+this.site_id+"&type=switch", name: "site switches inventory" });
1018-
this.quick_links.push({ url: url + "?site_id="+this.site_id+"&type=gateway", name: "site gateways inventory" });
1019-
} else if (res?.groups?.host && this.org_id){
1022+
this.quick_links.push({ url: url + "?site_id=" + this.site_id + "&type=ap", name: "site aps inventory" });
1023+
this.quick_links.push({ url: url + "?site_id=" + this.site_id + "&type=switch", name: "site switches inventory" });
1024+
this.quick_links.push({ url: url + "?site_id=" + this.site_id + "&type=gateway", name: "site gateways inventory" });
1025+
} else if (res?.groups?.host && this.org_id) {
10201026
this.quick_links.push({ url: url, name: "org inventory" });
10211027
this.quick_links.push({ url: url + "?type=ap", name: "org aps inventory" });
10221028
this.quick_links.push({ url: url + "?type=switch", name: "org switches inventory" });
@@ -1025,6 +1031,26 @@ export class ApiManageComponent implements OnInit {
10251031
}
10261032
}
10271033

1034+
1035+
1036+
orgNacIdentityProvidersUrl(res: RegExpExecArray): void {
1037+
res = this.process_query_params(res);
1038+
this.org_id = res?.groups?.org_id;
1039+
this.site_id = res?.groups?.site_id ? res?.groups?.site_id : null;
1040+
const url = "https://api." + res?.groups?.host + "/api/v1/orgs/" + this.org_id + "/inventory";
1041+
if (res?.groups?.host && this.org_id && res?.groups?.provider) {
1042+
this.quick_links.push({ url: "https://api." + res?.groups?.host + "/api/v1/orgs/" + this.org_id + "/setting/"+res?.groups?.provider+"/link_accounts", name: "NAC "+res?.groups?.provider+" MDM" });
1043+
} else if (res?.groups?.host && this.org_id) {
1044+
this.quick_links.push({ url: "https://api." + res?.groups?.host + "/api/v1/orgs/" + this.org_id + "/ssos", name: "NAC IDPS" });
1045+
this.quick_links.push({ url: "https://api." + res?.groups?.host + "/api/v1/orgs/" + this.org_id + "/setting/intune/link_accounts", name: "NAC INTUNE MDM" });
1046+
this.quick_links.push({ url: "https://api." + res?.groups?.host + "/api/v1/orgs/" + this.org_id + "/setting/jamf/link_accounts", name: "NAC JAMF MDM" });
1047+
this.quick_links.push({ url: "https://api." + res?.groups?.host + "/api/v1/orgs/" + this.org_id + "/setting/mobicontrol/link_accounts", name: "NAC MOBICONTROL MDM" });
1048+
this.quick_links.push({ url: "https://api." + res?.groups?.host + "/api/v1/orgs/" + this.org_id + "/setting/vmware/link_accounts", name: "NAC VMWARE MDM" });
1049+
}
1050+
}
1051+
1052+
1053+
10281054
commonOrgUrl(res: RegExpExecArray): void {
10291055
res = this.process_query_params(res);
10301056
this.org_id = res?.groups?.org_id;
@@ -1139,21 +1165,17 @@ export class ApiManageComponent implements OnInit {
11391165
this.forgeOrgObject("nacrules", res?.groups?.host, res?.groups?.detail);
11401166
this.forgeNacPolicies(res?.groups?.host);
11411167
break;
1142-
case "nacidentityproviders":
1143-
this.setName("NAC IDP", res?.groups?.detail);
1144-
this.forgeOrgNacIdp(res?.groups?.host);
1145-
break;
11461168
case "onboardingworkflow":
11471169
console.log(res?.groups)
11481170
switch (res?.groups?.detail) {
1149-
case "pskportals":
1150-
this.setName("Psk Portals", res?.groups?.detail);
1151-
this.quick_links.push({ url: "https://api." + res?.groups?.host + "/api/v1/orgs/" + this.org_id + "/pskportals", name: this.obj_name });
1152-
break;
11531171
case "nacportals":
1154-
this.setName("NAC Portals", res?.groups?.detail);
1172+
this.setName("NAC Portal", res?.groups?.detail);
11551173
this.quick_links.push({ url: "https://api." + res?.groups?.host + "/api/v1/orgs/" + this.org_id + "/nacportals", name: this.obj_name });
11561174
break;
1175+
default:
1176+
this.setName("Psk Portal", res?.groups?.detail);
1177+
this.quick_links.push({ url: "https://api." + res?.groups?.host + "/api/v1/orgs/" + this.org_id + "/pskportals", name: this.obj_name });
1178+
break;
11571179
}
11581180
break;
11591181
case "sdk":
@@ -1365,6 +1387,23 @@ export class ApiManageComponent implements OnInit {
13651387
})
13661388
}
13671389

1390+
////////////////////////////////////////////////////////////////////////////////////
1391+
////////////////////////////////////////////////////////////////////////////////////
1392+
////////////////////// EVENTS URL FUNCTION DISPATCHER
1393+
orgUpgradeUrl(res: RegExpExecArray): void {
1394+
this.org_id = res?.groups?.org_id;
1395+
var device_type = "ap";
1396+
if (res?.groups?.device_type) device_type = res?.groups?.device_type;
1397+
this.quick_links.push({
1398+
url: "https://api." + res?.groups?.host + "/api/v1/orgs/" + this.org_id + "/devices/upgrade?device_type="+device_type+"&duration=30d",
1399+
name: device_type+ " Upgrades"
1400+
})
1401+
this.quick_links.push({
1402+
url: "https://api." + res?.groups?.host + "/api/v1/orgs/" + this.org_id + "/devices/versions?type="+device_type,
1403+
name: device_type+ " Versions"
1404+
})
1405+
}
1406+
13681407
////////////////////////////////////////////////////////////////////////////////////
13691408
////////////////////////////////////////////////////////////////////////////////////
13701409
////////////////////// EVENTS URL FUNCTION DISPATCHER

angular/src/assets/api.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

angular/src/manifest.json

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,23 @@
22
"manifest_version": 3,
33
"name": "Mist Extension",
44
"short_name": "mist-extension",
5-
"version": "5.5.2",
5+
"version": "5.6.0",
66
"description": "Web Browser Extension for Mist Developers to provide easier access to Mist APIs",
77
"icons": {
88
"16": "assets/favicon-16x16.png",
99
"48": "assets/favicon-48x48.png",
1010
"128": "assets/favicon-128x128.png"
1111
},
12+
"browser_specific_settings": {
13+
"gecko": {
14+
"id": "{46f824d5-3c9d-468e-950f-cd2448e488d5}",
15+
"data_collection_permissions": {
16+
"required": [
17+
"none"
18+
]
19+
}
20+
}
21+
},
1222
"action": {
1323
"default_popup": "index.html?#/popup",
1424
"default_title": "Mist Extension"
@@ -30,7 +40,9 @@
3040
}
3141
],
3242
"background": {
33-
"service_worker": "assets/js/serviceWorker.js"
43+
"scripts": [
44+
"assets/js/serviceWorker.js"
45+
]
3446
},
3547
"content_security_policy": {
3648
"extension_pages": "script-src 'self'; object-src 'self'"
@@ -46,4 +58,4 @@
4658
"https://*.mist-federal.com/*",
4759
"https://*.ai.juniper.net/*"
4860
]
49-
}
61+
}

angular/src/manifest_chrome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33
"name": "Mist Extension",
44
"short_name": "mist-extension",
5-
"version": "5.5.2",
5+
"version": "5.6.0",
66
"description": "Web Browser Extension for Mist Developers to provide easier access to Mist APIs",
77
"icons": {
88
"16": "assets/favicon-16x16.png",

angular/src/manifest_ffx.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33
"name": "Mist Extension",
44
"short_name": "mist-extension",
5-
"version": "5.5.2",
5+
"version": "5.6.0",
66
"description": "Web Browser Extension for Mist Developers to provide easier access to Mist APIs",
77
"icons": {
88
"16": "assets/favicon-16x16.png",
@@ -11,7 +11,12 @@
1111
},
1212
"browser_specific_settings": {
1313
"gecko": {
14-
"id": "{46f824d5-3c9d-468e-950f-cd2448e488d5}"
14+
"id": "{46f824d5-3c9d-468e-950f-cd2448e488d5}",
15+
"data_collection_permissions": {
16+
"required": [
17+
"none"
18+
]
19+
}
1520
}
1621
},
1722
"action": {
@@ -53,4 +58,4 @@
5358
"https://*.mist-federal.com/*",
5459
"https://*.ai.juniper.net/*"
5560
]
56-
}
61+
}

api.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)