From d3c0f5dfe25768bd918596dcdaf00b66e4c42c84 Mon Sep 17 00:00:00 2001 From: Cody Jackson Date: Sat, 21 Mar 2020 02:09:03 -0700 Subject: [PATCH] Adding yet another condition to the CIS Add Schedule button This now checks to see if there's and RKE template. If there is an RKE template and the scheduleScanned is disabled the button will be disabled unless there's an override available for the scheduledClusterScan.enabled field. rancher/rancher#26150 --- app/authenticated/cluster/cis/scan/route.js | 3 ++- .../cluster/cis/scan/template.hbs | 2 +- app/models/cluster.js | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/app/authenticated/cluster/cis/scan/route.js b/app/authenticated/cluster/cis/scan/route.js index f699c0c5d..dccaf0318 100644 --- a/app/authenticated/cluster/cis/scan/route.js +++ b/app/authenticated/cluster/cis/scan/route.js @@ -19,7 +19,8 @@ export default Route.extend({ return await Promise.all(reportPromises); })(), - configMaps: this.securityScanConfig.loadAsyncConfigMap(get(this, 'scope.currentCluster')) + configMaps: this.securityScanConfig.loadAsyncConfigMap(get(this, 'scope.currentCluster')), + clusterTemplateRevisions: get(this, 'globalStore').findAll('clustertemplaterevision') }); }, }); diff --git a/app/authenticated/cluster/cis/scan/template.hbs b/app/authenticated/cluster/cis/scan/template.hbs index 09a74702d..38dca347e 100644 --- a/app/authenticated/cluster/cis/scan/template.hbs +++ b/app/authenticated/cluster/cis/scan/template.hbs @@ -23,7 +23,7 @@ {{t 'cis.scan.table.empty'}} {{else if (eq kind "right-actions")}} -