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
4b567e35
Commit
4b567e35
authored
Jan 12, 2017
by
Mitsuhiro Tanda
Committed by
Torkel Ödegaard
Jan 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
suppress refresh when user is inactive (#7219)
parent
f045fbf2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
public/app/core/services/context_srv.ts
+4
-0
public/app/features/dashboard/timeSrv.js
+4
-2
No files found.
public/app/core/services/context_srv.ts
View file @
4b567e35
...
...
@@ -57,6 +57,10 @@ export class ContextSrv {
store
.
set
(
'grafana.sidemenu.pinned'
,
val
);
}
isGrafanaVisible
()
{
return
!!
(
document
.
visibilityState
===
undefined
||
document
.
visibilityState
===
'visible'
);
}
toggleSideMenu
()
{
this
.
sidemenu
=
!
this
.
sidemenu
;
if
(
!
this
.
sidemenu
)
{
...
...
public/app/features/dashboard/timeSrv.js
View file @
4b567e35
...
...
@@ -10,7 +10,7 @@ define([
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
service
(
'timeSrv'
,
function
(
$rootScope
,
$timeout
,
$routeParams
,
timer
)
{
module
.
service
(
'timeSrv'
,
function
(
$rootScope
,
$timeout
,
$routeParams
,
timer
,
contextSrv
)
{
var
self
=
this
;
// default time
...
...
@@ -95,7 +95,9 @@ define([
self
.
cancel_scheduled_refresh
();
self
.
refresh_timer
=
timer
.
register
(
$timeout
(
function
()
{
self
.
start_scheduled_refresh
(
after_ms
);
self
.
refreshDashboard
();
if
(
contextSrv
.
isGrafanaVisible
())
{
self
.
refreshDashboard
();
}
},
after_ms
));
};
...
...
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