[ui] Two small UI quality of life changes (#19377)

* Jobs index without groups

* Download button only appears if you have content in your template

* No longer need to test for the group count in jobs index
This commit is contained in:
Phil Renaud
2023-12-08 11:21:14 -05:00
committed by GitHub
parent e9ff6d74d3
commit 5d2688a257
6 changed files with 4 additions and 16 deletions

3
.changelog/19377.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:improvement
ui: dont allow new jobspec download until template is populated, and remove group count from jobs index
```

View File

@@ -114,6 +114,6 @@
@text="Save as .nomad.hcl"
@color="secondary"
{{on "click" @fns.onSaveFile}}
disabled={{not @data.job._newDefinition}}
/>
</Hds::ButtonSet>

View File

@@ -52,9 +52,6 @@
<t.sort-by @prop="status">
Status
</t.sort-by>
<th>
Groups
</th>
<th class="is-3">
Summary
</th>

View File

@@ -53,13 +53,6 @@
{{this.job.priority}}
</td>
{{/if}}
<td data-test-job-task-groups>
{{#if this.job.taskGroupCount}}
{{this.job.taskGroupCount}}
{{else}}
--
{{/if}}
</td>
<td data-test-job-allocations>
<div class="inline-chart">
{{#if this.job.hasChildren}}

View File

@@ -155,9 +155,6 @@
<t.sort-by @prop="priority">
Priority
</t.sort-by>
<th>
Groups
</th>
<th class="is-3">
Summary
</th>

View File

@@ -63,7 +63,6 @@ module('Acceptance | jobs list', function (hooks) {
test('each job row should contain information about the job', async function (assert) {
server.createList('job', 2);
const job = server.db.jobs.sortBy('modifyIndex').reverse()[0];
const taskGroups = server.db.taskGroups.where({ jobId: job.id });
await JobsList.visit();
@@ -76,7 +75,6 @@ module('Acceptance | jobs list', function (hooks) {
assert.equal(jobRow.status, job.status, 'Status');
assert.equal(jobRow.type, typeForJob(job), 'Type');
assert.equal(jobRow.priority, job.priority, 'Priority');
assert.equal(jobRow.taskGroups, taskGroups.length, '# Groups');
});
test('each job row should link to the corresponding job', async function (assert) {