ui: hide triggered by and status filters for now (#12472)
This commit is contained in:
parent
2e2ff3f75e
commit
16c167f180
|
@ -32,7 +32,9 @@ export default class EvaluationsIndexRoute extends Route {
|
||||||
nextToken,
|
nextToken,
|
||||||
pageSize,
|
pageSize,
|
||||||
searchTerm,
|
searchTerm,
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
status,
|
status,
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
triggeredBy,
|
triggeredBy,
|
||||||
type,
|
type,
|
||||||
qpNamespace: namespace,
|
qpNamespace: namespace,
|
||||||
|
@ -57,8 +59,9 @@ export default class EvaluationsIndexRoute extends Route {
|
||||||
namespace,
|
namespace,
|
||||||
per_page: pageSize,
|
per_page: pageSize,
|
||||||
next_token: nextToken,
|
next_token: nextToken,
|
||||||
status,
|
// TODO: add support for status and triggeredBy filters
|
||||||
triggeredBy,
|
//status,
|
||||||
|
//triggeredBy,
|
||||||
filter: generateFilter(),
|
filter: generateFilter(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="toolbar-item is-right-aligned">
|
<div class="toolbar-item is-right-aligned">
|
||||||
|
{{!-- TODO: add support for status and triggered by
|
||||||
<SingleSelectDropdown
|
<SingleSelectDropdown
|
||||||
data-test-evaluation-status-facet
|
data-test-evaluation-status-facet
|
||||||
@label="Status"
|
@label="Status"
|
||||||
|
@ -26,13 +27,6 @@
|
||||||
@selection={{this.triggeredBy}}
|
@selection={{this.triggeredBy}}
|
||||||
@onSelect={{action this.setQueryParam "triggeredBy"}}
|
@onSelect={{action this.setQueryParam "triggeredBy"}}
|
||||||
/>
|
/>
|
||||||
<SingleSelectDropdown
|
|
||||||
data-test-evaluation-namespace-facet
|
|
||||||
@label="Namespace"
|
|
||||||
@options={{this.optionsNamespaces}}
|
|
||||||
@selection={{this.qpNamespace}}
|
|
||||||
@onSelect={{action this.setQueryParam "qpNamespace"}}
|
|
||||||
/>
|
|
||||||
<SingleSelectDropdown
|
<SingleSelectDropdown
|
||||||
data-test-evaluation-type-facet
|
data-test-evaluation-type-facet
|
||||||
@label="Type"
|
@label="Type"
|
||||||
|
@ -40,6 +34,14 @@
|
||||||
@selection={{this.type}}
|
@selection={{this.type}}
|
||||||
@onSelect={{action this.setQueryParam "type"}}
|
@onSelect={{action this.setQueryParam "type"}}
|
||||||
/>
|
/>
|
||||||
|
--}}
|
||||||
|
<SingleSelectDropdown
|
||||||
|
data-test-evaluation-namespace-facet
|
||||||
|
@label="Namespace"
|
||||||
|
@options={{this.optionsNamespaces}}
|
||||||
|
@selection={{this.qpNamespace}}
|
||||||
|
@onSelect={{action this.setQueryParam "qpNamespace"}}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{#if @model.length}}
|
{{#if @model.length}}
|
||||||
|
@ -71,7 +73,7 @@
|
||||||
<tr
|
<tr
|
||||||
data-test-evaluation="{{row.model.shortId}}"
|
data-test-evaluation="{{row.model.shortId}}"
|
||||||
style="cursor: pointer;"
|
style="cursor: pointer;"
|
||||||
class="{{if (eq this.currentEval row.model.id) "is-active"}}"
|
class="{{if (eq this.currentEval row.model.id) 'is-active'}}"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
{{on "click" (fn this.handleEvaluationClick row.model)}}
|
{{on "click" (fn this.handleEvaluationClick row.model)}}
|
||||||
{{on "keyup" (fn this.handleEvaluationClick row.model)}}
|
{{on "keyup" (fn this.handleEvaluationClick row.model)}}
|
||||||
|
|
|
@ -141,10 +141,11 @@ module('Acceptance | evaluations list', function (hooks) {
|
||||||
{
|
{
|
||||||
namespace: '*',
|
namespace: '*',
|
||||||
per_page: '25',
|
per_page: '25',
|
||||||
status: '',
|
|
||||||
next_token: '',
|
next_token: '',
|
||||||
triggeredBy: '',
|
|
||||||
filter: '',
|
filter: '',
|
||||||
|
// TODO: add support for status and triggeredBy filters.
|
||||||
|
// status: '',
|
||||||
|
// triggeredBy: '',
|
||||||
},
|
},
|
||||||
'Forwards the correct query parameters on default query when route initially loads'
|
'Forwards the correct query parameters on default query when route initially loads'
|
||||||
);
|
);
|
||||||
|
@ -162,7 +163,8 @@ module('Acceptance | evaluations list', function (hooks) {
|
||||||
});
|
});
|
||||||
|
|
||||||
module('filters', function () {
|
module('filters', function () {
|
||||||
test('it should enable filtering by evaluation status', async function (assert) {
|
// TODO: add support for status and triggeredBy filters.
|
||||||
|
test.skip('it should enable filtering by evaluation status', async function (assert) {
|
||||||
assert.expect(2);
|
assert.expect(2);
|
||||||
|
|
||||||
server.get('/evaluations', getStandardRes);
|
server.get('/evaluations', getStandardRes);
|
||||||
|
@ -185,12 +187,15 @@ module('Acceptance | evaluations list', function (hooks) {
|
||||||
return [];
|
return [];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO: add support for status and triggeredBy filters.
|
||||||
|
/*
|
||||||
await clickTrigger('[data-test-evaluation-status-facet]');
|
await clickTrigger('[data-test-evaluation-status-facet]');
|
||||||
await selectChoose('[data-test-evaluation-status-facet]', 'Pending');
|
await selectChoose('[data-test-evaluation-status-facet]', 'Pending');
|
||||||
|
|
||||||
assert
|
assert
|
||||||
.dom('[data-test-no-eval-match]')
|
.dom('[data-test-no-eval-match]')
|
||||||
.exists('Renders a message saying no evaluations match filter status');
|
.exists('Renders a message saying no evaluations match filter status');
|
||||||
|
*/
|
||||||
});
|
});
|
||||||
|
|
||||||
test('it should enable filtering by namespace', async function (assert) {
|
test('it should enable filtering by namespace', async function (assert) {
|
||||||
|
@ -206,10 +211,11 @@ module('Acceptance | evaluations list', function (hooks) {
|
||||||
{
|
{
|
||||||
namespace: 'default',
|
namespace: 'default',
|
||||||
per_page: '25',
|
per_page: '25',
|
||||||
status: '',
|
|
||||||
next_token: '',
|
next_token: '',
|
||||||
triggeredBy: '',
|
|
||||||
filter: '',
|
filter: '',
|
||||||
|
// TODO: add support for status and triggeredBy filters.
|
||||||
|
// status: '',
|
||||||
|
// triggeredBy: '',
|
||||||
},
|
},
|
||||||
'It makes another server request using the options selected by the user'
|
'It makes another server request using the options selected by the user'
|
||||||
);
|
);
|
||||||
|
@ -224,7 +230,8 @@ module('Acceptance | evaluations list', function (hooks) {
|
||||||
.exists('Renders a message saying no evaluations match filter status');
|
.exists('Renders a message saying no evaluations match filter status');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('it should enable filtering by triggered by', async function (assert) {
|
// TODO: add support for status and triggeredBy filters.
|
||||||
|
test.skip('it should enable filtering by triggered by', async function (assert) {
|
||||||
assert.expect(2);
|
assert.expect(2);
|
||||||
|
|
||||||
server.get('/evaluations', getStandardRes);
|
server.get('/evaluations', getStandardRes);
|
||||||
|
@ -258,7 +265,8 @@ module('Acceptance | evaluations list', function (hooks) {
|
||||||
.exists('Renders a message saying no evaluations match filter status');
|
.exists('Renders a message saying no evaluations match filter status');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('it should enable filtering by type', async function (assert) {
|
// TODO: add support for type filter.
|
||||||
|
test.skip('it should enable filtering by type', async function (assert) {
|
||||||
assert.expect(2);
|
assert.expect(2);
|
||||||
|
|
||||||
server.get('/evaluations', getStandardRes);
|
server.get('/evaluations', getStandardRes);
|
||||||
|
@ -303,10 +311,11 @@ module('Acceptance | evaluations list', function (hooks) {
|
||||||
{
|
{
|
||||||
namespace: '*',
|
namespace: '*',
|
||||||
per_page: '25',
|
per_page: '25',
|
||||||
status: '',
|
|
||||||
next_token: '',
|
next_token: '',
|
||||||
triggeredBy: '',
|
|
||||||
filter: `ID contains "${searchTerm}" or JobID contains "${searchTerm}" or NodeID contains "${searchTerm}" or TriggeredBy contains "${searchTerm}"`,
|
filter: `ID contains "${searchTerm}" or JobID contains "${searchTerm}" or NodeID contains "${searchTerm}" or TriggeredBy contains "${searchTerm}"`,
|
||||||
|
// TODO: add support for status and triggeredBy filters.
|
||||||
|
// status: '',
|
||||||
|
// triggeredBy: '',
|
||||||
},
|
},
|
||||||
'It makes another server request using the options selected by the user'
|
'It makes another server request using the options selected by the user'
|
||||||
);
|
);
|
||||||
|
@ -341,10 +350,11 @@ module('Acceptance | evaluations list', function (hooks) {
|
||||||
{
|
{
|
||||||
namespace: '*',
|
namespace: '*',
|
||||||
per_page: '50',
|
per_page: '50',
|
||||||
status: '',
|
|
||||||
next_token: '',
|
next_token: '',
|
||||||
triggeredBy: '',
|
|
||||||
filter: '',
|
filter: '',
|
||||||
|
// TODO: add support for status and triggeredBy filters.
|
||||||
|
// status: '',
|
||||||
|
// triggeredBy: '',
|
||||||
},
|
},
|
||||||
'It makes a request with the per_page set by the user'
|
'It makes a request with the per_page set by the user'
|
||||||
);
|
);
|
||||||
|
@ -376,10 +386,11 @@ module('Acceptance | evaluations list', function (hooks) {
|
||||||
{
|
{
|
||||||
namespace: '*',
|
namespace: '*',
|
||||||
per_page: '25',
|
per_page: '25',
|
||||||
status: '',
|
|
||||||
next_token: 'next-token-1',
|
next_token: 'next-token-1',
|
||||||
triggeredBy: '',
|
|
||||||
filter: '',
|
filter: '',
|
||||||
|
// TODO: add support for status and triggeredBy filters.
|
||||||
|
// status: '',
|
||||||
|
// triggeredBy: '',
|
||||||
},
|
},
|
||||||
'It makes another server request using the options selected by the user'
|
'It makes another server request using the options selected by the user'
|
||||||
);
|
);
|
||||||
|
@ -403,10 +414,11 @@ module('Acceptance | evaluations list', function (hooks) {
|
||||||
{
|
{
|
||||||
namespace: '*',
|
namespace: '*',
|
||||||
per_page: '25',
|
per_page: '25',
|
||||||
status: '',
|
|
||||||
next_token: 'next-token-2',
|
next_token: 'next-token-2',
|
||||||
triggeredBy: '',
|
|
||||||
filter: '',
|
filter: '',
|
||||||
|
// TODO: add support for status and triggeredBy filters.
|
||||||
|
// status: '',
|
||||||
|
// triggeredBy: '',
|
||||||
},
|
},
|
||||||
'It makes another server request using the options selected by the user'
|
'It makes another server request using the options selected by the user'
|
||||||
);
|
);
|
||||||
|
@ -430,10 +442,11 @@ module('Acceptance | evaluations list', function (hooks) {
|
||||||
{
|
{
|
||||||
namespace: '*',
|
namespace: '*',
|
||||||
per_page: '25',
|
per_page: '25',
|
||||||
status: '',
|
|
||||||
next_token: 'next-token-1',
|
next_token: 'next-token-1',
|
||||||
triggeredBy: '',
|
|
||||||
filter: '',
|
filter: '',
|
||||||
|
// TODO: add support for status and triggeredBy filters.
|
||||||
|
// status: '',
|
||||||
|
// triggeredBy: '',
|
||||||
},
|
},
|
||||||
'It makes a request using the stored old token.'
|
'It makes a request using the stored old token.'
|
||||||
);
|
);
|
||||||
|
@ -452,10 +465,11 @@ module('Acceptance | evaluations list', function (hooks) {
|
||||||
{
|
{
|
||||||
namespace: '*',
|
namespace: '*',
|
||||||
per_page: '25',
|
per_page: '25',
|
||||||
status: '',
|
|
||||||
next_token: '',
|
next_token: '',
|
||||||
triggeredBy: '',
|
|
||||||
filter: '',
|
filter: '',
|
||||||
|
// TODO: add support for status and triggeredBy filters.
|
||||||
|
// status: '',
|
||||||
|
// triggeredBy: '',
|
||||||
},
|
},
|
||||||
'When there are no more stored previous tokens, we will request with no next-token.'
|
'When there are no more stored previous tokens, we will request with no next-token.'
|
||||||
);
|
);
|
||||||
|
@ -469,7 +483,8 @@ module('Acceptance | evaluations list', function (hooks) {
|
||||||
await click('[data-test-eval-pagination-prev]');
|
await click('[data-test-eval-pagination-prev]');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('it should clear all query parameters on refresh', async function (assert) {
|
// TODO: add support for status and triggeredBy filters.
|
||||||
|
test.skip('it should clear all query parameters on refresh', async function (assert) {
|
||||||
assert.expect(1);
|
assert.expect(1);
|
||||||
|
|
||||||
server.get('/evaluations', function () {
|
server.get('/evaluations', function () {
|
||||||
|
@ -514,7 +529,8 @@ module('Acceptance | evaluations list', function (hooks) {
|
||||||
await click('[data-test-eval-refresh]');
|
await click('[data-test-eval-refresh]');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('it should reset pagination when filters are applied', async function (assert) {
|
// TODO: add support for status and triggeredBy filters.
|
||||||
|
test.skip('it should reset pagination when filters are applied', async function (assert) {
|
||||||
assert.expect(1);
|
assert.expect(1);
|
||||||
|
|
||||||
server.get('/evaluations', function () {
|
server.get('/evaluations', function () {
|
||||||
|
|
Loading…
Reference in New Issue