Explorar o código

Fix an issue preventing loading dashboards from subfolders.

Boaz Leskes %!s(int64=12) %!d(string=hai) anos
pai
achega
2e7a2d7410
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/app/services/dashboard.js

+ 2 - 2
src/app/services/dashboard.js

@@ -274,7 +274,7 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
 
     this.file_load = function(file) {
       return $http({
-        url: "app/dashboards/"+file.replace(".(?!json)","/")+'?' + new Date().getTime(),
+        url: "app/dashboards/"+file.replace(/\.(?!json)/,"/")+'?' + new Date().getTime(),
         method: "GET",
         transformResponse: function(response) {
           return renderTemplate(response,$routeParams);
@@ -314,7 +314,7 @@ function (angular, $, kbn, _, config, moment, Modernizr) {
 
     this.script_load = function(file) {
       return $http({
-        url: "app/dashboards/"+file.replace(".(?!js)","/"),
+        url: "app/dashboards/"+file.replace(/\.(?!js)/,"/"),
         method: "GET",
         transformResponse: function(response) {
           /*jshint -W054 */