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
a68a179c
Commit
a68a179c
authored
Sep 18, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small improvements to dashboard alerts, less intrusive, do not push down page anymore, Closes #822
parent
f2a6fc4d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
17 deletions
+47
-17
src/app/controllers/dashboardNavCtrl.js
+2
-2
src/css/less/bootswatch.light.less
+1
-1
src/css/less/overrides.less
+31
-6
src/index.html
+13
-8
No files found.
src/app/controllers/dashboardNavCtrl.js
View file @
a68a179c
...
@@ -78,7 +78,7 @@ function (angular, _, moment, config, store) {
...
@@ -78,7 +78,7 @@ function (angular, _, moment, config, store) {
var
clone
=
angular
.
copy
(
$scope
.
dashboard
);
var
clone
=
angular
.
copy
(
$scope
.
dashboard
);
$scope
.
db
.
saveDashboard
(
clone
)
$scope
.
db
.
saveDashboard
(
clone
)
.
then
(
function
(
result
)
{
.
then
(
function
(
result
)
{
alertSrv
.
set
(
'Dashboard Saved'
,
'
Dashboard has been saved as "'
+
result
.
title
+
'"'
,
'success'
,
5
000
);
alertSrv
.
set
(
'Dashboard Saved'
,
'
Saved as "'
+
result
.
title
+
'"'
,
'success'
,
3
000
);
if
(
result
.
url
!==
$location
.
path
())
{
if
(
result
.
url
!==
$location
.
path
())
{
$location
.
search
({});
$location
.
search
({});
...
@@ -88,7 +88,7 @@ function (angular, _, moment, config, store) {
...
@@ -88,7 +88,7 @@ function (angular, _, moment, config, store) {
$rootScope
.
$emit
(
'dashboard-saved'
,
$scope
.
dashboard
);
$rootScope
.
$emit
(
'dashboard-saved'
,
$scope
.
dashboard
);
},
function
(
err
)
{
},
function
(
err
)
{
alertSrv
.
set
(
'Save failed'
,
err
,
'error'
,
5000
);
alertSrv
.
set
(
'Save failed'
,
err
,
'error'
,
5000
);
});
});
};
};
...
...
src/css/less/bootswatch.light.less
View file @
a68a179c
...
@@ -59,6 +59,7 @@ a.text-success:hover { color: darken(@green, 10%); }
...
@@ -59,6 +59,7 @@ a.text-success:hover { color: darken(@green, 10%); }
}
}
.brand {
.brand {
padding: 0px 15px;
&:hover {
&:hover {
color: @navbarLinkColorHover;
color: @navbarLinkColorHover;
...
@@ -461,7 +462,6 @@ legend {
...
@@ -461,7 +462,6 @@ legend {
// -----------------------------------------------------
// -----------------------------------------------------
.alert {
.alert {
.border-radius(0);
text-shadow: none;
text-shadow: none;
&-heading, h1, h2, h3, h4, h5, h6 {
&-heading, h1, h2, h3, h4, h5, h6 {
...
...
src/css/less/overrides.less
View file @
a68a179c
...
@@ -317,13 +317,38 @@ div.flot-text {
...
@@ -317,13 +317,38 @@ div.flot-text {
color: @textColor !important;
color: @textColor !important;
}
}
.
dashboard-notice
{
.
page-alert-list
{
z-index:8000;
z-index:8000;
margin-left:0px;
min-width: 300px;
padding:3px 0px 3px 0px;
max-width: 300px;
width:100%;
position: fixed;
padding-left:20px;
right: 20px;
color: @white;
top: 56px;
.alert {
color: @white;
padding-bottom: 13px;
position: relative;
}
.alert-close {
position: absolute;
top: -4px;
right: -2px;
width: 19px;
height: 19px;
padding: 0;
background: @grayLighter;
border-radius: 50%;
border: none;
font-size: 1.1rem;
color: @grayDarker;
}
.alert-title {
font-weight: bold;
padding-bottom: 2px;
}
}
}
...
...
src/index.html
View file @
a68a179c
...
@@ -24,12 +24,17 @@
...
@@ -24,12 +24,17 @@
<link
rel=
"stylesheet"
href=
"css/grafana.light.min.css"
ng-if=
"grafana.style === 'light'"
>
<link
rel=
"stylesheet"
href=
"css/grafana.light.min.css"
ng-if=
"grafana.style === 'light'"
>
<div
ng-repeat=
'alert in dashAlerts.list'
class=
"alert-{{alert.severity}} dashboard-notice"
ng-show=
"$last"
>
<div
class=
"page-alert-list"
>
<button
type=
"button"
class=
"close"
ng-click=
"dashAlerts.clear(alert)"
style=
"padding-right:50px"
>
×
</button>
<div
ng-repeat=
'alert in dashAlerts.list'
class=
"alert-{{alert.severity}} alert"
>
<strong>
{{alert.title}}
</strong>
<span
ng-bind-html=
'alert.text'
></span>
<div
style=
"padding-right:10px"
class=
'pull-right small'
>
{{$index + 1}} alert(s)
</div>
<button
type=
"button"
class=
"alert-close"
ng-click=
"dashAlerts.clear(alert)"
>
</div>
<i
class=
"icon-remove-sign"
></i>
</button>
<div
ng-view
></div>
<div
class=
"alert-title"
>
{{alert.title}}
</div>
<div
ng-bind-html=
'alert.text'
></div>
</body>
</div>
</div>
<div
ng-view
></div>
</body>
</html>
</html>
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