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",
|
"name": "web",
|
||||||
"version": "0.100.1-dev",
|
"version": "0.100.5",
|
||||||
"private": true,
|
"private": true,
|
||||||
"productName": "Tactical RMM",
|
"productName": "Tactical RMM",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -10,26 +10,26 @@
|
|||||||
"format": "prettier --write \"**/*.{js,ts,vue,,html,md,json}\" --ignore-path .gitignore"
|
"format": "prettier --write \"**/*.{js,ts,vue,,html,md,json}\" --ignore-path .gitignore"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@quasar/extras": "1.14.1",
|
"@quasar/extras": "1.14.2",
|
||||||
"apexcharts": "3.35.3",
|
"apexcharts": "3.35.3",
|
||||||
"axios": "0.27.2",
|
"axios": "0.27.2",
|
||||||
"dotenv": "16.0.1",
|
"dotenv": "16.0.1",
|
||||||
"qrcode.vue": "3.3.3",
|
"qrcode.vue": "3.3.3",
|
||||||
"quasar": "2.7.3",
|
"quasar": "2.7.5",
|
||||||
"vue": "3.2.37",
|
"vue": "3.2.37",
|
||||||
"vue3-ace-editor": "2.2.2",
|
"vue3-ace-editor": "2.2.2",
|
||||||
"vue3-apexcharts": "1.4.1",
|
"vue3-apexcharts": "1.4.1",
|
||||||
"vuedraggable": "4.1.0",
|
"vuedraggable": "4.1.0",
|
||||||
"vue-router": "4.0.16",
|
"vue-router": "4.1.1",
|
||||||
"vuex": "4.0.2"
|
"vuex": "4.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@quasar/cli": "^1.3.2",
|
"@quasar/cli": "^1.3.2",
|
||||||
"@intlify/vite-plugin-vue-i18n": "^3.4.0",
|
"@intlify/vite-plugin-vue-i18n": "^3.4.0",
|
||||||
"@quasar/app-vite": "^1.0.2",
|
"@quasar/app-vite": "^1.0.5",
|
||||||
"@types/node": "^18.0.0",
|
"@types/node": "^18.0.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
||||||
"@typescript-eslint/parser": "^5.29.0",
|
"@typescript-eslint/parser": "^5.30.5",
|
||||||
"autoprefixer": "^10.4.7",
|
"autoprefixer": "^10.4.7",
|
||||||
"eslint": "^8.18.0",
|
"eslint": "^8.18.0",
|
||||||
"eslint-config-prettier": "^8.5.0",
|
"eslint-config-prettier": "^8.5.0",
|
||||||
|
|||||||
@@ -31,6 +31,17 @@ export default function ({ app, router, store }) {
|
|||||||
return response;
|
return response;
|
||||||
},
|
},
|
||||||
async function (error) {
|
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;
|
let text;
|
||||||
|
|
||||||
if (!error.response) {
|
if (!error.response) {
|
||||||
|
|||||||
@@ -249,10 +249,7 @@ export default {
|
|||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.replace(/([^a-zA-Z0-9]+)/g, "");
|
.replace(/([^a-zA-Z0-9]+)/g, "");
|
||||||
|
|
||||||
const fileName =
|
const fileName = `trmm-${clientStripped}-${siteStripped}-${this.agenttype}-${this.goarch}.exe`;
|
||||||
this.goarch === GOARCH_AMD64
|
|
||||||
? `rmm-${clientStripped}-${siteStripped}-${this.agenttype}.exe`
|
|
||||||
: `rmm-${clientStripped}-${siteStripped}-${this.agenttype}-x86.exe`;
|
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
installMethod: this.installMethod,
|
installMethod: this.installMethod,
|
||||||
|
|||||||
@@ -12,11 +12,15 @@
|
|||||||
color="positive"
|
color="positive"
|
||||||
class="full-width"
|
class="full-width"
|
||||||
@click="doCodeSign"
|
@click="doCodeSign"
|
||||||
|
:loading="loading"
|
||||||
>
|
>
|
||||||
<q-tooltip
|
<q-tooltip
|
||||||
>Force all existing agents to be updated to the code-signed
|
>Force all existing agents to be updated to the code-signed
|
||||||
version</q-tooltip
|
version</q-tooltip
|
||||||
>
|
>
|
||||||
|
<template v-slot:loading>
|
||||||
|
<q-spinner-facebook />
|
||||||
|
</template>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-form @submit.prevent="editToken">
|
<q-form @submit.prevent="editToken">
|
||||||
@@ -33,56 +37,92 @@
|
|||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section class="row items-center">
|
<q-card-section class="row items-center">
|
||||||
<q-btn label="Save" color="primary" type="submit" />
|
<q-btn label="Save" color="primary" type="submit" />
|
||||||
|
<q-space />
|
||||||
|
<q-btn label="Delete" color="negative" @click="confirmDelete" />
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-form>
|
</q-form>
|
||||||
</q-card>
|
</q-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 {
|
export default {
|
||||||
name: "CodeSign",
|
name: "CodeSign",
|
||||||
mixins: [mixins],
|
setup() {
|
||||||
data() {
|
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();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
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 {
|
return {
|
||||||
settings: {
|
settings,
|
||||||
token: "",
|
loading,
|
||||||
},
|
confirmDelete,
|
||||||
|
doCodeSign,
|
||||||
|
editToken,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
|
||||||
getToken() {
|
|
||||||
this.$axios.get("/core/codesign/").then((r) => {
|
|
||||||
this.settings = r.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
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();
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -35,12 +35,7 @@
|
|||||||
Tactical RMM<span class="text-overline q-ml-sm"
|
Tactical RMM<span class="text-overline q-ml-sm"
|
||||||
>v{{ currentTRMMVersion }}</span
|
>v{{ currentTRMMVersion }}</span
|
||||||
>
|
>
|
||||||
<span
|
<span class="text-overline q-ml-md" v-if="updateAvailable()"
|
||||||
class="text-overline q-ml-md"
|
|
||||||
v-if="
|
|
||||||
latestTRMMVersion !== 'error' &&
|
|
||||||
currentTRMMVersion !== latestTRMMVersion
|
|
||||||
"
|
|
||||||
><q-badge color="warning"
|
><q-badge color="warning"
|
||||||
><a :href="latestReleaseURL" target="_blank"
|
><a :href="latestReleaseURL" target="_blank"
|
||||||
>v{{ latestTRMMVersion }} available</a
|
>v{{ latestTRMMVersion }} available</a
|
||||||
@@ -171,6 +166,7 @@ export default {
|
|||||||
const latestTRMMVersion = computed(() => store.state.latestTRMMVersion);
|
const latestTRMMVersion = computed(() => store.state.latestTRMMVersion);
|
||||||
const needRefresh = computed(() => store.state.needrefresh);
|
const needRefresh = computed(() => store.state.needrefresh);
|
||||||
const user = computed(() => store.state.username);
|
const user = computed(() => store.state.username);
|
||||||
|
const hosted = computed(() => store.state.hosted);
|
||||||
|
|
||||||
const latestReleaseURL = computed(() => {
|
const latestReleaseURL = computed(() => {
|
||||||
return latestTRMMVersion.value
|
return latestTRMMVersion.value
|
||||||
@@ -233,6 +229,11 @@ export default {
|
|||||||
}, 60 * 5 * 1000);
|
}, 60 * 5 * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateAvailable() {
|
||||||
|
if (latestTRMMVersion.value === "error" || hosted.value) return false;
|
||||||
|
return currentTRMMVersion.value !== latestTRMMVersion.value;
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
setupWS();
|
setupWS();
|
||||||
store.dispatch("getDashInfo");
|
store.dispatch("getDashInfo");
|
||||||
@@ -261,6 +262,7 @@ export default {
|
|||||||
|
|
||||||
// methods
|
// methods
|
||||||
showUserPreferences,
|
showUserPreferences,
|
||||||
|
updateAvailable,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user