mirror of
https://github.com/jpros/tacticalrmm-web.git
synced 2026-03-01 07:41:00 +00:00
add code signing auth token
This commit is contained in:
@@ -89,6 +89,10 @@
|
||||
<q-item clickable v-close-popup @click="showEditCoreSettingsModal = true">
|
||||
<q-item-section>Global Settings</q-item-section>
|
||||
</q-item>
|
||||
<!-- code sign -->
|
||||
<q-item clickable v-close-popup @click="showCodeSign = true">
|
||||
<q-item-section>Code Signing</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
@@ -179,6 +183,10 @@
|
||||
<q-dialog v-model="showServerMaintenance">
|
||||
<ServerMaintenance @close="showMaintenance = false" />
|
||||
</q-dialog>
|
||||
<!-- Code Sign -->
|
||||
<q-dialog v-model="showCodeSign">
|
||||
<CodeSign @close="showCodeSign = false" />
|
||||
</q-dialog>
|
||||
</q-bar>
|
||||
</div>
|
||||
</template>
|
||||
@@ -201,6 +209,7 @@ import AuditManager from "@/components/AuditManager";
|
||||
import BulkAction from "@/components/modals/agents/BulkAction";
|
||||
import Deployment from "@/components/Deployment";
|
||||
import ServerMaintenance from "@/components/modals/core/ServerMaintenance";
|
||||
import CodeSign from "@/components/modals/coresettings/CodeSign";
|
||||
|
||||
export default {
|
||||
name: "FileBar",
|
||||
@@ -217,6 +226,7 @@ export default {
|
||||
BulkAction,
|
||||
Deployment,
|
||||
ServerMaintenance,
|
||||
CodeSign,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -233,6 +243,7 @@ export default {
|
||||
showDeployment: false,
|
||||
showDebugLog: false,
|
||||
showScriptManager: false,
|
||||
showCodeSign: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
||||
67
src/components/modals/coresettings/CodeSign.vue
Normal file
67
src/components/modals/coresettings/CodeSign.vue
Normal file
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<q-card style="min-width: 85vh">
|
||||
<q-card-section class="row items-center">
|
||||
<div class="text-h6">Code Signing</div>
|
||||
<q-space />
|
||||
<q-btn icon="close" flat round dense v-close-popup />
|
||||
</q-card-section>
|
||||
<q-form @submit.prevent="editToken">
|
||||
<q-card-section class="row">
|
||||
<div class="col-2">Token:</div>
|
||||
<div class="col-1"></div>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
v-model="settings.token"
|
||||
class="col-9 q-pa-none"
|
||||
:rules="[val => !!val || 'Token is required']"
|
||||
/>
|
||||
</q-card-section>
|
||||
<q-card-section class="row items-center">
|
||||
<q-btn label="Save" color="primary" type="submit" />
|
||||
</q-card-section>
|
||||
</q-form>
|
||||
</q-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixins from "@/mixins/mixins";
|
||||
export default {
|
||||
name: "CodeSign",
|
||||
mixins: [mixins],
|
||||
data() {
|
||||
return {
|
||||
settings: {
|
||||
token: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
getToken() {
|
||||
this.$axios
|
||||
.get("/core/codesign/")
|
||||
.then(r => {
|
||||
this.settings = r.data;
|
||||
})
|
||||
.catch(e => this.notifyError(e.response.data));
|
||||
},
|
||||
editToken() {
|
||||
this.$q.loading.show();
|
||||
this.$axios
|
||||
.patch("/core/codesign/", this.settings)
|
||||
.then(r => {
|
||||
this.$q.loading.hide();
|
||||
this.notifySuccess(r.data);
|
||||
this.$emit("close");
|
||||
})
|
||||
.catch(e => {
|
||||
this.$q.loading.hide();
|
||||
this.notifyError(e.response.data, 4000);
|
||||
});
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getToken();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user