Compare commits
11 Commits
v0.100.1-d
...
v0.100.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8a171ba2c | ||
|
|
7ee87da3b6 | ||
|
|
7bce958633 | ||
|
|
24a63f477e | ||
|
|
57963f6d1a | ||
|
|
c9d76bdddc | ||
|
|
c279a44679 | ||
|
|
974ba53926 | ||
|
|
021fbbe14f | ||
|
|
bbd74c34b7 | ||
|
|
ddeb6293a1 |
774
package-lock.json
generated
774
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "web",
|
||||
"version": "0.100.1-dev",
|
||||
"version": "0.100.5",
|
||||
"private": true,
|
||||
"productName": "Tactical RMM",
|
||||
"scripts": {
|
||||
@@ -10,26 +10,26 @@
|
||||
"format": "prettier --write \"**/*.{js,ts,vue,,html,md,json}\" --ignore-path .gitignore"
|
||||
},
|
||||
"dependencies": {
|
||||
"@quasar/extras": "1.14.1",
|
||||
"@quasar/extras": "1.14.2",
|
||||
"apexcharts": "3.35.3",
|
||||
"axios": "0.27.2",
|
||||
"dotenv": "16.0.1",
|
||||
"qrcode.vue": "3.3.3",
|
||||
"quasar": "2.7.3",
|
||||
"quasar": "2.7.5",
|
||||
"vue": "3.2.37",
|
||||
"vue3-ace-editor": "2.2.2",
|
||||
"vue3-apexcharts": "1.4.1",
|
||||
"vuedraggable": "4.1.0",
|
||||
"vue-router": "4.0.16",
|
||||
"vue-router": "4.1.1",
|
||||
"vuex": "4.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@quasar/cli": "^1.3.2",
|
||||
"@intlify/vite-plugin-vue-i18n": "^3.4.0",
|
||||
"@quasar/app-vite": "^1.0.2",
|
||||
"@types/node": "^18.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
||||
"@typescript-eslint/parser": "^5.29.0",
|
||||
"@quasar/app-vite": "^1.0.5",
|
||||
"@types/node": "^18.0.3",
|
||||
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
||||
"@typescript-eslint/parser": "^5.30.5",
|
||||
"autoprefixer": "^10.4.7",
|
||||
"eslint": "^8.18.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
|
||||
@@ -31,6 +31,17 @@ export default function ({ app, router, store }) {
|
||||
return response;
|
||||
},
|
||||
async function (error) {
|
||||
if (error.code && error.code === "ERR_NETWORK") {
|
||||
Notify.create({
|
||||
color: "negative",
|
||||
message: "Backend is offline (network error)",
|
||||
caption:
|
||||
"Open your browser's dev tools and check the console tab for more detailed error messages",
|
||||
timeout: 5000,
|
||||
});
|
||||
return Promise.reject({ ...error });
|
||||
}
|
||||
|
||||
let text;
|
||||
|
||||
if (!error.response) {
|
||||
|
||||
@@ -249,10 +249,7 @@ export default {
|
||||
.toLowerCase()
|
||||
.replace(/([^a-zA-Z0-9]+)/g, "");
|
||||
|
||||
const fileName =
|
||||
this.goarch === GOARCH_AMD64
|
||||
? `rmm-${clientStripped}-${siteStripped}-${this.agenttype}.exe`
|
||||
: `rmm-${clientStripped}-${siteStripped}-${this.agenttype}-x86.exe`;
|
||||
const fileName = `trmm-${clientStripped}-${siteStripped}-${this.agenttype}-${this.goarch}.exe`;
|
||||
|
||||
const data = {
|
||||
installMethod: this.installMethod,
|
||||
|
||||
@@ -12,11 +12,15 @@
|
||||
color="positive"
|
||||
class="full-width"
|
||||
@click="doCodeSign"
|
||||
:loading="loading"
|
||||
>
|
||||
<q-tooltip
|
||||
>Force all existing agents to be updated to the code-signed
|
||||
version</q-tooltip
|
||||
>
|
||||
<template v-slot:loading>
|
||||
<q-spinner-facebook />
|
||||
</template>
|
||||
</q-btn>
|
||||
</q-card-section>
|
||||
<q-form @submit.prevent="editToken">
|
||||
@@ -33,56 +37,92 @@
|
||||
</q-card-section>
|
||||
<q-card-section class="row items-center">
|
||||
<q-btn label="Save" color="primary" type="submit" />
|
||||
<q-space />
|
||||
<q-btn label="Delete" color="negative" @click="confirmDelete" />
|
||||
</q-card-section>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixins from "@/mixins/mixins";
|
||||
import { ref, onMounted } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import axios from "axios";
|
||||
import { notifySuccess } from "@/utils/notify";
|
||||
|
||||
const endpoint = "/core/codesign/";
|
||||
|
||||
export default {
|
||||
name: "CodeSign",
|
||||
mixins: [mixins],
|
||||
data() {
|
||||
return {
|
||||
settings: {
|
||||
token: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getToken() {
|
||||
this.$axios.get("/core/codesign/").then((r) => {
|
||||
this.settings = r.data;
|
||||
setup() {
|
||||
const $q = useQuasar();
|
||||
const settings = ref({ token: "" });
|
||||
const loading = ref(false);
|
||||
|
||||
async function getToken() {
|
||||
try {
|
||||
const { data } = await axios.get(endpoint);
|
||||
settings.value = data;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
async function deleteToken() {
|
||||
try {
|
||||
await axios.delete(endpoint);
|
||||
notifySuccess("Token was deleted!");
|
||||
await getToken();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
function confirmDelete() {
|
||||
$q.dialog({
|
||||
title: "Delete token?",
|
||||
cancel: true,
|
||||
persistent: true,
|
||||
}).onOk(() => {
|
||||
deleteToken();
|
||||
});
|
||||
},
|
||||
editToken() {
|
||||
this.$q.loading.show();
|
||||
this.$axios
|
||||
.patch("/core/codesign/", this.settings)
|
||||
.then((r) => {
|
||||
this.$q.loading.hide();
|
||||
this.notifySuccess(r.data);
|
||||
})
|
||||
.catch(() => {
|
||||
this.$q.loading.hide();
|
||||
});
|
||||
},
|
||||
doCodeSign() {
|
||||
this.$q.loading.show();
|
||||
this.$axios
|
||||
.post("/core/codesign/")
|
||||
.then((r) => {
|
||||
this.$q.loading.hide();
|
||||
this.notifySuccess(r.data);
|
||||
})
|
||||
.catch(() => {
|
||||
this.$q.loading.hide();
|
||||
});
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getToken();
|
||||
}
|
||||
|
||||
async function doCodeSign() {
|
||||
loading.value = true;
|
||||
try {
|
||||
const { data } = await axios.post(endpoint);
|
||||
loading.value = false;
|
||||
notifySuccess(data);
|
||||
} catch (e) {
|
||||
loading.value = false;
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
async function editToken() {
|
||||
$q.loading.show();
|
||||
try {
|
||||
const { data } = await axios.patch(endpoint, settings.value);
|
||||
$q.loading.hide();
|
||||
notifySuccess(data);
|
||||
} catch (e) {
|
||||
$q.loading.hide();
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getToken();
|
||||
});
|
||||
|
||||
return {
|
||||
settings,
|
||||
loading,
|
||||
confirmDelete,
|
||||
doCodeSign,
|
||||
editToken,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -35,12 +35,7 @@
|
||||
Tactical RMM<span class="text-overline q-ml-sm"
|
||||
>v{{ currentTRMMVersion }}</span
|
||||
>
|
||||
<span
|
||||
class="text-overline q-ml-md"
|
||||
v-if="
|
||||
latestTRMMVersion !== 'error' &&
|
||||
currentTRMMVersion !== latestTRMMVersion
|
||||
"
|
||||
<span class="text-overline q-ml-md" v-if="updateAvailable()"
|
||||
><q-badge color="warning"
|
||||
><a :href="latestReleaseURL" target="_blank"
|
||||
>v{{ latestTRMMVersion }} available</a
|
||||
@@ -171,6 +166,7 @@ export default {
|
||||
const latestTRMMVersion = computed(() => store.state.latestTRMMVersion);
|
||||
const needRefresh = computed(() => store.state.needrefresh);
|
||||
const user = computed(() => store.state.username);
|
||||
const hosted = computed(() => store.state.hosted);
|
||||
|
||||
const latestReleaseURL = computed(() => {
|
||||
return latestTRMMVersion.value
|
||||
@@ -233,6 +229,11 @@ export default {
|
||||
}, 60 * 5 * 1000);
|
||||
}
|
||||
|
||||
function updateAvailable() {
|
||||
if (latestTRMMVersion.value === "error" || hosted.value) return false;
|
||||
return currentTRMMVersion.value !== latestTRMMVersion.value;
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
setupWS();
|
||||
store.dispatch("getDashInfo");
|
||||
@@ -261,6 +262,7 @@ export default {
|
||||
|
||||
// methods
|
||||
showUserPreferences,
|
||||
updateAvailable,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user