From 3142e872bcfa1eba2940efa4e4b45612bfc1dd64 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Tue, 29 Mar 2016 13:41:47 +0200 Subject: SONAR-7494 Web: Reintroduce the web app context --- server/sonar-web/src/main/js/apps/global-permissions/groups-view.js | 6 +++--- server/sonar-web/src/main/js/apps/global-permissions/main.js | 2 +- server/sonar-web/src/main/js/apps/global-permissions/permission.js | 4 ++-- server/sonar-web/src/main/js/apps/global-permissions/users-view.js | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'server/sonar-web/src/main/js/apps/global-permissions') diff --git a/server/sonar-web/src/main/js/apps/global-permissions/groups-view.js b/server/sonar-web/src/main/js/apps/global-permissions/groups-view.js index eebc1249772..f74b578f772 100644 --- a/server/sonar-web/src/main/js/apps/global-permissions/groups-view.js +++ b/server/sonar-web/src/main/js/apps/global-permissions/groups-view.js @@ -22,7 +22,7 @@ import Template from './templates/global-permissions-groups.hbs'; import '../../components/SelectList'; function getSearchUrl (permission, project) { - let url = '/api/permissions/groups?ps=100&permission=' + permission; + let url = window.baseUrl + '/api/permissions/groups?ps=100&permission=' + permission; if (project) { url = url + '&projectId=' + project; } @@ -52,8 +52,8 @@ export default Modal.extend({ }, queryParam: 'q', searchUrl: getSearchUrl(this.options.permission, this.options.project), - selectUrl: '/api/permissions/add_group', - deselectUrl: '/api/permissions/remove_group', + selectUrl: window.baseUrl + '/api/permissions/add_group', + deselectUrl: window.baseUrl + '/api/permissions/remove_group', extra: getExtra(this.options.permission, this.options.project), selectParameter: 'groupName', selectParameterValue: 'name', diff --git a/server/sonar-web/src/main/js/apps/global-permissions/main.js b/server/sonar-web/src/main/js/apps/global-permissions/main.js index 3a468aef67d..85571020b10 100644 --- a/server/sonar-web/src/main/js/apps/global-permissions/main.js +++ b/server/sonar-web/src/main/js/apps/global-permissions/main.js @@ -32,7 +32,7 @@ export default React.createClass({ }, requestPermissions() { - const url = '/api/permissions/search_global_permissions'; + const url = window.baseUrl + '/api/permissions/search_global_permissions'; $.get(url).done(r => { this.setState({ ready: true, permissions: r.permissions }); }); diff --git a/server/sonar-web/src/main/js/apps/global-permissions/permission.js b/server/sonar-web/src/main/js/apps/global-permissions/permission.js index 7b6be54f353..456aa69befb 100644 --- a/server/sonar-web/src/main/js/apps/global-permissions/permission.js +++ b/server/sonar-web/src/main/js/apps/global-permissions/permission.js @@ -40,7 +40,7 @@ export default React.createClass({ }, requestUsers() { - const url = '/api/permissions/users'; + const url = window.baseUrl + '/api/permissions/users'; let data = { permission: this.props.permission.key, ps: MAX_ITEMS }; if (this.props.project) { data.projectId = this.props.project; @@ -49,7 +49,7 @@ export default React.createClass({ }, requestGroups() { - const url = '/api/permissions/groups'; + const url = window.baseUrl + '/api/permissions/groups'; let data = { permission: this.props.permission.key, ps: MAX_ITEMS }; if (this.props.project) { data.projectId = this.props.project; diff --git a/server/sonar-web/src/main/js/apps/global-permissions/users-view.js b/server/sonar-web/src/main/js/apps/global-permissions/users-view.js index 10d152599c2..ba4789f1bcd 100644 --- a/server/sonar-web/src/main/js/apps/global-permissions/users-view.js +++ b/server/sonar-web/src/main/js/apps/global-permissions/users-view.js @@ -22,7 +22,7 @@ import Template from './templates/global-permissions-users.hbs'; import '../../components/SelectList'; function getSearchUrl (permission, project) { - let url = '/api/permissions/users?ps=100&permission=' + permission; + let url = window.baseUrl + '/api/permissions/users?ps=100&permission=' + permission; if (project) { url = url + '&projectId=' + project; } @@ -52,8 +52,8 @@ export default Modal.extend({ }, queryParam: 'q', searchUrl: getSearchUrl(this.options.permission, this.options.project), - selectUrl: '/api/permissions/add_user', - deselectUrl: '/api/permissions/remove_user', + selectUrl: window.baseUrl + '/api/permissions/add_user', + deselectUrl: window.baseUrl + '/api/permissions/remove_user', extra: getExtra(this.options.permission, this.options.project), selectParameter: 'login', selectParameterValue: 'login', -- cgit v1.2.3