diff options
Diffstat (limited to 'server/sonar-web/src/main/js/api')
-rw-r--r-- | server/sonar-web/src/main/js/api/components.js | 27 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/api/nav.js | 6 | ||||
-rw-r--r-- | server/sonar-web/src/main/js/api/users.js | 6 |
3 files changed, 39 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/api/components.js b/server/sonar-web/src/main/js/api/components.js new file mode 100644 index 00000000000..8fe69f9c6d2 --- /dev/null +++ b/server/sonar-web/src/main/js/api/components.js @@ -0,0 +1,27 @@ +import $ from 'jquery'; + +export function getComponents (data) { + let url = baseUrl + '/api/components/search'; + return $.get(url, data); +} + +export function getProvisioned (data) { + let url = baseUrl + '/api/projects/provisioned'; + return $.get(url, data); +} + +export function getGhosts (data) { + let url = baseUrl + '/api/projects/ghosts'; + return $.get(url, data); +} + +export function deleteComponents (data) { + let url = baseUrl + '/api/projects/bulk_delete'; + return $.post(url, data); +} + +export function createProject (options) { + options.url = baseUrl + '/api/projects/create'; + options.type = 'POST'; + return $.ajax(options); +} diff --git a/server/sonar-web/src/main/js/api/nav.js b/server/sonar-web/src/main/js/api/nav.js new file mode 100644 index 00000000000..86cc425795a --- /dev/null +++ b/server/sonar-web/src/main/js/api/nav.js @@ -0,0 +1,6 @@ +import $ from 'jquery'; + +export function getGlobalNavigation () { + let url = baseUrl + '/api/navigation/global'; + return $.get(url); +} diff --git a/server/sonar-web/src/main/js/api/users.js b/server/sonar-web/src/main/js/api/users.js new file mode 100644 index 00000000000..90910dd0d95 --- /dev/null +++ b/server/sonar-web/src/main/js/api/users.js @@ -0,0 +1,6 @@ +import $ from 'jquery'; + +export function getCurrentUser () { + let url = baseUrl + '/api/users/current'; + return $.get(url); +} |