aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-06-29 15:49:14 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2017-07-04 16:29:36 +0200
commit119b1079c42cb176d22773e0e029023152a79c4b (patch)
tree42812ac1b83dac10c46dfd11a1cd3f48c5b88b56 /server/sonar-web/src/main/js/apps
parente843bd39520a3c97948b9920ae9db6c525cada95 (diff)
downloadsonarqube-119b1079c42cb176d22773e0e029023152a79c4b.tar.gz
sonarqube-119b1079c42cb176d22773e0e029023152a79c4b.zip
SONAR-9483 Reset the compareToProfile parameter when an action is done on the quality profil facet
Diffstat (limited to 'server/sonar-web/src/main/js/apps')
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js b/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js
index 09a232e530e..01aa4a90a0c 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js
@@ -82,6 +82,7 @@ export default BaseFacet.extend({
obj.activation = true;
obj[property] = $(e.currentTarget).data('value');
}
+ obj.compareToProfile = null;
this.options.app.state.updateFilter(obj);
},
@@ -90,7 +91,7 @@ export default BaseFacet.extend({
const compareProfile = this.options.app.state.get('query').compareToProfile;
const profile = $(e.currentTarget).parents('.js-facet').data('value');
if (compareProfile == null || compareProfile !== profile) {
- this.options.app.state.updateFilter({ activation: 'true' });
+ this.options.app.state.updateFilter({ activation: 'true', compareToProfile: null });
}
},
@@ -101,7 +102,8 @@ export default BaseFacet.extend({
if (compareProfile == null || compareProfile !== profile) {
this.options.app.state.updateFilter({
activation: 'false',
- active_severities: null
+ active_severities: null,
+ compareToProfile: null
});
}
},
@@ -115,6 +117,7 @@ export default BaseFacet.extend({
const obj = { activation: null };
const property = this.model.get('property');
obj[property] = null;
+ obj.compareToProfile = null;
this.options.app.state.updateFilter(obj);
},