2 Commits

4 changed files with 1 additions and 141 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "sockeye", "name": "sockeye",
"version": "8.0.16", "version": "8.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",

View File

@@ -487,15 +487,6 @@ ServiceContractor = 5 */
route: "/ops-metrics", route: "/ops-metrics",
key: key++ key: key++
}); });
// //PROFILE
// //metrics rights
// sub.push({
// title: "ServerProfiler",
// icon: "$sockiBinoculars",
// route: "/ops-profile",
// key: key++
// });
} }
//NOTIFICATION CONFIG AND HISTORY //NOTIFICATION CONFIG AND HISTORY

View File

@@ -591,12 +591,6 @@ export default new Router({
component: () => component: () =>
import(/* webpackChunkName: "ops" */ "./views/ops-metrics.vue") import(/* webpackChunkName: "ops" */ "./views/ops-metrics.vue")
}, },
{
path: "/ops-profile",
name: "ops-profile",
component: () =>
import(/* webpackChunkName: "ops" */ "./views/ops-profile.vue")
},
{ {
path: "/ops-notify-queue", path: "/ops-notify-queue",
name: "ops-notify-queue", name: "ops-notify-queue",

View File

@@ -1,125 +0,0 @@
<template>
<v-row v-if="formState.ready" v-resize="onResize" dense>
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
<v-col cols="12">
<v-btn @click="refreshProfile">
<v-icon>$sockiSync</v-icon>
</v-btn>
</v-col>
<v-col cols="12">
<v-card elevation="4" data-cy="profileCard">
<v-card :height="cardHeight">
<iframe
id="profileFrame"
style="width:100%;height:100%"
:src="profileUrl()"
></iframe>
</v-card>
</v-card>
</v-col>
</v-row>
</template>
<script>
const FORM_KEY = "ops-profile";
export default {
data() {
return {
cardHeight: 300,
formState: {
ready: false,
loading: false,
errorBoxMessage: null,
appError: null,
serverError: {}
}
};
},
async created() {
const vm = this;
try {
await initForm(vm);
window.$gz.eventBus.$on("menu-click", clickHandler);
generateMenu(vm);
this.formState.ready = true;
} catch (err) {
vm.formState.ready = true;
window.$gz.errorHandler.handleFormError(err, vm);
}
},
beforeDestroy() {
window.$gz.eventBus.$off("menu-click", clickHandler);
},
methods: {
onResize() {
this.cardHeight = window.innerHeight * 0.8;
},
profileUrl() {
return (
window.$gz.api.ServerBaseUrl() +
"profiler/results-index?t=" +
this.$store.state.downloadToken
);
},
refreshProfile() {
const ifr = document.getElementById("profileFrame");
//trigger refresh? wtf? I don't know and at this point I'm not changing it in case it breaks something 2022-08-20
// eslint-disable-next-line no-self-assign
ifr.src = ifr.src;
}
}
};
//////////////////////
//
//
function generateMenu() {
const menuOptions = {
isMain: true,
icon: "$sockiBinoculars",
title: "ServerProfiler",
helpUrl: "ops-profile",
formData: {
sockType: window.$gz.type.ServerMetrics
},
menuItems: []
};
window.$gz.eventBus.$emit("menu-change", menuOptions);
}
/////////////////////////////
//
//
function clickHandler(menuItem) {
if (!menuItem) {
return;
}
const m = window.$gz.menu.parseMenuItem(menuItem);
if (m.owner == FORM_KEY && !m.disabled) {
switch (m.key) {
default:
window.$gz.eventBus.$emit(
"notify-warning",
FORM_KEY + "::context click: [" + m.key + "]"
);
}
}
}
/////////////////////////////////
//
//
async function initForm() {
await fetchTranslatedText();
}
//////////////////////////////////////////////////////////
//
// Ensures UI translated text is available
//
async function fetchTranslatedText() {
await window.$gz.translation.cacheTranslations(["ServerProfiler"]);
}
</script>