<div class="search-navigator-workspace">
<div class="search-navigator-workspace-header"></div>
- <div class="search-navigator-workspace-list"></div>
+ <div class="search-navigator-workspace-details"></div>
</div>
-<h3>{{t 'coding_rules'}}</h3>
-<p class="spacer-top">Total: <a href="{{link rulesSearchUrl}}">{{formatMeasure activeRuleCount 'INT'}}</a></p>
-{{#notEmpty rulesSeverities}}
- <ul class="spacer-top list-inline">
- {{#each rulesSeverities}}
- <li>
- {{severity val}}
- <a href="{{link ../rulesSearchUrl '|severities=' val}}">{{formatMeasure count 'INT'}}</a>
- </li>
- {{/each}}
- </ul>
-{{/notEmpty}}
-
-<hr class="spacer-top spacer-bottom">
-
-<h3>{{t 'projects'}}</h3>
-{{#if isDefault}}
- <p class="alert alert-info">{{t 'quality_profiles.projects_for_default.edit'}}</p>
-{{else}}
- <div id="quality-profile-projects"></div>
-{{/if}}
-
-<hr class="spacer-top spacer-bottom">
+<div class="panel panel-vertical" id="quality-profile-rules">
+ <header class="page-header">
+ <h3 class="page-title">{{t 'coding_rules'}}</h3>
+ </header>
+ <p>
+ <a class="big" href="{{link rulesSearchUrl}}">{{formatMeasure activeRuleCount 'INT'}}</a>
+ activate rules
+ </p>
+ {{#notEmpty rulesSeverities}}
+ <div class="abs-width-400 spacer-top">
+ <div class="columns">
+ <div class="column-half">
+ {{#eachEven rulesSeverities}}
+ <p class="spacer-top">
+ {{severityIcon val}}
+ <a href="{{link ../rulesSearchUrl '|severities=' val}}">{{formatMeasure count 'INT'}}</a>
+ <span class="text-lowercase">{{t 'severity' val}}</span>
+ </p>
+ {{/eachEven}}
+ </div>
+ <div class="column-half">
+ {{#eachOdd rulesSeverities}}
+ <p class="spacer-top">
+ {{severityIcon val}}
+ <a href="{{link ../rulesSearchUrl '|severities=' val}}">{{formatMeasure count 'INT'}}</a>
+ <span class="text-lowercase">{{t 'severity' val}}</span>
+ </p>
+ {{/eachOdd}}
+ </div>
+ </div>
+ </div>
+ {{/notEmpty}}
+</div>
-<h3>{{t 'permalinks'}}</h3>
-<p class="alert alert-warning">Coming soon...</p>
+<div class="panel panel-vertical" id="quality-profile-projects">
+ <header class="page-header">
+ <h3 class="page-title">{{t 'projects'}}</h3>
+ </header>
+ {{#if isDefault}}
+ <p class="alert alert-info">{{t 'quality_profiles.projects_for_default.edit'}}</p>
+ {{else}}
+ <div id="quality-profile-projects-list"></div>
+ {{/if}}
+</div>
-<hr class="spacer-top spacer-bottom">
+<div class="panel panel-vertical" id="quality-profile-permalinks">
+ <header class="page-header">
+ <h3 class="page-title">{{t 'permalinks'}}</h3>
+ </header>
+ <p class="alert alert-warning">Coming soon...</p>
+</div>
-<div id="quality-profile-inheritance">
+<div class="panel panel-vertical" id="quality-profile-inheritance">
<header class="page-header">
<h3 class="page-title">{{t 'quality_profiles.profile_inheritance'}}</h3>
<div class="page-actions">
</div>
</div>
-<hr class="spacer-top spacer-bottom">
-
-<h3>{{t 'changelog'}}</h3>
-<p class="alert alert-warning">Coming soon...</p>
+<div class="panel panel-vertical" id="quality-profile-changelog">
+ <header class="page-header">
+ <h3 class="page-title">{{t 'changelog'}}</h3>
+ </header>
+ <p class="alert alert-warning">Coming soon...</p>
+</div>
* Misc
*/
+(function () {
+
+ /**
+ * Comparator for _.sortBy()-like functions
+ *
+ * Fit for natural severities order
+ * @param {string} severity
+ * @returns {number}
+ */
+ window.severityComparator = function (severity) {
+ var SEVERITIES_ORDER = ['BLOCKER', 'CRITICAL', 'MAJOR', 'MINOR', 'INFO'];
+ return SEVERITIES_ORDER.indexOf(severity);
+ };
+
+
+ /**
+ * Comparator for _.sortBy()-like functions
+ *
+ * Fit for facet-like display:
+ * BLOCKER MINOR
+ * CRITICAL INFO
+ * MAJOR
+ * @param {string} severity
+ * @returns {number}
+ */
+ window.severityColumnsComparator = function (severity) {
+ var SEVERITIES_ORDER = ['BLOCKER', 'MINOR', 'CRITICAL', 'INFO', 'MAJOR'];
+ return SEVERITIES_ORDER.indexOf(severity);
+ };
+
+})();
+
(function () {
jQuery(function () {
key = profile.get('key'),
options = {
ps: 1,
- facets: 'severities',
+ facets: 'severities,tags',
qprofile: key,
activation: 'true'
};
return $.get(url, options).done(function (r) {
var severityFacet = _.findWhere(r.facets, { property: 'severities' });
if (severityFacet != null) {
- profile.set({ rulesSeverities: severityFacet.values });
+ var severities = severityFacet.values,
+ severityComparator = function (s) {
+ return window.severityColumnsComparator(s.val);
+ },
+ sortedSeverities = _.sortBy(severities, severityComparator);
+ profile.set({ rulesSeverities: sortedSeverities });
}
});
},
headerRegion: '.search-navigator-workspace-header',
actionsRegion: '.search-navigator-filters',
resultsRegion: '.quality-profiles-results',
- detailsRegion: '.search-navigator-workspace-list'
+ detailsRegion: '.search-navigator-workspace-details'
},
onRender: function () {
var navigator = $('.search-navigator');
- navigator.addClass('sticky');
+ navigator.addClass('sticky search-navigator-extended-view');
var top = navigator.offset().top;
this.$('.search-navigator-workspace-header').css({ top: top });
this.$('.search-navigator-side').css({ top: top }).isolatedScroll();
var key = this.model.get('key');
if (!this.model.get('isDefault')) {
new SelectList({
- el: this.$('#quality-profile-projects'),
+ el: this.$('#quality-profile-projects-list'),
width: '100%',
readOnly: false,
focusSearch: false,
.columns {
.clearfix;
- margin: 0 -10px;
+ margin-left: -10px;
+ margin-right: -10px;
+ overflow: hidden;
}
.column-half {
padding: 10px;
}
+.panel + .panel {
+ margin-top: 20px;
+ padding-top: 20px;
+ border-top: 1px solid @barBorderColor;
+}
+
+.panel-vertical {
+ padding-left: 0;
+ padding-right: 0;
+}
+
.panel-info {
border: 1px solid @blue;
background-color: @lightBlue;
.coding-rules-detail-header,
.coding-rules-detail-title {
position: relative;
- margin: 1em 0;
line-height: 1.5;
font-size: @bigFontSize;
font-weight: 400;
}
+.coding-rules-detail-header,
+.coding-rules-detail-title,
+.coding-rules-detail-actions {
+ margin: 16px 0;
+}
+
.coding-rules-detail-header {
margin: 0;
padding-right: 100px;
.coding-rules-detail-title {
display: inline-block;
- margin-top: 2em;
+}
+
+.coding-rules-detail-title-first {
+ margin-top: 6px;
}
.coding-rules-detail-permalink {
quality_profiles.delete_confirm_title=Delete Profile
quality_profiles.are_you_sure_want_delete_profile_x_and_descendants=Are you sure that you want to delete the profile "{0}" and all its descendants?
quality_profiles.editing_profile=Editing profile
-quality_profiles.profile_inheritance=Profile inheritance
+quality_profiles.profile_inheritance=Inheritance
quality_profiles.available_projects=Available projects
quality_profiles.associated_projects=Associated projects
quality_profiles.no_projects_associated_to_profile_x=No projects are explicitly associated to the profile "{0}".