aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/apps')
-rw-r--r--server/sonar-web/src/main/js/apps/account/change-password-view.js2
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/main.js23
-rw-r--r--server/sonar-web/src/main/js/apps/background-tasks/stats.js5
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/app.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/bulk-change-modal-view.js4
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/facets/active-severity-facet.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/facets/custom-values-facet.js8
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/facets/inheritance-facet.js4
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/facets/status-facet.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule-details-view.js4
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js4
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-view.js4
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule/manual-rule-creation-view.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule/rule-description-view.js2
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js10
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/workspace-list-empty-view.js4
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js4
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/author-facet.js8
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/custom-values-facet.js8
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/language-facet.js8
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/project-facet.js8
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/rule-facet.js8
-rw-r--r--server/sonar-web/src/main/js/apps/issues/facets/tag-facet.js6
-rw-r--r--server/sonar-web/src/main/js/apps/issues/workspace-list-empty-view.js4
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/domain-timeline.js4
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/domain-treemap.js29
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/ncloc-distribution.js7
-rw-r--r--server/sonar-web/src/main/js/apps/overview/components/timeline-chart.js2
-rw-r--r--server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js2
-rw-r--r--server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js3
-rw-r--r--server/sonar-web/src/main/js/apps/overview/domains/structure-domain.js (renamed from server/sonar-web/src/main/js/apps/overview/domains/size-domain.js)4
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/coverage.js6
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/debt.js (renamed from server/sonar-web/src/main/js/apps/overview/main/issues.js)8
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/duplications.js5
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/main.js8
-rw-r--r--server/sonar-web/src/main/js/apps/overview/main/structure.js (renamed from server/sonar-web/src/main/js/apps/overview/main/size.js)8
-rw-r--r--server/sonar-web/src/main/js/apps/overview/overview.js14
-rw-r--r--server/sonar-web/src/main/js/apps/projects/form-view.js5
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/gate-condition-view.js4
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/gate-conditions-view.js4
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/gate-projects-view.js14
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/helpers.js12
-rw-r--r--server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js14
43 files changed, 144 insertions, 145 deletions
diff --git a/server/sonar-web/src/main/js/apps/account/change-password-view.js b/server/sonar-web/src/main/js/apps/account/change-password-view.js
index 6bd5d992b21..4df1c081161 100644
--- a/server/sonar-web/src/main/js/apps/account/change-password-view.js
+++ b/server/sonar-web/src/main/js/apps/account/change-password-view.js
@@ -10,7 +10,7 @@ export default ModalForm.extend({
if (this.checkPasswords()) {
this.sendRequest();
} else {
- this.showErrors([{ msg: t('user.password_doesnt_match_confirmation') }]);
+ this.showErrors([{ msg: window.t('user.password_doesnt_match_confirmation') }]);
}
},
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/main.js b/server/sonar-web/src/main/js/apps/background-tasks/main.js
index 02fa64391e1..521d3e36556 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/main.js
+++ b/server/sonar-web/src/main/js/apps/background-tasks/main.js
@@ -171,8 +171,7 @@ export default React.createClass({
statusFilter: STATUSES.FAILED,
currentsFilter: CURRENTS.ONLY_CURRENTS,
activityPage: 1
- },
- this.requestActivity);
+ }, this.requestActivity);
},
onTaskCanceled(task) {
@@ -192,23 +191,31 @@ export default React.createClass({
<div className="page">
<Header/>
- <Stats {...this.state} cancelPending={this.cancelPending} showFailures={this.showFailures}/>
+ <Stats
+ {...this.props}
+ {...this.state}
+ cancelPending={this.cancelPending}
+ showFailures={this.showFailures}/>
- <Search {...this.props} {...this.state}
+ <Search
+ {...this.props}
+ {...this.state}
refresh={this.requestData}
onStatusChange={this.onStatusChange}
onCurrentsChange={this.onCurrentsChange}
onDateChange={this.onDateChange}
onSearch={this.onSearch}/>
- <Tasks {...this.props}
+ <Tasks
+ {...this.props}
tasks={[].concat(this.state.queue, this.state.activity)}
onTaskCanceled={this.onTaskCanceled}
onFilter={this.handleFilter}/>
- <ListFooter count={this.state.queue.length + this.state.activity.length}
- total={this.state.queue.length + this.state.activityTotal}
- loadMore={this.loadMore}/>
+ <ListFooter
+ count={this.state.queue.length + this.state.activity.length}
+ total={this.state.queue.length + this.state.activityTotal}
+ loadMore={this.loadMore}/>
</div>
);
}
diff --git a/server/sonar-web/src/main/js/apps/background-tasks/stats.js b/server/sonar-web/src/main/js/apps/background-tasks/stats.js
index 308d7e4d8a8..2383f8d76fa 100644
--- a/server/sonar-web/src/main/js/apps/background-tasks/stats.js
+++ b/server/sonar-web/src/main/js/apps/background-tasks/stats.js
@@ -61,6 +61,11 @@ export default React.createClass({
if (this.props.failuresCount == null) {
return null;
}
+
+ if (this.props.options.component) {
+ return null;
+ }
+
if (this.props.failuresCount > 0) {
return (
<span>
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/app.js b/server/sonar-web/src/main/js/apps/coding-rules/app.js
index 61089511594..feb040c3562 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/app.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/app.js
@@ -63,7 +63,7 @@ var App = new Marionette.Application(),
App.manualRepository = function () {
return {
key: 'manual',
- name: t('coding_rules.manual_rule'),
+ name: window.t('coding_rules.manual_rule'),
language: 'none'
};
};
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/bulk-change-modal-view.js b/server/sonar-web/src/main/js/apps/coding-rules/bulk-change-modal-view.js
index d816c21c219..453aa8fd107 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/bulk-change-modal-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/bulk-change-modal-view.js
@@ -15,14 +15,14 @@ export default ModalFormView.extend({
showSuccessMessage: function (profile, succeeded) {
var profileBase = _.findWhere(this.options.app.qualityProfiles, { key: profile }),
profileName = profileBase != null ? profileBase.name : profile,
- message = tp('coding_rules.bulk_change.success', profileName, profileBase.language, succeeded);
+ message = window.tp('coding_rules.bulk_change.success', profileName, profileBase.language, succeeded);
this.ui.messagesContainer.append('<div class="alert alert-success">' + message + '</div>');
},
showWarnMessage: function (profile, succeeded, failed) {
var profileBase = _.findWhere(this.options.app.qualityProfiles, { key: profile }),
profileName = profileBase != null ? profileBase.name : profile,
- message = tp('coding_rules.bulk_change.warning', profileName, profileBase.language, succeeded, failed);
+ message = window.tp('coding_rules.bulk_change.warning', profileName, profileBase.language, succeeded, failed);
this.ui.messagesContainer.append('<div class="alert alert-warning">' + message + '</div>');
},
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/facets/active-severity-facet.js b/server/sonar-web/src/main/js/apps/coding-rules/facets/active-severity-facet.js
index 2062e292b99..2ab853c763a 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/facets/active-severity-facet.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/facets/active-severity-facet.js
@@ -26,7 +26,7 @@ export default BaseFacet.extend({
forbid: function () {
BaseFacet.prototype.forbid.apply(this, arguments);
- this.$el.prop('title', t('coding_rules.filters.active_severity.inactive'));
+ this.$el.prop('title', window.t('coding_rules.filters.active_severity.inactive'));
},
allow: function () {
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/facets/custom-values-facet.js b/server/sonar-web/src/main/js/apps/coding-rules/facets/custom-values-facet.js
index 9b2e01ef70a..bf3739cf70c 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/facets/custom-values-facet.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/facets/custom-values-facet.js
@@ -22,17 +22,17 @@ export default BaseFacet.extend({
prepareSearch: function () {
this.$('.js-custom-value').select2({
- placeholder: t('search_verb'),
+ placeholder: window.t('search_verb'),
minimumInputLength: 1,
allowClear: false,
formatNoMatches: function () {
- return t('select2.noMatches');
+ return window.t('select2.noMatches');
},
formatSearching: function () {
- return t('select2.searching');
+ return window.t('select2.searching');
},
formatInputTooShort: function () {
- return tp('select2.tooShort', 1);
+ return window.tp('select2.tooShort', 1);
},
width: '100%',
ajax: this.prepareAjaxSearch()
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/facets/inheritance-facet.js b/server/sonar-web/src/main/js/apps/coding-rules/facets/inheritance-facet.js
index d72f47e4584..490498a13cb 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/facets/inheritance-facet.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/facets/inheritance-facet.js
@@ -30,7 +30,7 @@ export default BaseFacet.extend({
forbid: function () {
BaseFacet.prototype.forbid.apply(this, arguments);
- this.$el.prop('title', t('coding_rules.filters.inheritance.inactive'));
+ this.$el.prop('title', window.t('coding_rules.filters.inheritance.inactive'));
},
allow: function () {
@@ -42,7 +42,7 @@ export default BaseFacet.extend({
var values = ['NONE', 'INHERITED', 'OVERRIDES'];
return values.map(function (key) {
return {
- label: t('coding_rules.filters.inheritance', key.toLowerCase()),
+ label: window.t('coding_rules.filters.inheritance', key.toLowerCase()),
val: key
};
});
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/facets/status-facet.js b/server/sonar-web/src/main/js/apps/coding-rules/facets/status-facet.js
index 23b0e41e089..fa453552567 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/facets/status-facet.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/facets/status-facet.js
@@ -7,7 +7,7 @@ export default BaseFacet.extend({
getValues: function () {
var values = this.model.getValues();
var x = values.map(function (value) {
- return _.extend(value, { label: t('rules.status', value.val.toLowerCase()) });
+ return _.extend(value, { label: window.t('rules.status', value.val.toLowerCase()) });
});
return x;
},
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule-details-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule-details-view.js
index f8dee5b02cd..87ae705c660 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule-details-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule-details-view.js
@@ -130,8 +130,8 @@ export default Marionette.LayoutView.extend({
var that = this,
ruleType = this.model.has('templateKey') ? 'custom' : 'manual';
confirmDialog({
- title: t('delete'),
- html: tp('coding_rules.delete.' + ruleType + '.confirm', this.model.get('name')),
+ title: window.t('delete'),
+ html: window.tp('coding_rules.delete.' + ruleType + '.confirm', this.model.get('name')),
yesHandler: function () {
var url = baseUrl + '/api/rules/delete',
options = { key: that.model.id };
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js
index ff0da3c7803..b4712e1c15e 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js
@@ -153,7 +153,7 @@ export default ModalFormView.extend({
}).fail(function (jqXHR) {
if (jqXHR.status === 409) {
that.existingRule = jqXHR.responseJSON.rule;
- that.showErrors([], [{ msg: t('coding_rules.reactivate.help') }]);
+ that.showErrors([], [{ msg: window.t('coding_rules.reactivate.help') }]);
that.ui.customRuleCreationCreate.addClass('hidden');
that.ui.customRuleCreationReactivate.removeClass('hidden');
} else {
@@ -175,7 +175,7 @@ export default ModalFormView.extend({
var statuses = ['READY', 'BETA', 'DEPRECATED'].map(function (status) {
return {
id: status,
- text: t('rules.status', status.toLowerCase())
+ text: window.t('rules.status', status.toLowerCase())
};
});
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-view.js
index 6e7002ba587..791334b4a0f 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-view.js
@@ -19,8 +19,8 @@ export default Marionette.ItemView.extend({
deleteRule: function () {
var that = this;
confirmDialog({
- title: t('delete'),
- html: t('are_you_sure'),
+ title: window.t('delete'),
+ html: window.t('are_you_sure'),
yesHandler: function () {
var url = baseUrl + '/api/rules/delete',
options = { key: that.model.id };
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/manual-rule-creation-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/manual-rule-creation-view.js
index cb0869490d0..dab19f1fb13 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule/manual-rule-creation-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/manual-rule-creation-view.js
@@ -99,7 +99,7 @@ export default ModalFormView.extend({
}).fail(function (jqXHR) {
if (jqXHR.status === 409) {
that.existingRule = jqXHR.responseJSON.rule;
- that.showErrors([], [{ msg: t('coding_rules.reactivate.help') }]);
+ that.showErrors([], [{ msg: window.t('coding_rules.reactivate.help') }]);
that.ui.manualRuleCreationCreate.addClass('hidden');
that.ui.manualRuleCreationReactivate.removeClass('hidden');
} else {
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-description-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-description-view.js
index c1a2bc458e5..9b88e3267ce 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-description-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-description-view.js
@@ -64,7 +64,7 @@ export default Marionette.ItemView.extend({
removeExtendedDescription: function () {
var that = this;
confirmDialog({
- html: t('coding_rules.remove_extended_description.confirm'),
+ html: window.t('coding_rules.remove_extended_description.confirm'),
yesHandler: function () {
that.ui.extendDescriptionText.val('');
that.submitExtendDescription();
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js
index 1c74fc9dd63..6139044cbf6 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-profile-view.js
@@ -50,8 +50,8 @@ export default Marionette.ItemView.extend({
var that = this,
ruleKey = this.options.rule.get('key');
confirmDialog({
- title: t('coding_rules.revert_to_parent_definition'),
- html: tp('coding_rules.revert_to_parent_definition.confirm', this.getParent().name),
+ title: window.t('coding_rules.revert_to_parent_definition'),
+ html: window.tp('coding_rules.revert_to_parent_definition.confirm', this.getParent().name),
yesHandler: function () {
return $.ajax({
type: 'POST',
@@ -72,8 +72,8 @@ export default Marionette.ItemView.extend({
var that = this,
ruleKey = this.options.rule.get('key');
confirmDialog({
- title: t('coding_rules.deactivate'),
- html: tp('coding_rules.deactivate.confirm'),
+ title: window.t('coding_rules.deactivate'),
+ html: window.tp('coding_rules.deactivate.confirm'),
yesHandler: function () {
return $.ajax({
type: 'POST',
@@ -137,5 +137,3 @@ export default Marionette.ItemView.extend({
});
}
});
-
-
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-empty-view.js b/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-empty-view.js
index 6563efc2e3a..5045ff3891d 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-empty-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-empty-view.js
@@ -4,8 +4,6 @@ export default Marionette.ItemView.extend({
className: 'search-navigator-no-results',
template: function () {
- return t('coding_rules.no_results');
+ return window.t('coding_rules.no_results');
}
});
-
-
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js b/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js
index 5897372020b..05e54964103 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/workspace-list-item-view.js
@@ -62,8 +62,8 @@ export default WorkspaceListItemView.extend(RuleFilterMixin).extend({
ruleKey = this.model.get('key'),
activation = this.model.get('activation');
confirmDialog({
- title: t('coding_rules.deactivate'),
- html: tp('coding_rules.deactivate.confirm'),
+ title: window.t('coding_rules.deactivate'),
+ html: window.tp('coding_rules.deactivate.confirm'),
yesHandler: function () {
return $.ajax({
type: 'POST',
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/author-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/author-facet.js
index 6567912ab1e..ec9d1a2966e 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/author-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/author-facet.js
@@ -11,13 +11,13 @@ export default CustomValuesFacet.extend({
minimumInputLength: 2,
allowClear: false,
formatNoMatches: function () {
- return t('select2.noMatches');
+ return window.t('select2.noMatches');
},
formatSearching: function () {
- return t('select2.searching');
+ return window.t('select2.searching');
},
formatInputTooShort: function () {
- return tp('select2.tooShort', 2);
+ return window.tp('select2.tooShort', 2);
},
width: '100%',
ajax: {
@@ -38,5 +38,3 @@ export default CustomValuesFacet.extend({
});
}
});
-
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/custom-values-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/custom-values-facet.js
index bf86b4970fb..e9bb08d5853 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/custom-values-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/custom-values-facet.js
@@ -26,13 +26,13 @@ export default BaseFacet.extend({
minimumInputLength: 2,
allowClear: false,
formatNoMatches: function () {
- return t('select2.noMatches');
+ return window.t('select2.noMatches');
},
formatSearching: function () {
- return t('select2.searching');
+ return window.t('select2.searching');
},
formatInputTooShort: function () {
- return tp('select2.tooShort', 2);
+ return window.tp('select2.tooShort', 2);
},
width: '100%',
ajax: this.prepareAjaxSearch()
@@ -65,5 +65,3 @@ export default BaseFacet.extend({
return this.options.app.state.updateFilter(obj);
}
});
-
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/language-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/language-facet.js
index c3d6f274420..e1d48fd5ac2 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/language-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/language-facet.js
@@ -12,13 +12,13 @@ export default CustomValuesFacet.extend({
minimumInputLength: 2,
allowClear: false,
formatNoMatches: function () {
- return t('select2.noMatches');
+ return window.t('select2.noMatches');
},
formatSearching: function () {
- return t('select2.searching');
+ return window.t('select2.searching');
},
formatInputTooShort: function () {
- return tp('select2.tooShort', 2);
+ return window.tp('select2.tooShort', 2);
},
width: '100%',
ajax: {
@@ -62,5 +62,3 @@ export default CustomValuesFacet.extend({
});
}
});
-
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/project-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/project-facet.js
index 5c8eef0fd0e..b4657f808df 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/project-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/project-facet.js
@@ -28,13 +28,13 @@ export default CustomValuesFacet.extend({
minimumInputLength: 2,
allowClear: false,
formatNoMatches: function () {
- return t('select2.noMatches');
+ return window.t('select2.noMatches');
},
formatSearching: function () {
- return t('select2.searching');
+ return window.t('select2.searching');
},
formatInputTooShort: function () {
- return tp('select2.tooShort', 2);
+ return window.tp('select2.tooShort', 2);
},
width: '100%',
ajax: {
@@ -78,5 +78,3 @@ export default CustomValuesFacet.extend({
});
}
});
-
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/rule-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/rule-facet.js
index 8d50f462c0e..d049890807b 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/rule-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/rule-facet.js
@@ -13,13 +13,13 @@ export default CustomValuesFacet.extend({
minimumInputLength: 2,
allowClear: false,
formatNoMatches: function () {
- return t('select2.noMatches');
+ return window.t('select2.noMatches');
},
formatSearching: function () {
- return t('select2.searching');
+ return window.t('select2.searching');
},
formatInputTooShort: function () {
- return tp('select2.tooShort', 2);
+ return window.tp('select2.tooShort', 2);
},
width: '100%',
ajax: {
@@ -74,5 +74,3 @@ export default CustomValuesFacet.extend({
});
}
});
-
-
diff --git a/server/sonar-web/src/main/js/apps/issues/facets/tag-facet.js b/server/sonar-web/src/main/js/apps/issues/facets/tag-facet.js
index 291bcf6f393..52b0a49c5bb 100644
--- a/server/sonar-web/src/main/js/apps/issues/facets/tag-facet.js
+++ b/server/sonar-web/src/main/js/apps/issues/facets/tag-facet.js
@@ -13,10 +13,10 @@ export default CustomValuesFacet.extend({
minimumInputLength: 0,
allowClear: false,
formatNoMatches: function () {
- return t('select2.noMatches');
+ return window.t('select2.noMatches');
},
formatSearching: function () {
- return t('select2.searching');
+ return window.t('select2.searching');
},
width: '100%',
ajax: {
@@ -50,5 +50,3 @@ export default CustomValuesFacet.extend({
});
}
});
-
-
diff --git a/server/sonar-web/src/main/js/apps/issues/workspace-list-empty-view.js b/server/sonar-web/src/main/js/apps/issues/workspace-list-empty-view.js
index b40c68d0ab6..391dbbfd461 100644
--- a/server/sonar-web/src/main/js/apps/issues/workspace-list-empty-view.js
+++ b/server/sonar-web/src/main/js/apps/issues/workspace-list-empty-view.js
@@ -4,8 +4,6 @@ export default Marionette.ItemView.extend({
className: 'search-navigator-no-results',
template: function () {
- return t('issue_filter.no_issues');
+ return window.t('issue_filter.no_issues');
}
});
-
-
diff --git a/server/sonar-web/src/main/js/apps/overview/components/domain-timeline.js b/server/sonar-web/src/main/js/apps/overview/components/domain-timeline.js
index 25db1cddea3..6400d512f54 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/domain-timeline.js
+++ b/server/sonar-web/src/main/js/apps/overview/components/domain-timeline.js
@@ -177,7 +177,7 @@ export const DomainTimeline = React.createClass({
<Select value={this.state.currentMetric}
options={optionsWithDomains}
clearable={false}
- className="input-large"
+ style={{ width: 170 }}
onChange={this.handleMetricChange}/>
</span>;
},
@@ -216,7 +216,7 @@ export const DomainTimeline = React.createClass({
<Select value={this.state.comparisonMetric}
options={optionsWithDomains}
placeholder="Compare with..."
- className="input-large"
+ style={{ width: 170 }}
onChange={this.handleComparisonMetricChange}/>
</span>;
},
diff --git a/server/sonar-web/src/main/js/apps/overview/components/domain-treemap.js b/server/sonar-web/src/main/js/apps/overview/components/domain-treemap.js
index 033a791ead4..03253cbcf5a 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/domain-treemap.js
+++ b/server/sonar-web/src/main/js/apps/overview/components/domain-treemap.js
@@ -95,20 +95,21 @@ export class DomainTreemap extends React.Component {
return this.renderLoading();
}
- // TODO filter out zero sized components
- let items = this.state.components.map(component => {
- let colorMeasure = this.props.colorMetric ? component.measures[this.props.colorMetric] : null;
- return {
- key: component.key,
- name: component.name,
- qualifier: component.qualifier,
- size: component.measures[this.props.sizeMetric],
- color: colorMeasure != null ? this.props.scale(colorMeasure) : '#777',
- tooltip: this.getTooltip(component),
- label: component.name,
- link: getComponentUrl(component.key)
- };
- });
+ let items = this.state.components
+ .filter(component => component.measures[this.props.sizeMetric])
+ .map(component => {
+ let colorMeasure = this.props.colorMetric ? component.measures[this.props.colorMetric] : null;
+ return {
+ key: component.key,
+ name: component.name,
+ qualifier: component.qualifier,
+ size: component.measures[this.props.sizeMetric],
+ color: colorMeasure != null ? this.props.scale(colorMeasure) : '#777',
+ tooltip: this.getTooltip(component),
+ label: component.name,
+ link: getComponentUrl(component.key)
+ };
+ });
const canBeClicked = node => node.qualifier !== 'FIL' && node.qualifier !== 'UTS';
diff --git a/server/sonar-web/src/main/js/apps/overview/components/ncloc-distribution.js b/server/sonar-web/src/main/js/apps/overview/components/ncloc-distribution.js
index 764457ad403..0a24b77c65d 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/ncloc-distribution.js
+++ b/server/sonar-web/src/main/js/apps/overview/components/ncloc-distribution.js
@@ -65,7 +65,12 @@ export const NclocDistribution = React.createClass({
data = _.sortBy(data, d => -d.x);
- let yTicks = data.map(d => collapsePath(d.value, 20));
+ let yTicks = data.map(d => {
+ return {
+ label: collapsePath(d.value, 20),
+ tooltip: d.value
+ };
+ });
let yValues = data.map(d => formatMeasure(d.x, 'SHORT_INT'));
diff --git a/server/sonar-web/src/main/js/apps/overview/components/timeline-chart.js b/server/sonar-web/src/main/js/apps/overview/components/timeline-chart.js
index e82f5a3c457..83b0f711b6b 100644
--- a/server/sonar-web/src/main/js/apps/overview/components/timeline-chart.js
+++ b/server/sonar-web/src/main/js/apps/overview/components/timeline-chart.js
@@ -111,7 +111,7 @@ export const Timeline = React.createClass({
y: _.last(yScale.range()),
width: xScale.range()[1] - xScale(this.props.leakPeriodDate),
height: _.first(yScale.range()) - _.last(yScale.range()),
- fill: '#fffae7'
+ fill: '#fbf3d5'
};
return <rect {...opts}/>;
},
diff --git a/server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js b/server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js
index 4ee8ce45476..d87d3dc5e70 100644
--- a/server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js
+++ b/server/sonar-web/src/main/js/apps/overview/domains/debt-domain.js
@@ -27,7 +27,7 @@ const KNOWN_METRICS = ['violations', 'sqale_index', 'sqale_rating', 'sqale_debt_
'critical_violations', 'major_violations', 'minor_violations', 'info_violations', 'confirmed_issues'];
-export const IssuesMain = React.createClass({
+export const DebtMain = React.createClass({
mixins: [TooltipsMixin],
getInitialState() {
diff --git a/server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js b/server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js
index 2223139a760..861e82ad2b5 100644
--- a/server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js
+++ b/server/sonar-web/src/main/js/apps/overview/domains/duplications-domain.js
@@ -8,13 +8,12 @@ import { DomainTreemap } from '../components/domain-treemap';
import { DomainBubbleChart } from '../components/domain-bubble-chart';
import { getPeriodLabel, getPeriodDate } from './../helpers/periods';
import { TooltipsMixin } from '../../../components/mixins/tooltips-mixin';
-import { filterMetrics, filterMetricsForDomains } from '../helpers/metrics';
+import { filterMetrics, filterMetricsForDomains, getMetricName } from '../helpers/metrics';
import { DomainLeakTitle } from '../main/components';
import { CHART_COLORS_RANGE_PERCENT } from '../../../helpers/constants';
import { formatMeasure, formatMeasureVariation } from '../../../helpers/measures';
import { DonutChart } from '../../../components/charts/donut-chart';
import { DrilldownLink } from '../../../components/shared/drilldown-link';
-import { getMetricName } from '../helpers/metrics';
export const DuplicationsMain = React.createClass({
diff --git a/server/sonar-web/src/main/js/apps/overview/domains/size-domain.js b/server/sonar-web/src/main/js/apps/overview/domains/structure-domain.js
index 05a23ae3d51..3c1563bde01 100644
--- a/server/sonar-web/src/main/js/apps/overview/domains/size-domain.js
+++ b/server/sonar-web/src/main/js/apps/overview/domains/structure-domain.js
@@ -12,7 +12,7 @@ import { filterMetrics, filterMetricsForDomains } from '../helpers/metrics';
import { DomainLeakTitle } from '../main/components';
-export const SizeMain = React.createClass({
+export const StructureMain = React.createClass({
mixins: [TooltipsMixin],
getInitialState() {
@@ -149,7 +149,7 @@ export const SizeMain = React.createClass({
return <div className="overview-detailed-page">
<div className="overview-card">
<div className="overview-card-header">
- <div className="overview-title">{window.t('overview.domain.size')}</div>
+ <div className="overview-title">{window.t('overview.domain.structure')}</div>
{this.renderLegend()}
</div>
diff --git a/server/sonar-web/src/main/js/apps/overview/main/coverage.js b/server/sonar-web/src/main/js/apps/overview/main/coverage.js
index 07aaff0c383..7755cb28df7 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/coverage.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/coverage.js
@@ -85,9 +85,11 @@ export const GeneralCoverage = React.createClass({
];
return <Domain>
- <DomainHeader component={this.props.component} title={window.t('overview.domain.coverage')} linkTo="/tests"/>
+ <DomainHeader component={this.props.component}
+ title={window.t('overview.domain.coverage')}
+ linkTo="/coverage"/>
- <DomainPanel domain="coverage">
+ <DomainPanel>
<DomainNutshell>
<MeasuresList>
diff --git a/server/sonar-web/src/main/js/apps/overview/main/issues.js b/server/sonar-web/src/main/js/apps/overview/main/debt.js
index 86a145596e2..490eadc22c8 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/issues.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/debt.js
@@ -18,7 +18,7 @@ import { getMetricName } from '../helpers/metrics';
import { formatMeasure } from '../../../helpers/measures';
-export const GeneralIssues = React.createClass({
+export const GeneralDebt = React.createClass({
propTypes: {
leakPeriodLabel: React.PropTypes.string,
leakPeriodDate: React.PropTypes.object
@@ -56,9 +56,11 @@ export const GeneralIssues = React.createClass({
render () {
return <Domain>
- <DomainHeader component={this.props.component} title={window.t('overview.domain.debt')} linkTo="/issues"/>
+ <DomainHeader component={this.props.component}
+ title={window.t('overview.domain.debt')}
+ linkTo="/debt"/>
- <DomainPanel domain="issues">
+ <DomainPanel>
<DomainNutshell>
<MeasuresList>
diff --git a/server/sonar-web/src/main/js/apps/overview/main/duplications.js b/server/sonar-web/src/main/js/apps/overview/main/duplications.js
index 64cafcf8932..6240df80417 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/duplications.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/duplications.js
@@ -57,10 +57,11 @@ export const GeneralDuplications = React.createClass({
];
return <Domain>
- <DomainHeader component={this.props.component} title={window.t('overview.domain.duplications')}
+ <DomainHeader component={this.props.component}
+ title={window.t('overview.domain.duplications')}
linkTo="/duplications"/>
- <DomainPanel domain="duplications">
+ <DomainPanel>
<DomainNutshell>
<MeasuresList>
diff --git a/server/sonar-web/src/main/js/apps/overview/main/main.js b/server/sonar-web/src/main/js/apps/overview/main/main.js
index 39e17057257..81eabb769f4 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/main.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/main.js
@@ -2,10 +2,10 @@ import _ from 'underscore';
import moment from 'moment';
import React from 'react';
-import { GeneralIssues } from './issues';
+import { GeneralDebt } from './debt';
import { GeneralCoverage } from './coverage';
import { GeneralDuplications } from './duplications';
-import { GeneralSize } from './size';
+import { GeneralStructure } from './structure';
import { CoverageSelectionMixin } from '../components/coverage-selection-mixin';
import { getPeriodLabel, getPeriodDate } from './../helpers/periods';
import { getMeasuresAndVariations } from '../../../api/measures';
@@ -146,11 +146,11 @@ export default React.createClass({
let props = _.extend({}, this.props, this.state);
return <div className="overview-domains-list">
- <GeneralIssues {...props} history={this.state.history['sqale_index']}/>
+ <GeneralDebt {...props} history={this.state.history['sqale_index']}/>
<GeneralCoverage {...props} coverageMetricPrefix={this.state.coverageMetricPrefix}
history={this.state.history[coverageMetric]}/>
<GeneralDuplications {...props} history={this.state.history['duplicated_lines_density']}/>
- <GeneralSize {...props} history={this.state.history['ncloc']}/>
+ <GeneralStructure {...props} history={this.state.history['ncloc']}/>
</div>;
}
});
diff --git a/server/sonar-web/src/main/js/apps/overview/main/size.js b/server/sonar-web/src/main/js/apps/overview/main/structure.js
index d1138a87f13..a823614a498 100644
--- a/server/sonar-web/src/main/js/apps/overview/main/size.js
+++ b/server/sonar-web/src/main/js/apps/overview/main/structure.js
@@ -15,7 +15,7 @@ import { formatMeasure, formatMeasureVariation } from '../../../helpers/measures
import { LanguageDistribution } from '../components/language-distribution';
-export const GeneralSize = React.createClass({
+export const GeneralStructure = React.createClass({
propTypes: {
leakPeriodLabel: React.PropTypes.string,
leakPeriodDate: React.PropTypes.object
@@ -51,9 +51,11 @@ export const GeneralSize = React.createClass({
render () {
return <Domain>
- <DomainHeader component={this.props.component} title={window.t('overview.domain.size')} linkTo="/size"/>
+ <DomainHeader component={this.props.component}
+ title={window.t('overview.domain.structure')}
+ linkTo="/structure"/>
- <DomainPanel domain="size">
+ <DomainPanel>
<DomainNutshell>
<MeasuresList>
{this.renderLanguageDistribution()}
diff --git a/server/sonar-web/src/main/js/apps/overview/overview.js b/server/sonar-web/src/main/js/apps/overview/overview.js
index 8301fd6add4..706f8b68d2e 100644
--- a/server/sonar-web/src/main/js/apps/overview/overview.js
+++ b/server/sonar-web/src/main/js/apps/overview/overview.js
@@ -3,10 +3,10 @@ import React from 'react';
import Gate from './gate/gate';
import GeneralMain from './main/main';
import Meta from './meta';
-import { SizeMain } from './domains/size-domain';
+import { StructureMain } from './domains/structure-domain';
import { DuplicationsMain } from './domains/duplications-domain';
import { CoverageMain } from './domains/coverage-domain';
-import { IssuesMain } from './domains/debt-domain';
+import { DebtMain } from './domains/debt-domain';
import { getMetrics } from '../../api/metrics';
import { RouterMixin } from '../../components/router/router';
@@ -45,7 +45,7 @@ export const Overview = React.createClass({
renderSize () {
return <div className="overview">
- <SizeMain {...this.props} {...this.state}/>
+ <StructureMain {...this.props} {...this.state}/>
</div>;
},
@@ -63,7 +63,7 @@ export const Overview = React.createClass({
renderIssues () {
return <div className="overview">
- <IssuesMain {...this.props} {...this.state}/>
+ <DebtMain {...this.props} {...this.state}/>
</div>;
},
@@ -74,13 +74,13 @@ export const Overview = React.createClass({
switch (this.state.route) {
case '':
return this.renderMain();
- case '/size':
+ case '/structure':
return this.renderSize();
case '/duplications':
return this.renderDuplications();
- case '/tests':
+ case '/coverage':
return this.renderTests();
- case '/issues':
+ case '/debt':
return this.renderIssues();
default:
throw new Error('Unknown route: ' + this.state.route);
diff --git a/server/sonar-web/src/main/js/apps/projects/form-view.js b/server/sonar-web/src/main/js/apps/projects/form-view.js
index c5e12ab40d8..8f8951c7b1a 100644
--- a/server/sonar-web/src/main/js/apps/projects/form-view.js
+++ b/server/sonar-web/src/main/js/apps/projects/form-view.js
@@ -1,5 +1,4 @@
-import ModalForm from 'components/common/modal-form';
-import './templates';
+import ModalForm from '../../components/common/modal-form';
export default ModalForm.extend({
@@ -19,5 +18,3 @@ export default ModalForm.extend({
}
});
-
-
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/gate-condition-view.js b/server/sonar-web/src/main/js/apps/quality-gates/gate-condition-view.js
index 9ab319a78e7..fef2d7638ac 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/gate-condition-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/gate-condition-view.js
@@ -90,11 +90,9 @@ export default Marionette.ItemView.extend({
return _.extend(Marionette.ItemView.prototype.serializeData.apply(this, arguments), {
canEdit: this.options.canEdit,
periods: this.options.periods,
- periodText: period ? period.text : t('value'),
+ periodText: period ? period.text : window.t('value'),
metric: this.getMetric(),
isDiffMetric: this.isDiffMetric()
});
}
});
-
-
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/gate-conditions-view.js b/server/sonar-web/src/main/js/apps/quality-gates/gate-conditions-view.js
index 4994a9da37b..e7f75a33107 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/gate-conditions-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/gate-conditions-view.js
@@ -34,7 +34,7 @@ export default Marionette.CompositeView.extend({
this.ui.metricSelect.select2({
allowClear: false,
width: '250px',
- placeholder: t('alerts.select_metric')
+ placeholder: window.t('alerts.select_metric')
});
},
@@ -71,5 +71,3 @@ export default Marionette.CompositeView.extend({
});
}
});
-
-
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/gate-projects-view.js b/server/sonar-web/src/main/js/apps/quality-gates/gate-projects-view.js
index ff7816bd659..5d0493a59f5 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/gate-projects-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-gates/gate-projects-view.js
@@ -25,14 +25,14 @@ export default Marionette.ItemView.extend({
selectParameter: 'projectId',
selectParameterValue: 'id',
labels: {
- selected: t('quality_gates.projects.with'),
- deselected: t('quality_gates.projects.without'),
- all: t('quality_gates.projects.all'),
- noResults: t('quality_gates.projects.noResults')
+ selected: window.t('quality_gates.projects.with'),
+ deselected: window.t('quality_gates.projects.without'),
+ all: window.t('quality_gates.projects.all'),
+ noResults: window.t('quality_gates.projects.noResults')
},
tooltips: {
- select: t('quality_gates.projects.select_hint'),
- deselect: t('quality_gates.projects.deselect_hint')
+ select: window.t('quality_gates.projects.select_hint'),
+ deselect: window.t('quality_gates.projects.deselect_hint')
}
});
}
@@ -44,5 +44,3 @@ export default Marionette.ItemView.extend({
});
}
});
-
-
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/helpers.js b/server/sonar-web/src/main/js/apps/quality-profiles/helpers.js
index 7e060b9599b..479b9b18299 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/helpers.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/helpers.js
@@ -15,15 +15,19 @@ Handlebars.registerHelper('exporterUrl', function (profile, exporterKey) {
});
Handlebars.registerHelper('severityChangelog', function (severity) {
- var label = '<i class="icon-severity-' + severity.toLowerCase() + '"></i>&nbsp;' + t('severity', severity),
- message = tp('quality_profiles.severity_set_to_x', label);
+ var label = '<i class="icon-severity-' + severity.toLowerCase() + '"></i>&nbsp;' + window.t('severity', severity),
+ message = window.tp('quality_profiles.severity_set_to_x', label);
return new Handlebars.SafeString(message);
});
Handlebars.registerHelper('parameterChangelog', function (value, parameter) {
if (parameter) {
- return new Handlebars.SafeString(tp('quality_profiles.parameter_set_to_x', value, parameter));
+ return new Handlebars.SafeString(
+ window.tp('quality_profiles.parameter_set_to_x', value, parameter)
+ );
} else {
- return new Handlebars.SafeString(tp('quality_profiles.changelog.parameter_reset_to_default_value_x', parameter));
+ return new Handlebars.SafeString(
+ window.tp('quality_profiles.changelog.parameter_reset_to_default_value_x', parameter)
+ );
}
});
diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js b/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js
index b5f9167033d..10fc51c4a30 100644
--- a/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js
+++ b/server/sonar-web/src/main/js/apps/quality-profiles/profile-details-view.js
@@ -74,14 +74,14 @@ export default Marionette.LayoutView.extend({
selectParameter: 'projectUuid',
selectParameterValue: 'uuid',
labels: {
- selected: t('quality_gates.projects.with'),
- deselected: t('quality_gates.projects.without'),
- all: t('quality_gates.projects.all'),
- noResults: t('quality_gates.projects.noResults')
+ selected: window.t('quality_gates.projects.with'),
+ deselected: window.t('quality_gates.projects.without'),
+ all: window.t('quality_gates.projects.all'),
+ noResults: window.t('quality_gates.projects.noResults')
},
tooltips: {
- select: t('quality_profiles.projects.select_hint'),
- deselect: t('quality_profiles.projects.deselect_hint')
+ select: window.t('quality_profiles.projects.select_hint'),
+ deselect: window.t('quality_profiles.projects.deselect_hint')
}
});
this.listenTo(this.projectsSelectList.collection, 'change:selected', this.onProjectsChange);
@@ -158,5 +158,3 @@ export default Marionette.LayoutView.extend({
});
}
});
-
-