*/
import FacetsView from '../../components/navigator/facets-view';
import BaseFacet from './facets/base-facet';
+import TypeFacet from './facets/type-facet';
import SeverityFacet from './facets/severity-facet';
import StatusFacet from './facets/status-facet';
import ProjectFacet from './facets/project-facet';
import ModeFacet from './facets/mode-facet';
const viewsMapping = {
+ types: TypeFacet,
severities: SeverityFacet,
statuses: StatusFacet,
assignees: AssigneeFacet,
--- /dev/null
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.
+ */
+import _ from 'underscore';
+import BaseFacet from './base-facet';
+import Template from '../templates/facets/issues-type-facet.hbs';
+
+export default BaseFacet.extend({
+ template: Template,
+
+ sortValues (values) {
+ const order = ['BUG', 'VULNERABILITY', 'CODE_SMELL'];
+ return _.sortBy(values, function (v) {
+ return order.indexOf(v.val);
+ });
+ }
+});
+
+
page: 1,
maxResultsReached: false,
query: {},
- facets: ['facetMode', 'severities', 'resolutions'],
+ facets: ['facetMode', 'types', 'resolutions'],
isContext: false,
allFacets: [
'facetMode',
'issues',
- 'severities',
+ 'types',
'resolutions',
+ 'severities',
'statuses',
'createdAt',
'rules',
'actionPlans'
],
facetsFromServer: [
+ 'types',
'severities',
'statuses',
'resolutions',
--- /dev/null
+{{> "_issues-facet-header"}}
+
+<div class="search-navigator-facet-list">
+ {{#each values}}
+ <a class="facet search-navigator-facet js-facet"
+ data-value="{{val}}">
+ <span class="facet-name">{{t 'issue.type' val}}</span>
+ <span class="facet-stat">
+ {{#eq ../state.facetMode 'count'}}{{numberShort count}}{{else}}{{formatMeasure count 'SHORT_WORK_DUR'}}{{/eq}}
+ </span>
+ </a>
+ {{/each}}
+</div>
issue.unplan.submit=Unplan
issue.plan.error.plan_must_be_created_first=At least one action plan must be created on this project. Please contact your project administrator if you don't have the permission to do it.
+issue.type.CODE_SMELL=Code Smell
+issue.type.BUG=Bug
+issue.type.VULNERABILITY=Vulnerability
+
issue.status.REOPENED=Reopened
issue.status.REOPENED.description=Transitioned to and then back from some other status.
issue.status.RESOLVED=Resolved
# ISSUES FACETS
#
#------------------------------------------------------------------------------
+issues.facet.types=Type
issues.facet.severities=Severity
issues.facet.projectUuids=Project
issues.facet.statuses=Status