From b2b345e3a3c5ca6a6c974a043e6dfb34c161b96f Mon Sep 17 00:00:00 2001 From: JacquesLarique <134954692+JacquesLarique@users.noreply.github.com> Date: Thu, 23 Jan 2025 11:03:44 +0100 Subject: [PATCH] fix(billing): adjust ssh key list template and fix error prone code (#14994) ref: MANAGER-16766 Signed-off-by: Jacques Larique --- .../modules/billing/src/autoRenew/autorenew.controller.js | 4 ++-- .../manager/modules/billing/src/autoRenew/ssh/user-ssh.html | 2 +- .../modules/new-billing/src/autoRenew/autorenew.controller.js | 4 ++-- .../modules/new-billing/src/autoRenew/ssh/user-ssh.html | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/manager/modules/billing/src/autoRenew/autorenew.controller.js b/packages/manager/modules/billing/src/autoRenew/autorenew.controller.js index 2f3c6c51c343..a67aa309061f 100644 --- a/packages/manager/modules/billing/src/autoRenew/autorenew.controller.js +++ b/packages/manager/modules/billing/src/autoRenew/autorenew.controller.js @@ -78,7 +78,7 @@ export default class AutorenewCtrl { this.parseExtraCriteria(); - if (this.sort.predicate) { + if (this.sort?.predicate) { this.columnsConfig = map(COLUMNS_CONFIG, (column) => column.property === this.sort.predicate ? { @@ -193,7 +193,7 @@ export default class AutorenewCtrl { return this.$q.resolve({ meta: { - totalCount: this.services.count, + totalCount: this.services?.count || 0, }, data: this.billingServices, }); diff --git a/packages/manager/modules/billing/src/autoRenew/ssh/user-ssh.html b/packages/manager/modules/billing/src/autoRenew/ssh/user-ssh.html index 2a833781306c..c7c24734c59a 100644 --- a/packages/manager/modules/billing/src/autoRenew/ssh/user-ssh.html +++ b/packages/manager/modules/billing/src/autoRenew/ssh/user-ssh.html @@ -113,7 +113,7 @@ - + diff --git a/packages/manager/modules/new-billing/src/autoRenew/autorenew.controller.js b/packages/manager/modules/new-billing/src/autoRenew/autorenew.controller.js index 2f3c6c51c343..a67aa309061f 100644 --- a/packages/manager/modules/new-billing/src/autoRenew/autorenew.controller.js +++ b/packages/manager/modules/new-billing/src/autoRenew/autorenew.controller.js @@ -78,7 +78,7 @@ export default class AutorenewCtrl { this.parseExtraCriteria(); - if (this.sort.predicate) { + if (this.sort?.predicate) { this.columnsConfig = map(COLUMNS_CONFIG, (column) => column.property === this.sort.predicate ? { @@ -193,7 +193,7 @@ export default class AutorenewCtrl { return this.$q.resolve({ meta: { - totalCount: this.services.count, + totalCount: this.services?.count || 0, }, data: this.billingServices, }); diff --git a/packages/manager/modules/new-billing/src/autoRenew/ssh/user-ssh.html b/packages/manager/modules/new-billing/src/autoRenew/ssh/user-ssh.html index 2a833781306c..c7c24734c59a 100644 --- a/packages/manager/modules/new-billing/src/autoRenew/ssh/user-ssh.html +++ b/packages/manager/modules/new-billing/src/autoRenew/ssh/user-ssh.html @@ -113,7 +113,7 @@ - +