From 84ec09a2b2365393c5621bf7cca1420b6c535a92 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 1 Jun 2020 17:46:53 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 4 +--- ayanova/src/api/gzapi.js | 7 +++++++ ayanova/src/api/initialize.js | 8 ++++++++ ayanova/src/router.js | 6 ++++++ ayanova/src/views/ops-log.vue | 5 ----- ayanova/src/views/ops-metrics.vue | 15 +++++++++++---- 6 files changed, 33 insertions(+), 12 deletions(-) diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 2cfcbb78..554fa6eb 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -64,9 +64,7 @@ todo: Profiling https://github.com/MiniProfiler/dotnet/tree/master/src/MiniProfiler.Shared/ui Full profiling view: - Add a role check in startup on auth for full view - Add a switch to turn off profiling or turn it on - ideally somehow do it from within a route so can turn it on and off dynamically + Add a filter to filter out anything auth related so no one can see that, i.e. filter out Authenticate routes where JWT is visible in query Add a link in UI for profiler, maybe host inside a frame or something (actually this might help with the auth dl token as well) diff --git a/ayanova/src/api/gzapi.js b/ayanova/src/api/gzapi.js index b0872a3f..65aef434 100644 --- a/ayanova/src/api/gzapi.js +++ b/ayanova/src/api/gzapi.js @@ -272,6 +272,13 @@ export default { return window.$gz.store.state.apiUrl + apiPath; }, ///////////////////////////// + // Just the server itself + // used by profiler etc + // + ServerBaseUrl() { + return window.$gz.store.state.helpUrl.replace("/docs/", "/"); + }, + ///////////////////////////// // backup file download URL // backupDownloadUrl(fileName) { diff --git a/ayanova/src/api/initialize.js b/ayanova/src/api/initialize.js index 46b9d41a..be581029 100644 --- a/ayanova/src/api/initialize.js +++ b/ayanova/src/api/initialize.js @@ -656,6 +656,14 @@ export default function initialize() { key: key++ }); + //PROFILE + sub.push({ + title: t("ServerProfile"), + icon: "fa-binoculars", + route: "/ops-profile", + key: key++ + }); + //NOTIFICATION CONFIG AND HISTORY sub.push({ title: t("NotificationSettings"), diff --git a/ayanova/src/router.js b/ayanova/src/router.js index e67c75fe..826da0cf 100644 --- a/ayanova/src/router.js +++ b/ayanova/src/router.js @@ -373,6 +373,12 @@ export default new Router({ component: () => import(/* webpackChunkName: "ops" */ "./views/ops-metrics.vue") }, + { + path: "/ops-profile", + name: "ops-profile", + component: () => + import(/* webpackChunkName: "ops" */ "./views/ops-profile.vue") + }, { path: "/ops-notification-settings", diff --git a/ayanova/src/views/ops-log.vue b/ayanova/src/views/ops-log.vue index 14c783a2..e0173b4f 100644 --- a/ayanova/src/views/ops-log.vue +++ b/ayanova/src/views/ops-log.vue @@ -24,11 +24,6 @@ >
{{ log }}
- diff --git a/ayanova/src/views/ops-metrics.vue b/ayanova/src/views/ops-metrics.vue index 820b6d57..4657e341 100644 --- a/ayanova/src/views/ops-metrics.vue +++ b/ayanova/src/views/ops-metrics.vue @@ -11,9 +11,6 @@ @click:append-outer="getDataFromApi" @input="timePeriodChanged" > - @@ -22,7 +19,9 @@ storage cpu & memory - {{ routes }} + + @@ -275,6 +274,14 @@ export default { } }, computed: { + profileUrl() { + // "http://localhost:7575/profiler/results-index?t=l47NWWuZo89MU1GuHV/tYY0d2xwsFrY/K5MZb1zTTvY"; + return ( + window.$gz.api.ServerBaseUrl() + + "profiler/results-index?t=" + + this.$store.state.downloadToken + ); + }, cpuChartData() { return { datasets: [