mirror of https://github.com/rancher/ui.git
Fix config map and secret issue
https://github.com/rancher/rancher/issues/13104
This commit is contained in:
parent
7bbf8845af
commit
e6cd90bafc
|
|
@ -36,7 +36,10 @@ export default Component.extend(ViewNewEdit, OptionallyNamespaced, {
|
|||
},
|
||||
|
||||
validate() {
|
||||
return true;
|
||||
const errors = [];
|
||||
errors.pushObjects(get(this,'namespaceErrors')||[]);
|
||||
set(this,'errors', errors);
|
||||
return errors.length === 0;
|
||||
},
|
||||
|
||||
doSave() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { set } from '@ember/object';
|
||||
import { get, set } from '@ember/object';
|
||||
import Component from '@ember/component';
|
||||
import ViewNewEdit from 'shared/mixins/view-new-edit';
|
||||
import OptionallyNamespaced from 'shared/mixins/optionally-namespaced';
|
||||
|
|
@ -21,6 +21,14 @@ export default Component.extend(ViewNewEdit, OptionallyNamespaced, {
|
|||
|
||||
projectType: 'secret',
|
||||
namespacedType: 'namespacedSecret',
|
||||
|
||||
validate() {
|
||||
const errors = [];
|
||||
errors.pushObjects(get(this,'namespaceErrors')||[]);
|
||||
set(this,'errors', errors);
|
||||
return errors.length === 0;
|
||||
},
|
||||
|
||||
doSave() {
|
||||
let self = this;
|
||||
let sup = self._super;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
}}
|
||||
{{/if}}
|
||||
|
||||
{{optionally-namespaced scope=scope mode=mode namespace=namespace model=model}}
|
||||
{{optionally-namespaced namespaceErrors=namespaceErrors scope=scope mode=mode namespace=namespace model=model}}
|
||||
|
||||
<div class="box mt-10">
|
||||
<label class="acc-label">{{t 'newSecret.values.label'}}</label>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ export default Component.extend({
|
|||
scope: null,
|
||||
namespace: null,
|
||||
model: null,
|
||||
namespaceErrors: null,
|
||||
|
||||
isView: equal('mode', VIEW),
|
||||
isNew: equal('mode', NEW),
|
||||
|
|
|
|||
Loading…
Reference in New Issue