mirror of
https://github.com/jpros/tacticalrmm-web.git
synced 2026-01-20 12:00:20 +00:00
more recovery rework
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
<div class="q-gutter-sm">
|
||||
<q-radio dense v-model="state.mode" val="mesh" label="Mesh Agent" />
|
||||
<q-radio dense v-model="state.mode" val="tacagent" label="Tactical Agent" />
|
||||
<q-radio dense v-model="state.mode" val="command" label="Shell Command" />
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-card-section v-if="state.mode === 'mesh'">
|
||||
@@ -22,21 +21,6 @@
|
||||
<q-card-section v-else-if="state.mode === 'tacagent'">
|
||||
Fix issues with the Tactical RMM Agent service.
|
||||
</q-card-section>
|
||||
<q-card-section v-else-if="state.mode === 'command'">
|
||||
<p>Run a shell command on the agent.</p>
|
||||
<p>You should use the 'Send Command' feature from the agent's context menu for sending shell commands.</p>
|
||||
<p>Only use this as a last resort if unable to recover the Tactical RMM Agent service.</p>
|
||||
<q-input
|
||||
ref="input"
|
||||
v-model="state.cmd"
|
||||
outlined
|
||||
label="Command"
|
||||
bottom-slots
|
||||
stack-label
|
||||
error-message="*Required"
|
||||
:error="!isValid"
|
||||
/>
|
||||
</q-card-section>
|
||||
<q-card-actions align="right">
|
||||
<q-btn dense flat push label="Cancel" v-close-popup />
|
||||
<q-btn :loading="loading" dense flat push label="Recover" color="primary" type="submit" />
|
||||
@@ -48,7 +32,7 @@
|
||||
|
||||
<script>
|
||||
// composition imports
|
||||
import { ref, computed } from "vue";
|
||||
import { ref } from "vue";
|
||||
import { useDialogPluginComponent } from "quasar";
|
||||
import { sendAgentRecovery } from "@/api/agents";
|
||||
import { notifySuccess } from "@/utils/notify";
|
||||
@@ -66,20 +50,10 @@ export default {
|
||||
// agent recovery logic
|
||||
const state = ref({
|
||||
mode: "mesh",
|
||||
cmd: null,
|
||||
});
|
||||
|
||||
const loading = ref(false);
|
||||
|
||||
const isValid = computed(() => {
|
||||
if (state.value.mode === "command") {
|
||||
if (state.value.cmd === null || state.value.cmd === "") {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
async function sendRecovery() {
|
||||
loading.value = true;
|
||||
try {
|
||||
@@ -96,7 +70,6 @@ export default {
|
||||
// reactive data
|
||||
state,
|
||||
loading,
|
||||
isValid,
|
||||
|
||||
// methods
|
||||
sendRecovery,
|
||||
|
||||
Reference in New Issue
Block a user