Chronological most-recent evals by default (#12847)

* Chronological most-recent evals by default

* Adding reverse: true to the list of expected queryparams in test

* changelog
This commit is contained in:
Phil Renaud 2022-05-05 16:11:27 -04:00 committed by GitHub
parent b67bd4c377
commit 6a8f98723e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 0 deletions

3
.changelog/12847.txt Normal file
View file

@ -0,0 +1,3 @@
```release-note:improvement
ui: change sort-order of evaluations to be reverse-chronological
```

View file

@ -94,6 +94,7 @@ export default class EvaluationsIndexRoute extends Route {
return this.store.query('evaluation', { return this.store.query('evaluation', {
namespace, namespace,
reverse: true,
per_page: pageSize, per_page: pageSize,
next_token: nextToken, next_token: nextToken,
filter: generateFilterExpression(), filter: generateFilterExpression(),

View file

@ -147,6 +147,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: '', next_token: '',
filter: '', filter: '',
reverse: 'true',
}, },
'Forwards the correct query parameters on default query when route initially loads' 'Forwards the correct query parameters on default query when route initially loads'
); );
@ -181,6 +182,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: '', next_token: '',
filter: 'Status contains "pending"', filter: 'Status contains "pending"',
reverse: 'true',
}, },
'It makes another server request using the options selected by the user' 'It makes another server request using the options selected by the user'
); );
@ -210,6 +212,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: '', next_token: '',
filter: '', filter: '',
reverse: 'true',
}, },
'It makes another server request using the options selected by the user' 'It makes another server request using the options selected by the user'
); );
@ -239,6 +242,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: '', next_token: '',
filter: `TriggeredBy contains "periodic-job"`, filter: `TriggeredBy contains "periodic-job"`,
reverse: 'true',
}, },
'It makes another server request using the options selected by the user' 'It makes another server request using the options selected by the user'
); );
@ -271,6 +275,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: '', next_token: '',
filter: 'NodeID is not empty', filter: 'NodeID is not empty',
reverse: 'true',
}, },
'It makes another server request using the options selected by the user' 'It makes another server request using the options selected by the user'
); );
@ -301,6 +306,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: '', next_token: '',
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}"`,
reverse: 'true',
}, },
'It makes another server request using the options selected by the user' 'It makes another server request using the options selected by the user'
); );
@ -330,6 +336,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: '', next_token: '',
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}"`,
reverse: 'true',
}, },
'It makes another server request using the options selected by the user' 'It makes another server request using the options selected by the user'
); );
@ -345,6 +352,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: '', next_token: '',
filter: `(ID contains "${searchTerm}" or JobID contains "${searchTerm}" or NodeID contains "${searchTerm}" or TriggeredBy contains "${searchTerm}") and NodeID is not empty`, filter: `(ID contains "${searchTerm}" or JobID contains "${searchTerm}" or NodeID contains "${searchTerm}" or TriggeredBy contains "${searchTerm}") and NodeID is not empty`,
reverse: 'true',
}, },
'It makes another server request using the options selected by the user' 'It makes another server request using the options selected by the user'
); );
@ -361,6 +369,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: '', next_token: '',
filter: `NodeID is not empty`, filter: `NodeID is not empty`,
reverse: 'true',
}, },
'It makes another server request using the options selected by the user' 'It makes another server request using the options selected by the user'
); );
@ -376,6 +385,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: '', next_token: '',
filter: `NodeID is not empty and Status contains "complete"`, filter: `NodeID is not empty and Status contains "complete"`,
reverse: 'true',
}, },
'It makes another server request using the options selected by the user' 'It makes another server request using the options selected by the user'
); );
@ -412,6 +422,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '50', per_page: '50',
next_token: '', next_token: '',
filter: '', filter: '',
reverse: 'true',
}, },
'It makes a request with the per_page set by the user' 'It makes a request with the per_page set by the user'
); );
@ -445,6 +456,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: 'next-token-1', next_token: 'next-token-1',
filter: '', filter: '',
reverse: 'true',
}, },
'It makes another server request using the options selected by the user' 'It makes another server request using the options selected by the user'
); );
@ -470,6 +482,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: 'next-token-2', next_token: 'next-token-2',
filter: '', filter: '',
reverse: 'true',
}, },
'It makes another server request using the options selected by the user' 'It makes another server request using the options selected by the user'
); );
@ -495,6 +508,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: 'next-token-1', next_token: 'next-token-1',
filter: '', filter: '',
reverse: 'true',
}, },
'It makes a request using the stored old token.' 'It makes a request using the stored old token.'
); );
@ -515,6 +529,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: '', next_token: '',
filter: '', filter: '',
reverse: 'true',
}, },
'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.'
); );
@ -558,6 +573,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: '', next_token: '',
filter: '', filter: '',
reverse: 'true',
}, },
'It clears all query parameters when making a refresh' 'It clears all query parameters when making a refresh'
); );
@ -605,6 +621,7 @@ module('Acceptance | evaluations list', function (hooks) {
per_page: '25', per_page: '25',
next_token: '', next_token: '',
filter: 'Status contains "pending"', filter: 'Status contains "pending"',
reverse: 'true',
}, },
'It clears all next token when filtered request is made' 'It clears all next token when filtered request is made'
); );