Updated grafana datasource

This commit is contained in:
Torkel Ödegaard
2014-11-24 08:05:07 +01:00
parent 4b5eadf7b5
commit 79beefe57c
3 changed files with 7 additions and 8 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ function (angular, $, _, appLevelRequire, config) {
var apps_deps = [
'ngRoute',
'$strap.directives',
'ngDragDrop',
'ang-drag-drop',
'grafana',
'pasvaz.bindonce'
];
+1 -1
View File
@@ -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;