From f34e76a68f1f4c723a9c5a86bcccbbeec0f23f8f Mon Sep 17 00:00:00 2001 From: Luiz Aoqui Date: Thu, 6 Jan 2022 16:01:55 -0500 Subject: [PATCH] ui: fix CI (#11785) --- ui/app/controllers/jobs/job/task-group.js | 8 +- ui/app/templates/csi/volumes/volume.hbs | 156 ++++------- ui/app/templates/jobs/job/task-group.hbs | 248 +++++------------- ui/app/templates/optimize.hbs | 81 ++---- .../integration/components/trigger-test.js | 1 + 5 files changed, 151 insertions(+), 343 deletions(-) diff --git a/ui/app/controllers/jobs/job/task-group.js b/ui/app/controllers/jobs/job/task-group.js index 3cb6efe34777..8a2c39ed981c 100644 --- a/ui/app/controllers/jobs/job/task-group.js +++ b/ui/app/controllers/jobs/job/task-group.js @@ -14,10 +14,10 @@ import classic from 'ember-classic-decorator'; @classic export default class TaskGroupController extends Controller.extend( - Sortable, - Searchable, - WithNamespaceResetting -) { + Sortable, + Searchable, + WithNamespaceResetting + ) { @service userSettings; @service can; diff --git a/ui/app/templates/csi/volumes/volume.hbs b/ui/app/templates/csi/volumes/volume.hbs index 7ac8e68f92ba..a15171d0258a 100644 --- a/ui/app/templates/csi/volumes/volume.hbs +++ b/ui/app/templates/csi/volumes/volume.hbs @@ -3,158 +3,108 @@ {{/each}} {{page-title "CSI Volume " this.model.name}}
-

- {{this.model.name}} -

+

{{this.model.name}}

+
- - Volume Details - + Volume Details - - Health - + Health {{if this.model.schedulable "Schedulable" "Unschedulable"}} - - Provider - + Provider {{this.model.provider}} - - External ID - + External ID {{this.model.externalId}} {{#if this.system.shouldShowNamespaces}} - - Namespace - + Namespace {{this.model.namespace.name}} {{/if}}
+
Write Allocations
{{#if this.model.writeAllocations.length}} - + - - ID - - - Created - - - Modified - - - Status - - - Client - - - Job - - - Version - - - CPU - - - Memory - + ID + Created + Modified + Status + Client + Job + Version + CPU + Memory + @onClick={{action "gotoAllocation" row.model}} /> {{else}}
-

- No Write Allocations -

-

- No allocations are depending on this volume for read/write access. -

+

No Write Allocations

+

No allocations are depending on this volume for read/write access.

{{/if}}
+
Read Allocations
{{#if this.model.readAllocations.length}} - + - - ID - - - Modified - - - Created - - - Status - - - Client - - - Job - - - Version - - - CPU - - - Memory - + ID + Modified + Created + Status + Client + Job + Version + CPU + Memory + @onClick={{action "gotoAllocation" row.model}} /> {{else}}
-

- No Read Allocations -

-

- No allocations are depending on this volume for read-only access. -

+

No Read Allocations

+

No allocations are depending on this volume for read-only access.

{{/if}}
+
Constraints @@ -162,32 +112,20 @@
- - + + - - + + - - + +
- Setting - - Value - SettingValue
- Access Mode - - {{this.model.accessMode}} - Access Mode{{this.model.accessMode}}
- Attachment Mode - - {{this.model.attachmentMode}} - Attachment Mode{{this.model.attachmentMode}}
-
\ No newline at end of file + diff --git a/ui/app/templates/jobs/job/task-group.hbs b/ui/app/templates/jobs/job/task-group.hbs index dd95b32e0a96..ce4468b53429 100644 --- a/ui/app/templates/jobs/job/task-group.hbs +++ b/ui/app/templates/jobs/job/task-group.hbs @@ -2,116 +2,64 @@ {{page-title "Task group " this.model.name " - Job " this.model.job.name}}

- - {{this.model.name}} - + {{this.model.name}}
{{#if this.model.scaling}} - - Count - + + Count + {{/if}}

+
- - Task Group Details - - - - # Tasks - - {{this.model.tasks.length}} - - - - Reserved CPU - - {{format-scheduled-hertz this.model.reservedCPU}} - + Task Group Details + + # Tasks {{this.model.tasks.length}} + Reserved CPU {{format-scheduled-hertz this.model.reservedCPU}} - - Reserved Memory - + Reserved Memory {{format-scheduled-bytes this.model.reservedMemory start="MiB"}} {{#if (gt this.model.reservedMemoryMax this.model.reservedMemory)}} - ({{format-scheduled-bytes this.model.reservedMemoryMax start="MiB"}}Max) + ({{format-scheduled-bytes this.model.reservedMemoryMax start="MiB"}} Max) {{/if}} - - - Reserved Disk - - {{format-scheduled-bytes this.model.reservedEphemeralDisk start="MiB"}} - + Reserved Disk {{format-scheduled-bytes this.model.reservedEphemeralDisk start="MiB"}} {{#if this.model.scaling}} - - - Count Range - - {{this.model.scaling.min}} - to - {{this.model.scaling.max}} + Count Range + {{this.model.scaling.min}} to {{this.model.scaling.max}} - - - Scaling Policy? - + Scaling Policy? {{if this.model.scaling.policy "Yes" "No"}} {{/if}}
+
-
- Allocation Status - - {{this.allocations.length}} - -
+
Allocation Status {{this.allocations.length}}
- +
    {{#each chart.data as |datum index|}} -
  1. +
  2. {{/each}} @@ -152,102 +100,62 @@ @source={{this.sortedAllocations}} @size={{this.pageSize}} @page={{this.currentPage}} - @class="allocations" as |p| - > + @class="allocations" as |p|> + @class="with-foot" as |t|> - - ID - - - Created - - - Modified - - - Status - - - Version - - - Client - - - Volume - - - CPU - - - Memory - + ID + Created + Modified + Status + Version + Client + Volume + CPU + Memory - +
    - {{else if this.allocations.length}} -
    -
    -

    - No Matches -

    -

    - No allocations match the term - - {{this.searchTerm}} - -

    -
    -
    {{else}} -
    -
    -

    - No Allocations -

    -

    - No allocations have been placed. -

    + {{#if this.allocations.length}} +
    +
    +

    No Matches

    +

    No allocations match the term {{this.searchTerm}}

    +
    -
    + {{else}} +
    +
    +

    No Allocations

    +

    No allocations have been placed.

    +
    +
    + {{/if}} {{/if}}
+ + {{#if this.model.scaleState.isVisible}} {{#if this.shouldShowScaleEventTimeline}}
@@ -259,6 +167,7 @@
{{/if}} +
Recent Scaling Events @@ -268,6 +177,7 @@
{{/if}} + {{#if this.model.volumes.length}}
@@ -276,47 +186,29 @@
- - Name - - - Type - - - Source - - - Permissions - + Name + Type + Source + Permissions {{#if row.model.isCSI}} - + {{row.model.name}} {{else}} {{row.model.name}} {{/if}} - - {{row.model.type}} - - - {{row.model.source}} - - - {{if row.model.readOnly "Read" "Read/Write"}} - + {{row.model.type}} + {{row.model.source}} + {{if row.model.readOnly "Read" "Read/Write"}}
{{/if}} -
\ No newline at end of file + diff --git a/ui/app/templates/optimize.hbs b/ui/app/templates/optimize.hbs index 5e1795c15a0b..d5beb0d73fa7 100644 --- a/ui/app/templates/optimize.hbs +++ b/ui/app/templates/optimize.hbs @@ -9,12 +9,7 @@ data-test-recommendation-summaries-search @onChange={{this.syncActiveSummary}} @searchTerm={{mut this.searchTerm}} - @placeholder="Search - {{this.summaries.length}} - - {{pluralize "recommendation" this.summaries.length}} - ..." - /> + @placeholder="Search {{this.summaries.length}} {{pluralize "recommendation" this.summaries.length}}..." /> {{/if}}
@@ -25,88 +20,72 @@ @label="Namespace" @options={{this.optionsNamespaces}} @selection={{this.qpNamespace}} - @onSelect={{action - (queue - (action this.cacheNamespace) (action this.setFacetQueryParam "qpNamespace") - ) - }} - /> + @onSelect={{action (queue + (action this.cacheNamespace) + (action this.setFacetQueryParam "qpNamespace") + )}} /> {{/if}} + @onSelect={{action this.setFacetQueryParam "qpType"}} /> + @onSelect={{action this.setFacetQueryParam "qpStatus"}} /> + @onSelect={{action this.setFacetQueryParam "qpDatacenter"}} /> + @onSelect={{action this.setFacetQueryParam "qpPrefix"}} />
+ {{#if this.filteredSummaries}} {{outlet}} - + + - - Job - - - Recommended At - - - # Allocs - - - CPU - - - Mem - - - Agg. CPU - - - Agg. Mem - + Job + Recommended At + # Allocs + CPU + Mem + Agg. CPU + Agg. Mem {{#if row.model.isProcessed}} - + {{else}} {{/if}} + {{else}}
-

- No Matches -

+

No Matches

No recommendations match your current filter selection.

@@ -114,13 +93,11 @@ {{/if}} {{else}}
-

- No Recommendations -

+

No Recommendations

All recommendations have been accepted or dismissed. Nomad will continuously monitor applications so expect more recommendations in the future.

{{/if}} - \ No newline at end of file + diff --git a/ui/tests/integration/components/trigger-test.js b/ui/tests/integration/components/trigger-test.js index bbcb41b32488..20999b01afdc 100644 --- a/ui/tests/integration/components/trigger-test.js +++ b/ui/tests/integration/components/trigger-test.js @@ -1,3 +1,4 @@ +/* eslint-disable ember-a11y-testing/a11y-audit-called */ import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render, click, waitFor } from '@ember/test-helpers';