mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
New variable creation adds the first namespace in your available list at variable creation time (#13991)
* New variable creation adds the first namespace in your available list at variable creation time * Changelog
This commit is contained in:
3
.changelog/13991.txt
Normal file
3
.changelog/13991.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:bug
|
||||
ui: when creating a secure variable, check against your namespaces rather than assuming default
|
||||
```
|
||||
@@ -1,8 +1,12 @@
|
||||
import Route from '@ember/routing/route';
|
||||
|
||||
export default class VariablesNewRoute extends Route {
|
||||
model(params) {
|
||||
return this.store.createRecord('variable', { path: params.path });
|
||||
async model(params) {
|
||||
const namespaces = await this.store.peekAll('namespace');
|
||||
return this.store.createRecord('variable', {
|
||||
path: params.path,
|
||||
namespace: namespaces.objectAt(0)?.id,
|
||||
});
|
||||
}
|
||||
resetController(controller, isExiting) {
|
||||
// If the user navigates away from /new, clear the path
|
||||
|
||||
Reference in New Issue
Block a user