mirror of https://github.com/grafana/grafana
Add avatar to team and team members page (#10305)
* teams: add db migration for email column in teams table * teams: /teams should render index page with a 200 OK * teams: additional backend functionality for team and team members Possibility to save/update email for teams. Possibility to retrive avatar url when searching for teams. Possibility to retrive avatar url when searching for team members. * teams: display team avatar and team member avatars Possibility to save and update email for a team * teams: create team on separate page instead of modal dialogpull/10313/head
parent
d41ce4f9ca
commit
af34f9977e
@ -1,13 +1,13 @@ |
||||
import './org_users_ctrl'; |
||||
import './profile_ctrl'; |
||||
import './org_users_ctrl'; |
||||
import './select_org_ctrl'; |
||||
import './change_password_ctrl'; |
||||
import './new_org_ctrl'; |
||||
import './user_invite_ctrl'; |
||||
import './teams_ctrl'; |
||||
import './team_details_ctrl'; |
||||
import './create_team_modal'; |
||||
import './org_api_keys_ctrl'; |
||||
import './org_details_ctrl'; |
||||
import './prefs_control'; |
||||
import "./org_users_ctrl"; |
||||
import "./profile_ctrl"; |
||||
import "./org_users_ctrl"; |
||||
import "./select_org_ctrl"; |
||||
import "./change_password_ctrl"; |
||||
import "./new_org_ctrl"; |
||||
import "./user_invite_ctrl"; |
||||
import "./teams_ctrl"; |
||||
import "./team_details_ctrl"; |
||||
import "./create_team_ctrl"; |
||||
import "./org_api_keys_ctrl"; |
||||
import "./org_details_ctrl"; |
||||
import "./prefs_control"; |
||||
|
||||
@ -0,0 +1,26 @@ |
||||
import coreModule from "app/core/core_module"; |
||||
|
||||
export default class CreateTeamCtrl { |
||||
name: string; |
||||
email: string; |
||||
navModel: any; |
||||
|
||||
/** @ngInject **/ |
||||
constructor(private backendSrv, private $location, navModelSrv) { |
||||
this.navModel = navModelSrv.getNav("cfg", "teams", 0); |
||||
} |
||||
|
||||
create() { |
||||
const payload = { |
||||
name: this.name, |
||||
email: this.email |
||||
}; |
||||
this.backendSrv.post("/api/teams", payload).then(result => { |
||||
if (result.teamId) { |
||||
this.$location.path("/org/teams/edit/" + result.teamId); |
||||
} |
||||
}); |
||||
} |
||||
} |
||||
|
||||
coreModule.controller("CreateTeamCtrl", CreateTeamCtrl); |
||||
@ -1,36 +0,0 @@ |
||||
///<reference path="../../headers/common.d.ts" />
|
||||
|
||||
import coreModule from 'app/core/core_module'; |
||||
import appEvents from 'app/core/app_events'; |
||||
|
||||
export class CreateTeamCtrl { |
||||
teamName = ''; |
||||
|
||||
/** @ngInject */ |
||||
constructor(private backendSrv, private $location) {} |
||||
|
||||
createTeam() { |
||||
this.backendSrv.post('/api/teams', { name: this.teamName }).then(result => { |
||||
if (result.teamId) { |
||||
this.$location.path('/org/teams/edit/' + result.teamId); |
||||
} |
||||
this.dismiss(); |
||||
}); |
||||
} |
||||
|
||||
dismiss() { |
||||
appEvents.emit('hide-modal'); |
||||
} |
||||
} |
||||
|
||||
export function createTeamModal() { |
||||
return { |
||||
restrict: 'E', |
||||
templateUrl: 'public/app/features/org/partials/create_team.html', |
||||
controller: CreateTeamCtrl, |
||||
bindToController: true, |
||||
controllerAs: 'ctrl', |
||||
}; |
||||
} |
||||
|
||||
coreModule.directive('createTeamModal', createTeamModal); |
||||
Loading…
Reference in new issue