Skip to content

Commit

Permalink
adding access logs quick link
Browse files Browse the repository at this point in the history
  • Loading branch information
tmunzer committed Nov 21, 2024
1 parent 2652651 commit 3b20022
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mist-extension",
"version": "4.2.3",
"version": "4.2.4",
"description": "Generated with @larscom/ng-mist-extension",
"scripts": {
"start": "npm run watch",
Expand Down
12 changes: 8 additions & 4 deletions angular/src/app/pages/api/manage/manage.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,21 @@ export class ApiManageComponent implements OnInit {

////////////////////////////////////////////////////////////////////////////////////
////////////////////// COMMON ORG FUNCTIONS
forgeOrgObject(obj_name: string, host: string, detail: string | undefined, extra_param: string | undefined = undefined): void {
forgeOrgObject(obj_name: string, host: string, detail: string | undefined, extra_param: string | undefined = undefined, ui_name:string|undefined=undefined): void {
let url = "";
if (!ui_name){
ui_name = this.obj_name;
}
if (detail && detail != "new") {
// set QUICK LINK
url = "https://api." + host + "/api/v1/orgs/" + this.org_id + "/" + obj_name + "/" + this.obj_id;
this.quick_links.push({ url: url, name: this.obj_name });
this.quick_links.push({ url: url, name: ui_name });
} else {
// set QUICK LINK
this.obj_id = undefined;
url = "https://api." + host + "/api/v1/orgs/" + this.org_id + "/" + obj_name;
if (extra_param) url += "?" + extra_param;
this.quick_links.push({ url: url, name: this.obj_name });
this.quick_links.push({ url: url, name: ui_name });
}
}

Expand Down Expand Up @@ -931,7 +934,8 @@ export class ApiManageComponent implements OnInit {
break;
case "auditlogs":
this.setName(res?.groups?.obj.substr(0, res?.groups?.obj.length - 1), res?.groups?.detail);
this.forgeOrgObject("logs", res?.groups?.host, res?.groups?.detail);
this.forgeOrgObject("logs", res?.groups?.host, res?.groups?.detail, undefined, "audit logs");
this.forgeOrgObject("logs", res?.groups?.host, res?.groups?.detail, "message=\"accessed%20org%20\"", "access logs");
break;
case "apinventory":
this.obj_name = "inventory";
Expand Down
2 changes: 1 addition & 1 deletion angular/src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Mist Extension",
"short_name": "mist-extension",
"version": "4.2.3",
"version": "4.2.4",
"description": "Web Browser Extension for Mist Developpers to provide easier access to Mist APIs",
"icons": {
"16": "assets/favicon-16x16.png",
Expand Down
2 changes: 1 addition & 1 deletion angular/src/manifest_chrome.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Mist Extension",
"short_name": "mist-extension",
"version": "4.2.3",
"version": "4.2.4",
"description": "Web Browser Extension for Mist Developpers to provide easier access to Mist APIs",
"icons": {
"16": "assets/favicon-16x16.png",
Expand Down
2 changes: 1 addition & 1 deletion angular/src/manifest_ffx.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Mist Extension",
"short_name": "mist-extension",
"version": "4.2.3",
"version": "4.2.4",
"description": "Web Browser Extension for Mist Developpers to provide easier access to Mist APIs",
"icons": {
"16": "assets/favicon-16x16.png",
Expand Down

0 comments on commit 3b20022

Please sign in to comment.