aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api/components.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/api/components.js')
-rw-r--r--server/sonar-web/src/main/js/api/components.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/server/sonar-web/src/main/js/api/components.js b/server/sonar-web/src/main/js/api/components.js
index 934d7a9c1bb..4d36ff7c942 100644
--- a/server/sonar-web/src/main/js/api/components.js
+++ b/server/sonar-web/src/main/js/api/components.js
@@ -20,32 +20,32 @@
import { getJSON, postJSON, post } from '../helpers/request.js';
export function getComponents (data) {
- const url = window.baseUrl + '/api/components/search';
+ const url = '/api/components/search';
return getJSON(url, data);
}
export function getProvisioned (data) {
- const url = window.baseUrl + '/api/projects/provisioned';
+ const url = '/api/projects/provisioned';
return getJSON(url, data);
}
export function getGhosts (data) {
- const url = window.baseUrl + '/api/projects/ghosts';
+ const url = '/api/projects/ghosts';
return getJSON(url, data);
}
export function deleteComponents (data) {
- const url = window.baseUrl + '/api/projects/bulk_delete';
+ const url = '/api/projects/bulk_delete';
return post(url, data);
}
export function createProject (data) {
- const url = window.baseUrl + '/api/projects/create';
+ const url = '/api/projects/create';
return postJSON(url, data);
}
export function getComponentTree (strategy, componentKey, metrics = [], additional = {}) {
- const url = window.baseUrl + '/api/measures/component_tree';
+ const url = '/api/measures/component_tree';
const data = Object.assign({}, additional, {
baseComponentKey: componentKey,
metricKeys: metrics.join(','),
@@ -63,25 +63,25 @@ export function getComponentLeaves (componentKey, metrics, additional) {
}
export function getComponent (componentKey, metrics = []) {
- const url = window.baseUrl + '/api/measures/component';
+ const url = '/api/measures/component';
const data = { componentKey, metricKeys: metrics.join(',') };
return getJSON(url, data).then(r => r.component);
}
export function getTree (baseComponentKey, options = {}) {
- const url = window.baseUrl + '/api/components/tree';
+ const url = '/api/components/tree';
const data = Object.assign({}, options, { baseComponentKey });
return getJSON(url, data);
}
export function getParents ({ id, key }) {
- const url = window.baseUrl + '/api/components/show';
+ const url = '/api/components/show';
const data = id ? { id } : { key };
return getJSON(url, data).then(r => r.ancestors);
}
export function getBreadcrumbs ({ id, key }) {
- const url = window.baseUrl + '/api/components/show';
+ const url = '/api/components/show';
const data = id ? { id } : { key };
return getJSON(url, data).then(r => {
const reversedAncestors = [...r.ancestors].reverse();
@@ -90,7 +90,7 @@ export function getBreadcrumbs ({ id, key }) {
}
export function getProjectsWithInternalId (query) {
- const url = window.baseUrl + '/api/resources/search';
+ const url = '/api/resources/search';
const data = {
f: 's2',
q: 'TRK',