change_verb=Change
class=Class
classes=Classes
+close=Close
closed=Closed
code=Code
color=Color
project=Project
projects=Projects
raw=Raw
+refresh=Refresh
remove=Remove
rename=Rename
reset_verb=Reset
measure_filter.criteria.language=Language
measure_filter.criteria.metric=Metric
measure_filter.criteria.project=Project
-measure_filter.criteria.age.from_date=From date
-measure_filter.criteria.age.to_date=To date
-measure_filter.criteria.age.note=year-month-day (2012-01-31)
-measure_filter.criteria.age.more_than=More than
-measure_filter.criteria.age.within_last=Within the last
+measure_filter.criteria.from_date=Inspected since
+measure_filter.criteria.to_date=Inspected before
+measure_filter.criteria.date_format=year-month-day (2013-01-31)
+measure_filter.criteria.age.more_than=Inspected more than
+measure_filter.criteria.age.within_last=Inspected within the last
measure_filter.criteria.age.days_ago=days ago
measure_filter.criteria.age.days=days
+measure_filter.criteria.components_of=Components of
+measure_filter.criteria.components_of_project=Components of project
measure_filter.new_search=New search
measure_filter.more_criteria=+ More Criteria
measure_filter.languages=Languages
measure_filter.manage_filters=Manage Filters
measure_filter.display.list=List
measure_filter.display.treemap=Treemap
-measure_filter.configure_columns=Configure Columns
+measure_filter.list.change=Change Columns
+measure_filter.treemap.change=Change Treemap
measure_filter.too_many_results=Too many results. Please refine your search.
+measure_filter.add_column_button=Add Column
+measure_filter.widget.unknown_filter_warning=This widget is configured to display a measure filter that doesn't exist anymore.
#------------------------------------------------------------------------------
<li>If you have a question or an issue, please report it on the <a href="http://redirect.sonarsource.com/4">mailing list</a>.</li>\
</ul>
+widget.measure_filter_list.name=Measure Filter as List
+widget.measure_filter_list.description=Displays the result of a pre-configured measure filter as a list
+
+widget.measure_filter_treemap.name=Measure Filter as Treemap
+widget.measure_filter_treemap.description=Displays the result of pre-configured measure filter as a Treemap
+
+
#------------------------------------------------------------------------------
#
# COMPONENTS
filter.execute(self, :user => current_user)
@widget_title = link_to h(filter.name), {:controller => 'measures', :action => 'filter', :id => filter.id, :display => 'list'}
%>
+ <% if filter.description.present? %><p><%= h filter.description -%></p><% end %>
<%= render :partial => "measures/display_#{filter.display.key}", :locals => {:edit_mode => false, :widget => widget, :filter => filter} %>
- <%
- end
+<%
end
- %>
\ No newline at end of file
+ else
+%>
+ <p><%= image_tag 'warning.png' %> <%= message 'measure_filter.widget.unknown_filter_warning' -%></p>
+<%
+ end
+%>
\ No newline at end of file
@widget_title = link_to h(filter.name), url_options
%>
+ <% if filter.description.present? %><p><%= h filter.description -%></p><% end %>
<%= render :partial => "measures/display_#{filter.display.key}", :locals => {:edit_mode => false, :widget => widget, :filter => filter} %>
- <%
+<%
end
+ else
+%>
+ <p><%= image_tag 'warning.png' %> <%= message 'measure_filter.widget.unknown_filter_warning' -%></p>
+<%
end
- %>
\ No newline at end of file
+%>
\ No newline at end of file
<a href="<%= ApplicationController.root_context -%>/dashboard/index/<%= @project.id -%>?did=<%= active_dashboard.dashboard_id -%><%= "&"+period_param if period_param -%>"><%= active_dashboard.dashboard.name(true) -%></a>
</li>
<% end %>
- <li class="<%= 'active' if request.request_uri.include?('/cloud/index') -%>">
- <a href="<%= ApplicationController.root_context -%>/cloud/index/<%= @project.id -%>"><%= message('clouds.page') -%></a></li>
<li class="spacer"></li>
<li class="sidebar-title"><%= message('sidebar.tools') -%></li>
<li class="<%= 'active' if request.request_uri.include?('/components/index') -%>">
<li class="<%= 'active' if request.request_uri.include?('/drilldown/violations') -%>">
<a href="<%= ApplicationController.root_context -%>/drilldown/violations/<%= @project.id -%><%= "?"+period_param if period_param -%>"><%= message('violations_drilldown.page') -%></a>
</li>
- <% if controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'comparable') %>
- <li class="<%= 'active' if request.request_uri.include?('/comparison/index') -%>">
- <a href="<%= ApplicationController.root_context -%>/comparison/index?resource=<%= @project.key -%>"><%= message('comparison.page') -%></a>
- </li>
- <% end %>
<% controller.java_facade.getPages(Navigation::SECTION_RESOURCE, @project.scope, @project.qualifier, @project.language, @project.last_snapshot.metric_keys.to_java(:string)).each do |page|
page_url = (page.isController() ? "#{page.getId()}?id=#{@project.id}" : "/plugins/resource/#{@project.id}?page=#{page.getId()}")
%>
<a href="<%= ApplicationController.root_context -%><%= page_url -%>"><%= message(page.getId() + '.page', :default => page.getTitle()) %></a>
</li>
<% end %>
+ <li class="<%= 'active' if controller.controller_path=='cloud' -%>">
+ <a href="<%= ApplicationController.root_context -%>/cloud/index/<%= @project.id -%>"><%= message('clouds.page') -%></a>
+ </li>
+ <% if controller.java_facade.getResourceTypeBooleanProperty(@project.qualifier, 'comparable') %>
+ <li class="<%= 'active' if request.request_uri.include?('/comparison/index') -%>">
+ <a href="<%= ApplicationController.root_context -%>/comparison/index?resource=<%= @project.key -%>"><%= message('comparison.page') -%></a>
+ </li>
+ <% end %>
+
<% elsif selected_section==Navigation::SECTION_CONFIGURATION %>
colspan += 1 if display_favourites
table_columns = []
table_columns << '' if display_favourites
- table_columns.concat(filter.display.columns.map{|c| c.key})
+ table_columns.concat(filter.display.columns.map { |c| c.key })
if edit_mode
content_for :script do
%>
%>
<% if edit_mode %>
- <table class="spaced width100 admin">
+ <table class="spaced width100 box">
<tr>
<td>
<%= metric_select_tag 'metric', Metric.all.reject { |m| m.hidden || m.data? },
<% end %>
</select>
- <button id="add-metric">Add Column</button>
+ <button id="add-metric"><%= message 'measure_filter.add_column_button' %></button>
</td>
<td class="right">
- <a href="#" class="button" id="exit-edit">Done</a>
+ <a href="#" class="button" id="exit-edit"><%= message 'close' -%></a>
+ <% if filter.owner?(current_user) %>
+ <a id="save-columns" href="<%= url_for params.merge({:action => 'save_form', :id => filter.id}) -%>" class="button open-modal"><%= message('save_and_close') -%></a>
+ <% end %>
</td>
</tr>
</table>
<tbody>
<% if edit_mode %>
- <tr class="admin">
+ <tr class="bordered-bottom">
<% if display_favourites %>
<td></td>
<% end %>
<%
- treemap_id = 1
- if defined? widget
- treemap_id = widget.id
+ treemap_id = (defined? widget) ? widget.id : 1
+ unless edit_mode
%>
<table class="spaced">
<tr>
<% if filter.display.color_metric %>
<td class="thin nowrap">
<span class="note"><%= message('color') -%>
- : <b><%= filter.display.color_metric.short_name -%></b> <%= render :partial => 'treemap/gradient', :locals => {:metric => filter.display.color_metric} %></span>
+ : <b><%= filter.display.color_metric.short_name -%></b> <%= render :partial => 'treemap/gradient', :locals => {:metric => filter.display.color_metric} %></span>
</td>
<% end %>
<td>
</tr>
</table>
<% else %>
- <table class="spaced width100">
+ <table class="spaced width100 box">
<tr>
<td valign="top" class="thin nowrap">
<span class="comments"><%= message('size') -%></span>
:allow_empty => true,
:selected_key => (filter.display.color_metric ? filter.display.color_metric.key : nil) -%>
- <button id="update-treemap">Update</button>
+ <button id="update-treemap"><%= message 'refresh' -%></button>
</td>
<td valign="bottom"><%= image_tag 'loading.gif', :id => "tm-loading-#{treemap_id}", :style => 'display:none' -%></td>
+ <td class="right" valign="bottom">
+ <a href="#" class="button" id="exit-edit"><%= message 'close' -%></a>
+ <% if filter.owner?(current_user) %>
+ <a id="save-columns" href="<%= url_for params.merge({:action => 'save_form', :id => filter.id}) -%>" class="button open-modal"><%= message('save_and_close') -%></a>
+ <% end %>
+ </td>
</tr>
</table>
<% end %>
<% unless defined? widget
- content_for :script do %>
- <script>
- $j(document).ready(function () {
- $j("#update-treemap").on("click", function (e) {
- var url = removeUrlAttr(decodeURI(window.location.href), 'tmSize');
- url = removeUrlAttr(url, 'tmColor');
- url += '&tmSize=' + $j('#select-tm-size').val();
- var color = $j('#select-tm-color').val();
- if (color != null && color != '') {
- url += '&tmColor=' + color;
- }
- window.location = url;
+ content_for :script do %>
+ <script>
+ $j(document).ready(function () {
+ $j("#update-treemap").on("click", function (e) {
+ var url = removeUrlAttr(decodeURI(window.location.href), 'tmSize');
+ url = removeUrlAttr(url, 'tmColor');
+ url += '&tmSize=' + $j('#select-tm-size').val();
+ var color = $j('#select-tm-color').val();
+ if (color != null && color != '') {
+ url += '&tmColor=' + color;
+ }
+ window.location = url;
+ });
+ $j("#exit-edit").on("click", function (e) {
+ window.location = removeUrlAttr(decodeURI(window.location.href), 'edit');
+ });
});
- $j("#exit-edit").on("click", function (e) {
- window.location = removeUrlAttr(decodeURI(window.location.href), 'edit');
- });
- });
- </script>
-<% end
-end %>
+ </script>
+ <% end
+ end %>
<% if filter.results.empty? %>
<p><%= message('no_data') -%></p>
<li class="sidebar-title">
<%= @filter.name.present? ? h(@filter.name) : 'New Search' -%>
</li>
- <li>
+ <li class="marginbottom5">
<%
qualifiers = Api::Utils.java_facade.getResourceTypesForFilter().map do |resource_type|
[message("qualifiers.#{resource_type.getQualifier()}"), resource_type.getQualifier()]
%>
<%= select_tag 'qualifiers[]', options_for_select(qualifiers, @filter.criteria['qualifiers']||''), :multiple => true, :id => 'select-qualifiers' -%>
</li>
- <li id="criteria-project" <%= "style='display:none'" unless @filter.base_resource -%>>
+ <li id="criteria-project" <%= "style='display:none'" unless @filter.base_resource -%> class="marginbottom5">
+ <%= message 'measure_filter.criteria.components_of' -%>:
<%= resource_select_tag 'baseId', :resource_type_property => 'supportsGlobalDashboards', :width => '100%',
:selected_resource => @filter.base_resource,
:placeholder => message('project'),
:allow_clear => true
-%>
</li>
- <li id="criteria-lang" <%= "style='display:none'" unless @filter.criteria('languages') -%>>
+ <li id="criteria-lang" <%= "style='display:none'" unless @filter.criteria('languages') -%> class="marginbottom5">
<% languages = [['', '']].concat(Api::Utils.languages.map { |lang| [lang.name, lang.key] }) %>
<%= select_tag 'languages[]', options_for_select(languages, @filter.criteria['languages']), :multiple => true, :id => 'select-lang' -%>
</li>
- <li id="criteria-name" <%= "style='display:none'" unless @filter.criteria('nameSearch') -%>>
+ <li id="criteria-name" <%= "style='display:none'" unless @filter.criteria('nameSearch') -%> class="marginbottom5">
<%= message('measure_filter.name_contains') -%>:<br>
<input type="text" name="nameSearch" value="<%= h @filter.criteria['nameSearch'] -%>">
</li>
- <li id="criteria-key" <%= "style='display:none'" unless @filter.criteria('keyRegexp') -%>>
+ <li id="criteria-key" <%= "style='display:none'" unless @filter.criteria('keyRegexp') -%> class="marginbottom5">
<%= message('measure_filter.key_like') -%>:<br>
<input type="text" name="keyRegexp" value="<%= h @filter.criteria['keyRegexp'] -%>">
</li>
- <li id="criteria-fav" <%= "style='display:none'" unless @filter.criteria('onFavourites') -%>>
+ <li id="criteria-fav" <%= "style='display:none'" unless @filter.criteria('onFavourites') -%> class="marginbottom5">
<img src="<%= ApplicationController.root_context -%>/images/star.png"> <%= message 'measure_filter.criteria.only_favourites' %>:
<%= check_box_tag 'onFavourites', 'true', @filter.criteria['onFavourites']=='true' -%>
</li>
<% condition_metrics = Metric.all.select { |m| m.numeric? && !m.hidden } %>
<% for i in 1..3 %>
- <li id="criteria-metric-<%= i -%>" style="<%= "display: none" if hidden_condition_indexes.include?(i) -%>">
+ <li id="criteria-metric-<%= i -%>" style="<%= "display: none" if hidden_condition_indexes.include?(i) -%>" class="marginbottom5">
<%= metric_select_tag "c#{i}_metric", condition_metrics, :allow_empty => true, :selected_key => @filter.criteria("c#{i}_metric"), :width => '100%', :placeholder => 'Metric' -%>
<%= select_tag "c#{i}_period", options_for_select([['Value', ''], [Api::Utils.period_label(1), '1'], [Api::Utils.period_label(2), '2'], [Api::Utils.period_label(3), '3']], @filter.criteria("c#{i}_period")) -%>
<br>
<input type="text" size="5" name="c<%= i -%>_val" value="<%= h @filter.criteria("c#{i}_val") -%>">
</li>
<% end %>
- <li id="criteria-date" <%= "style='display:none'" unless @filter.criteria('fromDate') || @filter.criteria('toDate') -%>>
- <%= message 'measure_filter.criteria.age.from_date' -%>:
- <input type="text" name="fromDate" value="<%= @filter.criteria['fromDate'] -%>" size="10" maxlength="10">
+ <li id="criteria-date" <%= "style='display:none'" unless @filter.criteria('fromDate') || @filter.criteria('toDate') -%> class="marginbottom5">
+ <%= message('measure_filter.criteria.from_date') -%>:<br>
+ <input type="text" name="fromDate" value="<%= @filter.criteria['fromDate'] -%>" size="10" maxlength="10" class="marginbottom5">
<br>
- <%= message 'measure_filter.criteria.age.to_date' -%>:
+ <%= message 'measure_filter.criteria.to_date' -%>:<br>
<input type="text" name="toDate" value="<%= @filter.criteria['toDate'] -%>" size="10" maxlength="10"><br>
- <span class="note"><%= message 'measure_filter.criteria.age.note' -%>:</span>
+ <span class="small gray"><%= message 'measure_filter.criteria.date_format' -%></span>
</li>
- <li id="criteria-age" <%= "style='display:none'" unless @filter.criteria('ageMinDays') || @filter.criteria('ageMaxDays') -%>>
- <%= message 'measure_filter.criteria.age.more_than' -%>:
- <input type="text" name="ageMinDays" value="<%= @filter.criteria['ageMinDays'] -%>" size="3"> <%= message 'measure_filter.criteria.age.days_ago' -%>
- <br><%= message 'measure_filter.criteria.age.within_last' -%>:
+ <li id="criteria-age" <%= "style='display:none'" unless @filter.criteria('ageMinDays') || @filter.criteria('ageMaxDays') -%> class="marginbottom5">
+ <%= message 'measure_filter.criteria.age.more_than' -%>:<br>
+ <input type="text" name="ageMinDays" value="<%= @filter.criteria['ageMinDays'] -%>" size="3" class="marginbottom5"> <%= message 'measure_filter.criteria.age.days_ago' -%>
+ <br>
+ <%= message 'measure_filter.criteria.age.within_last' -%>:<br>
<input type="text" name="ageMaxDays" value="<%= @filter.criteria['ageMaxDays'] -%>" size="3"> <%= message 'measure_filter.criteria.age.days' -%>
</li>
- <li id="more-td">
+ <li id="more-td" class="marginbottom5">
<select id="more-criteria">
<option value=""></option>
<option value="age"><%= message 'measure_filter.criteria.age' -%></option>
<option value="lang"><%= message 'measure_filter.criteria.language' -%></option>
<option value="metric"><%= message 'measure_filter.criteria.metric' -%></option>
<option value="name"><%= message 'measure_filter.criteria.name' -%></option>
- <option value="project"><%= message 'measure_filter.criteria.project' -%></option>
+ <option value="project"><%= message 'measure_filter.criteria.components_of_project' -%></option>
</select>
</li>
<li>
</div>
<div class="page-split-right">
<div id="content">
- <h2><%= message 'measure_filter.manage.my_filters' -%></h2>
+ <h1><%= message 'measure_filter.manage.my_filters' -%></h1>
<table class="data marginbottom10" id="my-filters">
<thead>
<tr>
<br/>
- <h2><%= message 'measure_filter.manage.shared_filters' -%></h2>
+ <h1><%= message 'measure_filter.manage.shared_filters' -%></h1>
<table class="data" id="shared-filters">
<thead>
<tr>
<td>
<%= link_to h(filter.name), :action => 'filter', :id => filter.id -%>
<% if filter.description %>
- <div><%= h filter.description -%></div>
+ <div class="note"><%= h filter.description -%></div>
<% end %>
</td>
<td>
<ul class="operations">
<%
edit_mode = (params[:edit]=='true')
- if @filter.display.key==:list && !edit_mode
+ unless edit_mode
%>
<li>
- <a id="configure-columns" href="<%= url_for params.merge({:edit => true, :id => @filter.id}) -%>"><%= message('measure_filter.configure_columns') -%></a>
+ <a id="change-display" href="<%= url_for params.merge({:edit => true, :id => @filter.id}) -%>"><%= message("measure_filter.#{@filter.display.key}.change") -%></a>
</li>
<% end %>
<li>
<% end %>
<% end %>
</ul>
- <div class="page_title" style="padding-left: 10px">
- <% if @filter.description.present? %>
- <%= h @filter.description -%>
+ <div class="page_title">
+ <% if @filter.name.present? %>
+ <span class="h3"><%= h @filter.name -%></span>
+ <% if @filter.description.present? %>
+ <span class="note"><%= h @filter.description -%></span>
+ <% end %>
<% end %>
</div>
</div>