From 37ea6b7901e9889a4530e382536bbe8e1db19848 Mon Sep 17 00:00:00 2001 From: Francesco Torchia Date: Thu, 21 Mar 2024 18:18:36 +0100 Subject: [PATCH 1/2] Remove window.$nuxt deprecation for Harvester Signed-off-by: Francesco Torchia --- shell/initialize/App.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shell/initialize/App.js b/shell/initialize/App.js index 5eae21de01c..c261bea0be5 100644 --- a/shell/initialize/App.js +++ b/shell/initialize/App.js @@ -37,7 +37,11 @@ export default { window.$globalApp = this; Object.defineProperty(window, '$nuxt', { get() { - console.warn('window.$nuxt is deprecated. It would be best to stop using globalState all together. For an alternative you can use window.$globalApp.'); // eslint-disable-line no-console + const isHarvester = this.$globalApp?.$store.getters['currentCluster']?.isHarvester; + + if (!isHarvester) { + console.warn('window.$nuxt is deprecated. It would be best to stop using globalState all together. For an alternative you can use window.$globalApp.'); // eslint-disable-line no-console + } return window.$globalApp; } From 06392e5aabc44b1380b9f1f1a1dfacc31d8a2cb2 Mon Sep 17 00:00:00 2001 From: Francesco Torchia Date: Thu, 21 Mar 2024 18:19:09 +0100 Subject: [PATCH 2/2] Remove unused state property Signed-off-by: Francesco Torchia --- shell/components/formatter/ImagePercentageBar.vue | 4 ---- 1 file changed, 4 deletions(-) diff --git a/shell/components/formatter/ImagePercentageBar.vue b/shell/components/formatter/ImagePercentageBar.vue index 915a3bbb2d6..f149454dfa1 100644 --- a/shell/components/formatter/ImagePercentageBar.vue +++ b/shell/components/formatter/ImagePercentageBar.vue @@ -37,10 +37,6 @@ export default { }]; }, - state() { - return this.row.stateDisplay; - }, - completed() { return Number.parseFloat(this.value) === 100 && !this.failed; },