diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/coding-rules/rule')
8 files changed, 12 insertions, 12 deletions
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 853082f3234..b9ebae4d1a2 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 @@ -154,7 +154,7 @@ export default ModalFormView.extend({ sendRequest (action, options) { this.$('.alert').addClass('hidden'); const that = this; - const url = '/api/rules/' + action; + const url = window.baseUrl + '/api/rules/' + action; return $.ajax({ url, type: 'POST', 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 24a4854e98f..6e2907598f6 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 @@ -49,7 +49,7 @@ export default Marionette.ItemView.extend({ return _.extend(Marionette.ItemView.prototype.serializeData.apply(this, arguments), { canWrite: this.options.app.canWrite, templateRule: this.options.templateRule, - permalink: '/coding_rules/#rule_key=' + encodeURIComponent(this.model.id) + permalink: window.baseUrl + '/coding_rules/#rule_key=' + encodeURIComponent(this.model.id) }); } }); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/delete-rule-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/delete-rule-view.js index bfeff19b91f..b0d344118f0 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/delete-rule-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/delete-rule-view.js @@ -28,7 +28,7 @@ export default ModalFormView.extend({ onFormSubmit() { ModalFormView.prototype.onFormSubmit.apply(this, arguments); - const url = '/api/rules/delete'; + const url = window.baseUrl + '/api/rules/delete'; const options = { key: this.model.id }; $.post(url, options).done(() => { this.destroy(); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js index 311fa010f5f..dce27670e4d 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/profile-activation-view.js @@ -99,7 +99,7 @@ export default ModalForm.extend({ return $.ajax({ type: 'POST', - url: '/api/qualityprofiles/activate_rule', + url: window.baseUrl + '/api/qualityprofiles/activate_rule', data: { severity, profile_key: profileKey, 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 9c5c5df3bf8..49486712db8 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({ this.ui.extendDescriptionForm.addClass('hidden'); return $.ajax({ type: 'POST', - url: '/api/rules/update', + url: window.baseUrl + '/api/rules/update', dataType: 'json', data: { key: this.model.get('key'), diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-issues-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-issues-view.js index afd73aa6957..db19ac674c0 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-issues-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-issues-view.js @@ -36,7 +36,7 @@ export default Marionette.ItemView.extend({ requestIssues () { const that = this; - const url = '/api/issues/search'; + const url = window.baseUrl + '/api/issues/search'; const options = { rules: this.model.id, resolved: false, @@ -61,7 +61,7 @@ export default Marionette.ItemView.extend({ return _.extend(Marionette.ItemView.prototype.serializeData.apply(this, arguments), { total: this.total, projects: this.projects, - baseSearchUrl: '/issues/search#resolved=false|rules=' + encodeURIComponent(this.model.id) + baseSearchUrl: window.baseUrl + '/issues/search#resolved=false|rules=' + encodeURIComponent(this.model.id) }); } }); diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-meta-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-meta-view.js index a11699b561e..1a5e0507fe0 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-meta-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/rule-meta-view.js @@ -57,7 +57,7 @@ export default Marionette.ItemView.extend(RuleFilterMixin).extend({ }, requestTags () { - const url = '/api/rules/tags'; + const url = window.baseUrl + '/api/rules/tags'; return $.get(url); }, @@ -90,7 +90,7 @@ export default Marionette.ItemView.extend(RuleFilterMixin).extend({ const tags = this.ui.tagInput.val(); return $.ajax({ type: 'POST', - url: '/api/rules/update', + url: window.baseUrl + '/api/rules/update', data: { key: this.model.get('key'), tags @@ -107,7 +107,7 @@ export default Marionette.ItemView.extend(RuleFilterMixin).extend({ return _.extend(Marionette.ItemView.prototype.serializeData.apply(this, arguments), { canWrite: this.options.app.canWrite, allTags: _.union(this.model.get('sysTags'), this.model.get('tags')), - permalink: '/coding_rules#rule_key=' + encodeURIComponent(this.model.id) + permalink: window.baseUrl + '/coding_rules#rule_key=' + encodeURIComponent(this.model.id) }); } }); 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 e30ed43fd77..a2dcd979655 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 @@ -75,7 +75,7 @@ export default Marionette.ItemView.extend({ yesHandler () { return $.ajax({ type: 'POST', - url: '/api/qualityprofiles/activate_rule', + url: window.baseUrl + '/api/qualityprofiles/activate_rule', data: { profile_key: that.model.get('qProfile'), rule_key: ruleKey, @@ -97,7 +97,7 @@ export default Marionette.ItemView.extend({ yesHandler () { return $.ajax({ type: 'POST', - url: '/api/qualityprofiles/deactivate_rule', + url: window.baseUrl + '/api/qualityprofiles/deactivate_rule', data: { profile_key: that.model.get('qProfile'), rule_key: ruleKey |