Commit e4675ca5 by Alexander Zobnin

refactor: user groups to teams, replace rest mentions

parent 5d3bfee2
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
### WIP (in develop branch currently as its unstable or unfinished) ### WIP (in develop branch currently as its unstable or unfinished)
- Dashboard folders - Dashboard folders
- User groups - Teams
- Dashboard permissions (on folder & dashboard level), permissions can be assigned to groups or individual users - Dashboard permissions (on folder & dashboard level), permissions can be assigned to groups or individual users
- UX changes to nav & side menu - UX changes to nav & side menu
- New dashboard grid layout system - New dashboard grid layout system
......
...@@ -6,7 +6,7 @@ But it will give you an idea of our current vision and plan. ...@@ -6,7 +6,7 @@ But it will give you an idea of our current vision and plan.
### Short term (1-4 months) ### Short term (1-4 months)
- Release Grafana v5 - Release Grafana v5
- User groups - Teams
- Dashboard folders - Dashboard folders
- Dashboard & folder permissions (assigned to users or groups) - Dashboard & folder permissions (assigned to users or groups)
- New Dashboard layout engine - New Dashboard layout engine
......
...@@ -12,7 +12,7 @@ export class AclCtrl { ...@@ -12,7 +12,7 @@ export class AclCtrl {
{value: 4, text: 'Admin'} {value: 4, text: 'Admin'}
]; ];
aclTypes = [ aclTypes = [
{value: 'Group', text: 'User Group'}, {value: 'Group', text: 'Team'},
{value: 'User', text: 'User'}, {value: 'User', text: 'User'},
{value: 'Viewer', text: 'Everyone With Viewer Role'}, {value: 'Viewer', text: 'Everyone With Viewer Role'},
{value: 'Editor', text: 'Everyone With Editor Role'} {value: 'Editor', text: 'Everyone With Editor Role'}
......
...@@ -54,7 +54,7 @@ describe('AclCtrl', () => { ...@@ -54,7 +54,7 @@ describe('AclCtrl', () => {
ctx.ctrl.typeChanged(); ctx.ctrl.typeChanged();
}); });
it('should sort the result by role, user group and user', () => { it('should sort the result by role, team and user', () => {
expect(ctx.ctrl.items[0].role).to.eql('Viewer'); expect(ctx.ctrl.items[0].role).to.eql('Viewer');
expect(ctx.ctrl.items[1].role).to.eql('Editor'); expect(ctx.ctrl.items[1].role).to.eql('Editor');
expect(ctx.ctrl.items[2].teamId).to.eql(2); expect(ctx.ctrl.items[2].teamId).to.eql(2);
...@@ -124,7 +124,7 @@ describe('AclCtrl', () => { ...@@ -124,7 +124,7 @@ describe('AclCtrl', () => {
}); });
}); });
describe('when duplicate user group permissions are added', () => { describe('when duplicate team permissions are added', () => {
beforeEach(() => { beforeEach(() => {
backendSrv.get.reset(); backendSrv.get.reset();
backendSrv.post.reset(); backendSrv.post.reset();
...@@ -148,7 +148,7 @@ describe('AclCtrl', () => { ...@@ -148,7 +148,7 @@ describe('AclCtrl', () => {
}); });
}); });
describe('when one inherited and one not inherited user group permission are added', () => { describe('when one inherited and one not inherited team permission are added', () => {
beforeEach(() => { beforeEach(() => {
backendSrv.get.reset(); backendSrv.get.reset();
backendSrv.post.reset(); backendSrv.post.reset();
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="p-t-2"> <div class="p-t-2">
<div class="gf-form-inline"> <div class="gf-form-inline">
<div class="gf-form max-width-21"> <div class="gf-form max-width-21">
<input type="text" class="gf-form-input" ng-model='ctrl.teamName' required give-focus="true" placeholder="Enter User Group Name"></input> <input type="text" class="gf-form-input" ng-model='ctrl.teamName' required give-focus="true" placeholder="Enter Team Name"></input>
</div> </div>
<div class="gf-form"> <div class="gf-form">
<button class="btn gf-form-btn btn-success" ng-click="ctrl.createTeam();ctrl.dismiss();">Create</button> <button class="btn gf-form-btn btn-success" ng-click="ctrl.createTeam();ctrl.dismiss();">Create</button>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="page-container"> <div class="page-container">
<div class="page-header"> <div class="page-header">
<h1>Edit User Group</h1> <h1>Edit Team</h1>
</div> </div>
<form name="teamDetailsForm" class="gf-form-group gf-form-inline"> <form name="teamDetailsForm" class="gf-form-group gf-form-inline">
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</form> </form>
<div class="gf-form-group"> <div class="gf-form-group">
<h3 class="page-heading">User Group Members</h3> <h3 class="page-heading">Team Members</h3>
<form name="ctrl.addMemberForm" class="gf-form-group"> <form name="ctrl.addMemberForm" class="gf-form-group">
<div class="gf-form"> <div class="gf-form">
...@@ -44,6 +44,6 @@ ...@@ -44,6 +44,6 @@
</table> </table>
<div> <div>
<em class="muted" ng-hide="ctrl.teamMembers.length > 0"> <em class="muted" ng-hide="ctrl.teamMembers.length > 0">
This user group has no members yet. This team has no members yet.
</em> </em>
</div> </div>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="gf-form gf-form--grow"> <div class="gf-form gf-form--grow">
<label class="gf-form-label">Search</label> <label class="gf-form-label">Search</label>
<input type="text" class="gf-form-input max-width-20" placeholder="Find User Group by name" tabindex="1" give-focus="true" <input type="text" class="gf-form-input max-width-20" placeholder="Find Team by name" tabindex="1" give-focus="true"
ng-model="ctrl.query" ng-model-options="{ debounce: 500 }" spellcheck='false' ng-change="ctrl.get()" /> ng-model="ctrl.query" ng-model-options="{ debounce: 500 }" spellcheck='false' ng-change="ctrl.get()" />
</div> </div>
...@@ -59,6 +59,6 @@ ...@@ -59,6 +59,6 @@
</div> </div>
<em class="muted" ng-hide="ctrl.teams.length > 0"> <em class="muted" ng-hide="ctrl.teams.length > 0">
No User Groups found. No Teams found.
</em> </em>
</div> </div>
...@@ -24,7 +24,7 @@ var backendSrv = { ...@@ -24,7 +24,7 @@ var backendSrv = {
}); });
})); }));
describe('when user is chosen to be added to user group', () => { describe('when user is chosen to be added to team', () => {
beforeEach(() => { beforeEach(() => {
const userItem = { const userItem = {
id: 2, id: 2,
......
...@@ -43,7 +43,7 @@ export class TeamsCtrl { ...@@ -43,7 +43,7 @@ export class TeamsCtrl {
deleteTeam(team) { deleteTeam(team) {
appEvents.emit('confirm-modal', { appEvents.emit('confirm-modal', {
title: 'Delete', title: 'Delete',
text: 'Are you sure you want to delete User Group ' + team.name + '?', text: 'Are you sure you want to delete Team ' + team.name + '?',
yesText: "Delete", yesText: "Delete",
icon: "fa-warning", icon: "fa-warning",
onConfirm: () => { onConfirm: () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment