Compare commits
21 Commits
net10-port
...
8.1.3
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a6d8eff6f | |||
| 8f6428467c | |||
| cb7f79342d | |||
| d28588dca9 | |||
| 91cb511d6f | |||
| ac23f1f264 | |||
| d286650eaa | |||
| d1813f6d63 | |||
| 15c2b157df | |||
| 45310dd76e | |||
| 1188829841 | |||
| 0aaf5a2ca6 | |||
| 6192821a33 | |||
| 9f300a65ff | |||
| cb8d6da832 | |||
| 64d8f62e5e | |||
| a48b82f6ec | |||
| 683afce49b | |||
| 97f5b37e0a | |||
| 35dfd669d9 | |||
| 259a2ee832 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sockeye",
|
"name": "sockeye",
|
||||||
"version": "8.1.0",
|
"version": "8.1.3",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
|
|||||||
@@ -242,6 +242,7 @@ import gznotify from "./components/gznotify";
|
|||||||
import openObjectHandler from "./api/open-object-handler";
|
import openObjectHandler from "./api/open-object-handler";
|
||||||
import notifyPoll from "./api/notifypoll";
|
import notifyPoll from "./api/notifypoll";
|
||||||
import { processLogout } from "./api/authutil";
|
import { processLogout } from "./api/authutil";
|
||||||
|
import insertDateShortcut from "./api/insert-date-shortcut";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
gzconfirm,
|
gzconfirm,
|
||||||
@@ -310,10 +311,12 @@ export default {
|
|||||||
window.$gz.dialog.wireUpEventHandlers(this);
|
window.$gz.dialog.wireUpEventHandlers(this);
|
||||||
openObjectHandler.wireUpEventHandlers(this);
|
openObjectHandler.wireUpEventHandlers(this);
|
||||||
window.$gz.translation.setVuetifyDefaultLanguageElements(this);
|
window.$gz.translation.setVuetifyDefaultLanguageElements(this);
|
||||||
|
insertDateShortcut.wireUp();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
//UNWIRE ALL EVENT HANDLERS FROM GZEVENTBUS
|
//UNWIRE ALL EVENT HANDLERS FROM GZEVENTBUS
|
||||||
window.$gz.eventBus.$off();
|
window.$gz.eventBus.$off();
|
||||||
|
insertDateShortcut.unwire();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const vm = this;
|
const vm = this;
|
||||||
|
|||||||
67
src/api/insert-date-shortcut.js
Normal file
67
src/api/insert-date-shortcut.js
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
// case 4756: keyboard shortcut to insert today's date in any text field
|
||||||
|
// Ctrl+; inserts "2026-10-26 - "
|
||||||
|
// Ctrl+Shift+; inserts "2026-10-26 14:30 - "
|
||||||
|
// at the cursor (replacing any selected text) of the text box being typed in, on the browser's clock
|
||||||
|
// (same keys as Excel and Google Sheets)
|
||||||
|
//
|
||||||
|
function pad(n) {
|
||||||
|
return n < 10 ? "0" + n : "" + n;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function dateText(now, withTime) {
|
||||||
|
let text = `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(
|
||||||
|
now.getDate()
|
||||||
|
)}`;
|
||||||
|
if (withTime) {
|
||||||
|
text += ` ${pad(now.getHours())}:${pad(now.getMinutes())}`;
|
||||||
|
}
|
||||||
|
return text + " - ";
|
||||||
|
}
|
||||||
|
|
||||||
|
function isPlainTextField(el) {
|
||||||
|
if (!el || el.readOnly || el.disabled) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//the report editor (Monaco) has its own keyboard handling
|
||||||
|
if (el.closest && el.closest(".monaco-editor")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (el.tagName === "TEXTAREA") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return (
|
||||||
|
el.tagName === "INPUT" &&
|
||||||
|
["text", "search", ""].includes(
|
||||||
|
(el.getAttribute("type") || "").toLowerCase()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function handleKeydown(e) {
|
||||||
|
if (!e.ctrlKey || e.altKey || e.metaKey || e.code !== "Semicolon") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const el = document.activeElement;
|
||||||
|
if (!isPlainTextField(el)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
e.preventDefault();
|
||||||
|
el.setRangeText(
|
||||||
|
dateText(new Date(), e.shiftKey),
|
||||||
|
el.selectionStart,
|
||||||
|
el.selectionEnd,
|
||||||
|
"end"
|
||||||
|
);
|
||||||
|
//let Vue's v-model see the change, as typing would
|
||||||
|
el.dispatchEvent(new Event("input", { bubbles: true }));
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {
|
||||||
|
wireUp() {
|
||||||
|
document.addEventListener("keydown", handleKeydown);
|
||||||
|
},
|
||||||
|
unwire() {
|
||||||
|
document.removeEventListener("keydown", handleKeydown);
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -37,7 +37,7 @@ export default {
|
|||||||
// Get users default time zone
|
// Get users default time zone
|
||||||
// first check if overriden in useroptions
|
// first check if overriden in useroptions
|
||||||
// if not then use browsers own setting
|
// if not then use browsers own setting
|
||||||
// if that is empty then final default of "America/New_York"
|
// if the browser can't name its time zone then its current offset from UTC
|
||||||
//https://www.iana.org/time-zones
|
//https://www.iana.org/time-zones
|
||||||
//https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
//https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||||
getResolvedTimeZoneName() {
|
getResolvedTimeZoneName() {
|
||||||
@@ -49,7 +49,14 @@ export default {
|
|||||||
if (!window.$gz.util.stringIsNullOrEmpty(tz)) {
|
if (!window.$gz.util.stringIsNullOrEmpty(tz)) {
|
||||||
return tz;
|
return tz;
|
||||||
} else {
|
} else {
|
||||||
return "America/New_York";
|
//case 4739: e.g. a new Windows time zone the browser doesn't know yet; this used to be "America/New_York"
|
||||||
|
//a fixed offset zone in whole hours, the only kind every browser and luxon accept by name
|
||||||
|
//(Etc/GMT signs are reversed: UTC-7 is Etc/GMT+7, which is what getTimezoneOffset returns, 420 minutes)
|
||||||
|
const hours = Math.round(new Date().getTimezoneOffset() / 60);
|
||||||
|
if (hours == 0) {
|
||||||
|
return "Etc/GMT";
|
||||||
|
}
|
||||||
|
return `Etc/GMT${hours > 0 ? "+" : "-"}${Math.abs(hours)}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
export default {
|
export default {
|
||||||
version: "8.0.17",
|
version: "8.1.3",
|
||||||
copyright: "© 1999-2024, Ground Zero Tech-Works Inc."
|
//case 4630: the year is set when the client is built (vue.config.js)
|
||||||
|
copyright: `© ${process.env.VUE_APP_BUILD_YEAR}, Ground Zero Tech-Works Inc.`
|
||||||
};
|
};
|
||||||
|
|||||||
114
src/components/extension-close-cases-control.vue
Normal file
114
src/components/extension-close-cases-control.vue
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
<template>
|
||||||
|
<!-- case 4742: close or reopen the selected cases in one go (Sockeye only, so plain English, no translation keys) -->
|
||||||
|
<v-expansion-panel v-if="available == true">
|
||||||
|
<v-expansion-panel-header
|
||||||
|
disable-icon-rotate
|
||||||
|
expand-icon="$sockiCheckCircle"
|
||||||
|
>Close / reopen cases</v-expansion-panel-header
|
||||||
|
>
|
||||||
|
<v-expansion-panel-content>
|
||||||
|
<v-btn
|
||||||
|
color="blue darken-1"
|
||||||
|
text
|
||||||
|
:disabled="jobActive"
|
||||||
|
:loading="jobActive && !opening"
|
||||||
|
data-cy="extCloseCases"
|
||||||
|
@click="doAction(false)"
|
||||||
|
>Close</v-btn
|
||||||
|
>
|
||||||
|
<v-btn
|
||||||
|
color="blue darken-1"
|
||||||
|
text
|
||||||
|
:disabled="jobActive"
|
||||||
|
:loading="jobActive && opening"
|
||||||
|
data-cy="extOpenCases"
|
||||||
|
@click="doAction(true)"
|
||||||
|
>Reopen</v-btn
|
||||||
|
>
|
||||||
|
<v-btn
|
||||||
|
v-if="jobActive"
|
||||||
|
color="red darken-1"
|
||||||
|
text
|
||||||
|
@click="requestCancel()"
|
||||||
|
>
|
||||||
|
{{ $sock.t("Cancel") }}</v-btn
|
||||||
|
><span v-if="jobActive">{{ progress }}</span>
|
||||||
|
</v-expansion-panel-content>
|
||||||
|
</v-expansion-panel>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
dataListSelection: { type: Object, default: null }
|
||||||
|
},
|
||||||
|
data: () => ({
|
||||||
|
jobActive: false,
|
||||||
|
opening: false,
|
||||||
|
currentJobId: null,
|
||||||
|
progress: ""
|
||||||
|
}),
|
||||||
|
computed: {
|
||||||
|
available() {
|
||||||
|
return (
|
||||||
|
this.dataListSelection != null &&
|
||||||
|
this.dataListSelection.SockType == window.$gz.type.GZCase &&
|
||||||
|
window.$gz.role.getRights(window.$gz.type.GZCase).change
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async requestCancel() {
|
||||||
|
await window.$gz.api.upsert(
|
||||||
|
"job-operations/request-cancel",
|
||||||
|
this.currentJobId
|
||||||
|
);
|
||||||
|
},
|
||||||
|
async doAction(open) {
|
||||||
|
const vm = this;
|
||||||
|
//Clear any possible prior errors
|
||||||
|
vm.$emit("ext-show-job-log", "clear");
|
||||||
|
vm.opening = open;
|
||||||
|
const url = `job-operations/batch-close-cases?open=${open}`;
|
||||||
|
try {
|
||||||
|
this.progress = "";
|
||||||
|
let jobId = await window.$gz.api.upsert(url, this.dataListSelection);
|
||||||
|
if (jobId.error) {
|
||||||
|
throw new Error(window.$gz.errorHandler.errorToString(jobId, vm));
|
||||||
|
}
|
||||||
|
this.currentJobId = jobId.jobId;
|
||||||
|
vm.jobActive = true;
|
||||||
|
let jobProgress = {};
|
||||||
|
while (vm.jobActive == true) {
|
||||||
|
await window.$gz.util.sleepAsync(2000);
|
||||||
|
jobProgress = await window.$gz.api.get(
|
||||||
|
`job-operations/progress/${this.currentJobId}`
|
||||||
|
);
|
||||||
|
if (jobProgress.error) {
|
||||||
|
throw new Error(
|
||||||
|
window.$gz.errorHandler.errorToString(jobProgress, vm)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
jobProgress = jobProgress.data;
|
||||||
|
this.progress = jobProgress.progress;
|
||||||
|
if (jobProgress.jobStatus == 4 || jobProgress.jobStatus == 0) {
|
||||||
|
if (jobProgress.jobStatus == 4) {
|
||||||
|
//emit job id and event to parent for log viewing
|
||||||
|
vm.$emit("ext-show-job-log", jobId);
|
||||||
|
}
|
||||||
|
throw new Error("Job failed");
|
||||||
|
}
|
||||||
|
if (jobProgress.jobStatus == 3) {
|
||||||
|
vm.jobActive = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Here if it's completed successfully
|
||||||
|
window.$gz.eventBus.$emit("notify-success", vm.$sock.t("JobCompleted"));
|
||||||
|
vm.$emit("ext-close-refresh");
|
||||||
|
} catch (error) {
|
||||||
|
vm.jobActive = false;
|
||||||
|
window.$gz.eventBus.$emit("notify-error", vm.$sock.t("JobFailed"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@@ -24,6 +24,11 @@
|
|||||||
<v-expansion-panels focusable>
|
<v-expansion-panels focusable>
|
||||||
<ExtensionTags :data-list-selection="dataListSelection" />
|
<ExtensionTags :data-list-selection="dataListSelection" />
|
||||||
<ExtensionExport :data-list-selection="dataListSelection" />
|
<ExtensionExport :data-list-selection="dataListSelection" />
|
||||||
|
<ExtensionCloseCases
|
||||||
|
:data-list-selection="dataListSelection"
|
||||||
|
@ext-close-refresh="close({ refresh: true })"
|
||||||
|
@ext-show-job-log="handleError($event)"
|
||||||
|
/>
|
||||||
<ExtensionDelete
|
<ExtensionDelete
|
||||||
:data-list-selection="dataListSelection"
|
:data-list-selection="dataListSelection"
|
||||||
@ext-close-refresh="close({ refresh: true })"
|
@ext-close-refresh="close({ refresh: true })"
|
||||||
@@ -43,12 +48,14 @@
|
|||||||
import ExtensionTags from "./extension-tags-control.vue";
|
import ExtensionTags from "./extension-tags-control.vue";
|
||||||
import ExtensionExport from "./extension-export-control.vue";
|
import ExtensionExport from "./extension-export-control.vue";
|
||||||
import ExtensionDelete from "./extension-delete-control.vue";
|
import ExtensionDelete from "./extension-delete-control.vue";
|
||||||
|
import ExtensionCloseCases from "./extension-close-cases-control.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
ExtensionTags,
|
ExtensionTags,
|
||||||
ExtensionExport,
|
ExtensionExport,
|
||||||
ExtensionDelete
|
ExtensionDelete,
|
||||||
|
ExtensionCloseCases
|
||||||
},
|
},
|
||||||
data: () => ({
|
data: () => ({
|
||||||
isVisible: false,
|
isVisible: false,
|
||||||
|
|||||||
@@ -27,39 +27,18 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
openUrl() {
|
openUrl() {
|
||||||
if (this.value) {
|
if (this.value) {
|
||||||
window.open(`ssh:${this.value}`, "ssh");
|
//case 4663: ssh://root@host is the form OpenSSH understands; "ssh:host" (the PuTTY-era link) is not
|
||||||
|
window.open(`ssh://root@${this.value.trim()}`, "ssh");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
TO USE THIS:
|
TO USE THIS (case 4663): Windows must open ssh:// links in Windows Terminal, which runs Windows' own OpenSSH
|
||||||
Must have a SSH URI handler set in registry on windows to open putty like this:
|
(it uses the keys in the KeePassXC SSH agent). The registry handler, under HKEY_CLASSES_ROOT\ssh\shell\open\command:
|
||||||
|
|
||||||
----------------
|
"C:\Users\<you>\AppData\Local\Microsoft\WindowsApps\wt.exe" ssh "%1"
|
||||||
Windows Registry Editor Version 5.00
|
|
||||||
|
|
||||||
[HKEY_CLASSES_ROOT\ssh]
|
plus the "URL Protocol" value on HKEY_CLASSES_ROOT\ssh so the browser offers it.
|
||||||
@="URL:SSH Protocol"
|
|
||||||
"URL Protocol"=""
|
|
||||||
|
|
||||||
[HKEY_CLASSES_ROOT\ssh\DefaultIcon]
|
|
||||||
@="%%ProgramFiles%%\\PuTTY\\putty.exe"
|
|
||||||
|
|
||||||
[HKEY_CLASSES_ROOT\ssh\shell]
|
|
||||||
|
|
||||||
[HKEY_CLASSES_ROOT\ssh\shell\open]
|
|
||||||
|
|
||||||
[HKEY_CLASSES_ROOT\ssh\shell\open\command]
|
|
||||||
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -Command \"$val='%l'; $val = $val.TrimEnd('/');if ($val.StartsWith('ssh://')) { $val = $val.SubString(6) };if ($val.StartsWith('ssh:')) { $val = $val.SubString(4) }; & 'C:\\Program Files\\PuTTY\\putty.exe' \"$val\"\""
|
|
||||||
|
|
||||||
|
|
||||||
----------------
|
|
||||||
|
|
||||||
Also in putty need to set default to use pagent agent and then open the keys in KeePass so relies on a lot specific to us but it works great
|
|
||||||
https://documentation.help/PuTTY/config-saving.html#S4.1.2
|
|
||||||
|
|
||||||
|
|
||||||
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command "$val='%l'; $val = $val.TrimEnd('/');if ($val.StartsWith('ssh://')) { $val = $val.SubString(6) };if ($val.StartsWith('ssh:')) { $val = $val.SubString(4) }; & 'C:\Program Files\PuTTY\putty.exe' "$val""
|
|
||||||
*/
|
*/
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ export default {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
updateTimeValue(v) {
|
updateTimeValue(v) {
|
||||||
this.updateValue(this.dateValue, v);
|
this.updateValue(null, v);
|
||||||
},
|
},
|
||||||
updateValue(theDate, theTime) {
|
updateValue(theDate, theTime) {
|
||||||
const vm = this;
|
const vm = this;
|
||||||
|
|||||||
@@ -1,5 +1,44 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
|
<!-- case 4764: open a case by its number, as AyaNova's work order list (Sockeye only, so plain English) -->
|
||||||
|
<v-row dense justify="center">
|
||||||
|
<v-dialog
|
||||||
|
v-model="openDialog"
|
||||||
|
persistent
|
||||||
|
max-width="600px"
|
||||||
|
@keydown.esc="openDialog = false"
|
||||||
|
@keydown.enter="openCase()"
|
||||||
|
>
|
||||||
|
<v-card>
|
||||||
|
<v-card-title>
|
||||||
|
<span class="text-h5">Open case</span>
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-text>
|
||||||
|
<v-text-field
|
||||||
|
v-model="openCaseNumber"
|
||||||
|
label="Case number"
|
||||||
|
autofocus
|
||||||
|
required
|
||||||
|
type="number"
|
||||||
|
data-cy="openCaseNumber"
|
||||||
|
></v-text-field>
|
||||||
|
</v-card-text>
|
||||||
|
<v-card-actions>
|
||||||
|
<v-spacer></v-spacer>
|
||||||
|
<v-btn color="blue darken-1" text @click="openDialog = false">{{
|
||||||
|
$sock.t("Cancel")
|
||||||
|
}}</v-btn>
|
||||||
|
<v-btn
|
||||||
|
color="blue darken-1"
|
||||||
|
text
|
||||||
|
:disabled="!openCaseNumber"
|
||||||
|
@click="openCase()"
|
||||||
|
>{{ $sock.t("OK") }}</v-btn
|
||||||
|
>
|
||||||
|
</v-card-actions>
|
||||||
|
</v-card>
|
||||||
|
</v-dialog>
|
||||||
|
</v-row>
|
||||||
<gz-report-selector ref="reportSelector"></gz-report-selector>
|
<gz-report-selector ref="reportSelector"></gz-report-selector>
|
||||||
<gz-extensions
|
<gz-extensions
|
||||||
ref="extensions"
|
ref="extensions"
|
||||||
@@ -36,7 +75,9 @@ export default {
|
|||||||
preFilterMode: null,
|
preFilterMode: null,
|
||||||
objectId: null,
|
objectId: null,
|
||||||
aForType: null,
|
aForType: null,
|
||||||
name: null
|
name: null,
|
||||||
|
openDialog: false,
|
||||||
|
openCaseNumber: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -72,6 +113,27 @@ export default {
|
|||||||
handleSelected(selected) {
|
handleSelected(selected) {
|
||||||
this.selectedItems = selected;
|
this.selectedItems = selected;
|
||||||
},
|
},
|
||||||
|
async openCase() {
|
||||||
|
//case 4764
|
||||||
|
if (!this.openCaseNumber) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const res = await window.$gz.api.get(
|
||||||
|
"gzcase/id-from-number/" + this.openCaseNumber
|
||||||
|
);
|
||||||
|
if (res.error) {
|
||||||
|
window.$gz.eventBus.$emit(
|
||||||
|
"notify-warning",
|
||||||
|
`Case ${this.openCaseNumber} was not found`
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.openDialog = false;
|
||||||
|
this.$router.push({
|
||||||
|
name: "gzcase-edit",
|
||||||
|
params: { recordid: res.data }
|
||||||
|
});
|
||||||
|
},
|
||||||
clearPreFilter() {
|
clearPreFilter() {
|
||||||
this.clientCriteria = null;
|
this.clientCriteria = null;
|
||||||
this.preFilterMode = null;
|
this.preFilterMode = null;
|
||||||
@@ -96,6 +158,10 @@ async function clickHandler(menuItem) {
|
|||||||
params: { recordid: 0 }
|
params: { recordid: 0 }
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case "open":
|
||||||
|
m.vm.openCaseNumber = null;
|
||||||
|
m.vm.openDialog = true;
|
||||||
|
break;
|
||||||
case "extensions":
|
case "extensions":
|
||||||
{
|
{
|
||||||
const res = await m.vm.$refs.extensions.open(
|
const res = await m.vm.$refs.extensions.open(
|
||||||
@@ -175,6 +241,14 @@ function generateMenu(vm) {
|
|||||||
key: FORM_KEY + ":extensions",
|
key: FORM_KEY + ":extensions",
|
||||||
vm: vm
|
vm: vm
|
||||||
});
|
});
|
||||||
|
//case 4764
|
||||||
|
menuOptions.menuItems.push({
|
||||||
|
title: "Open case",
|
||||||
|
notrans: true,
|
||||||
|
icon: "$sockiCoffee",
|
||||||
|
key: FORM_KEY + ":open",
|
||||||
|
vm: vm
|
||||||
|
});
|
||||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -66,23 +66,33 @@
|
|||||||
v-model="obj.created"
|
v-model="obj.created"
|
||||||
:label="$sock.t('Created')"
|
:label="$sock.t('Created')"
|
||||||
:rules="[form().required(this, 'created')]"
|
:rules="[form().required(this, 'created')]"
|
||||||
:readonly="formState.readOnly"
|
:readonly="true"
|
||||||
:error-messages="form().serverErrors(this, 'created')"
|
:error-messages="form().serverErrors(this, 'created')"
|
||||||
data-cy="created"
|
data-cy="created"
|
||||||
@input="fieldValueChanged('created')"
|
@input="fieldValueChanged('created')"
|
||||||
></gz-date-time-picker>
|
></gz-date-time-picker>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
|
<!-- case 4604: closed is set by the Close / Reopen button, not picked (Sockeye only, so plain English) -->
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<v-col cols="12" sm="6" lg="4" xl="3">
|
||||||
<gz-date-time-picker
|
<gz-date-time-picker
|
||||||
ref="closed"
|
ref="closed"
|
||||||
v-model="obj.closed"
|
v-model="obj.closed"
|
||||||
:label="$sock.t('GZCaseClosed')"
|
:label="$sock.t('GZCaseClosed')"
|
||||||
:readonly="formState.readOnly"
|
:readonly="true"
|
||||||
:error-messages="form().serverErrors(this, 'closed')"
|
:error-messages="form().serverErrors(this, 'closed')"
|
||||||
data-cy="closed"
|
data-cy="closed"
|
||||||
@input="fieldValueChanged('closed')"
|
@input="fieldValueChanged('closed')"
|
||||||
></gz-date-time-picker>
|
></gz-date-time-picker>
|
||||||
|
<v-btn
|
||||||
|
v-if="!formState.readOnly && obj.id != 0"
|
||||||
|
color="primary"
|
||||||
|
text
|
||||||
|
:disabled="formState.loading"
|
||||||
|
data-cy="closeOpen"
|
||||||
|
@click="setClosed(obj.closed == null)"
|
||||||
|
>{{ obj.closed == null ? "Close case" : "Reopen case" }}</v-btn
|
||||||
|
>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<!-- --------------------------------- -->
|
<!-- --------------------------------- -->
|
||||||
@@ -212,6 +222,10 @@ export default {
|
|||||||
this.obj = this.$route.params.obj;
|
this.obj = this.$route.params.obj;
|
||||||
this.obj.concurrency = undefined;
|
this.obj.concurrency = undefined;
|
||||||
this.obj.id = 0;
|
this.obj.id = 0;
|
||||||
|
//case 4714: a duplicate is a new, open case: the server gives it the next case number when saved
|
||||||
|
this.obj.caseId = 0;
|
||||||
|
this.obj.closed = null;
|
||||||
|
this.obj.created = window.$gz.locale.nowUTC8601String();
|
||||||
this.obj.name = `${this.obj.name} - ${window.$gz.translation.get(
|
this.obj.name = `${this.obj.name} - ${window.$gz.translation.get(
|
||||||
"Copy"
|
"Copy"
|
||||||
)}`;
|
)}`;
|
||||||
@@ -259,6 +273,15 @@ export default {
|
|||||||
form() {
|
form() {
|
||||||
return window.$gz.form;
|
return window.$gz.form;
|
||||||
},
|
},
|
||||||
|
async setClosed(close) {
|
||||||
|
//case 4604: Close sets the closed date to now, saves the case and goes back; Open clears it and saves
|
||||||
|
this.obj.closed = close ? window.$gz.locale.nowUTC8601String() : null;
|
||||||
|
this.fieldValueChanged("closed");
|
||||||
|
await this.submit();
|
||||||
|
if (close && !this.formState.dirty) {
|
||||||
|
this.$router.go(-1);
|
||||||
|
}
|
||||||
|
},
|
||||||
fieldValueChanged(ref) {
|
fieldValueChanged(ref) {
|
||||||
if (
|
if (
|
||||||
this.formState.ready &&
|
this.formState.ready &&
|
||||||
|
|||||||
@@ -143,7 +143,8 @@
|
|||||||
></gz-date-time-picker>
|
></gz-date-time-picker>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
<!-- case 4600: expiry only applies to trial servers; a paid server renews monthly -->
|
||||||
|
<v-col v-if="obj.trial" cols="12" sm="6" lg="4" xl="3">
|
||||||
<v-row no-gutters>
|
<v-row no-gutters>
|
||||||
<v-col cols="1">
|
<v-col cols="1">
|
||||||
<v-menu offset-y>
|
<v-menu offset-y>
|
||||||
@@ -394,6 +395,7 @@ export default {
|
|||||||
serverStates: [],
|
serverStates: [],
|
||||||
dataCenters: [
|
dataCenters: [
|
||||||
{ id: "SF", name: "San Francisco" },
|
{ id: "SF", name: "San Francisco" },
|
||||||
|
{ id: "ATL", name: "Atlanta" },
|
||||||
{ id: "NY", name: "New York" },
|
{ id: "NY", name: "New York" },
|
||||||
{ id: "TOR", name: "Toronto" },
|
{ id: "TOR", name: "Toronto" },
|
||||||
{ id: "AMS", name: "Amsterdam" },
|
{ id: "AMS", name: "Amsterdam" },
|
||||||
@@ -1205,6 +1207,10 @@ export default {
|
|||||||
loading: true
|
loading: true
|
||||||
});
|
});
|
||||||
window.$gz.form.deleteAllErrorBoxErrors(vm);
|
window.$gz.form.deleteAllErrorBoxErrors(vm);
|
||||||
|
//case 4600: expiry is hidden and unused for a paid server, but the record still needs a date
|
||||||
|
if (!vm.obj.trial && !vm.obj.subscriptionExpire) {
|
||||||
|
vm.obj.subscriptionExpire = window.$gz.locale.nowUTC8601String();
|
||||||
|
}
|
||||||
if (vm.obj.operatingSystem == null) {
|
if (vm.obj.operatingSystem == null) {
|
||||||
vm.obj.operatingSystem = "Ubuntu 22.10";
|
vm.obj.operatingSystem = "Ubuntu 22.10";
|
||||||
}
|
}
|
||||||
@@ -1361,6 +1367,8 @@ DOMAINNAME='${m.vm.obj.name}'
|
|||||||
#############################
|
#############################
|
||||||
echo STARTING...
|
echo STARTING...
|
||||||
timedatectl set-timezone $TIMEZONE
|
timedatectl set-timezone $TIMEZONE
|
||||||
|
# no phased updates, so weekly updates match what was tested on devtest first
|
||||||
|
echo 'APT::Get::Never-Include-Phased-Updates "true";' > /etc/apt/apt.conf.d/52no-phasing
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get dist-upgrade -y
|
apt-get dist-upgrade -y
|
||||||
dpkg-reconfigure unattended-upgrades
|
dpkg-reconfigure unattended-upgrades
|
||||||
@@ -1373,18 +1381,25 @@ echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
|
|||||||
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
|
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
|
||||||
echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf
|
echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf
|
||||||
echo INSTALL .NET CORE
|
echo INSTALL .NET CORE
|
||||||
apt-get install -y aspnetcore-runtime-8.0
|
apt-get install -y aspnetcore-runtime-10.0
|
||||||
|
echo GENERATE SERVER SECRETS
|
||||||
|
# unique per server, letters and digits only so they are safe in SQL, JSON and the connection string
|
||||||
|
DBPASSWORD=$(openssl rand -hex 24)
|
||||||
|
JWTSECRET=$(openssl rand -hex 16)
|
||||||
|
echo "PostgreSQL postgres password: $DBPASSWORD" > /root/ayanova-secrets.txt
|
||||||
|
echo "AYANOVA_JWT_SECRET: $JWTSECRET" >> /root/ayanova-secrets.txt
|
||||||
|
chmod 600 /root/ayanova-secrets.txt
|
||||||
echo INSTALL POSTGRESQL
|
echo INSTALL POSTGRESQL
|
||||||
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
# PostgreSQL project repository (same PostgreSQL build on every Ubuntu release); apt-key no longer exists on newer Ubuntu
|
||||||
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
apt-get install -y postgresql-common
|
||||||
sudo apt-get update
|
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
|
||||||
sudo apt-get -y install postgresql
|
sudo apt-get -y install postgresql
|
||||||
sudo -u postgres psql -U postgres -d postgres -c "alter user postgres with password 'YOUR_PASSWORD_HERE';"
|
sudo -u postgres psql -U postgres -d postgres -c "alter user postgres with password '$DBPASSWORD';"
|
||||||
echo INSTALL REPORTING LIBS
|
echo INSTALL REPORTING LIBS
|
||||||
|
|
||||||
# Ubuntu 24.04
|
# Ubuntu 24.04 and 26.04
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libatk1.0-0t64 libc6 libcairo2 libdbus-1-3 libexpat1 libfontconfig1 libgcc-s1 libgdk-pixbuf2.0-0 libglib2.0-0t64 libgtk-3-0t64 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libnss3 lsb-release libgbm-dev xdg-utils
|
sudo apt-get install -y libatk1.0-0t64 libc6 libcairo2 libdbus-1-3 libexpat1 libfontconfig1 libgcc-s1 libgdk-pixbuf-2.0-0 libglib2.0-0t64 libgtk-3-0t64 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libnss3 lsb-release libgbm-dev xdg-utils
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libatk-bridge2.0-0t64 libcups2t64 libxcomposite1 libxdamage1 libpangocairo-1.0-0 libxfixes3 libxrandr2 libgbm1 libcairo2 libpango-1.0-0 libasound2t64 wget
|
sudo apt-get install -y libatk-bridge2.0-0t64 libcups2t64 libxcomposite1 libxdamage1 libpangocairo-1.0-0 libxfixes3 libxrandr2 libgbm1 libcairo2 libpango-1.0-0 libasound2t64 wget
|
||||||
# NOTE: for future releases of ubuntu when need to update packages this was helpful https://itsfoss.com/unable-to-locate-package-error-ubuntu/
|
# NOTE: for future releases of ubuntu when need to update packages this was helpful https://itsfoss.com/unable-to-locate-package-error-ubuntu/
|
||||||
@@ -1392,15 +1407,19 @@ echo INSTALL AYANOVA
|
|||||||
apt install zip unzip -y
|
apt install zip unzip -y
|
||||||
mkdir /var/ayanova
|
mkdir /var/ayanova
|
||||||
mkdir /var/ayanova/data
|
mkdir /var/ayanova/data
|
||||||
mkdir /var/ayanova/Chrome
|
|
||||||
mkdir /var/ayanova/ChromeHeadlessShell
|
|
||||||
cd /var/ayanova
|
cd /var/ayanova
|
||||||
curl -O https://www.ayanova.com/download/ayanova-subscription-linux-x64-server.zip && unzip -o ayanova-subscription-linux-x64-server.zip
|
curl -O https://www.ayanova.com/download/ayanova-subscription-linux-x64-server.zip && unzip -o ayanova-subscription-linux-x64-server.zip
|
||||||
|
# put this server's own secrets in place of the shipped defaults
|
||||||
|
sed -i "s/Password=YOUR_PASSWORD_HERE;/Password=$DBPASSWORD;/" /var/ayanova/config.json
|
||||||
|
sed -i "s/12345YourRandom32CharacterSecret/$JWTSECRET/" /var/ayanova/config.json
|
||||||
|
# nginx is the only way in: listen on this server only, not on its public address
|
||||||
|
sed -i 's#http://[*]:7575#http://127.0.0.1:7575#' /var/ayanova/config.json
|
||||||
chown -vR :www-data /var/ayanova
|
chown -vR :www-data /var/ayanova
|
||||||
|
# program files read only for the service account; it writes to data only
|
||||||
|
chmod -R go-w /var/ayanova
|
||||||
chmod -R g+rw /var/ayanova/data
|
chmod -R g+rw /var/ayanova/data
|
||||||
chmod -R g+rwx /var/ayanova/Chrome
|
# config.json holds the database password: readable by root and the service group only
|
||||||
chmod -R g+rwx /var/ayanova/ChromeHeadlessShell
|
chmod 640 /var/ayanova/config.json
|
||||||
chmod g+rw /var/ayanova/
|
|
||||||
echo '[Unit]' >> /etc/systemd/system/ayanova.service
|
echo '[Unit]' >> /etc/systemd/system/ayanova.service
|
||||||
echo 'Description=AyaNova server' >> /etc/systemd/system/ayanova.service
|
echo 'Description=AyaNova server' >> /etc/systemd/system/ayanova.service
|
||||||
echo '' >> /etc/systemd/system/ayanova.service
|
echo '' >> /etc/systemd/system/ayanova.service
|
||||||
@@ -1414,6 +1433,11 @@ echo 'SyslogIdentifier=ayanova-server' >> /etc/systemd/system/ayanova.service
|
|||||||
echo 'User=www-data' >> /etc/systemd/system/ayanova.service
|
echo 'User=www-data' >> /etc/systemd/system/ayanova.service
|
||||||
echo 'Environment=ASPNETCORE_ENVIRONMENT=Production' >> /etc/systemd/system/ayanova.service
|
echo 'Environment=ASPNETCORE_ENVIRONMENT=Production' >> /etc/systemd/system/ayanova.service
|
||||||
echo 'Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false' >> /etc/systemd/system/ayanova.service
|
echo 'Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false' >> /etc/systemd/system/ayanova.service
|
||||||
|
echo 'NoNewPrivileges=true' >> /etc/systemd/system/ayanova.service
|
||||||
|
echo 'ProtectSystem=strict' >> /etc/systemd/system/ayanova.service
|
||||||
|
echo 'ReadWritePaths=/var/ayanova/data' >> /etc/systemd/system/ayanova.service
|
||||||
|
echo 'PrivateTmp=true' >> /etc/systemd/system/ayanova.service
|
||||||
|
echo 'ProtectHome=true' >> /etc/systemd/system/ayanova.service
|
||||||
echo '' >> /etc/systemd/system/ayanova.service
|
echo '' >> /etc/systemd/system/ayanova.service
|
||||||
echo '[Install]' >> /etc/systemd/system/ayanova.service
|
echo '[Install]' >> /etc/systemd/system/ayanova.service
|
||||||
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/ayanova.service
|
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/ayanova.service
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<div v-if="formState.ready">
|
<div v-if="formState.ready">
|
||||||
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
|
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
|
||||||
<v-form ref="form">
|
<v-form ref="form">
|
||||||
<div v-if="obj.aType" class="mb-6">
|
<div v-if="obj.sockType" class="mb-6">
|
||||||
<v-icon large @click="navToTarget()">{{ iconForType }}</v-icon
|
<v-icon large @click="navToTarget()">{{ iconForType }}</v-icon
|
||||||
><span class="text-h5" @click="navToTarget()"> {{ name }}</span>
|
><span class="text-h5" @click="navToTarget()"> {{ name }}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -191,7 +191,7 @@ export default {
|
|||||||
userId: window.$gz.store.state.userId,
|
userId: window.$gz.store.state.userId,
|
||||||
assignedByUserId: window.$gz.store.state.userId,
|
assignedByUserId: window.$gz.store.state.userId,
|
||||||
objectId: null,
|
objectId: null,
|
||||||
aType: null,
|
sockType: null, //case 4468: the server field is SockType; the form used AyaNova's AType, so reviews were saved with no type
|
||||||
overDue: false
|
overDue: false
|
||||||
},
|
},
|
||||||
formState: {
|
formState: {
|
||||||
@@ -222,7 +222,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
iconForType() {
|
iconForType() {
|
||||||
return window.$gz.util.iconForType(this.obj.aType);
|
return window.$gz.util.iconForType(this.obj.sockType);
|
||||||
},
|
},
|
||||||
hasSupervisorRole: function() {
|
hasSupervisorRole: function() {
|
||||||
return window.$gz.role.hasRole([
|
return window.$gz.role.hasRole([
|
||||||
@@ -298,10 +298,10 @@ export default {
|
|||||||
vm.obj.objectId = window.$gz.util.stringToIntOrNull(
|
vm.obj.objectId = window.$gz.util.stringToIntOrNull(
|
||||||
vm.$route.params.objectId
|
vm.$route.params.objectId
|
||||||
);
|
);
|
||||||
vm.obj.aType = window.$gz.util.stringToIntOrNull(
|
vm.obj.sockType = window.$gz.util.stringToIntOrNull(
|
||||||
vm.$route.params.aType
|
vm.$route.params.aType
|
||||||
);
|
);
|
||||||
if (!vm.obj.objectId || !vm.obj.aType) {
|
if (!vm.obj.objectId || !vm.obj.sockType) {
|
||||||
throw "SockType and ObjectId are required to create a review";
|
throw "SockType and ObjectId are required to create a review";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -337,7 +337,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
navToTarget: function() {
|
navToTarget: function() {
|
||||||
window.$gz.eventBus.$emit("openobject", {
|
window.$gz.eventBus.$emit("openobject", {
|
||||||
type: this.obj.aType,
|
type: this.obj.sockType,
|
||||||
id: this.obj.objectId
|
id: this.obj.objectId
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -515,7 +515,7 @@ async function clickHandler(menuItem) {
|
|||||||
name: "review-edit",
|
name: "review-edit",
|
||||||
params: {
|
params: {
|
||||||
recordid: 0,
|
recordid: 0,
|
||||||
aType: m.vm.obj.aType,
|
aType: m.vm.obj.sockType,
|
||||||
objectId: m.vm.obj.objectId,
|
objectId: m.vm.obj.objectId,
|
||||||
name: m.vm.name
|
name: m.vm.name
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,10 @@
|
|||||||
dense
|
dense
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly"
|
||||||
:label="$sock.t('BackupSetsToKeep')"
|
:label="$sock.t('BackupSetsToKeep')"
|
||||||
:rules="[form().integerValid(this, 'backupSetsToKeep')]"
|
:rules="[
|
||||||
|
form().integerValid(this, 'backupSetsToKeep'),
|
||||||
|
form().minValueValid(this, 'backupSetsToKeep', 1)
|
||||||
|
]"
|
||||||
:error-messages="form().serverErrors(this, 'backupSetsToKeep')"
|
:error-messages="form().serverErrors(this, 'backupSetsToKeep')"
|
||||||
type="number"
|
type="number"
|
||||||
@input="fieldValueChanged('backupSetsToKeep')"
|
@input="fieldValueChanged('backupSetsToKeep')"
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
|
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
|
||||||
|
|
||||||
|
//case 4630: the year the client is built, for the copyright line (src/api/sockeye-version.js); VUE_APP_ variables
|
||||||
|
//are compiled into the client
|
||||||
|
process.env.VUE_APP_BUILD_YEAR = new Date().getFullYear().toString();
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
//https://medium.com/@mrodal/how-to-make-lazy-loading-actually-work-in-vue-cli-3-7f3f88cfb102
|
//https://medium.com/@mrodal/how-to-make-lazy-loading-actually-work-in-vue-cli-3-7f3f88cfb102
|
||||||
chainWebpack: config => {
|
chainWebpack: config => {
|
||||||
|
|||||||
Reference in New Issue
Block a user