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
5a160f42
Commit
5a160f42
authored
Jul 29, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(invite): trying to get username to work as well
parent
6d6af092
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
5 deletions
+11
-5
pkg/api/org_invite.go
+4
-0
pkg/metrics/metrics.go
+1
-0
public/app/features/org/partials/invite.html
+3
-3
public/app/features/org/partials/orgUsers.html
+2
-1
public/css/less/login.less
+1
-1
No files found.
pkg/api/org_invite.go
View file @
5a160f42
...
...
@@ -134,6 +134,9 @@ func CompleteInvite(c *middleware.Context, completeInvite dtos.CompleteInviteFor
}
invite
:=
query
.
Result
if
invite
.
Status
!=
m
.
TmpUserInvitePending
{
return
ApiError
(
412
,
fmt
.
Sprintf
(
"Invite cannot be used in status %s"
,
invite
.
Status
),
nil
)
}
cmd
:=
m
.
CreateUserCommand
{
Email
:
completeInvite
.
Email
,
...
...
@@ -164,6 +167,7 @@ func CompleteInvite(c *middleware.Context, completeInvite dtos.CompleteInviteFor
loginUserWithUser
(
&
user
,
c
)
metrics
.
M_Api_User_SignUp
.
Inc
(
1
)
metrics
.
M_Api_User_SignUpInvite
.
Inc
(
1
)
return
ApiSuccess
(
"User created and logged in"
)
}
pkg/metrics/metrics.go
View file @
5a160f42
...
...
@@ -14,6 +14,7 @@ var (
M_Api_Status_404
=
NewComboCounterRef
(
"api.status.404"
)
M_Api_User_SignUp
=
NewComboCounterRef
(
"api.user.signup"
)
M_Api_User_SignUpInvite
=
NewComboCounterRef
(
"api.user.signup_invite"
)
M_Api_Dashboard_Get
=
NewComboCounterRef
(
"api.dashboard.get"
)
M_Api_Dashboard_Post
=
NewComboCounterRef
(
"api.dashboard.post"
)
M_Api_Admin_User_Create
=
NewComboCounterRef
(
"api.admin.user_create"
)
...
...
public/app/features/org/partials/invite.html
View file @
5a160f42
...
...
@@ -5,11 +5,11 @@
</a>
<h3>
Invite Users
Add or
Invite Users
</h3>
<div
class=
"modal-tagline"
>
Invite new or existing Grafana users to the organization
Invite new or
add
existing Grafana users to the organization
<span
class=
"highlight-word"
>
{{contextSrv.user.orgName}}
</span>
</div>
...
...
@@ -22,7 +22,7 @@
<div
class=
"tight-form"
ng-repeat=
"invite in invites"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
>
Email
Email
or Username
</li>
<li>
<input
type=
"email"
ng-model=
"invite.email"
required
...
...
public/app/features/org/partials/orgUsers.html
View file @
5a160f42
...
...
@@ -10,7 +10,8 @@
<h2>
Organization users
</h2>
<button
class=
"btn btn-success pull-right"
ng-click=
"openInviteModal()"
>
Invite Users
<i
class=
"fa fa-plus"
></i>
Add or Invite
</button>
<br>
...
...
public/css/less/login.less
View file @
5a160f42
...
...
@@ -102,7 +102,7 @@
height: 100%;
width: 100%;
background-image: url(/img/background_tease.jpg);
opacity: 0.
1
5;
opacity: 0.
0
5;
z-index: -1;
}
...
...
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