Ver código fonte

refactor: user groups to teams, replace rest mentions

Alexander Zobnin 8 anos atrás
pai
commit
e4675ca5c1

+ 1 - 1
CHANGELOG.md

@@ -2,7 +2,7 @@
 
 ### WIP (in develop branch currently as its unstable or unfinished)
 - Dashboard folders
-- User groups
+- Teams
 - Dashboard permissions (on folder & dashboard level), permissions can be assigned to groups or individual users
 - UX changes to nav & side menu
 - New dashboard grid layout system

+ 1 - 1
ROADMAP.md

@@ -6,7 +6,7 @@ But it will give you an idea of our current vision and plan.
 ### Short term (1-4 months)
 
  - Release Grafana v5
-  - User groups
+  - Teams
   - Dashboard folders
   - Dashboard & folder permissions (assigned to users or groups)
   - New Dashboard layout engine

+ 1 - 1
public/app/features/dashboard/acl/acl.ts

@@ -12,7 +12,7 @@ export class AclCtrl {
     {value: 4, text: 'Admin'}
   ];
   aclTypes = [
-    {value: 'Group', text: 'User Group'},
+    {value: 'Group', text: 'Team'},
     {value: 'User',  text: 'User'},
     {value: 'Viewer', text: 'Everyone With Viewer Role'},
     {value: 'Editor', text: 'Everyone With Editor Role'}

+ 3 - 3
public/app/features/dashboard/acl/specs/acl_specs.ts

@@ -54,7 +54,7 @@ describe('AclCtrl', () => {
       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[1].role).to.eql('Editor');
         expect(ctx.ctrl.items[2].teamId).to.eql(2);
@@ -124,7 +124,7 @@ describe('AclCtrl', () => {
     });
   });
 
-  describe('when duplicate user group permissions are added', () => {
+  describe('when duplicate team permissions are added', () => {
     beforeEach(() => {
       backendSrv.get.reset();
       backendSrv.post.reset();
@@ -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(() => {
       backendSrv.get.reset();
       backendSrv.post.reset();

+ 1 - 1
public/app/features/org/partials/create_team.html

@@ -14,7 +14,7 @@
       <div class="p-t-2">
         <div class="gf-form-inline">
           <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 class="gf-form">
             <button class="btn gf-form-btn btn-success" ng-click="ctrl.createTeam();ctrl.dismiss();">Create</button>

+ 3 - 3
public/app/features/org/partials/team_details.html

@@ -2,7 +2,7 @@
 
 <div class="page-container">
 	<div class="page-header">
-		<h1>Edit User Group</h1>
+		<h1>Edit Team</h1>
 	</div>
 
 	<form name="teamDetailsForm" class="gf-form-group gf-form-inline">
@@ -17,7 +17,7 @@
 	</form>
 
   <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">
       <div class="gf-form">
@@ -44,6 +44,6 @@
     </table>
     <div>
   <em class="muted" ng-hide="ctrl.teamMembers.length > 0">
-    This user group has no members yet.
+    This team has no members yet.
   </em>
 </div>

+ 2 - 2
public/app/features/org/partials/teams.html

@@ -5,7 +5,7 @@
 
     <div class="gf-form gf-form--grow">
       <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()" />
     </div>
 
@@ -59,6 +59,6 @@
   </div>
 
   <em class="muted" ng-hide="ctrl.teams.length > 0">
-    No User Groups found.
+    No Teams found.
   </em>
 </div>

+ 1 - 1
public/app/features/org/specs/team_details_ctrl_specs.ts

@@ -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(() => {
       const userItem = {
         id: 2,

+ 1 - 1
public/app/features/org/teams_ctrl.ts

@@ -43,7 +43,7 @@ export class TeamsCtrl {
   deleteTeam(team) {
     appEvents.emit('confirm-modal', {
       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",
       icon: "fa-warning",
       onConfirm: () => {