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
7b70e0ff
Commit
7b70e0ff
authored
Oct 11, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(UI): fixed 3 UI bugs, fixes #6225
parent
6b16fcea
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
6 deletions
+29
-6
public/app/features/alerting/alert_tab_ctrl.ts
+1
-0
public/app/features/dashboard/viewStateSrv.js
+4
-1
public/app/features/panel/panel_directive.ts
+22
-4
public/app/features/panel/panel_menu.js
+2
-1
No files found.
public/app/features/alerting/alert_tab_ctrl.ts
View file @
7b70e0ff
...
...
@@ -315,6 +315,7 @@ export class AlertTabCtrl {
this
.
alert
=
null
;
this
.
panel
.
thresholds
=
[];
this
.
conditionModels
=
[];
this
.
panelCtrl
.
alertState
=
null
;
this
.
panelCtrl
.
render
();
}
});
...
...
public/app/features/dashboard/viewStateSrv.js
View file @
7b70e0ff
...
...
@@ -83,6 +83,9 @@ function (angular, _, $) {
};
DashboardViewState
.
prototype
.
update
=
function
(
state
)
{
// remember if editStateChanged
this
.
editStateChanged
=
state
.
edit
!==
this
.
state
.
edit
;
_
.
extend
(
this
.
state
,
state
);
this
.
dashboard
.
meta
.
fullscreen
=
this
.
state
.
fullscreen
;
...
...
@@ -115,7 +118,7 @@ function (angular, _, $) {
if
(
this
.
fullscreenPanel
)
{
// if already fullscreen
if
(
this
.
fullscreenPanel
===
panelScope
)
{
if
(
this
.
fullscreenPanel
===
panelScope
&&
this
.
editStateChanged
===
false
)
{
return
;
}
else
{
this
.
leaveFullscreen
(
false
);
...
...
public/app/features/panel/panel_directive.ts
View file @
7b70e0ff
...
...
@@ -68,21 +68,39 @@ module.directive('grafanaPanel', function() {
// the reason for handling these classes this way is for performance
// limit the watchers on panels etc
var
transparentLastState
;
var
lastHasAlertRule
;
var
lastAlertState
;
var
hasAlertRule
;
ctrl
.
events
.
on
(
'render'
,
()
=>
{
if
(
transparentLastState
!==
ctrl
.
panel
.
transparent
)
{
panelContainer
.
toggleClass
(
'panel-transparent'
,
ctrl
.
panel
.
transparent
===
true
);
panelContainer
.
toggleClass
(
'panel-has-alert'
,
ctrl
.
panel
.
alert
!==
undefined
);
transparentLastState
=
ctrl
.
panel
.
transparent
;
}
hasAlertRule
=
ctrl
.
panel
.
alert
!==
undefined
;
if
(
lastHasAlertRule
!==
hasAlertRule
)
{
panelContainer
.
toggleClass
(
'panel-has-alert'
,
hasAlertRule
);
if
(
panelContainer
.
hasClass
(
'panel-has-alert'
))
{
panelContainer
.
removeClass
(
'panel-alert-state--ok panel-alert-state--alerting'
);
lastHasAlertRule
=
hasAlertRule
;
}
// set special class for ok, or alerting states
if
(
ctrl
.
alertState
)
{
if
(
lastAlertState
)
{
panelContainer
.
removeClass
(
'panel-alert-state--'
+
lastAlertState
);
}
if
(
ctrl
.
alertState
.
state
===
'ok'
||
ctrl
.
alertState
.
state
===
'alerting'
)
{
panelContainer
.
addClass
(
'panel-alert-state--'
+
ctrl
.
alertState
.
state
);
}
lastAlertState
=
ctrl
.
alertState
.
state
;
}
else
if
(
lastAlertState
)
{
panelContainer
.
removeClass
(
'panel-alert-state--'
+
lastAlertState
);
lastAlertState
=
null
;
}
});
scope
.
$watchGroup
([
'ctrl.fullscreen'
,
'ctrl.containerHeight'
],
function
()
{
...
...
public/app/features/panel/panel_menu.js
View file @
7b70e0ff
...
...
@@ -88,7 +88,8 @@ function (angular, $, _, Tether) {
$scope
.
$watchCollection
(
'ctrl.panel.links'
,
function
(
newValue
)
{
var
showIcon
=
(
newValue
?
newValue
.
length
>
0
:
false
)
&&
ctrl
.
panel
.
title
!==
''
;
$panelLinksBtn
.
toggle
(
showIcon
);
// cannot use toggle here, only works for attached elements
$panelLinksBtn
.
css
({
display
:
showIcon
?
'inline'
:
'none'
});
});
function
dismiss
(
time
,
force
)
{
...
...
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