From 53bdf3af6133fd1a054ffd60fb6a35339de39c3c Mon Sep 17 00:00:00 2001 From: d-linko Date: Mon, 11 Dec 2023 22:29:58 -0500 Subject: [PATCH] add missing calls to update agent info in modal --- .../app/components/management/agents/AgentModal.vue | 5 +++++ anms-ui/public/app/core/router.js | 10 +--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/anms-ui/public/app/components/management/agents/AgentModal.vue b/anms-ui/public/app/components/management/agents/AgentModal.vue index 42684d5..3f2a7ed 100644 --- a/anms-ui/public/app/components/management/agents/AgentModal.vue +++ b/anms-ui/public/app/components/management/agents/AgentModal.vue @@ -52,6 +52,10 @@ export default { }, watch: { showModal(newValue, _) { + const vm = this; + vm.setAgentId(vm.agentInfo.registered_agents_id); + vm.reloadAgent(); + console.log(vm.currentAgent) if (newValue === true) { this.show(); } @@ -59,6 +63,7 @@ export default { }, computed: { ...mapGetters("agents", { + currentAgent: "currentAgent", rptt: "rptt", operations: "operations", diff --git a/anms-ui/public/app/core/router.js b/anms-ui/public/app/core/router.js index 6db946d..c36cbc3 100644 --- a/anms-ui/public/app/core/router.js +++ b/anms-ui/public/app/core/router.js @@ -29,7 +29,6 @@ import UserProfile from '@app/components/user/UserProfile'; import UserAdmin from '@app/components/user/UserAdmin'; import Dashboard from "../components/management/monitor/Monitor"; import Agents from "../components/management/agents/Agents"; -import Agent from "../components/management/agents/Agent"; import build_ari from "../components/management/builder/buildAri"; import Status from "../components/status/Status"; import Adm from "../components/adm/Adm"; @@ -79,14 +78,7 @@ export default new Router({ name: 'Agents CBOR', component: Agents, props: true - }, - { - path: '/agents/id/:agentId', - name: 'Agent Details', - component: Agent, - props: true - }, - + }, { path: '/build', name: 'Build ari',