Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
bb7b5527
Commit
bb7b5527
authored
Aug 18, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
users view update
parent
11f6c4eb
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
6 deletions
+15
-6
pkg/api/org_users.go
+5
-4
pkg/models/org_user.go
+1
-0
public/app/features/org/partials/orgUsers.html
+4
-1
public/sass/components/_filter-table.scss
+5
-1
No files found.
pkg/api/org_users.go
View file @
bb7b5527
package
api
import
(
"github.com/grafana/grafana/pkg/api/dtos"
"github.com/grafana/grafana/pkg/bus"
"github.com/grafana/grafana/pkg/middleware"
m
"github.com/grafana/grafana/pkg/models"
...
...
@@ -31,10 +32,6 @@ func addOrgUserHelper(cmd m.AddOrgUserCommand) Response {
userToAdd
:=
userQuery
.
Result
// if userToAdd.Id == c.UserId {
// return ApiError(400, "Cannot add yourself as user", nil)
// }
cmd
.
UserId
=
userToAdd
.
Id
if
err
:=
bus
.
Dispatch
(
&
cmd
);
err
!=
nil
{
...
...
@@ -64,6 +61,10 @@ func getOrgUsersHelper(orgId int64) Response {
return
ApiError
(
500
,
"Failed to get account user"
,
err
)
}
for
_
,
user
:=
range
query
.
Result
{
user
.
AvatarUrl
=
dtos
.
GetGravatarUrl
(
user
.
Email
)
}
return
Json
(
200
,
query
.
Result
)
}
...
...
pkg/models/org_user.go
View file @
bb7b5527
...
...
@@ -115,6 +115,7 @@ type OrgUserDTO struct {
OrgId
int64
`json:"orgId"`
UserId
int64
`json:"userId"`
Email
string
`json:"email"`
AvatarUrl
string
`json:"avatarUrl"`
Login
string
`json:"login"`
Role
string
`json:"role"`
LastSeenAt
time
.
Time
`json:"lastSeenAt"`
...
...
public/app/features/org/partials/orgUsers.html
View file @
bb7b5527
...
...
@@ -8,7 +8,6 @@
</h1>
<div
class=
"page-header-tabs"
>
<button
class=
"btn btn-success"
ng-click=
"ctrl.openAddUsersView()"
ng-hide=
"ctrl.externalUserMngLinkUrl"
>
<i
class=
"fa fa-plus"
></i>
<span>
{{ctrl.addUsersBtnName}}
</span>
...
...
@@ -47,6 +46,7 @@
<table
class=
"filter-table form-inline"
>
<thead>
<tr>
<th></th>
<th>
Login
</th>
<th>
Email
</th>
<th>
...
...
@@ -58,6 +58,9 @@
</tr>
</thead>
<tr
ng-repeat=
"user in ctrl.users"
>
<td
style=
"width-4 text-center"
>
<img
class=
"filter-table__avatar"
ng-src=
"{{user.avatarUrl}}"
></img>
</td>
<td>
{{user.login}}
</td>
<td><span
class=
"ellipsis"
>
{{user.email}}
</span></td>
<td>
{{user.lastSeenAtAge}}
</td>
...
...
public/sass/components/_filter-table.scss
View file @
bb7b5527
...
...
@@ -53,4 +53,8 @@
padding-bottom
:
0
;
}
.filter-table__avatar
{
width
:
25px
;
height
:
25px
;
border-radius
:
50%
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment