mirror of
https://github.com/jpros/tacticalrmm-web.git
synced 2026-02-28 23:31:54 +00:00
add policy sync to automation manager
This commit is contained in:
@@ -127,6 +127,13 @@
|
||||
<q-item-section>Policy Exclusions</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item clickable v-close-popup @click="syncPolicies(props.row)">
|
||||
<q-item-section side>
|
||||
<q-icon name="sync" />
|
||||
</q-item-section>
|
||||
<q-item-section>Sync Policies</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-item clickable v-close-popup @click="showPatchPolicyForm(props.row)">
|
||||
<q-item-section side>
|
||||
<q-icon name="system_update" />
|
||||
@@ -450,6 +457,24 @@ export default {
|
||||
this.refresh();
|
||||
});
|
||||
},
|
||||
syncPolicies(policy) {
|
||||
this.$q.loading.show();
|
||||
|
||||
const data = {
|
||||
policy: policy.id,
|
||||
};
|
||||
|
||||
this.$axios
|
||||
.post(`/automation/sync/`, data)
|
||||
.then(r => {
|
||||
this.$q.loading.hide();
|
||||
this.notifySuccess("Sync request sent successfully. The task will be run on all affected agents");
|
||||
})
|
||||
.catch(error => {
|
||||
this.$q.loading.hide();
|
||||
this.notifyError("An Error occured while sending policy sync request");
|
||||
});
|
||||
},
|
||||
toggleCheckbox(policy, type) {
|
||||
this.$q.loading.show();
|
||||
let text = "";
|
||||
|
||||
Reference in New Issue
Block a user