mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 18:37:39 -02:30
Move toolbar default variable above the toolbar setting funciton
This commit is contained in:
@@ -45,6 +45,11 @@ function ListJobsController (
|
|||||||
setToolbarSort();
|
setToolbarSort();
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
const toolbarSortDefault = {
|
||||||
|
label: `${strings.get('sort.FINISH_TIME')}`,
|
||||||
|
value: '-finished'
|
||||||
|
};
|
||||||
|
|
||||||
function setToolbarSort () {
|
function setToolbarSort () {
|
||||||
const orderByValue = _.get($state.params, 'job_search.order_by');
|
const orderByValue = _.get($state.params, 'job_search.order_by');
|
||||||
const sortValue = _.find(vm.toolbarSortOptions, (option) => option.value === orderByValue);
|
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 = [
|
vm.toolbarSortOptions = [
|
||||||
{ label: `${strings.get('sort.NAME_ASCENDING')}`, value: 'name' },
|
{ label: `${strings.get('sort.NAME_ASCENDING')}`, value: 'name' },
|
||||||
{ label: `${strings.get('sort.NAME_DESCENDING')}`, value: '-name' },
|
{ label: `${strings.get('sort.NAME_DESCENDING')}`, value: '-name' },
|
||||||
|
|||||||
Reference in New Issue
Block a user