From c3f0e1b851d64a64109b096b23ddf9b195683ed4 Mon Sep 17 00:00:00 2001 From: navyadas-dev Date: Mon, 16 Mar 2026 14:01:23 +0530 Subject: [PATCH 1/3] NMD-789- Nomad UI Clients view issue in federated clusters configuration --- ui/app/routes/clients/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ui/app/routes/clients/index.js b/ui/app/routes/clients/index.js index b9678f080fa..75ae383b2ca 100644 --- a/ui/app/routes/clients/index.js +++ b/ui/app/routes/clients/index.js @@ -12,6 +12,20 @@ import { inject as service } from '@ember/service'; export default class IndexRoute extends Route.extend(WithWatchers) { @service store; + deactivate() { + const startTime = performance.now(); + console.log('🔴 [CLIENTS] Route deactivating at', new Date().toISOString()); + + this.cancelAllWatchers(); + + super.deactivate(...arguments); + + const duration = performance.now() - startTime; + console.log( + `🔴 [CLIENTS] Deactivate completed in ${duration.toFixed(2)}ms` + ); + } + startWatchers(controller) { controller.set('watcher', this.watch.perform()); } From 4035ce85c855dfdbc5c8b87c08fcb83c2ca9a184 Mon Sep 17 00:00:00 2001 From: navyadas-dev Date: Mon, 16 Mar 2026 18:25:08 +0530 Subject: [PATCH 2/3] NMD-789- Nomad UI Clients view issue in federated clusters configuration --- ui/app/routes/clients/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ui/app/routes/clients/index.js b/ui/app/routes/clients/index.js index 75ae383b2ca..b617b6df857 100644 --- a/ui/app/routes/clients/index.js +++ b/ui/app/routes/clients/index.js @@ -14,16 +14,14 @@ export default class IndexRoute extends Route.extend(WithWatchers) { deactivate() { const startTime = performance.now(); - console.log('🔴 [CLIENTS] Route deactivating at', new Date().toISOString()); + console.log('Route deactivating at', new Date().toISOString()); this.cancelAllWatchers(); super.deactivate(...arguments); const duration = performance.now() - startTime; - console.log( - `🔴 [CLIENTS] Deactivate completed in ${duration.toFixed(2)}ms` - ); + console.log(`Deactivate completed in ${duration.toFixed(2)}ms`); } startWatchers(controller) { From 8ee35a4042888607b9d703794078410880fd2cbf Mon Sep 17 00:00:00 2001 From: navyadas-dev Date: Thu, 30 Apr 2026 10:10:53 +0530 Subject: [PATCH 3/3] NMD-789-[Cont.] Nomad UI Clients view issue in federated clusters configuration --- ui/app/components/client-node-row.js | 23 +---------------------- ui/app/routes/clients/client/index.js | 15 +++++++++++---- ui/app/routes/clients/index.js | 7 ------- 3 files changed, 12 insertions(+), 33 deletions(-) diff --git a/ui/app/components/client-node-row.js b/ui/app/components/client-node-row.js index 32e551fba17..aca4d7a3be1 100644 --- a/ui/app/components/client-node-row.js +++ b/ui/app/components/client-node-row.js @@ -6,7 +6,6 @@ import { inject as service } from '@ember/service'; import Component from '@ember/component'; import { lazyClick } from '../helpers/lazy-click'; -import { watchRelationship } from 'nomad-ui/utils/properties/watch'; import WithVisibilityDetection from 'nomad-ui/mixins/with-component-visibility-detection'; import { computed } from '@ember/object'; import { classNames, tagName } from '@ember-decorators/component'; @@ -33,30 +32,10 @@ export default class ClientNodeRow extends Component.extend( // Reload the node in order to get detail information const node = this.node; if (node) { - node.reload().then(() => { - this.watch.perform(node, 100); - }); + node.reload(); } } - visibilityHandler() { - if (document.hidden) { - this.watch.cancelAll(); - } else { - const node = this.node; - if (node) { - this.watch.perform(node, 100); - } - } - } - - willDestroy() { - this.watch.cancelAll(); - super.willDestroy(...arguments); - } - - @watchRelationship('allocations') watch; - @computed('node.status') get nodeStatusColor() { let status = this.get('node.status'); diff --git a/ui/app/routes/clients/client/index.js b/ui/app/routes/clients/client/index.js index 7527b69a25d..05f0ae5feca 100644 --- a/ui/app/routes/clients/client/index.js +++ b/ui/app/routes/clients/client/index.js @@ -21,7 +21,12 @@ export default class ClientRoute extends Route.extend(WithWatchers) { return super.setupController(...arguments); } - resetController(controller) { + resetController(controller, isExiting) { + if (isExiting) { + controller.set('watchModel', null); + controller.set('watchAllocations', null); + } + controller.setProperties({ eligibilityError: null, stopDrainError: null, @@ -34,10 +39,12 @@ export default class ClientRoute extends Route.extend(WithWatchers) { } startWatchers(controller, model) { - if (model) { - controller.set('watchModel', this.watch.perform(model)); - controller.set('watchAllocations', this.watchAllocations.perform(model)); + if (!model) { + return; } + + controller.set('watchModel', this.watch.perform(model)); + controller.set('watchAllocations', this.watchAllocations.perform(model)); } @watchRecord('node') watch; diff --git a/ui/app/routes/clients/index.js b/ui/app/routes/clients/index.js index b617b6df857..dec1750ec9c 100644 --- a/ui/app/routes/clients/index.js +++ b/ui/app/routes/clients/index.js @@ -13,15 +13,8 @@ export default class IndexRoute extends Route.extend(WithWatchers) { @service store; deactivate() { - const startTime = performance.now(); - console.log('Route deactivating at', new Date().toISOString()); - this.cancelAllWatchers(); - super.deactivate(...arguments); - - const duration = performance.now() - startTime; - console.log(`Deactivate completed in ${duration.toFixed(2)}ms`); } startWatchers(controller) {