From 087ac3a0f203e607ce4f6dc6ea4ab0562771122c Mon Sep 17 00:00:00 2001 From: Phil Renaud Date: Thu, 25 May 2023 17:11:13 -0400 Subject: [PATCH] [ui] A few variables-ui-related bugfixes (#17319) * A few variable-adding bugfixes * Disable Delete button if only one KV is left, and remove entity warnings on Add More --- .changelog/17319.txt | 3 +++ ui/app/components/variable-form.hbs | 22 ++++++++++--------- ui/app/components/variable-form.js | 12 +++++++--- .../variable-form/related-entities.hbs | 4 +++- .../controllers/variables/variable/index.js | 3 ++- 5 files changed, 29 insertions(+), 15 deletions(-) create mode 100644 .changelog/17319.txt diff --git a/.changelog/17319.txt b/.changelog/17319.txt new file mode 100644 index 000000000..0cecdd827 --- /dev/null +++ b/.changelog/17319.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: fixed a handful of UX-related bugs during variable editing +``` diff --git a/ui/app/components/variable-form.hbs b/ui/app/components/variable-form.hbs index 0b1c2ed7f..7780f71a5 100644 --- a/ui/app/components/variable-form.hbs +++ b/ui/app/components/variable-form.hbs @@ -14,6 +14,17 @@ Format: nomad/jobs/<jobname>, nomad/jobs/<jobname>/<groupname>, nomad/jobs/<jobname>/<groupname>/<taskname>

{{/unless}} + + {{#if this.shouldShowLinkedEntities}} + + {{/if}} + {{/if}} {{#if this.hasConflict}} @@ -137,6 +148,7 @@ class="delete-row button is-danger is-inverted" type="button" {{on "click" (action this.deleteRow entry)}} + disabled={{eq this.keyValues.length 1}} > Delete @@ -150,16 +162,6 @@ {{/if}} {{/if}} - {{#if (and this.shouldShowLinkedEntities @model.isNew)}} - - {{/if}} -