This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<v-row v-if="formState.ready" align="start" justify="center">
|
||||
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
|
||||
<v-col cols="12" md="7">
|
||||
<v-card data-cy="configCard">
|
||||
<v-card id="ayaNovaConfigCard" data-cy="configCard">
|
||||
<v-subheader>AyaNova server settings</v-subheader>
|
||||
<v-list two-line>
|
||||
<v-list-item>
|
||||
@@ -201,13 +201,20 @@ export default {
|
||||
//////////////////////
|
||||
//
|
||||
//
|
||||
function generateMenu() {
|
||||
function generateMenu(vm) {
|
||||
const menuOptions = {
|
||||
isMain: true,
|
||||
icon: "$ayiInfoCircle",
|
||||
title: "ViewServerConfiguration",
|
||||
helpUrl: "ops-server-information",
|
||||
menuItems: []
|
||||
menuItems: [
|
||||
{
|
||||
title: "CopyToClipboard",
|
||||
icon: "$ayiCopy",
|
||||
key: `${FORM_KEY}:copyinfo`,
|
||||
vm: vm
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||
@@ -223,6 +230,19 @@ function clickHandler(menuItem) {
|
||||
const m = window.$gz.menu.parseMenuItem(menuItem);
|
||||
if (m.owner == FORM_KEY && !m.disabled) {
|
||||
switch (m.key) {
|
||||
case "copyinfo":
|
||||
//put the info on the clipboard:
|
||||
{
|
||||
const element = document.getElementById("ayaNovaConfigCard");
|
||||
const text = element.innerText || element.textContent;
|
||||
window.$gz.util.copyToClipboard(text);
|
||||
// let logText = "";
|
||||
// m.vm.$store.state.logArray.forEach(function appendLogItem(value) {
|
||||
// logText += value + "\n";
|
||||
// });
|
||||
//window.$gz.util.copyToClipboard(text + "\nCLIENT LOG\n" + logText);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
window.$gz.eventBus.$emit(
|
||||
"notify-warning",
|
||||
|
||||
Reference in New Issue
Block a user