Merge pull request #502 from spenceralger/fix-js-dashboards

Fixed dashboard scripts
This commit is contained in:
spenceralger
2013-09-16 11:11:20 -07:00
5 changed files with 16 additions and 12 deletions
+7 -4
View File
@@ -1,10 +1,13 @@
define([
'angular',
'jquery',
'kbn',
'underscore',
'config',
'moment',
'modernizr'
],
function (angular, _, config, Modernizr) {
function (angular, $, kbn, _, config, moment, Modernizr) {
'use strict';
var module = angular.module('kibana.services');
@@ -280,12 +283,12 @@ function (angular, _, config, Modernizr) {
this.script_load = function(file) {
return $http({
url: "dashboards/"+file,
url: "app/dashboards/"+file,
method: "GET",
transformResponse: function(response) {
/*jshint -W054 */
var _f = new Function("ARGS",response);
return _f($routeParams);
var _f = new Function('ARGS','kbn','_','moment','window','document','angular','require','define','$','jQuery',response);
return _f($routeParams,kbn,_,moment);
}
}).then(function(result) {
if(!result) {