alerts overview work

This commit is contained in:
sadnub
2021-01-25 18:01:25 -05:00
parent 3fe83f81be
commit db5ff372a4
12 changed files with 451 additions and 147 deletions

View File

@@ -11,7 +11,7 @@
<q-form @submit="submit">
<q-card-section v-if="options.length > 0">
<q-select
v-if="type !== 'agent'"
v-if="type === 'client' || type === 'site'"
class="q-mb-md"
v-model="selectedServerPolicy"
:options="options"
@@ -25,7 +25,7 @@
>
</q-select>
<q-select
v-if="type !== 'agent'"
v-if="type === 'client' || type === 'site'"
v-model="selectedWorkstationPolicy"
:options="options"
outlined
@@ -91,7 +91,7 @@ export default {
methods: {
submit() {
// check if data was changed
if (this.type !== "agent") {
if (this.type === "client" || this.type === "site") {
if (
this.object.workstation_policy === this.selectedWorkstationPolicy &&
this.object.server_policy === this.selectedServerPolicy
@@ -99,11 +99,13 @@ export default {
this.hide();
return;
}
} else {
} else if (this.type === "agent") {
if (this.object.policy === this.selectedAgentPolicy) {
this.hide();
return;
}
} else {
return;
}
this.$q.loading.show();
@@ -112,14 +114,13 @@ export default {
type: this.type,
};
if (this.type !== "agent") {
if (this.type === "client" || this.type === "site") {
data.server_policy = this.selectedServerPolicy;
data.workstation_policy = this.selectedWorkstationPolicy;
} else {
} else if (this.type === "agent") {
data.policy = this.selectedAgentPolicy;
}
console.log(data);
this.$axios
.post(`/automation/related/`, data)
.then(r => {