Skip to content

Business intelligence made simple

Updates

Andrew Kaned6f3937621af
diff --git a/app/controllers/blazer/dashboard_queries_controller.rb b/app/controllers/blazer/dashboard_queries_controller.rb
index a3e5fb78..b7e99f27 100644
--- a/app/controllers/blazer/dashboard_queries_controller.rb
+++ b/app/controllers/blazer/dashboard_queries_controller.rb
@@ -11,6 +11,12 @@ module Blazer
end
end
+ def update
+ end
+
+ def destroy
+ end
+
protected
def dashboard_query_params
diff --git a/app/controllers/blazer/dashboards_controller.rb b/app/controllers/blazer/dashboards_controller.rb
index 4947e726..72de782c 100644
--- a/app/controllers/blazer/dashboards_controller.rb
+++ b/app/controllers/blazer/dashboards_controller.rb
@@ -23,6 +23,23 @@ module Blazer
def show
end
+ def edit
+ end
+
+ def update
+ if @dashboard.update(dashboard_params)
+ redirect_to dashboard_path(@dashboard)
+ else
+ render :edit
+ end
+ end
+
+ def destroy
+ @dashboard.destroy
+ redirect_to dashboards_path
+ end
+
+
protected
def dashboard_params
diff --git a/app/views/blazer/dashboards/edit.html.erb b/app/views/blazer/dashboards/edit.html.erb
new file mode 100644
index 00000000..d44c608b
--- /dev/null
+++ b/app/views/blazer/dashboards/edit.html.erb
@@ -0,0 +1 @@
+<%= render partial: "form" %>
diff --git a/app/views/blazer/dashboards/show.html.erb b/app/views/blazer/dashboards/show.html.erb
index 5e683fd4..f81f0117 100644
--- a/app/views/blazer/dashboards/show.html.erb
+++ b/app/views/blazer/dashboards/show.html.erb
@@ -1,4 +1,22 @@
-<h2><%= @dashboard.name %></h1>
+<% title @dashboard.name %>
+
+<div style="position: fixed; top: 0; left: 0; right: 0; background-color: whitesmoke; height: 60px; z-index: 1001;">
+ <div class="container">
+ <div class="row" style="padding-top: 13px;">
+ <div class="col-sm-9">
+ <%= link_to "Home", root_path, class: "btn btn-primary", style: "vertical-align: top; margin-right: 5px;" %>
+ <h3 style="margin: 0; line-height: 34px; display: inline-block;">
+ <%= @dashboard.name %>
+ </h3>
+ </div>
+ <div class="col-sm-3 text-right">
+ <%= link_to "Edit", edit_dashboard_path(@dashboard), class: "btn btn-info" %>
+ </div>
+ </div>
+ </div>
+</div>
+
+<div style="margin-bottom: 80px;"></div>
<% @dashboard.blazer_dashboard_queries.order(:position).map(&:blazer_query).each_with_index do |query, i| %>
<div style="margin-top: 40px;">