aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2010-11-10 15:31:14 +0000
committersimonbrandhof <simon.brandhof@gmail.com>2010-11-10 15:31:14 +0000
commita99a85f7a75b283ec2873c0f786786386a63861e (patch)
treeb62f1c62b7dd5c18d4d6cf9223088e0cfe1a0040 /sonar-server
parent3a7e986883fd140772fa1b3f88018442cad31f35 (diff)
downloadsonarqube-a99a85f7a75b283ec2873c0f786786386a63861e.tar.gz
sonarqube-a99a85f7a75b283ec2873c0f786786386a63861e.zip
SONAR-1950 Clicking on a shared inactive dashboard throw an error
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_dashboard.html.erb186
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_editform.html.erb47
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_layouts.html.erb25
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_snapshot_title.html.erb12
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_tabs.html.erb21
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_widget.html.erb100
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_widget_update.rjs6
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/index.html.erb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/manage.html.erb86
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/new.html.erb6
10 files changed, 1 insertions, 490 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_dashboard.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_dashboard.html.erb
deleted file mode 100644
index 8835f7c85ff..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_dashboard.html.erb
+++ /dev/null
@@ -1,186 +0,0 @@
-<% if @dashboard && ((@dashboard.widgets.size > 0 && @dashboard.column_layout.split("-").size() > 0)||dashboard_edit) %>
- <script type="text/javascript">
- <!--
- var options = {
- <% if dashboard_edit %>
- editorEnabled: true,
- <% else %>
- editorEnabled: false,
- <% end %>
- portal: 'dashboard',
- column: 'dashboard-column',
- columnhandle: 'column-handle',
- block: 'block',
- content: 'content',
- handle: 'none',
- hoverclass: 'block-hover',
- dashboardstate: 'dashboardstate',
- toggle: 'block-toggle',
- blocklist: 'dashboard-block-carousel',
- widgetedit: 'widgetedit',
- highlight_duration: 2,
- highlight_startcolor: '#ffff99',
- highlight_endcolor: '#ffffff',
- <% if dashboard_edit %>
- saveurl: '<%= url_for :action => 'savedashboard', :id => @project.id, :dashboard => @dashboard.id -%>'
- <% else %>
- saveurl: ''
- <% end %>
- };
- var portal;
- function init() {
- portal = new Portal(options);
-
- if ($("dashboard-block-carousel") && $("dashboard-block-carousel").visible()) {
- new UI.Carousel("dashboard-block-carousel");
- }
- }
- Event.observe(window, 'load', init, false);
- //-->
- </script>
-
- <div id='dashboard'>
- <% if dashboard_edit %>
- <script type="text/javascript">
- <!--
- function operations_toggle(link_element, editzone) {
- $('dashboard-edit').hide();
- $('dashboard-layout').hide();
- $('dashboard-block-carousel').hide();
-
- $(link_element).up('ul').childElements().each(
- function (li_element) {
- $(li_element).removeClassName('selected');
- });
-
- var li_element = $(link_element).up('li');
- li_element.addClassName('selected');
-
- $(editzone).show();
-
- if ($(editzone)==$("dashboard-block-carousel") && $("dashboard-block-carousel").visible()) {
- new UI.Carousel("dashboard-block-carousel");
- }
- }
-
- function toggle_block(link) {
- if ($(link).innerHTML=="[view]") {
- $(link).up('.block').down(".widgetedit").fade({duration: 0.2, afterFinish: function() {
- $(link).up('.block').down(".content").show();
- }});
- $(link).update("[edit]");
- } else {
- $(link).up('.block').down(".content").fade({duration: 0.2, afterFinish: function() {
- $(link).up('.block').down(".widgetedit").show();
- }});
- if (Prototype.Browser.IE && parseInt(navigator.userAgent.substring(navigator.userAgent.indexOf("MSIE") + 5)) == 6) {
- $(link).update("");
- } else {
- $(link).update("[view]");
- }
- }
- return false;
- }
-
- function remove_block(link) {
- $(link).up('.block').remove();
- portal.saveDashboardsState();
- }
-
- function hide_block_info(widget_block) {
- if ($(widget_block).down(".error")) {
- $(widget_block).down(".error").hide();
- }
- if ($(widget_block).down(".notice")) {
- $(widget_block).down(".notice").hide();
- }
- $A($(widget_block).select(".editrow")).each(function (row, row_index) {
- row.removeClassName('valid-editrow')
- row.removeClassName('invalid-editrow')
- });
- }
- //-->
- </script>
- <div id="dashboard-operations">
- <ul class="operations">
- <li><a href="#" onclick="operations_toggle(this, 'dashboard-edit');">Edit dashboard</a></li>
- <li><a href="#" onclick="operations_toggle(this, 'dashboard-layout');">Edit layout</a></li>
- <li class="selected last">
- <a href="#" onclick="operations_toggle(this, 'dashboard-block-carousel');">Add widgets</a></li>
- </ul>
- <div style="clear:both;"></div>
- </div>
-
- <%= render :partial => 'dashboards/editform' %>
-
- <%= render :partial => 'dashboards/layouts' %>
-
- <div id="dashboard-block-carousel" class="admin">
-
- <p>Drag and drop to arrange widgets the way you like in available columns. If you want delete widget drag
- it back into this area.</p>
- <br/>
-
- <div class="button-wrapper">
- <div class="previous_button"></div>
- </div>
- <div id="dashboard-block-container" class="container">
- <ul>
- <% @widgets.each_with_index do |widget_view, index|
- if widget_view %>
- <li>
- <div class="block" id="block_<%= widget_view.getId().tr('_', '') -%>">
-
- <%= render :partial => 'dashboards/widget',
- :locals => {:dashboard_edit => dashboard_edit,
- :widget => nil,
- :widget_view => widget_view,
- :edit_mode => false} %>
-
- </div>
- </li>
- <% end %>
- <% end %>
- </ul>
- </div>
- <div class="button-wrapper">
- <div class="next_button"></div>
- </div>
- <div style="clear: both;"></div>
- </div>
-
- <% end %>
-
- <% columns=Array.new
- if @dashboard && @dashboard.column_layout
- columns=@dashboard.column_layout.split("-")
- end
- for index in 1..columns.size() %>
- <div class="dashboard-column-wrapper" style="width: <%=(columns.size()>0) ? columns[index-1].to_i : 100/columns.size() %>%; clear: right;">
- <div class="dashboard-column" id="dashboard-column-<%= index -%>" style="margin: 0px <%= index<columns.size() ? "5px" : "0px" %> 0px <%= index>1 ? "5px" : "0px" %>;">
- <% if dashboard_edit %>
- <div style="width: 100%; height:20px; margin: 0; padding: 0;"></div>
- <div class="column-handle"<%= ' style="display: none;"' if @dashboard.widgets.find(:all, :conditions => {:column_index => index}).size()>0 %>>Drop widgets here</div>
- <% end %>
-
- <% @dashboard.widgets.find(:all, :conditions => {:column_index => index}, :order => :order_index).each do |widget|
- widget_view=@widgets.find { |w| w.getId()== widget.widget_key }
- if widget_view %>
- <div class="block" id="block_<%= widget.id -%>">
-
- <%= render :partial => 'dashboards/widget',
- :locals => {:dashboard_edit => dashboard_edit,
- :widget => widget,
- :widget_view => widget_view,
- :edit_mode => false} %>
-
- </div>
- <% end %>
- <% end %>
-
- </div>
- </div>
- <% end %>
- <div style="clear: both;"></div>
- </div>
-<% end %> \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_editform.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_editform.html.erb
deleted file mode 100644
index f330d0f5bc7..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_editform.html.erb
+++ /dev/null
@@ -1,47 +0,0 @@
-<div id="dashboard-edit" class="admin" <%= (@dashboard.id ? 'style="display: none;"' : "") %>>
- <form id="dashboard_form" name="dashboard_form" action="<%= url_for :action => (@dashboard.id ? 'update' : 'create'), :id => @project.id, :dashboard => @dashboard.id -%>" method="post">
- <table class="form">
- <tbody>
- <tr>
- <td class="first">Name:</td>
- <td>
- <input type="text" name="name" id="name" size="40" value="<%= @dashboard.name -%>" class="spaced"/>
- </td>
- </tr>
- </tbody>
- <% if is_admin? %>
- <tbody id="simple-form">
- <tr>
- <td class="first">Shared:</td>
- <td>
- <input type="checkbox" name="shared" id="shared" <%= 'checked' if @dashboard.shared? -%>/>
- </td>
- </tr>
- </tbody>
- <% end %>
- <tbody>
- <tr>
- <td class="first">Description:</td>
- <td>
- <textarea name="description" cols="40" rows="4" id="description"><%= @dashboard.description -%></textarea>
- </td>
- </tr>
- </tbody>
- <tbody>
- <tr>
- <td colspan="2">
- <input type="submit" value="Save"/>
- <span class="spacer"> </span>
- <% if @dashboard.id %>
- <%= link_to "Delete", {:action => 'delete', :id => @project.id, :dashboard => @dashboard.id}, :method => :post, :confirm => 'Do you want to delete this dashboard ?' %>
- <span class="spacer"> </span>
- <a href="<%= url_for :action => 'index', :id => @project.id, :dashboard => @dashboard.id -%>">Cancel</a>
- <% else %>
- <a href="<%= url_for :action => 'index', :id => @project.id -%>">Cancel</a>
- <% end %>
- </td>
- </tr>
- </tbody>
- </table>
- </form>
-</div> \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_layouts.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_layouts.html.erb
deleted file mode 100644
index 9fdacdb52cd..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_layouts.html.erb
+++ /dev/null
@@ -1,25 +0,0 @@
- <div id="dashboard-layout" class="admin" style="display: none; margin:0; padding:0;">
- <p>Choose predefined layout.</p>
- <br/>
- <!--100%-->
- <div class="layout-example-wrapper" style="text-align:center;width: 20%;">
- <%= link_to image_tag('layout100.png'), {:action => 'layout', :id => @project.id, :dashboard => @dashboard.id, :layout => "100"}, :method => "post" %>
- </div>
- <!--50%-50%-->
- <div class="layout-example-wrapper" style="text-align:center;width: 20%;">
- <%= link_to image_tag('layout5050.png'), {:action => 'layout', :id => @project.id, :dashboard => @dashboard.id, :layout => "50-50"}, :method => "post" %>
- </div>
- <!--30%-70%-->
- <div class="layout-example-wrapper" style="text-align:center;width: 20%;">
- <%= link_to image_tag('layout3070.png'), {:action => 'layout', :id => @project.id, :dashboard => @dashboard.id, :layout => "30-70"}, :method => "post" %>
- </div>
- <!--70%-30%-->
- <div class="layout-example-wrapper" style="text-align:center;width: 20%;">
- <%= link_to image_tag('layout7030.png'), {:action => 'layout', :id => @project.id, :dashboard => @dashboard.id, :layout => "70-30"}, :method => "post" %>
- </div>
- <!--33%-33%-33%-->
- <div class="layout-example-wrapper" style="text-align:center;width: 19%;">
- <%= link_to image_tag('layout333333.png'), {:action => 'layout', :id => @project.id, :dashboard => @dashboard.id, :layout => "33-33-33"}, :method => "post" %>
- </div>
- <div style="clear:both;"></div>
- </div> \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_snapshot_title.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_snapshot_title.html.erb
deleted file mode 100644
index c5a57fb1533..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_snapshot_title.html.erb
+++ /dev/null
@@ -1,12 +0,0 @@
-<% if @snapshot %>
-<div id="snapshot_title" class="page_title">
-<h4>
-<%
- version_event=@snapshot.event(EventCategory::KEY_VERSION)
- profile_measure=@snapshot.measure(Metric::PROFILE)
- %>
-<%= link_to_favourite(@project) -%> <%= "#{version_event.fullname} - " if version_event %> <%= l @snapshot.created_at %>
-<% if profile_measure %> - profile <%= link_to profile_measure.data, :controller => '/rules_configuration', :action => 'index', :id => profile_measure.value.to_i %><% end %>
-</h4>
-</div>
-<% end %> \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_tabs.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_tabs.html.erb
deleted file mode 100644
index 1e594e2730d..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_tabs.html.erb
+++ /dev/null
@@ -1,21 +0,0 @@
-<% if logged_in? %>
-<div id="page-operations" style="position:relative;">
- <ul class="operations">
- <li><%= link_to 'Add dashboard', {:action => 'new', :id => @project.id } -%></li>
- <% if selected_tab && @dashboard %>
- <li><%= link_to 'Edit dashboard', {:action => 'edit', :id => @project.id, :dashboard => @dashboard.id } -%></li>
- <% end %>
- <li class="last"><%= link_to 'Manage dashboards', {:action => 'manage', :id => @project.id } -%></li>
- </ul>
-</div>
-<% end %>
-
-<% if @actives && !@actives.empty? %>
-<ul class="tabs" id="dashboard-tabs" style="border-bottom: 1px solid #cdcdcd; margin-bottom:3px;">
-<% @actives.each do |active| %>
- <li>
- <a href="<%= url_for :action => 'index', :id => @project.id, :dashboard => active.dashboard.id -%>" class="<%= 'selected' if selected_tab==active.dashboard.id -%>"><%= active.name -%><%= " *" if active.dashboard.shared? %></a>
- </li>
-<% end %>
-</ul>
-<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_widget.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_widget.html.erb
deleted file mode 100644
index 17d5e6f135e..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_widget.html.erb
+++ /dev/null
@@ -1,100 +0,0 @@
-<%
- properties_available=widget_view.getWidgetProperties() && widget_view.getWidgetProperties().size() != 0
-
- if !properties_available || (widget && widget.state==Widget::STATE_ACTIVE)
- begin
- widget_properties=Hash.new
- if widget
- widget.widget_properties.each do |property|
- widget_properties[property.key]=property.value
- end
- end
- widget_body=render :inline => widget_view.getTarget().getTemplate(), :locals => {:widget_properties => widget_properties}
- rescue => error
- logger.error("Can not render widget #{widget_view.getId()}: " + error)
- logger.error(error.backtrace.join("\n"))
- widget_body=""
- end
- end
-%>
-
-<% if dashboard_edit || (widget.state==Widget::STATE_ACTIVE && widget_body.include?('<')) %>
-
- <div class="handle" style="//overflow:hidden;//zoom:1;<%= !dashboard_edit ? "display: none;" : "" %>">
- <%= (widget) ? widget.name : widget_view.getTitle() -%>
- <% if dashboard_edit %>
- <a class="block-remove" style="//margin: -1em 0 0 0;" onclick="remove_block(this);return false;">[x]</a>
- <% if properties_available && widget && widget.state==Widget::STATE_ACTIVE %>
- <a class="block-view-toggle" style="//margin: -1em 0 0 0;" onclick="return toggle_block(this);">[<%= edit_mode ? "view" : "edit" %>]</a> &nbsp;
- <% end %>
- <% end %>
- </div>
- <% if defined?(validation_result) %>
- <div class="error" style="<%= "display: none;" unless validation_result["errormsg"] %>clear:both;margin: 0;border-bottom:0;">
- <span class="errormsg"><%= validation_result["errormsg"] if validation_result["errormsg"] %></span> &nbsp;&nbsp;[<a href="#" onclick="hide_block_info($(this).up('.block'));return false;">hide</a>]
- </div>
- <div class="notice" style="<%= "display: none;" unless validation_result["infomsg"] %>clear:both;margin: 0;border-bottom:0;">
- <span class="infomsg"><%= validation_result["infomsg"] if validation_result["infomsg"] %></span> &nbsp;&nbsp;[<a href="#" onclick="hide_block_info($(this).up('.block'));return false;">hide</a>]
- </div>
- <% end %>
-
- <div class="description">
- <div style="height:90px;overflow-y:auto;"><%= widget_view.getDescription() -%></div>
-
- <div align="center"><%= button_to_function "Add", "portal.addNewWidget($(this).up('.block'),$$('.column-handle')[0]);", :style => "width:40px;"%></div>
- </div>
-
- <% if properties_available && dashboard_edit %>
- <div class="widgetedit" style="height:100%;<%= "display: none;" unless (edit_mode || (widget && widget.state==Widget::STATE_INACTIVE)) %>">
- <% form_remote_tag :url => {:action => 'savewidget', :id => @project.id, :dashboard => @dashboard.id},
- :method => "post",
- :before => "$(this).down('.widgetid').value=$(this).up('.block').identify().split('_').pop();hide_block_info($(this).up('.block'))" do -%>
- <table class="form" align="center" style="border-collapse:separate;border-spacing:5px;">
- <tbody>
- <% widget_view.getWidgetProperties().each do |property|
- db_property_value=widget.widget_property_value(property.key()) if widget
- entered_value=params[property.key()]
- entered_value=property.defaultValue() if !entered_value || entered_value.empty?
- entered_value=nil unless edit_mode
- editrow_class=""
- if defined?(validation_result)
- editrow_class= validation_result[property.key()]=="valid" ? "valid-editrow" : "invalid-editrow"
- end
- %>
- <tr>
- <td class="first"><%= property.name() -%>:<br>
- <span style="font-size: 85%;font-weight: normal;">[<%= property.type()+" "+property.key() -%>]</span></td>
- <td id="row_<%= property.key() -%>" class="editrow <%= editrow_class %>" style="vertical-align: middle;"><%= property_value_field(property.type(), property.key(), db_property_value, entered_value) %><%= "&nbsp;*" unless property.optional() %>
- <br>
- <span style="font-size: 85%;font-weight: normal;">[<%= property.description() -%>]</span></td>
- </tr>
- <% end %>
- </tbody>
- </table>
- <%= hidden_field_tag "widgetid", "", :class => "widgetid" %>
- <div align="center"><%= submit_tag 'Save' %></div>
- <% end -%>
- </div>
- <% end %>
-
- <% if (dashboard_edit && (!properties_available || (widget && widget.state==Widget::STATE_ACTIVE))) || (widget_body && widget_body.include?('<')) %>
- <div id="widget_<%= (widget) ? widget.id : widget_view.getId().tr('_', '') -%>" class="content <%= widget_view.getId() %>" style="height:100%;<%= "display: none;" if edit_mode || (properties_available && widget && widget.state==Widget::STATE_INACTIVE) %>">
- <% if dashboard_edit %>
- <!--[if lte IE 6]>
- <style type="text/css">
- #dashboard .block .content .transparent {
- display: none;
- }
- </style>
- <![endif]-->
- <div class="transparent"></div>
- <% end %>
- <% if widget_body.include? '<' %>
- <%= widget_body %>
- <% else %>
- <p>Can not render widget <b><%= widget_view.getTitle() %></b>.
- <% end %>
- <div style="clear: both;"></div>
- </div>
- <% end %>
-<% end %> \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_widget_update.rjs b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_widget_update.rjs
deleted file mode 100644
index 39b20ce7278..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/_widget_update.rjs
+++ /dev/null
@@ -1,6 +0,0 @@
-page.replace_html 'block_'+widget.id.to_s(), :partial => 'dashboards/widget',
- :locals => {:dashboard_edit => true,
- :widget => widget,
- :widget_view => widget_view,
- :edit_mode => result["saved"]!="true",
- :validation_result => result}
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/index.html.erb
index 489fef62fde..d6a1a26b7af 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/index.html.erb
@@ -76,7 +76,7 @@
@shared_dashboards.each do |dashboard| %>
<tr id="shared-dashboard-<%= u dashboard.name -%>" class="<%= cycle('even','odd', :name => 'shared') -%>">
<td>
- <%= link_to dashboard.name, {:controller => :dashboard, :action => :index, :id => dashboard.id, :resource => params[:resource]} -%>
+ <%= link_to dashboard.name, {:controller => :dashboard, :action => :index, :id => params[:resource], :did => dashboard.id} -%>
<% if dashboard.description.present? %>
<p class="small"><%= h dashboard.description -%></p>
<% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/manage.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/manage.html.erb
deleted file mode 100644
index 2dfc964f2b3..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/manage.html.erb
+++ /dev/null
@@ -1,86 +0,0 @@
-<%= render :partial => 'dashboards/tabs', :locals => {:selected_tab => nil} %>
-
-<h1>My dashboards</h1>
-<p>These dashboards are active and visible.</p>
-<br/>
-<table class="data" id="actives">
- <thead>
- <tr>
- <th>Name</th>
- <th>Default</th>
- <th>Order</th>
- <th>Operations</th>
- </tr>
- </thead>
- <tbody>
- <% if @actives.nil? || @actives.empty? %>
- <tr class="even"><td colspan="5">No dashboards</td></tr>
-
- <%
- else
- @actives.each_with_index do |active,index| %>
- <tr id="active-<%= u active.name -%>" class="<%= cycle('even','odd', :name => 'actives') -%>">
- <td><%= active.name %></td>
- <td>
- <%= boolean_icon(active.dashboard.shared, {:display_false => false}) -%>
- </td>
- <td>
- <% if index>0 %>
- <%= link_to image_tag('blue-up.png'), {:action => 'up', :id => @project.id, :dashboard => active.dashboard.id}, :method => :post, :id => "up-#{u active.name}" %>
- <% else %>
- <%= image_tag('transparent_16.gif') %>
- <% end %>
- <% if index<@actives.size-1 %>
- <%= link_to image_tag('blue-down.png'), {:action => 'down', :id => @project.id, :dashboard => active.dashboard.id}, :method => :post, :id => "down-#{u active.name}" %>
- <% end %>
- </td>
- <td>
- <% if !active.shared? || is_admin? %>
- <%= link_to 'Edit', {:action => 'edit', :id => @project.id, :dashboard => active.dashboard_id}, :method => :post, :id => "edit-#{u active.name}" %> |
- <%= link_to 'Delete', {:action => 'delete', :id => @project.id, :dashboard => active.dashboard_id, :manage => true}, :method => :post, :confirm => 'Do you want to delete this dashboard ?', :id => "delete-#{u active.name}" %>
- <% else %>
- <%= link_to 'Edit', {:action => 'edit', :id => @project.id, :dashboard => active.dashboard_id}, :method => :post, :id => "edit-#{u active.name}" %> |
- <%= link_to 'Hide', {:action => 'hide', :id => @project.id, :dashboard => active.dashboard_id}, :method => :post, :id => "hide-#{u active.name}" %>
- <% end %>
- </td>
- </tr>
- <% end
- end
- %>
- </tbody>
-</table>
-
-<br/><br/><br/>
-<h1>Disabled dashboards</h1>
-<p>These dashboards are hided.</p>
-<br/>
-<table class="data" id="shared">
- <thead>
- <tr>
- <th>Name</th>
- <th>Default</th>
- <th>Operations</th>
- </tr>
- </thead>
- <tbody>
- <% if @disabled_dashboards.nil? || @disabled_dashboards.empty? %>
- <tr class="even"><td colspan="3">No dashboards</td></tr>
-
- <%
- else
- @disabled_dashboards.each_with_index do |disabled,index|
- %>
- <tr id="active-<%= u disabled.name -%>" class="<%= cycle('even','odd', :name => 'actives') -%>">
- <td><%= disabled.name %></td>
- <td>
- <%= boolean_icon(disabled.dashboard.shared, {:display_false => false}) -%>
- </td>
- <td>
- <%= link_to 'Show', {:action => 'show', :id => @project.id, :dashboard => disabled.dashboard_id}, :method => :post, :id => "show-#{u disabled.name}" %>
- </td>
- </tr>
- <% end
- end
- %>
- </tbody>
-</table> \ No newline at end of file
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/new.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/new.html.erb
deleted file mode 100644
index 4158e623378..00000000000
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboards/new.html.erb
+++ /dev/null
@@ -1,6 +0,0 @@
-<%= render :partial => 'dashboards/tabs', :locals => {:selected_tab => (@dashboard ? @dashboard.id : 'new') } %>
-<% if @dashboard.id %>
- <%= render :partial => 'dashboards/dashboard', :locals => {:dashboard_edit => true } %>
-<% else %>
- <%= render :partial => 'dashboards/editform' %>
-<% end %> \ No newline at end of file