mirror of https://github.com/rancher/ui.git
36 lines
784 B
JavaScript
36 lines
784 B
JavaScript
import { set } from '@ember/object';
|
|
import Component from '@ember/component';
|
|
import ViewNewEdit from 'shared/mixins/view-new-edit';
|
|
import OptionallyNamespaced from 'shared/mixins/optionally-namespaced';
|
|
import layout from './template';
|
|
|
|
export default Component.extend(ViewNewEdit, OptionallyNamespaced, {
|
|
layout,
|
|
model: null,
|
|
|
|
titleKey: 'newSecret.title',
|
|
|
|
scope: 'project',
|
|
namespace: null,
|
|
|
|
actions: {
|
|
updateData(map) {
|
|
set(this, 'primaryResource.data', map);
|
|
},
|
|
},
|
|
|
|
projectType: 'secret',
|
|
namespacedType: 'namespacedSecret',
|
|
doSave() {
|
|
let self = this;
|
|
let sup = self._super;
|
|
return this.namespacePromise().then(() => {
|
|
return sup.apply(self,arguments);
|
|
});
|
|
},
|
|
|
|
doneSaving() {
|
|
this.sendAction('cancel');
|
|
},
|
|
});
|