mirror of
https://github.com/jpros/tacticalrmm-web.git
synced 2026-02-23 21:01:11 +00:00
removed key from v-for. Fixed custom dropdowns. other fixes
This commit is contained in:
@@ -27,14 +27,14 @@
|
||||
<!-- header slots -->
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
<template v-for="col in props.cols">
|
||||
<q-th v-if="col.name === 'active'" auto-width :key="col.name">
|
||||
<template v-for="col in props.cols" :key="col.name">
|
||||
<q-th v-if="col.name === 'active'" auto-width>
|
||||
<q-icon name="power_settings_new" size="1.5em">
|
||||
<q-tooltip>Enable User</q-tooltip>
|
||||
</q-icon>
|
||||
</q-th>
|
||||
|
||||
<q-th v-else :key="col.name" :props="props">{{ col.label }}</q-th>
|
||||
<q-th v-else :props="props">{{ col.label }}</q-th>
|
||||
</template>
|
||||
</q-tr>
|
||||
</template>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<q-menu style="max-height: 30vh">
|
||||
<q-list separator>
|
||||
<q-item v-if="alertsCount === 0">No New Alerts</q-item>
|
||||
<q-item v-for="alert in topAlerts" :key="alert.id">
|
||||
<q-item v-for="alert in topAlerts">
|
||||
<q-item-section>
|
||||
<q-item-label overline>{{ alert.client }} - {{ alert.site }} - {{ alert.hostname }}</q-item-label>
|
||||
<q-item-label lines="1">
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
:label="field.name"
|
||||
:type="field.type === 'text' ? 'text' : 'number'"
|
||||
:hint="hintText(field)"
|
||||
:model-value="model_value"
|
||||
@update:model-value="value => $emit('update:model-value', value)"
|
||||
:modelValue="modelValue"
|
||||
@update:modelValue="value => $emit('update:modelValue', value)"
|
||||
:rules="[...validationRules]"
|
||||
reactive-rules
|
||||
autogrow
|
||||
@@ -20,8 +20,8 @@
|
||||
ref="input"
|
||||
:label="field.name"
|
||||
:hint="hintText(field)"
|
||||
:model-value="model_value"
|
||||
@update:model-value="value => $emit('update:model-value', value)"
|
||||
:modelValue="modelValue"
|
||||
@update:modelValue="value => $emit('update:modelValue', value)"
|
||||
/>
|
||||
|
||||
<q-input
|
||||
@@ -31,8 +31,8 @@
|
||||
:hint="hintText(field)"
|
||||
outlined
|
||||
dense
|
||||
:model-value="model_value"
|
||||
@update:model-value="value => $emit('update:model-value', value)"
|
||||
:modelValue="modelValue"
|
||||
@update:modelValue="value => $emit('update:modelValue', value)"
|
||||
:rules="[...validationRules]"
|
||||
reactive-rules
|
||||
>
|
||||
@@ -40,8 +40,8 @@
|
||||
<q-icon name="event" class="cursor-pointer">
|
||||
<q-popup-proxy transition-show="scale" transition-hide="scale">
|
||||
<q-date
|
||||
:model-value="model_value"
|
||||
@update:model-value="value => $emit('update:model-value', value)"
|
||||
:modelValue="modelValue"
|
||||
@update:modelValue="value => $emit('update:modelValue', value)"
|
||||
mask="YYYY-MM-DD HH:mm"
|
||||
>
|
||||
<div class="row items-center justify-end">
|
||||
@@ -53,8 +53,8 @@
|
||||
<q-icon name="access_time" class="cursor-pointer">
|
||||
<q-popup-proxy transition-show="scale" transition-hide="scale">
|
||||
<q-time
|
||||
:model-value="model_value"
|
||||
@update:model-value="value => $emit('update:model-value', value)"
|
||||
:modelValue="modelValue"
|
||||
@update:modelValue="value => $emit('update:modelValue', value)"
|
||||
mask="YYYY-MM-DD HH:mm"
|
||||
>
|
||||
<div class="row items-center justify-end">
|
||||
@@ -69,8 +69,8 @@
|
||||
<q-select
|
||||
v-else-if="field.type === 'single' || field.type === 'multiple'"
|
||||
ref="input"
|
||||
:model-value="model_value"
|
||||
@update:model-value="value => $emit('update:model-value', value)"
|
||||
:modelValue="modelValue"
|
||||
@update:modelValue="value => $emit('update:modelValue', value)"
|
||||
outlined
|
||||
dense
|
||||
:hint="hintText(field)"
|
||||
@@ -86,7 +86,7 @@
|
||||
<script>
|
||||
export default {
|
||||
name: "CustomField",
|
||||
props: ["field", "model-value"],
|
||||
props: ["field", "modelValue"],
|
||||
methods: {
|
||||
validate(...args) {
|
||||
return this.$refs.input.validate(...args);
|
||||
@@ -105,9 +105,6 @@ export default {
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
model_value() {
|
||||
return this["model-value"];
|
||||
},
|
||||
validationRules() {
|
||||
const rules = [];
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</q-item-section>
|
||||
<q-item-section>{{ summary.make_model }}</q-item-section>
|
||||
</q-item>
|
||||
<q-item v-for="(cpu, i) in summary.cpu_model" :key="cpu + i">
|
||||
<q-item v-for="(cpu, i) in summary.cpu_model">
|
||||
<q-item-section avatar>
|
||||
<q-icon name="fas fa-microchip" />
|
||||
</q-item-section>
|
||||
@@ -33,7 +33,7 @@
|
||||
</q-item>
|
||||
|
||||
<!-- physical disks -->
|
||||
<q-item v-for="(disk, i) in summary.physical_disks" :key="disk + i">
|
||||
<q-item v-for="(disk, i) in summary.physical_disks">
|
||||
<q-item-section avatar>
|
||||
<q-icon name="far fa-hdd" />
|
||||
</q-item-section>
|
||||
@@ -99,7 +99,7 @@
|
||||
<!-- right -->
|
||||
<div class="col-3">
|
||||
<span class="text-subtitle2 text-bold">Disks</span>
|
||||
<div v-for="disk in disks" :key="disk.device">
|
||||
<div v-for="disk in disks">
|
||||
<span>{{ disk.device }} ({{ disk.fstype }})</span>
|
||||
<q-linear-progress rounded size="15px" :value="disk.percent / 100" color="green" class="q-mt-sm" />
|
||||
<span>{{ disk.free }} free of {{ disk.total }}</span>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="scroll" :style="{'max-height': tabsTableHeight}">
|
||||
<div v-for="i in info" :key="i + randomID()">
|
||||
<div v-for="j in i" :key="j + randomID()">
|
||||
<div v-for="(v, k) in j" :key="v + randomID()">
|
||||
<div class="scroll" :style="{ 'max-height': tabsTableHeight }">
|
||||
<div v-for="i in info">
|
||||
<div v-for="j in i">
|
||||
<div v-for="(v, k) in j">
|
||||
<span class="text-overline">{{ k }}:</span>
|
||||
<q-badge color="primary" class="q-ml-sm text-caption">{{ v }}</q-badge>
|
||||
</div>
|
||||
@@ -13,17 +13,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { uid } from "quasar";
|
||||
import { mapGetters } from "vuex";
|
||||
|
||||
export default {
|
||||
name: "WmiDetail",
|
||||
props: ["info"],
|
||||
methods: {
|
||||
randomID() {
|
||||
return uid();
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(["tabsTableHeight"]),
|
||||
},
|
||||
|
||||
@@ -37,12 +37,7 @@
|
||||
emit-value
|
||||
>
|
||||
<template v-slot:option="scope">
|
||||
<q-item
|
||||
v-if="!scope.opt.category"
|
||||
v-bind="scope.itemProps"
|
||||
v-on="scope.itemProps.itemEvents"
|
||||
class="q-pl-lg"
|
||||
>
|
||||
<q-item v-if="!scope.opt.category" v-bind="scope.itemProps" class="q-pl-lg">
|
||||
<q-item-section>
|
||||
<q-item-label v-html="scope.opt.label"></q-item-label>
|
||||
</q-item-section>
|
||||
@@ -67,7 +62,7 @@
|
||||
emit-value
|
||||
>
|
||||
<template v-slot:option="scope">
|
||||
<q-item v-if="!scope.opt.category" v-bind="scope.itemProps" v-on="scope.itemEvents" class="q-pl-lg">
|
||||
<q-item v-if="!scope.opt.category" v-bind="scope.itemProps" class="q-pl-lg">
|
||||
<q-item-section>
|
||||
<q-item-label v-html="scope.opt.label"></q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<q-tab-panels v-model="tab" :animated="false">
|
||||
<q-tab-panel name="clients">
|
||||
<q-list separator padding>
|
||||
<q-item :key="item.id + 'servers'" v-for="item in related.server_clients">
|
||||
<q-item v-for="item in related.server_clients">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.name }}</q-item-label>
|
||||
</q-item-section>
|
||||
@@ -51,7 +51,7 @@
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item :key="item.id + 'workstations'" v-for="item in related.workstation_clients">
|
||||
<q-item v-for="item in related.workstation_clients">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.name }}</q-item-label>
|
||||
</q-item-section>
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
<q-tab-panel name="sites">
|
||||
<q-list separator padding>
|
||||
<q-item :key="item.id + 'servers'" v-for="item in related.server_sites">
|
||||
<q-item v-for="item in related.server_sites">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.name }}</q-item-label>
|
||||
<q-item-label caption>{{ item.client_name }}</q-item-label>
|
||||
@@ -77,7 +77,7 @@
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item :key="item.id + 'workstations'" v-for="item in related.workstation_sites">
|
||||
<q-item v-for="item in related.workstation_sites">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.name }}</q-item-label>
|
||||
<q-item-label caption>{{ item.client_name }}</q-item-label>
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
<q-tab-panel name="agents">
|
||||
<q-list separator padding>
|
||||
<q-item :key="item.pk" v-for="item in related.agents">
|
||||
<q-item v-for="item in related.agents">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.hostname }}</q-item-label>
|
||||
<q-item-label caption>
|
||||
|
||||
@@ -95,12 +95,7 @@
|
||||
@input="setScriptDefaults"
|
||||
>
|
||||
<template v-slot:option="scope">
|
||||
<q-item
|
||||
v-if="!scope.opt.category"
|
||||
v-bind="scope.itemProps"
|
||||
v-on="scope.itemProps.itemEvents"
|
||||
class="q-pl-lg"
|
||||
>
|
||||
<q-item v-if="!scope.opt.category" v-bind="scope.itemProps" class="q-pl-lg">
|
||||
<q-item-section>
|
||||
<q-item-label v-html="scope.opt.label"></q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
<q-checkbox v-model="agent.overdue_text_alert" label="Get overdue sms alerts" />
|
||||
</q-card-section>
|
||||
<div class="text-h6">Custom Fields</div>
|
||||
<q-card-section v-for="field in customFields" :key="field.id">
|
||||
<q-card-section v-for="field in customFields">
|
||||
<CustomField v-model="custom_fields[field.name]" :field="field" />
|
||||
</q-card-section>
|
||||
</q-tab-panel>
|
||||
|
||||
@@ -20,12 +20,7 @@
|
||||
@input="setScriptDefaults"
|
||||
>
|
||||
<template v-slot:option="scope">
|
||||
<q-item
|
||||
v-if="!scope.opt.category"
|
||||
v-bind="scope.itemProps"
|
||||
v-on="scope.itemProps.itemEvents"
|
||||
class="q-pl-lg"
|
||||
>
|
||||
<q-item v-if="!scope.opt.category" v-bind="scope.itemProps" class="q-pl-lg">
|
||||
<q-item-section>
|
||||
<q-item-label v-html="scope.opt.label"></q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
@@ -37,12 +37,7 @@
|
||||
emit-value
|
||||
>
|
||||
<template v-slot:option="scope">
|
||||
<q-item
|
||||
v-if="!scope.opt.category"
|
||||
v-bind="scope.itemProps"
|
||||
v-on="scope.itemProps.itemEvents"
|
||||
class="q-pl-lg"
|
||||
>
|
||||
<q-item v-if="!scope.opt.category" v-bind="scope.itemProps" class="q-pl-lg">
|
||||
<q-item-section>
|
||||
<q-item-label v-html="scope.opt.label"></q-item-label>
|
||||
</q-item-section>
|
||||
@@ -67,7 +62,7 @@
|
||||
emit-value
|
||||
>
|
||||
<template v-slot:option="scope">
|
||||
<q-item v-if="!scope.opt.category" v-bind="scope.itemProps" v-on="scope.itemEvents" class="q-pl-lg">
|
||||
<q-item v-if="!scope.opt.category" v-bind="scope.itemProps" class="q-pl-lg">
|
||||
<q-item-section>
|
||||
<q-item-label v-html="scope.opt.label"></q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="col-2 q-mb-sm">Email recipients</div>
|
||||
<div class="col-4 q-mb-sm">
|
||||
<q-list dense v-if="template.email_recipients.length !== 0">
|
||||
<q-item v-for="email in template.email_recipients" :key="email" dense>
|
||||
<q-item v-for="email in template.email_recipients" dense>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ email }}</q-item-label>
|
||||
</q-item-section>
|
||||
@@ -63,7 +63,7 @@
|
||||
<div class="col-2 q-mb-sm">SMS recipients</div>
|
||||
<div class="col-4 q-mb-md">
|
||||
<q-list dense v-if="template.text_recipients.length !== 0">
|
||||
<q-item v-for="num in template.text_recipients" :key="num" dense>
|
||||
<q-item v-for="num in template.text_recipients" dense>
|
||||
<q-item-section>
|
||||
<q-item-label>{{ num }}</q-item-label>
|
||||
</q-item-section>
|
||||
@@ -119,12 +119,7 @@
|
||||
@input="setScriptDefaults('failure')"
|
||||
>
|
||||
<template v-slot:option="scope">
|
||||
<q-item
|
||||
v-if="!scope.opt.category"
|
||||
v-bind="scope.itemProps"
|
||||
v-on="scope.itemProps.itemEvents"
|
||||
class="q-pl-lg"
|
||||
>
|
||||
<q-item v-if="!scope.opt.category" v-bind="scope.itemProps" class="q-pl-lg">
|
||||
<q-item-section>
|
||||
<q-item-label v-html="scope.opt.label"></q-item-label>
|
||||
</q-item-section>
|
||||
@@ -188,12 +183,7 @@
|
||||
@input="setScriptDefaults('resolved')"
|
||||
>
|
||||
<template v-slot:option="scope">
|
||||
<q-item
|
||||
v-if="!scope.opt.category"
|
||||
v-bind="scope.itemProps"
|
||||
v-on="scope.itemProps.itemEvents"
|
||||
class="q-pl-lg"
|
||||
>
|
||||
<q-item v-if="!scope.opt.category" v-bind="scope.itemProps" class="q-pl-lg">
|
||||
<q-item-section>
|
||||
<q-item-label v-html="scope.opt.label"></q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<q-tab-panels v-model="tab" :animated="false">
|
||||
<q-tab-panel name="policies">
|
||||
<q-list separator padding>
|
||||
<q-item :key="policy.id" v-for="policy in related.policies">
|
||||
<q-item v-for="policy in related.policies">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ policy.name }}</q-item-label>
|
||||
</q-item-section>
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<q-tab-panel name="clients">
|
||||
<q-list separator padding>
|
||||
<q-item :key="client.id" v-for="client in related.clients">
|
||||
<q-item v-for="client in related.clients">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ client.name }}</q-item-label>
|
||||
</q-item-section>
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
<q-tab-panel name="sites">
|
||||
<q-list separator padding>
|
||||
<q-item :key="site.id" v-for="site in related.sites">
|
||||
<q-item v-for="site in related.sites">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ site.name }}</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
@@ -34,12 +34,7 @@
|
||||
@input="setScriptDefaults"
|
||||
>
|
||||
<template v-slot:option="scope">
|
||||
<q-item
|
||||
v-if="!scope.opt.category"
|
||||
v-bind="scope.itemProps"
|
||||
v-on="scope.itemProps.itemEvents"
|
||||
class="q-pl-lg"
|
||||
>
|
||||
<q-item v-if="!scope.opt.category" v-bind="scope.itemProps" class="q-pl-lg">
|
||||
<q-item-section>
|
||||
<q-item-label v-html="scope.opt.label"></q-item-label>
|
||||
</q-item-section>
|
||||
@@ -210,11 +205,9 @@ export default {
|
||||
},
|
||||
},
|
||||
created() {
|
||||
if (this.mode === "edit") {
|
||||
this.getCheck();
|
||||
}
|
||||
|
||||
this.scriptOptions = this.getScriptOptions(this.showCommunityScripts);
|
||||
|
||||
if (this.mode === "edit") this.getCheck();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -189,12 +189,12 @@ export default {
|
||||
this.$axios
|
||||
.get("/services/defaultservices/")
|
||||
.then(r => {
|
||||
this.svcData = Object.freeze(r.data);
|
||||
this.svcData = r.data;
|
||||
this.winsvccheck.svc_policy_mode = "default";
|
||||
})
|
||||
.catch(e => {});
|
||||
} else {
|
||||
this.svcData = Object.freeze(this.agentServices);
|
||||
this.svcData = this.agentServices;
|
||||
}
|
||||
},
|
||||
getDisplayName() {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</q-card-section>
|
||||
|
||||
<div class="text-h6">Custom Fields</div>
|
||||
<q-card-section v-for="field in customFields" :key="field.id">
|
||||
<q-card-section v-for="field in customFields">
|
||||
<CustomField v-model="custom_fields[field.name]" :field="field" />
|
||||
</q-card-section>
|
||||
<q-card-actions align="right">
|
||||
|
||||
@@ -22,12 +22,7 @@
|
||||
:rules="[val => !!val || 'Select the site that the agents should be moved to']"
|
||||
>
|
||||
<template v-slot:option="scope">
|
||||
<q-item
|
||||
v-if="!scope.opt.category"
|
||||
v-bind="scope.itemProps"
|
||||
v-on="scope.itemProps.itemEvents"
|
||||
class="q-pl-lg"
|
||||
>
|
||||
<q-item v-if="!scope.opt.category" v-bind="scope.itemProps" class="q-pl-lg">
|
||||
<q-item-section>
|
||||
<q-item-label v-html="scope.opt.label"></q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</q-card-section>
|
||||
|
||||
<div class="text-h6">Custom Fields</div>
|
||||
<q-card-section v-for="field in customFields" :key="field.id">
|
||||
<q-card-section v-for="field in customFields">
|
||||
<CustomField v-model="custom_fields[field.name]" :field="field" />
|
||||
</q-card-section>
|
||||
|
||||
|
||||
@@ -141,7 +141,6 @@
|
||||
<q-list dense v-if="ready && settings.email_alert_recipients.length !== 0">
|
||||
<q-item
|
||||
v-for="email in settings.email_alert_recipients"
|
||||
:key="email"
|
||||
clickable
|
||||
v-ripple
|
||||
@click="removeEmail(email)"
|
||||
@@ -248,7 +247,6 @@
|
||||
<q-list dense v-if="ready && settings.sms_alert_recipients.length !== 0">
|
||||
<q-item
|
||||
v-for="num in settings.sms_alert_recipients"
|
||||
:key="num"
|
||||
clickable
|
||||
v-ripple
|
||||
@click="removeSMSNumber(num)"
|
||||
|
||||
@@ -32,12 +32,7 @@
|
||||
@input="setScriptDefaults"
|
||||
>
|
||||
<template v-slot:option="scope">
|
||||
<q-item
|
||||
v-if="!scope.opt.category"
|
||||
v-bind="scope.itemProps"
|
||||
v-on="scope.itemProps.itemEvents"
|
||||
class="q-pl-lg"
|
||||
>
|
||||
<q-item v-if="!scope.opt.category" v-bind="scope.itemProps" class="q-pl-lg">
|
||||
<q-item-section>
|
||||
<q-item-label v-html="scope.opt.label"></q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
@@ -23,12 +23,7 @@
|
||||
@input="setScriptDefaults"
|
||||
>
|
||||
<template v-slot:option="scope">
|
||||
<q-item
|
||||
v-if="!scope.opt.category"
|
||||
v-bind="scope.itemProps"
|
||||
v-on="scope.itemProps.itemEvents"
|
||||
class="q-pl-lg"
|
||||
>
|
||||
<q-item v-if="!scope.opt.category" v-bind="scope.itemProps" class="q-pl-lg">
|
||||
<q-item-section>
|
||||
<q-item-label v-html="scope.opt.label"></q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
Reference in New Issue
Block a user