Compare commits
14 Commits
net6-basel
...
8.1.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 45310dd76e | |||
| 1188829841 | |||
| 0aaf5a2ca6 | |||
| 6192821a33 | |||
| 9f300a65ff | |||
| cb8d6da832 | |||
| 64d8f62e5e | |||
| a48b82f6ec | |||
| 683afce49b | |||
| 97f5b37e0a | |||
| 35dfd669d9 | |||
| 259a2ee832 | |||
| a716934efe | |||
| f5c73cbb41 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sockeye",
|
||||
"version": "8.0.16",
|
||||
"version": "8.1.2",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
|
||||
@@ -487,15 +487,6 @@ ServiceContractor = 5 */
|
||||
route: "/ops-metrics",
|
||||
key: key++
|
||||
});
|
||||
|
||||
// //PROFILE
|
||||
// //metrics rights
|
||||
// sub.push({
|
||||
// title: "ServerProfiler",
|
||||
// icon: "$sockiBinoculars",
|
||||
// route: "/ops-profile",
|
||||
// key: key++
|
||||
// });
|
||||
}
|
||||
|
||||
//NOTIFICATION CONFIG AND HISTORY
|
||||
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
// Get users default time zone
|
||||
// first check if overriden in useroptions
|
||||
// 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://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
getResolvedTimeZoneName() {
|
||||
@@ -49,7 +49,14 @@ export default {
|
||||
if (!window.$gz.util.stringIsNullOrEmpty(tz)) {
|
||||
return tz;
|
||||
} 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 {
|
||||
version: "8.0.17",
|
||||
copyright: "© 1999-2024, Ground Zero Tech-Works Inc."
|
||||
version: "8.1.2",
|
||||
//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.`
|
||||
};
|
||||
|
||||
@@ -142,7 +142,7 @@ export default {
|
||||
);
|
||||
},
|
||||
updateTimeValue(v) {
|
||||
this.updateValue(this.dateValue, v);
|
||||
this.updateValue(null, v);
|
||||
},
|
||||
updateValue(theDate, theTime) {
|
||||
const vm = this;
|
||||
|
||||
@@ -591,12 +591,6 @@ 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-notify-queue",
|
||||
name: "ops-notify-queue",
|
||||
|
||||
@@ -394,6 +394,7 @@ export default {
|
||||
serverStates: [],
|
||||
dataCenters: [
|
||||
{ id: "SF", name: "San Francisco" },
|
||||
{ id: "ATL", name: "Atlanta" },
|
||||
{ id: "NY", name: "New York" },
|
||||
{ id: "TOR", name: "Toronto" },
|
||||
{ id: "AMS", name: "Amsterdam" },
|
||||
@@ -1361,6 +1362,8 @@ DOMAINNAME='${m.vm.obj.name}'
|
||||
#############################
|
||||
echo STARTING...
|
||||
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 dist-upgrade -y
|
||||
dpkg-reconfigure unattended-upgrades
|
||||
@@ -1373,18 +1376,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.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf
|
||||
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
|
||||
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
|
||||
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
|
||||
sudo apt-get update
|
||||
# PostgreSQL project repository (same PostgreSQL build on every Ubuntu release); apt-key no longer exists on newer Ubuntu
|
||||
apt-get install -y postgresql-common
|
||||
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
|
||||
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
|
||||
|
||||
# Ubuntu 24.04
|
||||
# Ubuntu 24.04 and 26.04
|
||||
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 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/
|
||||
@@ -1392,15 +1402,19 @@ echo INSTALL AYANOVA
|
||||
apt install zip unzip -y
|
||||
mkdir /var/ayanova
|
||||
mkdir /var/ayanova/data
|
||||
mkdir /var/ayanova/Chrome
|
||||
mkdir /var/ayanova/ChromeHeadlessShell
|
||||
cd /var/ayanova
|
||||
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
|
||||
# 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+rwx /var/ayanova/Chrome
|
||||
chmod -R g+rwx /var/ayanova/ChromeHeadlessShell
|
||||
chmod g+rw /var/ayanova/
|
||||
# config.json holds the database password: readable by root and the service group only
|
||||
chmod 640 /var/ayanova/config.json
|
||||
echo '[Unit]' >> /etc/systemd/system/ayanova.service
|
||||
echo 'Description=AyaNova server' >> /etc/systemd/system/ayanova.service
|
||||
echo '' >> /etc/systemd/system/ayanova.service
|
||||
@@ -1414,6 +1428,11 @@ echo 'SyslogIdentifier=ayanova-server' >> /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=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 '[Install]' >> /etc/systemd/system/ayanova.service
|
||||
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/ayanova.service
|
||||
|
||||
@@ -39,7 +39,10 @@
|
||||
dense
|
||||
:readonly="formState.readOnly"
|
||||
: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')"
|
||||
type="number"
|
||||
@input="fieldValueChanged('backupSetsToKeep')"
|
||||
|
||||
@@ -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>
|
||||
@@ -1,5 +1,9 @@
|
||||
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 = {
|
||||
//https://medium.com/@mrodal/how-to-make-lazy-loading-actually-work-in-vue-cli-3-7f3f88cfb102
|
||||
chainWebpack: config => {
|
||||
|
||||
Reference in New Issue
Block a user