mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'master' into popover-forms
This commit is contained in:
@@ -40,7 +40,14 @@ export function infoPopover() {
|
||||
openOn: openOn,
|
||||
hoverOpenDelay: 400,
|
||||
tetherOptions: {
|
||||
offset: offset
|
||||
offset: offset,
|
||||
constraints: [
|
||||
{
|
||||
to: 'window',
|
||||
attachment: 'together',
|
||||
pin: true
|
||||
}
|
||||
],
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -119,5 +119,3 @@ export function identityRenderer(part, innerExpr) {
|
||||
export function quotedIdentityRenderer(part, innerExpr) {
|
||||
return '"' + part.params[0] + '"';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -91,7 +91,13 @@ export function queryPartEditorDirective($compile, templateSrv) {
|
||||
}
|
||||
|
||||
var typeaheadSource = function (query, callback) {
|
||||
if (param.options) { return param.options; }
|
||||
if (param.options) {
|
||||
var options = param.options;
|
||||
if (param.type === 'int') {
|
||||
options = _.map(options, function(val) { return val.toString(); });
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
||||
$scope.$apply(function() {
|
||||
$scope.handleEvent({$event: {name: 'get-param-options'}}).then(function(result) {
|
||||
@@ -102,10 +108,6 @@ export function queryPartEditorDirective($compile, templateSrv) {
|
||||
};
|
||||
|
||||
$input.attr('data-provide', 'typeahead');
|
||||
var options = param.options;
|
||||
if (param.type === 'int') {
|
||||
options = _.map(options, function(val) { return val.toString(); });
|
||||
}
|
||||
|
||||
$input.typeahead({
|
||||
source: typeaheadSource,
|
||||
|
||||
@@ -101,18 +101,16 @@ function (angular, _, coreModule, config) {
|
||||
}
|
||||
|
||||
metricSources.sort(function(a, b) {
|
||||
if (a.meta.builtIn) {
|
||||
// these two should always be at the bottom
|
||||
if (a.meta.id === "mixed" || a.meta.id === "grafana") {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (b.meta.builtIn) {
|
||||
if (b.meta.id === "mixed" || b.meta.id === "grafana") {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (a.name.toLowerCase() > b.name.toLowerCase()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (a.name.toLowerCase() < b.name.toLowerCase()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user