mirror of
https://github.com/jpros/tacticalrmm-web.git
synced 2026-02-22 20:31:21 +00:00
Merge pull request #153 from sadnub/develop
fixes related agents and check additions not applying to all agents
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div style="width: 900px; max-width: 90vw;">
|
||||
<div style="width: 900px; max-width: 90vw">
|
||||
<q-card>
|
||||
<q-bar>
|
||||
<q-btn ref="refresh" @click="refresh" class="q-mr-sm" dense flat push icon="refresh" />Automation Manager
|
||||
@@ -10,17 +10,7 @@
|
||||
</q-bar>
|
||||
<div class="q-pa-md">
|
||||
<div class="q-gutter-sm">
|
||||
<q-btn
|
||||
ref="new"
|
||||
label="New"
|
||||
dense
|
||||
flat
|
||||
push
|
||||
unelevated
|
||||
no-caps
|
||||
icon="add"
|
||||
@click="showAddPolicyModal"
|
||||
/>
|
||||
<q-btn ref="new" label="New" dense flat push unelevated no-caps icon="add" @click="showAddPolicyModal" />
|
||||
<q-btn
|
||||
ref="edit"
|
||||
label="Edit"
|
||||
@@ -102,36 +92,21 @@
|
||||
<!-- context menu -->
|
||||
<q-menu context-menu>
|
||||
<q-list dense style="min-width: 200px">
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="showEditPolicyModal(props.row.id)"
|
||||
id="context-edit"
|
||||
>
|
||||
<q-item clickable v-close-popup @click="showEditPolicyModal(props.row.id)" id="context-edit">
|
||||
<q-item-section side>
|
||||
<q-icon name="edit" />
|
||||
</q-item-section>
|
||||
<q-item-section>Edit</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="showCopyPolicyModal(props.row)"
|
||||
id="context-copy"
|
||||
>
|
||||
<q-item clickable v-close-popup @click="showCopyPolicyModal(props.row)" id="context-copy">
|
||||
<q-item-section side>
|
||||
<q-icon name="content_copy" />
|
||||
</q-item-section>
|
||||
<q-item-section>Copy</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="deletePolicy(props.row.id)"
|
||||
id="context-delete"
|
||||
>
|
||||
<q-item clickable v-close-popup @click="deletePolicy(props.row.id)" id="context-delete">
|
||||
<q-item-section side>
|
||||
<q-icon name="delete" />
|
||||
</q-item-section>
|
||||
@@ -140,24 +115,14 @@
|
||||
|
||||
<q-separator></q-separator>
|
||||
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="showRelationsModal(props.row)"
|
||||
id="context-relation"
|
||||
>
|
||||
<q-item clickable v-close-popup @click="showRelationsModal(props.row)" id="context-relation">
|
||||
<q-item-section side>
|
||||
<q-icon name="account_tree" />
|
||||
</q-item-section>
|
||||
<q-item-section>Show Relations</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="showEditPatchPolicyModal(props.row)"
|
||||
id="context-winupdate"
|
||||
>
|
||||
<q-item clickable v-close-popup @click="showEditPatchPolicyModal(props.row)" id="context-winupdate">
|
||||
<q-item-section side>
|
||||
<q-icon name="system_update" />
|
||||
</q-item-section>
|
||||
@@ -173,47 +138,35 @@
|
||||
</q-menu>
|
||||
<!-- enabled checkbox -->
|
||||
<q-td>
|
||||
<q-checkbox
|
||||
dense
|
||||
@input="toggleCheckbox(props.row, 'Active')"
|
||||
v-model="props.row.active"
|
||||
/>
|
||||
<q-checkbox dense @input="toggleCheckbox(props.row, 'Active')" v-model="props.row.active" />
|
||||
</q-td>
|
||||
<!-- enforced checkbox -->
|
||||
<q-td>
|
||||
<q-checkbox
|
||||
dense
|
||||
@input="toggleCheckbox(props.row, 'Enforced')"
|
||||
v-model="props.row.enforced"
|
||||
/>
|
||||
<q-checkbox dense @input="toggleCheckbox(props.row, 'Enforced')" v-model="props.row.enforced" />
|
||||
</q-td>
|
||||
<q-td>
|
||||
{{ props.row.name }}
|
||||
<q-chip
|
||||
v-if="props.row.default_server_policy"
|
||||
color="primary"
|
||||
text-color="white"
|
||||
size="sm"
|
||||
>Default Server</q-chip>
|
||||
<q-chip
|
||||
v-if="props.row.default_workstation_policy"
|
||||
color="primary"
|
||||
text-color="white"
|
||||
size="sm"
|
||||
>Default Workstation</q-chip>
|
||||
<q-chip v-if="props.row.default_server_policy" color="primary" text-color="white" size="sm"
|
||||
>Default Server</q-chip
|
||||
>
|
||||
<q-chip v-if="props.row.default_workstation_policy" color="primary" text-color="white" size="sm"
|
||||
>Default Workstation</q-chip
|
||||
>
|
||||
</q-td>
|
||||
<q-td>{{ props.row.desc }}</q-td>
|
||||
<q-td>
|
||||
<span
|
||||
style="cursor:pointer;color:blue;text-decoration:underline"
|
||||
style="cursor: pointer; color: blue; text-decoration: underline"
|
||||
@click="showRelationsModal(props.row)"
|
||||
>{{ `Show Relations (${ props.row.agents_count }+)` }}</span>
|
||||
>{{ `Show Relations (${props.row.agents_count}+)` }}</span
|
||||
>
|
||||
</q-td>
|
||||
<q-td>
|
||||
<span
|
||||
style="cursor:pointer;color:blue;text-decoration:underline"
|
||||
style="cursor: pointer; color: blue; text-decoration: underline"
|
||||
@click="showEditPatchPolicyModal(props.row)"
|
||||
>{{ patchPolicyText(props.row) }}</span>
|
||||
>{{ patchPolicyText(props.row) }}</span
|
||||
>
|
||||
</q-td>
|
||||
<q-td>
|
||||
<q-icon name="content_copy" size="1.5em" @click="showCopyPolicyModal(props.row)">
|
||||
@@ -247,7 +200,7 @@
|
||||
|
||||
<!-- patch policy modal -->
|
||||
<q-dialog v-model="showPatchPolicyModal" @hide="closePatchPolicyModal">
|
||||
<q-card style="width: 900px; max-width: 90vw;">
|
||||
<q-card style="width: 900px; max-width: 90vw">
|
||||
<q-bar>
|
||||
{{ patchPolicyModalText() }}
|
||||
<q-space />
|
||||
@@ -255,7 +208,7 @@
|
||||
<q-tooltip content-class="bg-white text-primary">Close</q-tooltip>
|
||||
</q-btn>
|
||||
</q-bar>
|
||||
<q-scroll-area :thumb-style="thumbStyle" style="height: 500px;">
|
||||
<q-scroll-area :thumb-style="thumbStyle" style="height: 70vh">
|
||||
<PatchPolicyForm :policy="policy" @close="closePatchPolicyModal" />
|
||||
</q-scroll-area>
|
||||
</q-card>
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
</q-select>
|
||||
</q-card-section>
|
||||
<q-card-section class="row items-center">
|
||||
<q-btn label="Add Policies" color="primary" type="submit" />
|
||||
<q-btn label="Edit Policies" color="primary" type="submit" />
|
||||
</q-card-section>
|
||||
</q-form>
|
||||
</q-card>
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
<q-space />
|
||||
<q-btn icon="close" flat round dense v-close-popup />
|
||||
</q-card-section>
|
||||
<q-card-section
|
||||
class="row items-center"
|
||||
v-if="related.default_server_policy || related.default_workstation_policy"
|
||||
>
|
||||
<q-card-section class="row items-center" v-if="related.default_server_policy || related.default_workstation_policy">
|
||||
<div v-if="related.default_server_policy" class="text-body">
|
||||
<q-icon name="error_outline" color="info" size="1.5em" />This policy is set as the Default Server Policy.
|
||||
</div>
|
||||
@@ -34,74 +31,75 @@
|
||||
</q-tabs>
|
||||
|
||||
<q-separator />
|
||||
<q-scroll-area :thumb-style="thumbStyle" style="height: 50vh">
|
||||
<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-section>
|
||||
<q-item-label>{{ item.client }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-item-label>
|
||||
<i>Applied to Servers</i>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item :key="item.id + 'workstations'" v-for="item in related.workstation_clients">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.client }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-item-label>
|
||||
<i>Applied to Workstations</i>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-tab-panel>
|
||||
|
||||
<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-section>
|
||||
<q-item-label>{{ item.client }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-item-label>
|
||||
<i>Applied to Servers</i>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item :key="item.id+'workstations'" v-for="item in related.workstation_clients">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.client }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-item-label>
|
||||
<i>Applied to Workstations</i>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-tab-panel>
|
||||
<q-tab-panel name="sites">
|
||||
<q-list separator padding>
|
||||
<q-item :key="item.id + 'servers'" v-for="item in related.server_sites">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.site }}</q-item-label>
|
||||
<q-item-label caption>{{ item.client_name }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-item-label>
|
||||
<i>Applied to Servers</i>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item :key="item.id + 'workstations'" v-for="item in related.workstation_sites">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.site }}</q-item-label>
|
||||
<q-item-label caption>{{ item.client_name }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-item-label>
|
||||
<i>Applied to Workstations</i>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="sites">
|
||||
<q-list separator padding>
|
||||
<q-item :key="item.id+'servers'" v-for="item in related.server_sites">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.site }}</q-item-label>
|
||||
<q-item-label caption>{{ item.client_name }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-item-label>
|
||||
<i>Applied to Servers</i>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item :key="item.id+'workstations'" v-for="item in related.workstation_sites">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.site }}</q-item-label>
|
||||
<q-item-label caption>{{ item.client_name }}</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section side>
|
||||
<q-item-label>
|
||||
<i>Applied to Workstations</i>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-tab-panel>
|
||||
|
||||
<q-tab-panel name="agents">
|
||||
<q-list separator padding>
|
||||
<q-item :key="item.pk" v-for="item in related.agents">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.hostname }}</q-item-label>
|
||||
<q-item-label caption>
|
||||
<b>{{ item.client }}</b>
|
||||
{{ item.site }}
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
<q-tab-panel name="agents">
|
||||
<q-list separator padding>
|
||||
<q-item :key="item.pk" v-for="item in related.agents">
|
||||
<q-item-section>
|
||||
<q-item-label>{{ item.hostname }}</q-item-label>
|
||||
<q-item-label caption>
|
||||
<b>{{ item.client }}</b>
|
||||
{{ item.site }}
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-tab-panel>
|
||||
</q-tab-panels>
|
||||
</q-scroll-area>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</template>
|
||||
@@ -119,6 +117,13 @@ export default {
|
||||
return {
|
||||
tab: "clients",
|
||||
related: {},
|
||||
thumbStyle: {
|
||||
right: "2px",
|
||||
borderRadius: "5px",
|
||||
backgroundColor: "#027be3",
|
||||
width: "5px",
|
||||
opacity: 0.75,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
||||
Reference in New Issue
Block a user