Business intelligence made simple
Added tmp hack
Andrew Kane886e170fa092
diff --git a/app/assets/javascripts/blazer/routes.js.erb b/app/assets/javascripts/blazer/routes.js.erbindex 7413cd07..744009d3 100644--- a/app/assets/javascripts/blazer/routes.js.erb+++ b/app/assets/javascripts/blazer/routes.js.erb@@ -1 +1,26 @@-<%= JsRoutes.generate(engine: Blazer::Engine, prefix: Blazer::Engine.app.url_helpers.root_path) %>+<%#= JsRoutes.generate(engine: Blazer::Engine, prefix: Blazer::Engine.app.url_helpers.root_path) %>++// temp fix+var Routes = {+ run_queries_path: function() {+ return gon.root_path + "queries/run"+ },+ cancel_queries_path: function() {+ return gon.root_path + "queries/cancel"+ },+ schema_queries_path: function(params) {+ return gon.root_path + "queries/schema?data_source=" + params.data_source+ },+ tables_queries_path: function(params) {+ return gon.root_path + "queries/tables?data_source=" + params.data_source+ },+ queries_path: function() {+ return gon.root_path + "queries"+ },+ query_path: function(id) {+ return gon.root_path + "queries/" + id+ },+ dashboard_path: function(id) {+ return gon.root_path + "dashboards/" + id+ }+}diff --git a/app/controllers/blazer/base_controller.rb b/app/controllers/blazer/base_controller.rbindex adc19920..c470e020 100644--- a/app/controllers/blazer/base_controller.rb+++ b/app/controllers/blazer/base_controller.rb@@ -19,6 +19,7 @@ module Blazerif Blazer.before_actionbefore_action Blazer.before_action.to_symend+ before_action :set_js_routeslayout "blazer/application"@@ -101,5 +102,11 @@ module Blazeraction = resource.persisted? ? :edit : :newrender action, status: :unprocessable_entityend++ def set_js_routes+ gon.push(+ root_path: root_path+ )+ endendend