This commit is contained in:
@@ -14,10 +14,7 @@ todo: add shutdown server Client UI for new route in serverstate
|
||||
todo: Not licensed Client license page should start with trial evaluation expanded automatically
|
||||
|
||||
todo: contact link on server api host page should include dbid in link
|
||||
todo: Server page error when no license should guide to starting trial
|
||||
"E1020 - License key not found in database, running in unlicensed mode Only *the* SuperUser account can login to make changes"
|
||||
Maybe a link to the docs directly on evaluation start
|
||||
Or just say "Login as SuperUser to start evaluation / install license"
|
||||
|
||||
|
||||
|
||||
todo: NEW FRESH BUILD BEFORE PROCEEDING
|
||||
|
||||
@@ -411,6 +411,14 @@ export default new Router({
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "ops" */ "./views/ops-log.vue")
|
||||
},
|
||||
{
|
||||
path: "/ops-view-configuration",
|
||||
name: "ops-view-configuration",
|
||||
component: () =>
|
||||
import(
|
||||
/* webpackChunkName: "ops" */ "./views/ops-view-configuration.vue"
|
||||
)
|
||||
},
|
||||
|
||||
{
|
||||
path: "/ops-metrics",
|
||||
|
||||
187
ayanova/src/views/ops-view-configuration.vue
Normal file
187
ayanova/src/views/ops-view-configuration.vue
Normal file
@@ -0,0 +1,187 @@
|
||||
<template>
|
||||
<v-row v-if="this.formState.ready">
|
||||
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
||||
<v-col>
|
||||
<v-card>
|
||||
<div>
|
||||
<span class="ml-6 body-1">AYANOVA_DEFAULT_TRANSLATION: </span>
|
||||
<span class="body-2">{{ config.AYANOVA_DEFAULT_TRANSLATION }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-6 body-1">AYANOVA_DEFAULT_TRANSLATION: </span>
|
||||
<span class="body-2">{{ config.AYANOVA_DEFAULT_TRANSLATION }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-6 body-1">AYANOVA_DEFAULT_TRANSLATION: </span>
|
||||
<span class="body-2">{{ config.AYANOVA_DEFAULT_TRANSLATION }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-6 body-1">AYANOVA_DEFAULT_TRANSLATION: </span>
|
||||
<span class="body-2">{{ config.AYANOVA_DEFAULT_TRANSLATION }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-6 body-1">AYANOVA_DEFAULT_TRANSLATION: </span>
|
||||
<span class="body-2">{{ config.AYANOVA_DEFAULT_TRANSLATION }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-6 body-1">AYANOVA_DEFAULT_TRANSLATION: </span>
|
||||
<span class="body-2">{{ config.AYANOVA_DEFAULT_TRANSLATION }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-6 body-1">AYANOVA_DEFAULT_TRANSLATION: </span>
|
||||
<span class="body-2">{{ config.AYANOVA_DEFAULT_TRANSLATION }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-6 body-1">AYANOVA_DEFAULT_TRANSLATION: </span>
|
||||
<span class="body-2">{{ config.AYANOVA_DEFAULT_TRANSLATION }}</span>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="ml-6 body-1">AYANOVA_DEFAULT_TRANSLATION: </span>
|
||||
<span class="body-2">{{ config.AYANOVA_DEFAULT_TRANSLATION }}</span>
|
||||
</div>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/* Xeslint-disable */
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
const FORM_KEY = "ops-view-configuration";
|
||||
|
||||
export default {
|
||||
async created() {
|
||||
let vm = this;
|
||||
try {
|
||||
await initForm(vm);
|
||||
|
||||
vm.formState.ready = true;
|
||||
window.$gz.eventBus.$on("menu-click", clickHandler);
|
||||
generateMenu(vm);
|
||||
await vm.getDataFromApi();
|
||||
vm.formState.loading = false;
|
||||
} catch (err) {
|
||||
vm.formState.ready = true;
|
||||
window.$gz.errorHandler.handleFormError(err, vm);
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
config: {},
|
||||
formState: {
|
||||
ready: false,
|
||||
loading: true,
|
||||
errorBoxMessage: null,
|
||||
appError: null,
|
||||
serverError: {}
|
||||
}
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.$gz.eventBus.$off("menu-click", clickHandler);
|
||||
},
|
||||
methods: {
|
||||
async getDataFromApi() {
|
||||
let vm = this;
|
||||
vm.formState.loading = true;
|
||||
let url = "server-state/active-configuration";
|
||||
window.$gz.form.deleteAllErrorBoxErrors(vm);
|
||||
try {
|
||||
let res = await window.$gz.api.get(url);
|
||||
if (res.error) {
|
||||
vm.formState.serverError = res.error;
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
} else {
|
||||
vm.config = res.data;
|
||||
|
||||
//Update the form status
|
||||
window.$gz.form.setFormState({
|
||||
vm: vm,
|
||||
dirty: false,
|
||||
valid: true,
|
||||
loading: false
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
window.$gz.errorHandler.handleFormError(error, vm);
|
||||
} finally {
|
||||
window.$gz.form.setFormState({
|
||||
vm: vm,
|
||||
loading: false
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//////////////////////
|
||||
//
|
||||
//
|
||||
function generateMenu(vm) {
|
||||
let menuOptions = {
|
||||
isMain: true,
|
||||
icon: "fa-info-circle",
|
||||
title: "ViewServerConfiguration",
|
||||
helpUrl: "ops-config-environment-variables",
|
||||
menuItems: []
|
||||
};
|
||||
|
||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||
}
|
||||
|
||||
/////////////////////////////
|
||||
//
|
||||
//
|
||||
function clickHandler(menuItem) {
|
||||
if (!menuItem) {
|
||||
return;
|
||||
}
|
||||
let 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(vm) {
|
||||
await fetchTranslatedText(vm);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
//
|
||||
// Ensures UI translated text is available
|
||||
//
|
||||
async function fetchTranslatedText(vm) {
|
||||
await window.$gz.translation.cacheTranslations(["ViewServerConfiguration"]);
|
||||
}
|
||||
|
||||
/*
|
||||
AYANOVA_DEFAULT_TRANSLATION = ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION,
|
||||
AYANOVA_USE_URLS = ServerBootConfig.AYANOVA_USE_URLS,
|
||||
AYANOVA_DB_CONNECTION = ServerBootConfig.AYANOVA_DB_CONNECTION,
|
||||
AYANOVA_FOLDER_USER_FILES = ServerBootConfig.AYANOVA_FOLDER_USER_FILES,
|
||||
AYANOVA_FOLDER_BACKUP_FILES = ServerBootConfig.AYANOVA_FOLDER_BACKUP_FILES,
|
||||
AYANOVA_BACKUP_PG_DUMP_PATH = ServerBootConfig.AYANOVA_BACKUP_PG_DUMP_PATH,
|
||||
AYANOVA_LOG_PATH = ServerBootConfig.AYANOVA_LOG_PATH,
|
||||
AYANOVA_LOG_LEVEL = ServerBootConfig.AYANOVA_LOG_LEVEL,
|
||||
AYANOVA_LOG_ENABLE_LOGGER_DIAGNOSTIC_LOG = ServerBootConfig.AYANOVA_LOG_ENABLE_LOGGER_DIAGNOSTIC_LOG
|
||||
*/
|
||||
</script>
|
||||
Reference in New Issue
Block a user