Updated grafana datasource
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ function (angular, $, _, appLevelRequire, config) {
|
||||
var apps_deps = [
|
||||
'ngRoute',
|
||||
'$strap.directives',
|
||||
'ngDragDrop',
|
||||
'ang-drag-drop',
|
||||
'grafana',
|
||||
'pasvaz.bindonce'
|
||||
];
|
||||
|
||||
@@ -32,7 +32,7 @@ function (angular) {
|
||||
return;
|
||||
}
|
||||
|
||||
$http.post('/api/register/user', $scope.loginModel).then(function() {
|
||||
$http.post('/api/account', $scope.loginModel).then(function() {
|
||||
$location.path('/login');
|
||||
}, function(err) {
|
||||
$scope.registerError = "Unexpected error: " + err;
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
define([
|
||||
'angular',
|
||||
'lodash',
|
||||
'jquery',
|
||||
'config',
|
||||
'kbn',
|
||||
'moment'
|
||||
],
|
||||
function (angular) {
|
||||
function (angular, _) {
|
||||
'use strict';
|
||||
|
||||
var module = angular.module('grafana.services');
|
||||
@@ -68,7 +64,10 @@ function (angular) {
|
||||
return $http.get('/api/search/', { params: { q: query } })
|
||||
.then(function(results) {
|
||||
var hits = { dashboards: [], tags: [] };
|
||||
hits.dashboards = results.data;
|
||||
hits.dashboards = _.map(results.data, function(item) {
|
||||
item.id = item.slug;
|
||||
return item;
|
||||
});
|
||||
return hits;
|
||||
}, function(data) {
|
||||
throw "Failed to search: " + data;
|
||||
|
||||
Reference in New Issue
Block a user