aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api/quality-gates.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-03-29 13:41:47 +0200
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2016-03-31 13:09:07 +0200
commit3142e872bcfa1eba2940efa4e4b45612bfc1dd64 (patch)
treeb4c75819c85e0729d55fccd76660bcee0f8a068b /server/sonar-web/src/main/js/api/quality-gates.js
parent491644917a5ebb44429ef45ee1885ed9728daf56 (diff)
downloadsonarqube-3142e872bcfa1eba2940efa4e4b45612bfc1dd64.tar.gz
sonarqube-3142e872bcfa1eba2940efa4e4b45612bfc1dd64.zip
SONAR-7494 Web: Reintroduce the web app context
Diffstat (limited to 'server/sonar-web/src/main/js/api/quality-gates.js')
-rw-r--r--server/sonar-web/src/main/js/api/quality-gates.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/server/sonar-web/src/main/js/api/quality-gates.js b/server/sonar-web/src/main/js/api/quality-gates.js
index a32b0295d1d..e6567a918c1 100644
--- a/server/sonar-web/src/main/js/api/quality-gates.js
+++ b/server/sonar-web/src/main/js/api/quality-gates.js
@@ -20,13 +20,13 @@
import { getJSON, post, postJSON } from '../helpers/request';
export function fetchQualityGatesAppDetails () {
- const url = '/api/qualitygates/app';
+ const url = window.baseUrl + '/api/qualitygates/app';
return getJSON(url);
}
export function fetchQualityGates () {
- const url = '/api/qualitygates/list';
+ const url = window.baseUrl + '/api/qualitygates/list';
return getJSON(url).then(r => r.qualitygates.map(qualityGate => {
return {
@@ -37,51 +37,51 @@ export function fetchQualityGates () {
}
export function fetchQualityGate (id) {
- const url = '/api/qualitygates/show';
+ const url = window.baseUrl + '/api/qualitygates/show';
return getJSON(url, { id });
}
export function createQualityGate (name) {
- const url = '/api/qualitygates/create';
+ const url = window.baseUrl + '/api/qualitygates/create';
return postJSON(url, { name });
}
export function deleteQualityGate (id) {
- const url = '/api/qualitygates/destroy';
+ const url = window.baseUrl + '/api/qualitygates/destroy';
return post(url, { id });
}
export function renameQualityGate (id, name) {
- const url = '/api/qualitygates/rename';
+ const url = window.baseUrl + '/api/qualitygates/rename';
return post(url, { id, name });
}
export function copyQualityGate (id, name) {
- const url = '/api/qualitygates/copy';
+ const url = window.baseUrl + '/api/qualitygates/copy';
return postJSON(url, { id, name });
}
export function setQualityGateAsDefault (id) {
- const url = '/api/qualitygates/set_as_default';
+ const url = window.baseUrl + '/api/qualitygates/set_as_default';
return post(url, { id });
}
export function unsetQualityGateAsDefault (id) {
- const url = '/api/qualitygates/unset_default';
+ const url = window.baseUrl + '/api/qualitygates/unset_default';
return post(url, { id });
}
export function createCondition (gateId, condition) {
- const url = '/api/qualitygates/create_condition';
+ const url = window.baseUrl + '/api/qualitygates/create_condition';
return postJSON(url, { ...condition, gateId });
}
export function updateCondition (condition) {
- const url = '/api/qualitygates/update_condition';
+ const url = window.baseUrl + '/api/qualitygates/update_condition';
return postJSON(url, { ...condition });
}
export function deleteCondition (id) {
- const url = '/api/qualitygates/delete_condition';
+ const url = window.baseUrl + '/api/qualitygates/delete_condition';
return post(url, { id });
}