Commit 79beefe5 by Torkel Ödegaard

Updated grafana datasource

parent 4b5eadf7
......@@ -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;
......
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment