diff --git a/src/components/AgentTable.vue b/src/components/AgentTable.vue index bb76cfd..9be63c9 100644 --- a/src/components/AgentTable.vue +++ b/src/components/AgentTable.vue @@ -217,7 +217,7 @@ - + @@ -339,10 +339,6 @@ - - - - @@ -379,7 +375,6 @@ export default { EditAgent, RebootLater, PendingActions, - PolicyAdd, SendCommand, AgentRecovery, RunScript, @@ -395,10 +390,8 @@ export default { showSendCommand: false, showEditAgentModal: false, showRebootLaterModal: false, - showPolicyAddModal: false, showAgentRecovery: false, showRunScript: false, - policyAddPk: null, showPendingActions: false, pendingActionAgentPk: null, favoriteScripts: [], @@ -671,9 +664,13 @@ export default { return "agent-normal"; } }, - showPolicyAdd(pk) { - this.policyAddPk = pk; - this.showPolicyAddModal = true; + showPolicyAdd(agent) { + this.$q.dialog({ + component: PolicyAdd, + parent: this, + type: "agent", + object: agent, + }); }, toggleMaintenance(agent) { let data = { diff --git a/src/components/AlertsManager.vue b/src/components/AlertsManager.vue index 51dd14f..1f53998 100644 --- a/src/components/AlertsManager.vue +++ b/src/components/AlertsManager.vue @@ -15,26 +15,26 @@ - {{ props.name }} + {{ props.col.label }} @@ -74,9 +74,9 @@ @@ -173,7 +173,7 @@ export default { mixins: [mixins], data() { return { - selected: [], + selectedTemplate: null, templates: [], columns: [ { name: "is_active", label: "Active", field: "is_active", align: "left" }, @@ -225,7 +225,7 @@ export default { }); }, clearRow() { - this.selected = []; + this.selectedTemplate = null; }, refresh() { this.getTemplates(); @@ -292,8 +292,8 @@ export default { this.notifyError("An Error occured while editing the template"); }); }, - rowSelectedClass(id, selected) { - if (selected.length !== 0 && selected[0].id === id) return this.$q.dark.isActive ? "highlight-dark" : "highlight"; + rowSelectedClass(id, selectedTemplate) { + if (selectedTemplate && selectedTemplate.id === id) return this.$q.dark.isActive ? "highlight-dark" : "highlight"; }, show() { this.$refs.dialog.show(); diff --git a/src/components/automation/AutomationManager.vue b/src/components/automation/AutomationManager.vue index 09044a2..f1100ec 100644 --- a/src/components/automation/AutomationManager.vue +++ b/src/components/automation/AutomationManager.vue @@ -1,6 +1,6 @@