aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-web/src/main/js/apps/groups/group.js2
-rw-r--r--server/sonar-web/src/main/js/apps/groups/groups.js2
-rw-r--r--server/sonar-web/src/main/js/apps/groups/users-view.js6
-rw-r--r--server/sonar-web/src/main/js/apps/users/groups-view.js4
-rw-r--r--server/sonar-web/test/medium/groups.spec.js38
5 files changed, 26 insertions, 26 deletions
diff --git a/server/sonar-web/src/main/js/apps/groups/group.js b/server/sonar-web/src/main/js/apps/groups/group.js
index 89018901895..4fe63565365 100644
--- a/server/sonar-web/src/main/js/apps/groups/group.js
+++ b/server/sonar-web/src/main/js/apps/groups/group.js
@@ -3,7 +3,7 @@ import Backbone from 'backbone';
export default Backbone.Model.extend({
urlRoot: function () {
- return baseUrl + '/api/usergroups';
+ return baseUrl + '/api/user_groups';
},
sync: function (method, model, options) {
diff --git a/server/sonar-web/src/main/js/apps/groups/groups.js b/server/sonar-web/src/main/js/apps/groups/groups.js
index d22d3373d9a..d827872c7e8 100644
--- a/server/sonar-web/src/main/js/apps/groups/groups.js
+++ b/server/sonar-web/src/main/js/apps/groups/groups.js
@@ -5,7 +5,7 @@ export default Backbone.Collection.extend({
model: Group,
url: function () {
- return baseUrl + '/api/usergroups/search';
+ return baseUrl + '/api/user_groups/search';
},
parse: function (r) {
diff --git a/server/sonar-web/src/main/js/apps/groups/users-view.js b/server/sonar-web/src/main/js/apps/groups/users-view.js
index 8c815ff2e4d..fa8e632ef07 100644
--- a/server/sonar-web/src/main/js/apps/groups/users-view.js
+++ b/server/sonar-web/src/main/js/apps/groups/users-view.js
@@ -16,9 +16,9 @@ export default Modal.extend({
return item.name + '<br><span class="note">' + item.login + '</span>';
},
queryParam: 'q',
- searchUrl: baseUrl + '/api/usergroups/users?ps=100&id=' + this.model.id,
- selectUrl: baseUrl + '/api/usergroups/add_user',
- deselectUrl: baseUrl + '/api/usergroups/remove_user',
+ searchUrl: baseUrl + '/api/user_groups/users?ps=100&id=' + this.model.id,
+ selectUrl: baseUrl + '/api/user_groups/add_user',
+ deselectUrl: baseUrl + '/api/user_groups/remove_user',
extra: {
id: this.model.id
},
diff --git a/server/sonar-web/src/main/js/apps/users/groups-view.js b/server/sonar-web/src/main/js/apps/users/groups-view.js
index f402b931cb8..6e4a9048854 100644
--- a/server/sonar-web/src/main/js/apps/users/groups-view.js
+++ b/server/sonar-web/src/main/js/apps/users/groups-view.js
@@ -18,8 +18,8 @@ export default Modal.extend({
},
queryParam: 'q',
searchUrl: baseUrl + '/api/users/groups?ps=100&login=' + this.model.id,
- selectUrl: baseUrl + '/api/usergroups/add_user',
- deselectUrl: baseUrl + '/api/usergroups/remove_user',
+ selectUrl: baseUrl + '/api/user_groups/add_user',
+ deselectUrl: baseUrl + '/api/user_groups/remove_user',
extra: {
login: this.model.id
},
diff --git a/server/sonar-web/test/medium/groups.spec.js b/server/sonar-web/test/medium/groups.spec.js
index 1d97212fe41..90f157a70e0 100644
--- a/server/sonar-web/test/medium/groups.spec.js
+++ b/server/sonar-web/test/medium/groups.spec.js
@@ -6,7 +6,7 @@ define(function (require) {
bdd.it('should show list', function () {
return this.remote
.open()
- .mockFromFile('/api/usergroups/search', 'groups-spec/search.json')
+ .mockFromFile('/api/user_groups/search', 'groups-spec/search.json')
.startApp('groups')
.checkElementInclude('#content', 'sonar-users')
.checkElementExist('#groups-list ul')
@@ -22,18 +22,18 @@ define(function (require) {
bdd.it('should search', function () {
return this.remote
.open()
- .mockFromFile('/api/usergroups/search', 'groups-spec/search.json')
+ .mockFromFile('/api/user_groups/search', 'groups-spec/search.json')
.startApp('groups')
.checkElementInclude('#content', 'sonar-users')
.checkElementCount('#groups-list li[data-id]', 2)
.clearMocks()
- .mockFromFile('/api/usergroups/search', 'groups-spec/search-filtered.json', { data: { q: 'adm' } })
+ .mockFromFile('/api/user_groups/search', 'groups-spec/search-filtered.json', { data: { q: 'adm' } })
.fillElement('#groups-search-query', 'adm')
.clickElement('#groups-search-submit')
.checkElementInclude('#groups-list-footer', '1/1')
.checkElementCount('#groups-list li[data-id]', 1)
.clearMocks()
- .mockFromFile('/api/usergroups/search', 'groups-spec/search.json')
+ .mockFromFile('/api/user_groups/search', 'groups-spec/search.json')
.fillElement('#groups-search-query', '')
.clickElement('#groups-search-submit')
.checkElementInclude('#groups-list-footer', '2/2')
@@ -43,13 +43,13 @@ define(function (require) {
bdd.it('should show more', function () {
return this.remote
.open()
- .mockFromFile('/api/usergroups/search', 'groups-spec/search-big-1.json')
+ .mockFromFile('/api/user_groups/search', 'groups-spec/search-big-1.json')
.startApp('groups')
.checkElementInclude('#content', 'sonar-users')
.checkElementCount('#groups-list li[data-id]', 1)
.checkElementInclude('#groups-list-footer', '1/2')
.clearMocks()
- .mockFromFile('/api/usergroups/search', 'groups-spec/search-big-2.json', { data: { p: 2 } })
+ .mockFromFile('/api/user_groups/search', 'groups-spec/search-big-2.json', { data: { p: 2 } })
.clickElement('#groups-fetch-more')
.checkElementInclude('#groups-list-footer', '2/2')
.checkElementCount('#groups-list li[data-id]', 2);
@@ -58,8 +58,8 @@ define(function (require) {
bdd.it('should show users', function () {
return this.remote
.open()
- .mockFromFile('/api/usergroups/search', 'groups-spec/search.json')
- .mockFromFile('/api/usergroups/users*', 'groups-spec/users.json')
+ .mockFromFile('/api/user_groups/search', 'groups-spec/search.json')
+ .mockFromFile('/api/user_groups/users*', 'groups-spec/users.json')
.startApp('groups')
.checkElementInclude('#content', 'sonar-users')
.checkElementNotInclude('#content', 'Bob')
@@ -71,8 +71,8 @@ define(function (require) {
bdd.it('should create new group', function () {
return this.remote
.open()
- .mockFromFile('/api/usergroups/search', 'groups-spec/search.json')
- .mockFromFile('/api/usergroups/create', 'groups-spec/error.json', { status: 400 })
+ .mockFromFile('/api/user_groups/search', 'groups-spec/search.json')
+ .mockFromFile('/api/user_groups/create', 'groups-spec/error.json', { status: 400 })
.startApp('groups')
.checkElementInclude('#content', 'sonar-users')
.checkElementCount('#groups-list li[data-id]', 2)
@@ -83,8 +83,8 @@ define(function (require) {
.clickElement('#create-group-submit')
.checkElementExist('.alert.alert-danger')
.clearMocks()
- .mockFromFile('/api/usergroups/search', 'groups-spec/search-created.json')
- .mockFromString('/api/usergroups/create', '{}', { data: { name: 'name', description: 'description' } })
+ .mockFromFile('/api/user_groups/search', 'groups-spec/search-created.json')
+ .mockFromString('/api/user_groups/create', '{}', { data: { name: 'name', description: 'description' } })
.fillElement('#create-group-name', 'name')
.fillElement('#create-group-description', 'description')
.clickElement('#create-group-submit')
@@ -96,8 +96,8 @@ define(function (require) {
bdd.it('should update group', function () {
return this.remote
.open()
- .mockFromFile('/api/usergroups/search', 'groups-spec/search.json')
- .mockFromFile('/api/usergroups/update', 'groups-spec/error.json', { status: 400 })
+ .mockFromFile('/api/user_groups/search', 'groups-spec/search.json')
+ .mockFromFile('/api/user_groups/update', 'groups-spec/error.json', { status: 400 })
.startApp('groups')
.checkElementInclude('#content', 'sonar-users')
.clickElement('[data-id="2"] .js-group-update')
@@ -107,8 +107,8 @@ define(function (require) {
.clickElement('#create-group-submit')
.checkElementExist('.alert.alert-danger')
.clearMocks()
- .mockFromFile('/api/usergroups/search', 'groups-spec/search-updated.json')
- .mockFromString('/api/usergroups/update', '{}', { data: { id: '2' } })
+ .mockFromFile('/api/user_groups/search', 'groups-spec/search-updated.json')
+ .mockFromString('/api/user_groups/update', '{}', { data: { id: '2' } })
.fillElement('#create-group-name', 'guys')
.fillElement('#create-group-description', 'cool guys')
.clickElement('#create-group-submit')
@@ -119,8 +119,8 @@ define(function (require) {
bdd.it('should delete group', function () {
return this.remote
.open()
- .mockFromFile('/api/usergroups/search', 'groups-spec/search.json')
- .mockFromFile('/api/usergroups/delete', 'groups-spec/error.json', { status: 400 })
+ .mockFromFile('/api/user_groups/search', 'groups-spec/search.json')
+ .mockFromFile('/api/user_groups/delete', 'groups-spec/error.json', { status: 400 })
.startApp('groups')
.checkElementInclude('#content', 'sonar-users')
.clickElement('[data-id="1"] .js-group-delete')
@@ -132,7 +132,7 @@ define(function (require) {
.clickElement('[data-id="1"] .js-group-delete')
.checkElementExist('#delete-group-form')
.clearMocks()
- .mockFromString('/api/usergroups/delete', '{}', { data: { id: '1' } })
+ .mockFromString('/api/user_groups/delete', '{}', { data: { id: '1' } })
.clickElement('#delete-group-submit')
.checkElementNotExist('[data-id="1"]');
});