mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Add case-insensitive sort for variables.
This commit is contained in:
parent
a6c7635528
commit
4a93766143
@ -23,6 +23,8 @@ export class VariableEditorCtrl {
|
||||
{ value: 2, text: 'Alphabetical (desc)' },
|
||||
{ value: 3, text: 'Numerical (asc)' },
|
||||
{ value: 4, text: 'Numerical (desc)' },
|
||||
{ value: 5, text: 'Alphabetical (case-insensitive, asc)' },
|
||||
{ value: 6, text: 'Alphabetical (case-insensitive, desc)' },
|
||||
];
|
||||
|
||||
$scope.hideOptions = [{ value: 0, text: '' }, { value: 1, text: 'Label' }, { value: 2, text: 'Variable' }];
|
||||
|
@ -197,6 +197,8 @@ export class QueryVariable implements Variable {
|
||||
return parseInt(matches[1], 10);
|
||||
}
|
||||
});
|
||||
} else if (sortType === 3) {
|
||||
options = _.sortBy(options, opt => { return _.toLower(opt.text); });
|
||||
}
|
||||
|
||||
if (reverseSort) {
|
||||
|
Loading…
Reference in New Issue
Block a user