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
00ac446b
Commit
00ac446b
authored
Apr 10, 2017
by
Daniel Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: add new group, needs to be redone
parent
233cd7af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
+19
-14
public/app/features/org/partials/user_groups.html
+11
-4
public/app/features/org/user_groups_ctrl.ts
+8
-10
No files found.
public/app/features/org/partials/user_groups.html
View file @
00ac446b
...
@@ -6,10 +6,17 @@
...
@@ -6,10 +6,17 @@
<h1>
User Groups
</h1>
<h1>
User Groups
</h1>
<div
class=
"page-header-tabs"
>
<div
class=
"page-header-tabs"
>
<a
class=
"btn btn-success"
href=
"/org/user-groups/create"
>
<form
name=
"addTokenForm"
class=
"gf-form-group"
>
<i
class=
"fa fa-plus"
></i>
<div
class=
"gf-form-inline"
>
Create User Group
<div
class=
"gf-form max-width-21"
>
</a>
<span
class=
"gf-form-label"
>
Create a User Group
</span>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
'ctrl.userGroupName'
placeholder=
"Name"
></input>
</div>
<div
class=
"gf-form"
>
<button
class=
"btn gf-form-btn btn-success"
ng-click=
"ctrl.createUserGroup()"
>
Create
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div
class=
"search-field-wrapper pull-right width-18"
>
<div
class=
"search-field-wrapper pull-right width-18"
>
...
...
public/app/features/org/user_groups_ctrl.ts
View file @
00ac446b
...
@@ -10,6 +10,7 @@ export default class UserGroupsCtrl {
...
@@ -10,6 +10,7 @@ export default class UserGroupsCtrl {
totalPages
:
number
;
totalPages
:
number
;
showPaging
=
false
;
showPaging
=
false
;
query
:
any
=
''
;
query
:
any
=
''
;
userGroupName
:
any
=
''
;
/** @ngInject */
/** @ngInject */
constructor
(
private
$scope
,
private
$http
,
private
backendSrv
)
{
constructor
(
private
$scope
,
private
$http
,
private
backendSrv
)
{
...
@@ -37,6 +38,13 @@ export default class UserGroupsCtrl {
...
@@ -37,6 +38,13 @@ export default class UserGroupsCtrl {
this
.
get
();
this
.
get
();
}
}
createUserGroup
()
{
this
.
backendSrv
.
post
(
'/api/user-groups'
,
{
name
:
this
.
userGroupName
}).
then
(
result
=>
{
this
.
get
();
this
.
userGroupName
=
''
;
});
}
deleteUserGroup
(
userGroup
)
{
deleteUserGroup
(
userGroup
)
{
this
.
$scope
.
appEvent
(
'confirm-modal'
,
{
this
.
$scope
.
appEvent
(
'confirm-modal'
,
{
title
:
'Delete'
,
title
:
'Delete'
,
...
@@ -53,16 +61,6 @@ export default class UserGroupsCtrl {
...
@@ -53,16 +61,6 @@ export default class UserGroupsCtrl {
this
.
backendSrv
.
delete
(
'/api/user-groups/'
+
userGroup
.
id
)
this
.
backendSrv
.
delete
(
'/api/user-groups/'
+
userGroup
.
id
)
.
then
(
this
.
get
.
bind
(
this
));
.
then
(
this
.
get
.
bind
(
this
));
}
}
openUserGroupModal
()
{
var
modalScope
=
this
.
$scope
.
$new
();
this
.
$scope
.
appEvent
(
'show-modal'
,
{
src
:
'public/app/features/org/partials/add_user.html'
,
modalClass
:
'user-group-modal'
,
scope
:
modalScope
});
}
}
}
coreModule
.
controller
(
'UserGroupsCtrl'
,
UserGroupsCtrl
);
coreModule
.
controller
(
'UserGroupsCtrl'
,
UserGroupsCtrl
);
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