Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: Change edition to Octane #8418

Merged
merged 4 commits into from
Jul 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ui/app/templates/clients/client/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@
{{#if a.item.attributes.attributesStructured}}
<div class="boxed-section-body is-full-bleed">
<AttributesTable
@attributes={{a.item.attributesShort}}
@attributePairs={{a.item.attributesShort}}
@class="attributes-table" />
</div>
{{else}}
Expand All @@ -454,7 +454,7 @@
<div class="boxed-section-body is-full-bleed">
<AttributesTable
data-test-attributes
@attributes={{this.model.attributes.attributesStructured}}
@attributePairs={{this.model.attributes.attributesStructured}}
@class="attributes-table" />
</div>
<div class="boxed-section-head">
Expand All @@ -464,7 +464,7 @@
<div class="boxed-section-body is-full-bleed">
<AttributesTable
data-test-meta
@attributes={{this.model.meta.attributesStructured}}
@attributePairs={{this.model.meta.attributesStructured}}
@class="attributes-table" />
</div>
{{else}}
Expand Down
4 changes: 2 additions & 2 deletions ui/app/templates/components/attributes-table.hbs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<table class="table is-striped is-fixed is-compact is-darkened">
<table class="table is-striped is-fixed is-compact is-darkened" ...attributes>
<thead>
<tr>
<th class="is-one-third">Name</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<AttributesSection @attributes={{this.attributes}} />
<AttributesSection @attributes={{@attributePairs}} />
</tbody>
</table>
6 changes: 3 additions & 3 deletions ui/app/templates/components/job-deployment-details.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{yield (hash
metrics=(component "job-deployment/deployment-metrics" deployment=this.deployment)
taskGroups=(component "job-deployment/task-groups" deployment=this.deployment)
allocations=(component "job-deployment/deployment-allocations" deployment=this.deployment)
metrics=(component "job-deployment/deployment-metrics" deployment=@deployment)
taskGroups=(component "job-deployment/task-groups" deployment=@deployment)
allocations=(component "job-deployment/deployment-allocations" deployment=@deployment)
)}}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</div>
<div class="boxed-section-body is-full-bleed">
<ListTable
@source={{this.deployment.allocations}}
@source={{@deployment.allocations}}
@class="allocations" as |t|>
<t.head>
<th class="is-narrow"></th>
Expand Down
2 changes: 1 addition & 1 deletion ui/app/templates/components/job-deployment/task-groups.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</div>
<div class="boxed-section-body is-full-bleed">
<ListTable
@source={{this.deployment.taskGroupSummaries}}
@source={{@deployment.taskGroupSummaries}}
@class="task-groups" as |t|>
<t.head>
<th>Name</th>
Expand Down
20 changes: 10 additions & 10 deletions ui/app/templates/components/reschedule-event-timeline.hbs
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<ol class="timeline">
{{#if this.allocation.nextAllocation}}
{{#if @allocation.nextAllocation}}
<RescheduleEventRow
@label="Next Allocation"
@allocation={{this.allocation.nextAllocation}}
@time={{this.allocation.nextAllocation.modifyTime}} />
@allocation={{@allocation.nextAllocation}}
@time={{@allocation.nextAllocation.modifyTime}} />
{{/if}}
{{#if this.allocation.hasStoppedRescheduling}}
{{#if @allocation.hasStoppedRescheduling}}
<li class="timeline-note" data-test-stop-warning>
{{x-icon "warning" class="is-warning is-text"}} Nomad has stopped attempting to reschedule this allocation.
</li>
{{/if}}
{{#if (and this.allocation.followUpEvaluation.waitUntil (not this.allocation.nextAllocation))}}
{{#if (and @allocation.followUpEvaluation.waitUntil (not @allocation.nextAllocation))}}
<li class="timeline-note" data-test-attempt-notice>
{{x-icon "clock" class="is-info is-text"}} Nomad will attempt to reschedule
<span class="tooltip" aria-label="{{format-ts this.allocation.followUpEvaluation.waitUntil}}">
{{moment-from-now this.allocation.followUpEvaluation.waitUntil interval=1000}}
<span class="tooltip" aria-label="{{format-ts @allocation.followUpEvaluation.waitUntil}}">
{{moment-from-now @allocation.followUpEvaluation.waitUntil interval=1000}}
</span>
</li>
{{/if}}
<RescheduleEventRow
@allocation={{this.allocation}}
@allocation={{@allocation}}
@linkToAllocation={{false}}
@time={{this.allocation.modifyTime}} />
@time={{@allocation.modifyTime}} />

{{#each (reverse this.allocation.rescheduleEvents) as |event|}}
{{#each (reverse @allocation.rescheduleEvents) as |event|}}
<RescheduleEventRow
@allocationId={{event.previousAllocationId}}
@time={{event.time}} />
Expand Down
2 changes: 1 addition & 1 deletion ui/config/optional-features.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"application-template-wrapper": false,
"default-async-observers": true,
"jquery-integration": false,
"template-only-glimmer-components": false
"template-only-glimmer-components": true
}
3 changes: 3 additions & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@
"engines": {
"node": "10.* || >= 12"
},
"ember": {
"edition": "octane"
},
"private": true,
"ember-addon": {
"paths": [
Expand Down
2 changes: 1 addition & 1 deletion ui/stories/components/table-configuration.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export let TableConfiguration = () => {
return {
template: hbs`
<h5 class="title is-5">Table, configuration</h5>
<AttributesTable @attributes={{attributes}} @class="attributes-table" />
<AttributesTable @attributePairs={{attributes}} @class="attributes-table" />
`,
context: {
attributes: {
Expand Down
6 changes: 3 additions & 3 deletions ui/tests/integration/attributes-table-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module('Integration | Component | attributes table', function(hooks) {

test('should render a row for each key/value pair in a deep object', async function(assert) {
this.set('attributes', commonAttributes);
await render(hbs`<AttributesTable @attributes={{attributes}} />`);
await render(hbs`<AttributesTable @attributePairs={{attributes}} />`);

const rowsCount = Object.keys(flatten(commonAttributes)).length;
assert.equal(
Expand All @@ -40,7 +40,7 @@ module('Integration | Component | attributes table', function(hooks) {

test('should render the full path of key/value pair from the root of the object', async function(assert) {
this.set('attributes', commonAttributes);
await render(hbs`<AttributesTable @attributes={{attributes}} />`);
await render(hbs`<AttributesTable @attributePairs={{attributes}} />`);

assert.equal(find('[data-test-key]').textContent.trim(), 'key', 'Row renders the key');
assert.equal(find('[data-test-value]').textContent.trim(), 'value', 'Row renders the value');
Expand All @@ -61,7 +61,7 @@ module('Integration | Component | attributes table', function(hooks) {

test('should render a row for key/value pairs even when the value is another object', async function(assert) {
this.set('attributes', commonAttributes);
await render(hbs`<AttributesTable @attributes={{attributes}} />`);
await render(hbs`<AttributesTable @attributePairs={{attributes}} />`);

const countOfParentRows = countOfParentKeys(commonAttributes);
assert.equal(
Expand Down