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
57c78bc6
Commit
57c78bc6
authored
Jul 16, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(invite): began work on invite users dialog, #2353
parent
e1345337
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
129 additions
and
92 deletions
+129
-92
public/app/features/admin/partials/edit_user.html
+11
-11
public/app/features/dashboard/unsavedChangesSrv.js
+4
-11
public/app/features/org/orgUsersCtrl.js
+9
-0
public/app/features/org/partials/orgUsers.html
+14
-23
public/app/features/profile/partials/profile.html
+2
-2
public/app/partials/confirm_modal.html
+1
-1
public/app/partials/invite_users.html
+55
-0
public/app/services/alertSrv.js
+1
-1
public/app/services/utilSrv.js
+1
-0
public/css/less/bootswatch.dark.less
+0
-2
public/css/less/bootswatch.light.less
+0
-13
public/css/less/gfbox.less
+1
-7
public/css/less/grafana.less
+16
-8
public/css/less/variables.dark.less
+4
-2
public/css/less/variables.light.less
+7
-8
public/vendor/bootstrap/less/type.less
+3
-3
No files found.
public/app/features/admin/partials/edit_user.html
View file @
57c78bc6
...
...
@@ -9,7 +9,7 @@
<div
class=
"page-container"
>
<div
class=
"page"
>
<h2>
User details
Edit User
</h2>
<form
name=
"userForm"
>
...
...
@@ -17,7 +17,7 @@
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 100px"
>
<strong>
Name
</strong>
Name
</li>
<li>
<input
type=
"text"
required
ng-model=
"user.name"
class=
"input-xxlarge tight-form-input last"
>
...
...
@@ -28,7 +28,7 @@
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 100px"
>
<strong>
Email
</strong>
Email
</li>
<li>
<input
type=
"email"
ng-model=
"user.email"
class=
"input-xxlarge tight-form-input last"
>
...
...
@@ -39,7 +39,7 @@
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 100px"
>
<strong>
Username
</strong>
Username
</li>
<li>
<input
type=
"text"
ng-model=
"user.login"
class=
"input-xxlarge tight-form-input last"
>
...
...
@@ -53,16 +53,16 @@
<button
type=
"submit"
class=
"pull-right btn btn-success"
ng-click=
"update()"
ng-show=
"!createMode"
>
Update
</button>
</form>
<h
2
>
<h
3
>
Change password
</h
2
>
</h
3
>
<form
name=
"passwordForm"
>
<div>
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 100px"
>
<strong>
New password
</strong>
New password
</li>
<li>
<input
type=
"password"
required
ng-minlength=
"4"
ng-model=
"password"
class=
"input-xxlarge tight-form-input last"
>
...
...
@@ -76,9 +76,9 @@
<button
type=
"submit"
class=
"pull-right btn btn-success"
ng-click=
"setPassword()"
>
Update
</button>
</form>
<h
2
>
<h
3
>
Permissions
</h
2
>
</h
3
>
<div>
<div
class=
"tight-form last"
>
...
...
@@ -97,9 +97,9 @@
<br>
</div>
<h
2
>
<h
3
>
Organizations
</h
2
>
</h
3
>
<form
name=
"addOrgForm"
>
<div
class=
"tight-form"
>
...
...
public/app/features/dashboard/unsavedChangesSrv.js
View file @
57c78bc6
...
...
@@ -7,7 +7,7 @@ function(angular, _) {
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
service
(
'unsavedChangesSrv'
,
function
(
$
modal
,
$q
,
$location
,
$timeout
,
contextSrv
,
$window
)
{
module
.
service
(
'unsavedChangesSrv'
,
function
(
$
rootScope
,
$q
,
$location
,
$timeout
,
contextSrv
,
$window
)
{
function
Tracker
(
dashboard
,
scope
)
{
var
self
=
this
;
...
...
@@ -139,17 +139,10 @@ function(angular, _) {
tracker
.
scope
.
$emit
(
'save-dashboard'
);
};
var
confirmModal
=
$modal
({
template
:
'./app/partials/unsaved-changes.html'
,
modalClass
:
'confirm-modal'
,
persist
:
false
,
show
:
false
,
$rootScope
.
appEvent
(
'show-modal'
,
{
src
:
'./app/partials/unsaved-changes.html'
,
modalClass
:
'modal-no-header confirm-modal'
,
scope
:
modalScope
,
keyboard
:
false
});
$q
.
when
(
confirmModal
).
then
(
function
(
modalEl
)
{
modalEl
.
modal
(
'show'
);
});
};
...
...
public/app/features/org/orgUsersCtrl.js
View file @
57c78bc6
...
...
@@ -15,6 +15,7 @@ function (angular) {
$scope
.
init
=
function
()
{
$scope
.
get
();
$scope
.
editor
=
{
index
:
0
};
};
$scope
.
get
=
function
()
{
...
...
@@ -36,6 +37,14 @@ function (angular) {
backendSrv
.
post
(
'/api/org/users'
,
$scope
.
user
).
then
(
$scope
.
get
);
};
$scope
.
openInviteModal
=
function
()
{
$scope
.
appEvent
(
'show-modal'
,
{
src
:
'./app/partials/invite_users.html'
,
modalClass
:
'modal-no-header invite-modal'
,
scope
:
$scope
.
$new
()
});
};
$scope
.
init
();
});
...
...
public/app/features/org/partials/orgUsers.html
View file @
57c78bc6
...
...
@@ -9,32 +9,18 @@
<h2>
Organization users
</h2>
<form
name=
"form"
>
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
style=
"width: 127px"
>
<strong>
Username or Email
</strong>
</li>
<li>
<input
type=
"text"
ng-model=
"user.loginOrEmail"
required
class=
"input-xlarge tight-form-input"
placeholder=
"user@email.com or username"
>
</li>
<li
class=
"tight-form-item"
>
role
</li>
<li>
<select
type=
"text"
ng-model=
"user.role"
class=
"input-medium tight-form-input"
ng-options=
"f for f in ['Viewer', 'Editor', 'Read Only Editor', 'Admin']"
>
</select>
</li>
<li>
<button
class=
"btn btn-success tight-form-btn"
ng-click=
"addUser()"
>
Add
</button>
</li>
<div
class=
"clearfix"
></div>
</ul>
</div>
</form>
<button
class=
"btn btn-success pull-right"
ng-click=
"openInviteModal()"
>
Invite Users
</button>
<br>
<div
ng-model=
"editor.index"
bs-tabs
style=
"text-transform:capitalize;"
>
<div
ng-repeat=
"tab in ['Users', 'Pending Invitations']"
data-title=
"{{tab}}"
>
</div>
</div>
<div
ng-if=
"editor.index == 0"
>
<table
class=
"grafana-options-table form-inline"
>
<tr>
<th>
Login
</th>
...
...
@@ -58,5 +44,10 @@
</table>
</div>
<div
ng-if=
"editor.index == 1"
>
Pending invitaitons
</div>
</div>
</div>
public/app/features/profile/partials/profile.html
View file @
57c78bc6
...
...
@@ -8,7 +8,7 @@
<div
class=
"page-container"
>
<div
class=
"page"
>
<h2>
Profile
details
</h2>
<h2>
Profile
</h2>
<form
name=
"userForm"
>
<div>
...
...
@@ -64,7 +64,7 @@
<button
type=
"submit"
class=
"pull-right btn btn-success"
ng-click=
"update()"
>
Update
</button>
</form>
<h
2>
Organizations
</h2
>
<h
3>
Organizations
</h3
>
<table
class=
"grafana-options-table"
>
<tr
ng-repeat=
"org in orgs"
>
...
...
public/app/partials/confirm_modal.html
View file @
57c78bc6
...
...
@@ -12,7 +12,7 @@
{{title}}
</div>
<div
class=
"
confirm-modal-text
"
>
<div
class=
"
modal-tagline
"
>
{{text}}
</div>
...
...
public/app/partials/invite_users.html
0 → 100644
View file @
57c78bc6
<div
class=
"modal-body"
>
<a
class=
"modal-close"
ng-click=
"dismiss();"
>
<i
class=
"fa fa-remove"
></i>
</a>
<h3>
Invite Users
</h3>
<div
class=
"modal-tagline"
>
Invite new or existing Grafana users to the organization
<span
class=
"highlight-word"
>
{{contextSrv.user.orgName}}
</span>
</div>
<br>
<br>
<form
name=
"addOrgForm"
style=
"display: inline-block;"
>
<div
class=
"tight-form"
>
<ul
class=
"tight-form-list"
>
<li
class=
"tight-form-item"
>
Email
</li>
<li>
<input
type=
"text"
ng-model=
"newOrg.name"
bs-typeahead=
"searchOrgs"
required
class=
"input-large tight-form-input"
placeholder=
"email@test.com"
>
</li>
<li
class=
"tight-form-item"
>
Name
</li>
<li>
<input
type=
"text"
ng-model=
"newOrg.name"
bs-typeahead=
"searchOrgs"
required
class=
"input-large tight-form-input"
placeholder=
"name (optional)"
>
</li>
<li
class=
"tight-form-item"
>
Role
</li>
<li>
<select
type=
"text"
ng-model=
"newOrg.role"
class=
"input-small tight-form-input"
ng-options=
"f for f in ['Viewer', 'Editor', 'Read Only Editor', 'Admin']"
>
</select>
</li>
<div
class=
"clearfix"
></div>
</ul>
</div>
</form>
<div
class=
""
style=
"margin-top: 30px; margin-bottom: 20px;"
>
<button
type=
"button"
class=
"btn btn-inverse"
ng-click=
"dismiss()"
>
Cancel
</button>
<button
type=
"button"
class=
"btn btn-success"
ng-click=
"onConfirm();dismiss();"
>
Invite Users
</button>
</div>
</div>
public/app/services/alertSrv.js
View file @
57c78bc6
...
...
@@ -71,7 +71,7 @@ function (angular, _) {
var
confirmModal
=
$modal
({
template
:
'./app/partials/confirm_modal.html'
,
persist
:
false
,
modalClass
:
'confirm-modal'
,
modalClass
:
'
modal-no-header
confirm-modal'
,
show
:
false
,
scope
:
scope
,
keyboard
:
false
...
...
public/app/services/utilSrv.js
View file @
57c78bc6
...
...
@@ -14,6 +14,7 @@ function (angular) {
this
.
showModal
=
function
(
e
,
options
)
{
var
modal
=
$modal
({
modalClass
:
options
.
modalClass
,
template
:
options
.
src
,
persist
:
false
,
show
:
false
,
...
...
public/css/less/bootswatch.dark.less
View file @
57c78bc6
...
...
@@ -547,8 +547,6 @@ a:hover {
}
.modal {
.border-radius(1px);
border-top: solid 1px lighten(@grayDark, 5%);
background-color: @grafanaPanelBackground;
}
...
...
public/css/less/bootswatch.light.less
View file @
57c78bc6
...
...
@@ -531,19 +531,6 @@ a.thumbnail {
.border-radius(0);
}
.modal {
.border-radius(0);
background-color: @bodyBackground;
&-header {
border-bottom: none;
}
&-footer {
border-top: none;
background-color: transparent;
}
}
.popover {
.border-radius(0);
...
...
public/css/less/gfbox.less
View file @
57c78bc6
...
...
@@ -65,14 +65,8 @@
margin: 15px;
background: @grafanaPanelBackground;
position: relative;
border: 1px solid @
grayDark
;
border: 1px solid @
pageContainerBorderColor
;
padding: 20px 20px 60px 49px;
h2 {
color: @textColor;
font-weight: normal;
font-size: 22px;
}
}
.page {
...
...
public/css/less/grafana.less
View file @
57c78bc6
...
...
@@ -257,18 +257,28 @@
td:first-child { text-align: right; }
}
.
confirm-modal
{
.
modal-no-header
{
border: 1px solid @grafanaTargetFuncBackground;
max-width: 500px;
background-color: @grafanaPanelBackground;
text-align: center;
h3 {
margin-top: 30px;
}
.modal-close {
float: right;
font-size: 140%;
padding: 10px;
}
.modal-tagline {
font-size: 16px;
}
}
.confirm-modal {
max-width: 500px;
.confirm-modal-icon {
padding-top: 41px;
font-size: 280%;
...
...
@@ -282,10 +292,6 @@
margin-bottom: 15px;
}
.confirm-modal-text {
font-size: 16px;
}
.confirm-modal-buttons {
margin-top: 35px;
margin-bottom: 35px;
...
...
@@ -354,5 +360,7 @@
color: @orange;
}
.highlight-word {
color: @orange;
}
public/css/less/variables.dark.less
View file @
57c78bc6
...
...
@@ -69,8 +69,8 @@
@altFontFamily: @serifFontFamily;
@headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily
@headingsFontWeight:
bold
; // instead of browser default, bold
@headingsColor:
@textColor
; // empty to use BS default, @textColor
@headingsFontWeight:
normal
; // instead of browser default, bold
@headingsColor:
darken(@white,11%)
; // empty to use BS default, @textColor
@inputText: @black;
...
...
@@ -98,6 +98,8 @@
@grafanaListHighlight: #333;
@grafanaListMainLinkColor: @textColor;
@pageContainerBorderColor: @grayDark;
// Scrollbars
@scrollbarBackground: #3a3a3a;
@scrollbarBackground2: #3a3a3a;
...
...
public/css/less/variables.light.less
View file @
57c78bc6
...
...
@@ -33,9 +33,9 @@
// grafana Variables
// -------------------------
@grafanaPanelBackground: @
white
;
@grafanaPanelBackground: @
grayLighter
;
@grafanaPanelBorder: solid 1px #ddd;
@grafanaTriggerBorder: solid 1px @grayLight
er
;
@grafanaTriggerBorder: solid 1px @grayLight;
// Submenu
@submenuBackground: rgb(218, 217, 217);
...
...
@@ -58,16 +58,14 @@
// Scaffolding
// -------------------------
@bodyBackground: #E
AEAEA
;
@bodyBackground: #E
FEFEF
;
@textColor: @gray;
// Links
// -------------------------
@linkColor: @gray;
@linkColorDisabled: lighten(@linkColor,30%);
@linkColorHover: @grayDarker;
@linkColorHover: darken(@linkColor, 20%);
// Typography
// -------------------------
...
...
@@ -82,8 +80,8 @@
@altFontFamily: @serifFontFamily;
@headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily
@headingsFontWeight:
bold
; // instead of browser default, bold
@headingsColor: @
grayDarke
r; // empty to use BS default, @textColor
@headingsFontWeight:
normal
; // instead of browser default, bold
@headingsColor: @
textColo
r; // empty to use BS default, @textColor
// Component sizing
...
...
@@ -111,6 +109,7 @@
@grafanaListHighlightContrast: #ddd;
@grafanaListMainLinkColor: @textColor;
@pageContainerBorderColor: darken(@grafanaTargetBackground, 5%);
// Tables
// -------------------------
...
...
public/vendor/bootstrap/less/type.less
View file @
57c78bc6
...
...
@@ -74,9 +74,9 @@ h1,
h2,
h3 { line-height: @baseLineHeight * 2; }
h1 { font-size: @baseFontSize * 2.
75
; } // ~38px
h2 { font-size: @baseFontSize *
2.2
5; } // ~32px
h3 { font-size: @baseFontSize * 1.
75
; } // ~24px
h1 { font-size: @baseFontSize * 2.
00
; } // ~38px
h2 { font-size: @baseFontSize *
1.7
5; } // ~32px
h3 { font-size: @baseFontSize * 1.
50
; } // ~24px
h4 { font-size: @baseFontSize * 1.25; } // ~18px
h5 { font-size: @baseFontSize; }
h6 { font-size: @baseFontSize * 0.85; } // ~12px
...
...
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