Skip to content

Commit

Permalink
backport of commit 41bae45
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed May 25, 2023
1 parent 5410564 commit f5c52fe
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/17319.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: fixed a handful of UX-related bugs during variable editing
```
1 change: 1 addition & 0 deletions ui/app/components/variable-form.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
class="delete-row button is-danger is-inverted"
type="button"
{{on "click" (action this.deleteRow entry)}}
disabled={{eq this.keyValues.length 1}}
>
Delete
</button>
Expand Down
5 changes: 4 additions & 1 deletion ui/app/components/variable-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ export default class VariableFormComponent extends Component {
}

@action appendRow() {
this.keyValues.pushObject(copy(EMPTY_KV));
// Clear our any entity errors
let newRow = copy(EMPTY_KV);
newRow.warnings = EmberObject.create();
this.keyValues.pushObject(newRow);
}

@action deleteRow(row) {
Expand Down
2 changes: 1 addition & 1 deletion ui/app/components/variable-form/related-entities.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{{else if @job}}
job <LinkTo @route="jobs.job" @model={{concat @job "@" @namespace}}>{{@job}} <FlightIcon @name="external-link" /></LinkTo>
{{else}}
all nomad jobs
all nomad jobs in this namespace
{{/if}}
</span>
</p>

0 comments on commit f5c52fe

Please sign in to comment.