aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/workspace/views
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2017-03-28 16:42:37 +0200
committerStas Vilchik <stas-vilchik@users.noreply.github.com>2017-04-03 10:38:52 +0200
commitadb4265900d35345f8d900dca47cc6c2f490cb21 (patch)
tree1a3e27f58ff84c51cccd3f36d6a13ce2eec26c24 /server/sonar-web/src/main/js/components/workspace/views
parent32a73efa05cb12056a93f08b9124e647213f1f02 (diff)
downloadsonarqube-adb4265900d35345f8d900dca47cc6c2f490cb21.tar.gz
sonarqube-adb4265900d35345f8d900dca47cc6c2f490cb21.zip
SONAR-9005 support rules for organizations
Diffstat (limited to 'server/sonar-web/src/main/js/components/workspace/views')
-rw-r--r--server/sonar-web/src/main/js/components/workspace/views/rule-view.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/components/workspace/views/rule-view.js b/server/sonar-web/src/main/js/components/workspace/views/rule-view.js
index 1fe6440d64c..be86ab3e38d 100644
--- a/server/sonar-web/src/main/js/components/workspace/views/rule-view.js
+++ b/server/sonar-web/src/main/js/components/workspace/views/rule-view.js
@@ -21,6 +21,8 @@ import { union } from 'lodash';
import Marionette from 'backbone.marionette';
import BaseView from './base-viewer-view';
import Template from '../templates/workspace-rule.hbs';
+import { getRulesUrl } from '../../../helpers/urls';
+import { areThereCustomOrganizations } from '../../../store/organizations/utils';
export default BaseView.extend({
template: Template,
@@ -35,9 +37,15 @@ export default BaseView.extend({
},
serializeData() {
+ const query = { rule_key: this.model.get('key') };
+ const permalink = areThereCustomOrganizations()
+ ? getRulesUrl(query, this.model.get('organization'))
+ : getRulesUrl(query);
+
return {
...Marionette.LayoutView.prototype.serializeData.apply(this, arguments),
- allTags: union(this.model.get('sysTags'), this.model.get('tags'))
+ allTags: union(this.model.get('sysTags'), this.model.get('tags')),
+ permalink
};
}
});