mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
Move toolbar default variable above the toolbar setting funciton
This commit is contained in:
parent
661a54d356
commit
67753b790c
@ -45,6 +45,11 @@ function ListJobsController (
|
||||
setToolbarSort();
|
||||
}, true);
|
||||
|
||||
const toolbarSortDefault = {
|
||||
label: `${strings.get('sort.FINISH_TIME')}`,
|
||||
value: '-finished'
|
||||
};
|
||||
|
||||
function setToolbarSort () {
|
||||
const orderByValue = _.get($state.params, 'job_search.order_by');
|
||||
const sortValue = _.find(vm.toolbarSortOptions, (option) => option.value === orderByValue);
|
||||
@ -55,11 +60,6 @@ function ListJobsController (
|
||||
}
|
||||
}
|
||||
|
||||
const toolbarSortDefault = {
|
||||
label: `${strings.get('sort.FINISH_TIME')}`,
|
||||
value: '-finished'
|
||||
};
|
||||
|
||||
vm.toolbarSortOptions = [
|
||||
{ label: `${strings.get('sort.NAME_ASCENDING')}`, value: 'name' },
|
||||
{ label: `${strings.get('sort.NAME_DESCENDING')}`, value: '-name' },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user