diff options
Diffstat (limited to 'server/sonar-web/src/main/js/api/components.js')
-rw-r--r-- | server/sonar-web/src/main/js/api/components.js | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/server/sonar-web/src/main/js/api/components.js b/server/sonar-web/src/main/js/api/components.js index 32ed9f744cd..6b61a89fe42 100644 --- a/server/sonar-web/src/main/js/api/components.js +++ b/server/sonar-web/src/main/js/api/components.js @@ -21,32 +21,32 @@ import { getJSON, postJSON, post } from '../helpers/request.js'; export function getComponents (data) { - const url = baseUrl + '/api/components/search'; + const url = '/api/components/search'; return getJSON(url, data); } export function getProvisioned (data) { - const url = baseUrl + '/api/projects/provisioned'; + const url = '/api/projects/provisioned'; return getJSON(url, data); } export function getGhosts (data) { - const url = baseUrl + '/api/projects/ghosts'; + const url = '/api/projects/ghosts'; return getJSON(url, data); } export function deleteComponents (data) { - const url = baseUrl + '/api/projects/bulk_delete'; + const url = '/api/projects/bulk_delete'; return post(url, data); } export function createProject (data) { - const url = baseUrl + '/api/projects/create'; + const url = '/api/projects/create'; return postJSON(url, data); } export function getChildren (componentKey, metrics = []) { - const url = baseUrl + '/api/measures/component_tree'; + const url = '/api/measures/component_tree'; const data = { baseComponentKey: componentKey, metricKeys: metrics.join(','), @@ -56,7 +56,7 @@ export function getChildren (componentKey, metrics = []) { } export function getFiles (componentKey, metrics = [], additional = {}) { - const url = baseUrl + '/api/measures/component_tree'; + const url = '/api/measures/component_tree'; const data = Object.assign({}, additional, { baseComponentKey: componentKey, metricKeys: metrics.join(','), @@ -66,25 +66,25 @@ export function getFiles (componentKey, metrics = [], additional = {}) { } export function getComponent (componentKey, metrics = []) { - const url = 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 = 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 = 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 = 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(); @@ -93,7 +93,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', |