From 480986ef540c783f623ba81c20b3c5b66cba76cc Mon Sep 17 00:00:00 2001 From: shanewxy <592491808@qq.com> Date: Wed, 25 Dec 2019 17:39:29 +0800 Subject: [PATCH 1/2] Enable add labels and annotations while adding Config Maps --- app/components/cru-config-map/template.hbs | 10 ++++++++++ app/models/configmap.js | 8 ++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/components/cru-config-map/template.hbs b/app/components/cru-config-map/template.hbs index ef1964998..972810ffa 100644 --- a/app/components/cru-config-map/template.hbs +++ b/app/components/cru-config-map/template.hbs @@ -58,6 +58,16 @@ }} +
+ +
+ {{#accordion-list showExpandAll=false as | al expandFn |}} {{#if isView}} {{form-related-workloads diff --git a/app/models/configmap.js b/app/models/configmap.js index 26f829e98..56fd8c464 100644 --- a/app/models/configmap.js +++ b/app/models/configmap.js @@ -9,10 +9,10 @@ export default Resource.extend({ router: service(), clusterStore: service(), - state: 'active', - canClone: true, - - namespace: reference('namespaceId', 'namespace', 'clusterStore'), + state: 'active', + canClone: true, + canHaveLabels: true, + namespace: reference('namespaceId', 'namespace', 'clusterStore'), firstKey: alias('keys.firstObject'), From 0e5b2905f90f1deab852ac342056f9e6fc5a85da Mon Sep 17 00:00:00 2001 From: shanewxy <592491808@qq.com> Date: Mon, 23 Dec 2019 10:25:15 +0800 Subject: [PATCH 2/2] Enable add labels and annotations while adding secret https://github.com/rancher/rancher/issues/21513 --- app/components/cru-secret/template.hbs | 10 ++++++++++ app/models/secret.js | 10 +++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/app/components/cru-secret/template.hbs b/app/components/cru-secret/template.hbs index 9dea87d3c..9f97c1998 100644 --- a/app/components/cru-secret/template.hbs +++ b/app/components/cru-secret/template.hbs @@ -57,6 +57,16 @@ }} +
+ +
+ {{#accordion-list showExpandAll=false as | al expandFn |}} {{#if isView}} {{form-related-workloads diff --git a/app/models/secret.js b/app/models/secret.js index 36759ddea..8bf916cb9 100644 --- a/app/models/secret.js +++ b/app/models/secret.js @@ -7,11 +7,11 @@ export default Resource.extend({ router: service(), allWorkloads: service(), - state: 'active', - canClone: true, - - firstKey: alias('keys.firstObject'), - keys: computed('data', function() { + state: 'active', + canClone: true, + canHaveLabels: true, + firstKey: alias('keys.firstObject'), + keys: computed('data', function() { return Object.keys(get(this, 'data') || {}).sort(); }),