+++ /dev/null
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# SonarQube is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-require 'set'
-
-class Issues2Controller < ApplicationController
-
- SECTION=Navigation::SECTION_ISSUES2
-
- before_filter :init_options
- before_filter :load_fav_filters, :only => [:index, :search, :search2, :filter, :manage, :favourites, :toggle_fav]
-
- PAGE_SIZE = 100
-
- # GET /issues/index
- def index
- redirect_to :action => 'search'
- end
-
- # GET /issues/search
- def search
-
- end
-
- private
-
- def init_options
- @options_for_statuses = Internal.issues.listStatus().map { |s| [message('issue.status.' + s), s] }
- @options_for_resolutions = Internal.issues.listResolutions().map { |s| [message('issue.resolution.' + s), s] }
- end
-
- def load_fav_filters
- @favourite_filters = Internal.issues.findFavouriteIssueFiltersForCurrentUser() if logged_in?
- end
-
- def find_filter(id)
- Internal.issues.findIssueFilter(id)
- end
-
- def criteria_params
- new_params = params.clone
- new_params.delete('controller')
- new_params.delete('action')
- new_params
- end
-
- def init_params
- params['pageSize'] = PAGE_SIZE unless request.xhr?
- end
-
- def issues_query_params_sanitized
- Internal.issues.sanitizeFilterQuery(params).to_hash
- end
-
- def issues_query_params_from_filter(filter)
- Internal.issues.deserializeFilterQuery(filter).to_hash
- end
-
-end
SECTION_RESOURCE_CONFIGURATION = Navigation.new('resource_configuration', true)
SECTION_SESSION = Navigation.new('session', true)
SECTION_ISSUES = Navigation.new('issues', false)
- SECTION_ISSUES2 = Navigation.new('issues2', false)
SECTION_MEASURES = Navigation.new('measures', false)
SECTION_QUALITY_PROFILES = Navigation.new('quality_profiles', false)
SECTION_QUALITY_GATES = Navigation.new('quality_gates', false)
+++ /dev/null
-<%
- project_uuid = @projectUuids.to_a.first if !@projectUuids.empty? && @projectUuids.to_a.size == 1
- project_key = Internal.component_api.findByUuid(project_uuid).key() if project_uuid
- max_page_size_reached = @issues.size >= Internal.issues.maxPageSize()
-
- transitions_by_issues = {}
- unresolved_issues = 0
- unresolved_issues_user_can_admin = 0
- at_least_one_issue_is_planned = false
- at_least_one_issue_is_assigned = false
- all_issues_are_assigned_to_current_user = true
- @issues.each do |issue|
- transitions = Internal.issues.listTransitions(issue)
- transitions.each do |transition|
- issues_for_transition = transitions_by_issues[transition.key] || 0
- issues_for_transition += 1
- transitions_by_issues[transition.key] = issues_for_transition
- end
- unresolved_issues += 1 unless issue.resolution()
- if Java::OrgSonarServerUser::UserSession.get().hasProjectPermissionByUuid('issueadmin', issue.projectUuid)
- unresolved_issues_user_can_admin += 1 unless issue.resolution()
- end
- at_least_one_issue_is_planned ||= issue.actionPlanKey()
- at_least_one_issue_is_assigned ||= issue.assignee()
- all_issues_are_assigned_to_current_user &&= issue.assignee() == current_user.login
- end
-%>
-<form id="bulk-change-form" method="post" action="<%= ApplicationController.root_context -%>/issues/bulk_change">
- <input type="hidden" name="issues" value="<%= @issues.map { |issue| issue.key() }.join(',') -%>">
- <input type="hidden" name="actions[]" id="bulk-change-transition-action">
- <fieldset>
- <div class="modal-head">
- <h2><%= message('issue_bulk_change.form.title', {:params => @issues.size.to_s}) -%></h2>
- </div>
- <div class="modal-body">
- <div>
- <% if max_page_size_reached %>
- <p class="notes"><%= message('issue_bulk_change.max_issues_reached', :params => @issues.size) -%></p>
- <% end %>
- </div>
- <div class="modal-error"/>
-
- <% if unresolved_issues > 0 %>
- <div class="modal-field">
- <label for="assignee">
- <%= message('issue.assign.formlink') -%>
- </label>
- <input id="assign-action" name="actions[]" type="checkbox" value="assign"/>
- <%= assign_added_choices = {}
- # SONAR-4728 Display 'Not assigned' option only if at least one issue is assigned
- assign_added_choices[''] = escape_javascript(message('unassigned')) if at_least_one_issue_is_assigned
- # SONAR-4728 Display 'Assign to me' option only if not not all issues are asigned to current user
- assign_added_choices[current_user.login] = escape_javascript(message('assigned_to_me')) unless all_issues_are_assigned_to_current_user
- user_select_tag('assign.assignee', :html_id => 'assignee', :open => false, :selected_user => current_user,
- :include_choices => assign_added_choices)
- -%>
- <span style="float:right" class="note">(<%= message('issue_bulk_change.x_issues', :params => unresolved_issues.to_s) -%>)</span>
- </div>
- <%
- if project_key
- plans = Internal.issues.findOpenActionPlans(project_key)
- # Display action plan combo box if there are some action plans defined on the project
- unless plans.empty?
- first_plan = plans[0]
- options = plans.map { |plan|
- label = plan.deadLine ? "#{h plan.name} (#{format_date(plan.deadLine)})" : h(plan.name)
- [label, plan.key]
- }
- # SONAR-4728 Display 'Unplan' option only if at least one issue is planned
- options.unshift([escape_javascript(message('issue.unplan.submit')), '']) if at_least_one_issue_is_planned
- plan_options = options_for_select(options, first_plan.key)
- %>
- <div class="modal-field">
- <label for="plan">
- <%= message('issue.do_plan') -%>
- </label>
- <input id="plan-action" name="actions[]" type="checkbox" value="plan"/>
- <%= dropdown_tag('plan.plan', plan_options, {:show_search_box => false}, {:id => 'plan'}) -%>
- <span style="float:right" class="note">(<%= message('issue_bulk_change.x_issues', :params => unresolved_issues.to_s) -%>)</span>
- </div>
- <% end %>
- <% end %>
- <div class="modal-field">
- <label for="severity">
- <%= message('issue.set_severity') -%>
- </label>
- <input id="set-severity-action" name="actions[]" type="checkbox" value="set_severity"/>
- <%= severity_dropdown_tag('set_severity.severity', severitiy_select_option_tags, {:show_search_box => false},
- {:id => 'severity'}) -%>
- <span style="float:right" class="note">(<%= message('issue_bulk_change.x_issues', :params => unresolved_issues_user_can_admin.to_s) -%>)</span>
- </div>
- <% end %>
-
- <% if transitions_by_issues.size > 0 %>
- <div class="modal-field">
- <label>
- <%= message('issue.transition') -%>
- </label>
- <% transitions_by_issues.keys.sort.each do |transition| %>
- <input type="radio" id="transition-<%= transition -%>" name="do_transition.transition" value="<%= transition -%>"
- onClick="addTransitionAction();"> <label for="transition-<%= transition -%>" style="float: none; display: inline; left: 0; cursor: pointer;"><%= message("issue.transition.#{transition}") -%></label>
- <span style="float:right" class="note">(<%= message('issue_bulk_change.x_issues', :params => transitions_by_issues[transition].to_s) %>)</span><br/>
- <% end %>
- </div>
- <% end %>
-
- <div class="modal-field">
- <label>
- <%= message('issue.comment.formlink') -%>
- <span style="cursor: help;"><%= image_tag 'help.png', :title => h(message('issue_bulk_change.comment.help')) -%></span>
- </label>
- <div style="padding: 0 10px 10px 0;">
- <div>
- <textarea rows="4" name="comment" id="comment" style="width: 100%"></textarea>
- </div>
- <div style="float:right">
- <%= render :partial => 'markdown/tips' -%>
- </div>
- </div>
- </div>
-
- <div class="modal-field">
- <label for="send-notifications">
- <%= message('issue.send_notifications') -%>
- </label>
- <input id="send-notifications" name="sendNotifications" type="checkbox" value="true" />
- </div>
- </div>
- <div class="modal-foot">
- <span id="bulk-change-loading-image" class="loading-image hidden"><%= image_tag 'loading.gif' %></span>
- <input type="submit" value="<%= message('apply') -%>" id="bulk-change-submit" class="bulk-change" onclick="return displayLoadingImage()" />
- <a href="#" onclick="return closeModalWindow()" id="bulk-change-cancel"><%= message('cancel') -%></a>
- </div>
- </fieldset>
-</form>
-<script>
- $j("#bulk-change-form").modalForm({
- success: function () {
- onBulkIssues(<%= json_escape(params.to_json) -%>);
- }
- });
-
- function addTransitionAction() {
- $j('#bulk-change-transition-action').val("do_transition");
- }
-
- function displayLoadingImage() {
- $j('#bulk-change-loading-image').removeClass("hidden");
- }
-
- function check(id){
- $j('#'+ id).prop('checked', true);
- }
-
- /**
- * Attach some events on select boxes to automatically select associate check box when selecting an option
- */
- $j('#assignee').click(function() { check('assign-action'); });
- $j('#plan').click(function() { check('plan-action'); });
- $j('#severity').click(function() { check('set-severity-action'); });
-</script>
+++ /dev/null
-<form id="copy-filter-form" method="post" action="<%= ApplicationController.root_context -%>/issues/copy">
- <input type="hidden" name="id" value="<%= @filter.id -%>">
- <fieldset>
- <div class="modal-head">
- <h2><%= message('issue_filter.copy_filter') -%></h2>
- </div>
- <%= render :partial => 'filter_shared_form' %>
- <div class="modal-foot">
- <input type="submit" value="<%= message('copy') -%>" id="copy-submit" class="issue-filter"/>
- <a href="#" onclick="return closeModalWindow()" id="copy-cancel"><%= h message('cancel') -%></a>
- </div>
- </fieldset>
-</form>
-<script>
- $j("#copy-filter-form").modalForm({
- success: function (data) {
- return onCopy(data);
- }
- });
-</script>
+++ /dev/null
-<form id="edit-filter-form" method="post" action="<%= ApplicationController.root_context -%>/issues/edit">
- <input type="hidden" name="id" value="<%= @filter.id -%>">
- <fieldset>
- <div class="modal-head">
- <h2><%= message('issue_filter.edit_filter') -%></h2>
- </div>
- <%= render :partial => 'filter_shared_form', :locals => {:display_owner => true} %>
- <div class="modal-foot">
- <input type="submit" value="<%= message('save') -%>" id="save-submit" class="issue-filter"/>
- <a href="#" onclick="return closeModalWindow()" id="save-cancel"><%= message('cancel') -%></a>
- </div>
- </fieldset>
-</form>
-<script>
- $j("#edit-filter-form").modalForm({
- success: function (data) {
- return onEdit(data);
- }
- });
-</script>
+++ /dev/null
-<% if logged_in? %>
- {
- <% @favourite_filters.each do |filter| %>
- "<%= h filter.id -%>": "<%= escape_javascript filter.name -%>",
- <% end %>
- }
-<% else %>
- null
-<% end %>
+++ /dev/null
-<form id="save-as-filter-form" method="post" action="<%= ApplicationController.root_context -%>/issues/save_as">
- <input type="hidden" name="data" value="<%= u(@filter_query_serialized) -%>">
- <fieldset>
- <div class="modal-head">
- <h2><%= message('issue_filter.save_filter') -%></h2>
- </div>
- <%= render :partial => 'filter_shared_form' %>
- <div class="modal-foot">
- <input type="submit" value="<%= message('save') -%>" id="save-as-submit" class="issue-filter"/>
- <a href="#" onclick="return closeModalWindow()" id="save-as-cancel"><%= message('cancel') -%></a>
- </div>
- </fieldset>
-</form>
-<script>
- $j("#save-as-filter-form").modalForm({
- success: function (data) {
- return onSaveAs(data);
- }
- });
-</script>
+++ /dev/null
-<% if !local_assigns.has_key? :display_owner
- display_owner = false
- end %>
-<div class="modal-body">
- <div class="modal-error"/>
- <div class="modal-field">
- <label for="name"><%= message('issue_filter.form.name') -%> <em class="mandatory">*</em></label>
- <input id="name" name="name" type="text" size="50" maxlength="100" value="<%= h(@filter.name) if @filter -%>" autofocus="autofocus"/>
- </div>
- <div class="modal-field">
- <label for="description"><%= message('issue_filter.form.description') -%></label>
- <input id="description" name="description" type="text" size="50" maxlength="4000" value="<%= h(@filter.description) if @filter -%>"/>
- </div>
- <% if display_owner && can_be_reassigned_by(current_user, @filter) %>
- <% filter_owner = Api.users.findByLogin(@filter.user) %>
- <div class="modal-field">
- <label for="user"><%= h message('issue_filter.form.owner') -%></label>
- <%= user_select_tag('user', :html_id => 'select-filter-owner', :selected_user => filter_owner) -%>
- </div>
- <% else %>
- <input id="user" name="user" type="hidden" value="<%= h(@filter.user) if @filter -%>"/>
- <% end %>
- <% if Internal.issues.canUserShareIssueFilter() %>
- <div class="modal-field">
- <% if !@filter || @filter.user.nil? || @filter.user == current_user.login %>
- <label for="shared"><%= message('issue_filter.form.share') -%></label>
- <input id="shared" name="shared" type="checkbox" value="true" <%= 'checked' if (@filter && @filter.shared) -%>/>
- <% else %>
- <input id="shared" name="shared" type="hidden" value="<%= @filter.shared if @filter -%>"/>
- <% end %>
- </div>
- <% end %>
-</div>
+++ /dev/null
-<%
- if @issues_result.issues && !@issues_result.issues.empty?
- colspan = 6
-%>
- <div id="issues-list">
- <table class="data width100">
- <thead>
- <tr>
- <th width="1%" nowrap class="column-severity">
- <%= column_html(@issues_query, @issues_result, message('severity_abbreviated'), message('severity'), 'SEVERITY') %>
- </th>
- <th width="1%" nowrap class="column-status">
- <%= column_html(@issues_query, @issues_result, message('status'), message('status'), 'STATUS') %>
- </th>
- <th>
- <%= message('description') -%>
- </th>
- <th nowrap>
- <%= message('component') -%>
- </th>
- <th class="column-assignee">
- <%= column_html(@issues_query, @issues_result, message('issue_filter.header.assignee'), message('issue_filter.header.assignee'), 'ASSIGNEE') %>
- </th>
- <th width="1%" nowrap>
- <%= message('issue_filter.header.action_plan') -%>
- </th>
- <th width="1%" nowrap class="column-update-date">
- <%= column_html(@issues_query, @issues_result, message('issue_filter.header.update_date'), message('issue_filter.header.update_date'), 'UPDATE_DATE') %>
- </th>
- </tr>
- </thead>
- <tbody>
- <%
- @issues_result.issues.each do |issue|
- %>
- <tr class="<%= cycle('even', 'odd') -%>">
- <td width="1%" nowrap>
- <i class="icon-severity-<%= issue.severity.downcase -%>"></i>
- </td>
- <td>
- <%= message("issue.status.#{issue.status}") -%>
- <% if issue.resolution %>
- <span class="note" style="white-space: nowrap">[<%= message("issue.resolution.#{issue.resolution}") -%>]</span>
- <% end %>
- </td>
- <td>
- <a class='open-modal rule-modal issue-detail-link' modal-width='900' href='<%= url_for :controller => 'issue', :action => 'show', :id => issue.key, :modal => true -%>'>
- <%= h truncate(issue.message, :length => 100) -%></a>
- </td>
- <td>
- <% project = @issues_result.project(issue)
- component = @issues_result.component(issue) -%>
- <div class="subtitle"><%= h (truncate(project.name, :length => 100)) -%></div>
- <% if component %>
- <!-- Do not display component name when issue is on module -->
- <% if component.key != project.key %>
- <%= h component.longName() -%>
- <% end %>
- <% else %>
- <del><%= h issue.componentKey() %></del>
- <% end %>
- </td>
- <td>
- <%= h @issues_result.user(issue.assignee).name if issue.assignee -%>
- </td>
- <td>
- <%= h @issues_result.actionPlan(issue).name if issue.actionPlanKey() -%>
- </td>
- <td width="1%" nowrap>
- <%= human_short_date(Api::Utils.java_to_ruby_datetime(issue.updateDate())) -%>
- </td>
- </tr>
- <%
- end
- %>
- </tbody>
- <%= if @ajax_mode
- paginate_java(@issues_result.paging, :colspan => colspan, :id => 'issue-filter-foot', :include_loading_icon => true,
- :url_results => url_for({:controller => 'issues', :action => 'search'}.merge(params))) { |label, page_id|
- link_to_function label, "refreshList('#{@issues_query.sort}', #{@issues_query.asc}, #{page_id})"
- }
- else
- paginate_java(@issues_result.paging, :colspan => colspan, :id => 'issue-filter-foot', :include_loading_icon => true) { |label, page_id|
- link_to(label, params.merge({:pageIndex => page_id}))
- }
- end
- %>
- </table>
- </div>
-<%
- end
-%>
-
-<script type="text/javascript">
- var filterCriteria = <%= json_escape(@issues_query_params.to_json) -%>;
-
- function refreshList(sort, asc, page) {
- $j('#issue-filter-foot_pages').hide();
- $j('#issue-filter-foot_loading').show();
-
- filterCriteria['sort']=sort;
- filterCriteria['asc']=asc;
- filterCriteria['pageIndex']=page;
- var url = baseUrl + '/issues/search?' + $j.param(filterCriteria);
-
- <% if @ajax_mode %>
- $j('.issues-content').load(url, function () {
- // As issues will be loaded after open-modal has been processed by jQuery, we have to process manually modal classes
- processModal();
- });
- <% else %>
- window.location = url;
- <% end %>
- return false;
- }
-
- function processModal(){
- $j('.issues-content .open-modal').modal();
- }
-
- <% if @ajax_mode %>
- $j(document).ready(function() {
- processModal();
- });
- <% end %>
-</script>
+++ /dev/null
-<% if @issues_result && @issues_result.maxResultsReached() %>
- <p class="notes"><%= message('issue_filter.max_results_reached', :params => @issues_result.paging.total()) -%></p>
-<% end %>
-
-<% unless @issues_result.issues && !@issues_result.issues.empty? %>
- <p class="notes" style="padding: 5px;"><%= message('issue_filter.no_result') -%></p>
-<% end %>
-
-<% if logged_in? && !@first_search %>
- <div id="issue-filters-operations" class="line-block marginbottom10">
- <ul class="operations">
- <% if @filter && @filter.id %>
- <li><a id="copy" href="<%= url_for :action => 'copy_form', :id => @filter.id -%>" class="link-action open-modal"><%= message('copy') -%></a></li>
- <% end %>
- <% if !@unchanged && @filter && @filter.id && @filter.user == current_user.login %>
- <li>
- <%= link_to message('save'), params.merge({:action => 'save', :id => @filter.id}), :class => 'link-action', :id => 'save', :method => :post -%>
- </li>
- <% end %>
- <% unless @filter %>
- <li>
- <a id="save-as" href="<%= url_for params.merge({:action => 'save_as_form'}) -%>" class="link-action open-modal"><%= message('save_as') -%></a>
- </li>
- <% end %>
- <% if @issues_result.issues && !@issues_result.issues.empty? %>
- <li class="last">
- <a id="bulk-change" href="<%= url_for params.merge({:action => 'bulk_change_form'}) -%>"
- class="link-action open-modal"><%= message('bulk_change') -%></a>
- </li>
- <% end %>
- </ul>
-
- <% if @filter && @filter.id && @filter.name.present? %>
- <div class="page_title" id="filter-title">
- <p>
- <span class="h3"><%= h @filter.name -%></span>
- <span class="note">
- <% if !@filter.shared %>
- [<%= message 'issue_filter.private' -%>]
- <% elsif @filter.user==current_user.login %>
- [<%= message 'issue_filter.shared_with_all_users' -%>]
- <% elsif @filter.user %>
- [<%= message 'shared_by' -%> <%= Api.users.findByLogin(@filter.user).name -%>]
- <% end %>
- </span>
- <% if @filter.user == current_user.login %>
- <a href="<%= url_for :action => 'edit_form', :id => @filter.id -%>" class="open-modal" id="edit-filter"><%= image_tag 'pencil-small.png', :alt => message('edit') -%></a>
- <% end %>
- </p>
- </div>
- <% end %>
- </div>
-<% end %>
+++ /dev/null
-<% if logged_in? && @issues_result.issues && !@issues_result.issues.empty? %>
- <div class="line-block marginbottom10">
- <div id="issue-filters-operations" style="padding-right: 5px; padding-top: 5px;">
- <ul class="operations">
- <li class="last">
- <a id="bulk-change" href="<%= url_for params.merge({:controller => 'issues', :action => 'bulk_change_form'}) -%>"
- class="link-action open-modal"><%= message('bulk_change') -%></a>
- </li>
- </ul>
- </div>
- </div>
-<% end %>
+++ /dev/null
-<div class="issues-content">
- <%= render :partial => 'operations' -%>
- <%= render :partial => 'list' -%>
-</div>
+++ /dev/null
-<div class="issues-content">
- <%
- if @issues_result.issues && !@issues_result.issues.empty?
- %>
- <%= render :partial => 'operations_ajax' -%>
- <%= render :partial => 'list' -%>
- <% else %>
- <%= render :partial => 'shared/no_issues' -%>
- <% end %>
-</div>
+++ /dev/null
-<% content_for :script do %>
- <script>
- $j(document).ready(function () {
- $j(".issue-filter-star").click(function () {
- var filterId = $j(this).attr('filter-id');
- var star = $j(this);
- $j.ajax({
- type: 'POST',
- url: baseUrl + "/issues/toggle_fav",
- data: {id: filterId},
- success: function (data) {
- if (data == 'true') {
- star.removeClass('icon-not-favorite').addClass('icon-favorite');
- star.attr('title', '<%= escape_javascript message('click_to_remove_from_favorites') -%>');
- } else {
- star.removeClass('icon-favorite').addClass('icon-not-favorite');
- star.attr('title', '<%= escape_javascript message('click_to_add_to_favorites') -%>');
- }
- $j('#sidebar-favourites').load(baseUrl + '/issues/favourites');
- }
- });
- });
- });
-
- function onSaveAs(data) {
- window.location = baseUrl + '/issues/search#id=' + data;
- }
-
- function onCopy(data) {
- window.location = baseUrl + '/issues/search#id=' + data;
- }
-
- function onEdit(data) {
- window.location = baseUrl + '/issues/search#id=' + data;
- }
- </script>
-<% end %>
-<div>
- <div class="page">
- <h1><%= message 'issue_filter.manage.my_filters' -%></h1>
- <table class="data marginbottom10" id="my-issue-filters">
- <thead>
- <tr>
- <th class="thin"></th>
- <th><%= message('issue_filter.form.name') -%></th>
- <th><%= message('issue_filter.sharing') -%></th>
- <th class="right"><%= message('operations') -%></th>
- </tr>
- </thead>
- <tbody>
- <% if @filters.empty? %>
- <tr class="even">
- <td colspan="4"><%= message('issue_filter.no_filters') -%></td>
- </tr>
- <% else %>
- <% @filters.each do |filter| %>
- <tr id="my-issue-filter-<%= filter.name.parameterize -%>" class="<%= cycle('even', 'odd', :name => 'my-filters') -%>">
- <td>
- <%= issue_filter_star(filter, @favourite_filter_ids.include?(filter.id)) -%>
- </td>
- <td>
- <a href="<%= ApplicationController.root_context -%>/issues/search#id=<%= h filter.id -%>|<%= h filter.data -%>"><%= h filter.name -%></a>
- <% if filter.description %>
- <div class="note"><%= h filter.description -%></div>
- <% end %>
- </td>
- <td>
- <% if filter.shared %>
- <%= message 'issue_filter.shared_with_all_users' -%>
- <% else %>
- <%= message 'issue_filter.private' -%>
- <% end %>
- </td>
- <td class="thin nowrap right">
- <a id="copy-<%= filter.name.parameterize -%>" href="<%= ApplicationController.root_context -%>/issues/copy_form/<%= filter.id -%>"
- class="link-action open-modal"><%= message('copy') -%></a>
-
- <a id="edit_<%= filter.name.parameterize -%>" href="<%= ApplicationController.root_context -%>/issues/edit_form/<%= filter.id -%>"
- class="link-action open-modal"><%= message('edit') -%></a>
-
- <%= link_to_action message('delete'), "#{ApplicationController.root_context}/issues/delete/#{filter.id}",
- :class => 'link-action link-red',
- :id => "delete_#{filter.name.parameterize}",
- :confirm_button => message('delete'),
- :confirm_title => 'issue_filter.delete_confirm_title',
- :confirm_msg => 'issue_filter.are_you_sure_want_delete_filter_x',
- :confirm_msg_params => [filter.name] -%>
- </td>
- </tr>
- <% end %>
- <% end %>
- </tbody>
- </table>
-
- <br/>
-
- <h1><%= message 'issue_filter.manage.shared_filters' -%></h1>
- <table class="data" id="shared-filters">
- <thead>
- <tr>
- <th class="thin"></th>
- <th><%= message('issue_filter.form.name') -%></th>
- <th><%= message('shared_by') -%></th>
- <th class="right"><%= message('operations') -%></th>
- </tr>
- </thead>
- <tbody>
- <% if @shared_filters.empty? %>
- <tr class="even">
- <td colspan="4"><%= message('issue_filter.no_filters') -%></td>
- </tr>
- <% else %>
- <% @shared_filters.each do |filter| %>
- <tr id="shared-<%= filter.name.parameterize -%>" class="<%= cycle('even', 'odd', :name => 'shared-filters') -%>">
- <td>
- <%= issue_filter_star(filter, @favourite_filter_ids.include?(filter.id)) -%>
- </td>
- <td>
- <a href="<%= ApplicationController.root_context -%>/issues/search#id=<%= h filter.id -%>|<%= h filter.data -%>"><%= h filter.name -%></a>
- <% if filter.description %>
- <div class="note"><%= h filter.description -%></div>
- <% end %>
- </td>
- <td>
- <%= h Api.users.findByLogin(filter.user).name -%>
- </td>
- <td class="thin nowrap right">
- <a id="copy-<%= filter.name.parameterize -%>" href="<%= ApplicationController.root_context -%>/issues/copy_form/<%= filter.id -%>" class="link-action open-modal"><%= message('copy') -%></a>
- <% if has_role?(:admin) %>
-
- <a id="edit_shared_<%= filter.name.parameterize -%>" href="<%= ApplicationController.root_context -%>/issues/edit_form/<%= filter.id -%>" class="link-action open-modal"><%= message('edit') -%></a>
-
- <%= link_to_action message('delete'), "#{ApplicationController.root_context}/issues/delete/#{filter.id}",
- :class => 'link-action link-red',
- :id => "delete_system_#{filter.name.parameterize}",
- :confirm_button => message('delete'),
- :confirm_title => 'issue_filter.delete_confirm_title',
- :confirm_msg => 'issue_filter.are_you_sure_want_delete_filter_x',
- :confirm_msg_params => [filter.name] -%>
- <% end %>
- </td>
- </tr>
- <% end %>
- <% end %>
- </tbody>
- </table>
-
- </div>
-</div>
+++ /dev/null
-<% content_for :script do %>
- <script data-main="<%= ApplicationController.root_context -%>/js/issues-old/app" src="<%= ApplicationController.root_context -%>/js/require.js"></script>
-<% end %>
-
-<div class="navigator">
- <div class="navigator-header"></div>
- <div class="navigator-filters"></div>
-
- <div class="navigator-content">
- <div class="navigator-side">
- <div style="position:relative; overflow: visible; height: 100%;">
- <div class="navigator-actions"></div>
- <div class="navigator-results"></div>
- <a class="navigator-resizer"><i class="icon-resizer"></i></a>
- </div>
- </div>
- <div class="navigator-main">
- <div class="navigator-notes"><%= message('issue_filter.max_results_reached', :params => 10000) -%></div>
- <div class="navigator-details"></div>
- </div>
- </div>
-</div>
-
-
-<script>
- window.SS = {};
-
- _.extend(window.SS, {
- currentUser: '<%= current_user.login if current_user -%>',
- currentUserName: '<%= current_user.name if current_user -%>',
- severities: <%= RulesConfigurationController::RULE_PRIORITIES.to_json.html_safe -%>,
- statuses: <%= @options_for_statuses.to_json.html_safe -%>,
- resolutions: <%= @options_for_resolutions.to_json.html_safe -%>,
- favorites: <%= render :partial => 'issues/filter_favourites' -%>,
- languages: {<% controller.java_facade.getLanguages().to_a.sort {|a,b| a.getName() <=> b.getName()}.each do |language| -%>
- '<%= language.getKey().html_safe -%>': '<%= language.getName().html_safe -%>',
- <% end %>},
-
- phrases: {
- 'actionPlan': '<%= escape_javascript message('issue_filter.criteria.actionPlan') -%>',
- 'actionPlanNotAvailable': '<%= escape_javascript message('issue_filter.criteria.actionPlanNotAvailable') -%>',
- 'any': '<%= escape_javascript message('any') -%>',
- 'anytime': '<%= escape_javascript message('anytime') -%>',
- 'all': '<%= escape_javascript message('all') -%>',
- 'edit': '<%= escape_javascript message('edit') -%>',
- 'delete': '<%= escape_javascript message('delete') -%>',
- 'to': '<%= escape_javascript message('to.downcase') -%>',
- 'project': '<%= escape_javascript message('issue_filter.criteria.project') -%>',
- 'language': '<%= escape_javascript message('language') -%>',
- 'severity': '<%= escape_javascript message('issue_filter.criteria.severity') -%>',
- 'severities': {
- BLOCKER: '<%= escape_javascript message('severity.BLOCKER') -%>',
- CRITICAL: '<%= escape_javascript message('severity.CRITICAL') -%>',
- MAJOR: '<%= escape_javascript message('severity.MAJOR') -%>',
- MINOR: '<%= escape_javascript message('severity.MINOR') -%>',
- INFO: '<%= escape_javascript message('severity.INFO') -%>'
- },
- 'status': '<%= escape_javascript message('issue_filter.criteria.status') -%>',
- 'statuses': {
- OPEN: '<%= escape_javascript message('issue.status.OPEN') -%>',
- CONFIRMED: '<%= escape_javascript message('issue.status.CONFIRMED') -%>',
- REOPENED: '<%= escape_javascript message('issue.status.REOPENED') -%>',
- RESOLVED: '<%= escape_javascript message('issue.status.RESOLVED') -%>',
- CLOSED: '<%= escape_javascript message('issue.status.CLOSED') -%>'
- },
- 'actions': {
- comment: '<%= escape_javascript message('issue.comment.formlink') -%>',
- assign: '<%= escape_javascript message('issue.assign.formlink') -%>',
- assign_to_me: '<%= escape_javascript message('issue.assign.to_me') -%>',
- assigned_to: '<%= escape_javascript message('assigned_to') -%>',
- plan: '<%= escape_javascript message('issue.do_plan') -%>',
- planned_for: '<%= escape_javascript message('issue.planned_for') -%>',
- set_severity: '<%= escape_javascript message('issue.set_severity') -%>',
- <% Internal.issues.listPluginActions().each do |action| -%>
- '<%= escape_javascript action -%>': '<%= escape_javascript message("issue.action.#{action}.formlink") -%>',
- <% end -%>
- },
- 'transitions': {
- confirm: '<%= escape_javascript message('issue.transition.confirm') -%>',
- unconfirm: '<%= escape_javascript message('issue.transition.unconfirm') -%>',
- resolve: '<%= escape_javascript message('issue.transition.resolve') -%>',
- falsepositive: '<%= escape_javascript message('issue.transition.falsepositive') -%>',
- reopen: '<%= escape_javascript message('issue.transition.reopen') -%>',
- close: '<%= escape_javascript message('issue.transition.close') -%>'
- },
- assignee: '<%= escape_javascript message('issue_filter.criteria.assignee') -%>',
- resolution: '<%= escape_javascript message('issue_filter.criteria.resolution') -%>',
- resolutions: {
- 'RESOLVED': '<%= escape_javascript message('issue.status.RESOLVED') -%>',
- 'UNRESOLVED': '<%= escape_javascript message('unresolved') -%>',
- 'FALSE-POSITIVE': '<%= escape_javascript message('issue.resolution.FALSE-POSITIVE') -%>',
- 'FIXED': '<%= escape_javascript message('issue.resolution.FIXED') -%>',
- 'REMOVED': '<%= escape_javascript message('issue.resolution.REMOVED') -%>'
- },
- reporter: '<%= escape_javascript message('issue_filter.criteria.reporter') -%>',
- rule: '<%= escape_javascript message('issue_filter.criteria.rule') -%>',
- created: '<%= escape_javascript message('issue_filter.criteria.created') -%>',
- createdAt: '<%= escape_javascript message('issue_filter.criteria.created_at') -%>',
-
- moreCriteria: '<%= escape_javascript message('issue_filter.more_criteria') -%>',
- unassigned: '<%= escape_javascript message('unassigned') -%>',
- unplanned: '<%= escape_javascript message('issue.unplanned') -%>',
- assignedToMe: '<%= escape_javascript message('assigned_to_me') -%>',
- filtersList: '<%= escape_javascript message('issue_filter.filter_list') -%>',
- commentConfirmDelete: '<%= escape_javascript message('issue.comment.delete_confirm_message') -%>',
- requirementRemoved: '<%= escape_javascript message('issue.technical_debt_deleted') -%>',
-
- select2: {
- noMatches: '<%= escape_javascript message('select2.noMatches') -%>',
- searching: '<%= escape_javascript message('select2.searching') -%>',
- tooShort: '<%= escape_javascript message('select2.tooShort', :params => [2]) -%>'
- },
- 'Done': '<%= escape_javascript message("Done") -%>',
- 'Prev': '<%= escape_javascript message("Prev") -%>',
- 'Next': '<%= escape_javascript message("Next") -%>',
- 'Today': '<%= escape_javascript message("Today") -%>',
- 'January': '<%= escape_javascript message("January") -%>',
- 'February': '<%= escape_javascript message("February") -%>',
- 'March': '<%= escape_javascript message("March") -%>',
- 'April': '<%= escape_javascript message("April") -%>',
- 'May': '<%= escape_javascript message("May") -%>',
- 'June': '<%= escape_javascript message("June") -%>',
- 'July': '<%= escape_javascript message("July") -%>',
- 'August': '<%= escape_javascript message("August") -%>',
- 'September': '<%= escape_javascript message("September") -%>',
- 'October': '<%= escape_javascript message("October") -%>',
- 'November': '<%= escape_javascript message("November") -%>',
- 'December': '<%= escape_javascript message("December") -%>',
- 'Jan': '<%= escape_javascript message("Jan") -%>',
- 'Feb': '<%= escape_javascript message("Feb") -%>',
- 'Mar': '<%= escape_javascript message("Mar") -%>',
- 'Apr': '<%= escape_javascript message("Apr") -%>',
- 'Jun': '<%= escape_javascript message("Jun") -%>',
- 'Jul': '<%= escape_javascript message("Jul") -%>',
- 'Aug': '<%= escape_javascript message("Aug") -%>',
- 'Sep': '<%= escape_javascript message("Sep") -%>',
- 'Oct': '<%= escape_javascript message("Oct") -%>',
- 'Nov': '<%= escape_javascript message("Nov") -%>',
- 'Dec': '<%= escape_javascript message("Dec") -%>',
- 'Sunday': '<%= escape_javascript message("Sunday") -%>',
- 'Monday': '<%= escape_javascript message("Monday") -%>',
- 'Tuesday': '<%= escape_javascript message("Tuesday") -%>',
- 'Wednesday': '<%= escape_javascript message("Wednesday") -%>',
- 'Thursday': '<%= escape_javascript message("Thursday") -%>',
- 'Friday': '<%= escape_javascript message("Friday") -%>',
- 'Saturday': '<%= escape_javascript message("Saturday") -%>',
- 'Sun': '<%= escape_javascript message("Sun") -%>',
- 'Mon': '<%= escape_javascript message("Mon") -%>',
- 'Tue': '<%= escape_javascript message("Tue") -%>',
- 'Wed': '<%= escape_javascript message("Wed") -%>',
- 'Thu': '<%= escape_javascript message("Thu") -%>',
- 'Fri': '<%= escape_javascript message("Fri") -%>',
- 'Sat': '<%= escape_javascript message("Sat") -%>',
- 'Su': '<%= escape_javascript message("Su") -%>',
- 'Mo': '<%= escape_javascript message("Mo") -%>',
- 'Tu': '<%= escape_javascript message("Tu") -%>',
- 'We': '<%= escape_javascript message("We") -%>',
- 'Th': '<%= escape_javascript message("Th") -%>',
- 'Fr': '<%= escape_javascript message("Fr") -%>',
- 'Sa': '<%= escape_javascript message("Sa") -%>'
- }
- });
-
- window.messages = {
- 'all': '<%= escape_javascript message('all') -%>',
- 'assigned_to': '<%= escape_javascript message('assigned_to') -%>',
- 'bulk_change': '<%= escape_javascript message('bulk_change') -%>',
- 'issue.planned_for': '<%= escape_javascript message('issue.planned_for') -%>',
- 'issue.do_plan': '<%= escape_javascript message('issue.do_plan') -%>',
- 'issue.planned_for': '<%= escape_javascript message('issue.planned_for') -%>',
- 'more_actions': '<%= escape_javascript message('more_actions') -%>',
- 'reporter': '<%= escape_javascript message('reporter') -%>',
- 'author': '<%= escape_javascript message('author') -%>',
- 'cancel': '<%= escape_javascript message('cancel') -%>',
- 'save': '<%= escape_javascript message('save') -%>',
- 'issue.technical_debt_short': '<%= escape_javascript message('issue.technical_debt_short') -%>',
- 'issue.technical_debt_deleted': '<%= escape_javascript message('issue.technical_debt_deleted') -%>',
- 'rule': '<%= escape_javascript message('rule') -%>',
- 'changelog': '<%= escape_javascript message('changelog') -%>',
- 'edit': '<%= escape_javascript message('edit') -%>',
- 'delete': '<%= escape_javascript message('delete') -%>',
- 'moreCriteria': '<%= escape_javascript message('issue_filter.more_criteria') -%>',
- 'issue.plan.submit': '<%= escape_javascript message('issue.plan.submit') -%>',
- 'issue.unplan.submit': '<%= escape_javascript message('issue.unplan.submit') -%>',
- 'issue.assign.submit': '<%= escape_javascript message('issue.assign.submit') -%>',
- 'issue.set_severity.submit': '<%= escape_javascript message('issue.set_severity.submit') -%>',
- 'issue.comment.submit': '<%= escape_javascript message('issue.comment.submit') -%>',
- 'issue.plan.error.plan_must_be_created_first_for_admin': '<%= escape_javascript message('issue.plan.error.plan_must_be_created_first_for_admin') -%>',
- 'issue.plan.error.plan_must_be_created_first_for_other': '<%= escape_javascript message('issue.plan.error.plan_must_be_created_first_for_other') -%>',
- 'markdown.helplink': '<%= escape_javascript message('markdown.helplink') -%>',
- 'bold': '<%= escape_javascript message('bold') -%>',
- 'code': '<%= escape_javascript message('code') -%>',
- 'bulleted_point': '<%= escape_javascript message('bulleted_point') -%>',
- 'severity.BLOCKER': '<%= escape_javascript message('severity.BLOCKER') -%>',
- 'severity.CRITICAL': '<%= escape_javascript message('severity.CRITICAL') -%>',
- 'severity.MAJOR': '<%= escape_javascript message('severity.MAJOR') -%>',
- 'severity.MINOR': '<%= escape_javascript message('severity.MINOR') -%>',
- 'severity.INFO': '<%= escape_javascript message('severity.INFO') -%>',
-
- 'component_viewer.measure_section.size': '<%= escape_javascript message('component_viewer.measure_section.size') -%>',
- 'component_viewer.measure_section.complexity': '<%= escape_javascript message('component_viewer.measure_section.complexity') -%>',
- 'component_viewer.measure_section.structure': '<%= escape_javascript message('component_viewer.measure_section.structure') -%>',
- 'component_viewer.measure_section.documentation': '<%= escape_javascript message('component_viewer.measure_section.documentation') -%>',
- 'component_viewer.measure_section.severities': '<%= escape_javascript message('component_viewer.measure_section.severities') -%>',
- 'component_viewer.measure_section.rules': '<%= escape_javascript message('component_viewer.measure_section.rules') -%>',
- 'component_viewer.measure_section.issues': '<%= escape_javascript message('component_viewer.measure_section.issues') -%>',
- 'component_viewer.measure_section.sqale': '<%= escape_javascript message('component_viewer.measure_section.sqale') -%>',
- 'component_viewer.measure_section.unit_tests': '<%= escape_javascript message('component_viewer.measure_section.unit_tests') -%>',
- 'component_viewer.measure_section.integration_tests': '<%= escape_javascript message('component_viewer.measure_section.integration_tests') -%>',
-
- 'component_viewer.issues.current_issue': '<%= escape_javascript message('component_viewer.issues.current_issue') -%>',
- 'component_viewer.issues.unresolved_issues': '<%= escape_javascript message('component_viewer.issues.unresolved_issues') -%>',
- 'component_viewer.issues.false_positive_issues': '<%= escape_javascript message('component_viewer.issues.false_positive_issues') -%>',
-
- 'component_viewer.header.debt': '<%= escape_javascript message('component_viewer.header.debt') -%>',
- 'component_viewer.header.toggle_issues': '<%= escape_javascript message('component_viewer.header.toggle_issues') -%>',
- 'component_viewer.header.toggle_coverage': '<%= escape_javascript message('component_viewer.header.toggle_coverage') -%>',
- 'component_viewer.header.toggle_duplications': '<%= escape_javascript message('component_viewer.header.toggle_duplications') -%>',
-
- 'metric.lines.name': '<%= escape_javascript message('metric.lines.name') -%>',
- 'metric.ncloc.name': '<%= escape_javascript message('metric.ncloc.name') -%>',
- 'metric.complexity.name': '<%= escape_javascript message('metric.complexity.name') -%>',
- 'metric.function_complexity.name': '<%= escape_javascript message('metric.function_complexity.name') -%>',
- 'metric.classes.name': '<%= escape_javascript message('metric.classes.name') -%>',
- 'metric.functions.name': '<%= escape_javascript message('metric.functions.name') -%>',
- 'metric.accessors.name': '<%= escape_javascript message('metric.accessors.name') -%>',
- 'metric.statements.name': '<%= escape_javascript message('metric.statements.name') -%>',
- 'metric.comment_lines.name': '<%= escape_javascript message('metric.comment_lines.name') -%>',
- 'metric.comment_lines_density.name': '<%= escape_javascript message('metric.comment_lines_density.name') -%>',
- 'metric.public_api.name': '<%= escape_javascript message('metric.public_api.name') -%>',
- 'metric.public_undocumented_api.name': '<%= escape_javascript message('metric.public_undocumented_api.name') -%>',
- 'metric.public_documented_api_density.name': '<%= escape_javascript message('metric.public_documented_api_density.name') -%>',
-
- 'metric.coverage.name': '<%= escape_javascript message('metric.coverage.name') -%>',
- 'metric.line_coverage.name': '<%= escape_javascript message('metric.line_coverage.name') -%>',
- 'metric.lines_to_cover.name': '<%= escape_javascript message('metric.lines_to_cover.name') -%>',
- 'metric.covered_lines.name': '<%= escape_javascript message('metric.covered_lines.name') -%>',
- 'metric.uncovered_lines.name': '<%= escape_javascript message('metric.uncovered_lines.name') -%>',
- 'metric.branch_coverage.name': '<%= escape_javascript message('metric.branch_coverage.name') -%>',
- 'metric.conditions_to_cover.name': '<%= escape_javascript message('metric.conditions_to_cover.name') -%>',
- 'metric.covered_conditions.name': '<%= escape_javascript message('metric.covered_conditions.name') -%>',
- 'metric.uncovered_conditions.name': '<%= escape_javascript message('metric.uncovered_conditions.name') -%>',
-
- 'metric.duplicated_blocks.name': '<%= escape_javascript message('metric.duplicated_blocks.name') -%>',
- 'metric.duplicated_files.name': '<%= escape_javascript message('metric.duplicated_files.name') -%>',
- 'metric.duplicated_lines.name': '<%= escape_javascript message('metric.duplicated_lines.name') -%>',
- 'metric.duplicated_lines_density.name': '<%= escape_javascript message('metric.duplicated_lines_density.name') -%>',
-
- 'metric.violations.name': '<%= escape_javascript message('metric.violations.name') -%>',
- 'metric.sqale_index.name': '<%= escape_javascript message('metric.sqale_index.name') -%>',
- 'metric.blocker_violations.name': '<%= escape_javascript message('metric.blocker_violations.name') -%>',
- 'metric.critical_violations.name': '<%= escape_javascript message('metric.critical_violations.name') -%>',
- 'metric.major_violations.name': '<%= escape_javascript message('metric.major_violations.name') -%>',
- 'metric.minor_violations.name': '<%= escape_javascript message('metric.minor_violations.name') -%>',
- 'metric.info_violations.name': '<%= escape_javascript message('metric.info_violations.name') -%>'
- };
-</script>