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
b1126cb0
Unverified
Commit
b1126cb0
authored
Jul 03, 2019
by
Torkel Ödegaard
Committed by
GitHub
Jul 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AngularPanels: Fixed loading state indication for angular panels (#17900)
parent
98147fd5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
devenv/dev-dashboards/panel-common/lazy_loading.json
+0
-0
public/app/features/panel/metrics_panel_ctrl.ts
+12
-14
No files found.
devenv/dev-dashboards/panel-common/lazy_loading.json
0 → 100644
View file @
b1126cb0
This diff is collapsed.
Click to expand it.
public/app/features/panel/metrics_panel_ctrl.ts
View file @
b1126cb0
...
...
@@ -89,16 +89,13 @@ class MetricsPanelCtrl extends PanelCtrl {
this
.
loading
=
true
;
// load datasource service
return
(
this
.
datasourceSrv
.
get
(
this
.
panel
.
datasource
,
this
.
panel
.
scopedVars
)
.
then
(
this
.
updateTimeRange
.
bind
(
this
))
.
then
(
this
.
issueQueries
.
bind
(
this
))
// NOTE handleQueryResult is called by panelDataObserver
.
catch
((
err
:
any
)
=>
{
this
.
processDataError
(
err
);
})
);
return
this
.
datasourceSrv
.
get
(
this
.
panel
.
datasource
,
this
.
panel
.
scopedVars
)
.
then
(
this
.
updateTimeRange
.
bind
(
this
))
.
then
(
this
.
issueQueries
.
bind
(
this
))
.
catch
((
err
:
any
)
=>
{
this
.
processDataError
(
err
);
});
}
processDataError
(
err
:
any
)
{
...
...
@@ -134,7 +131,11 @@ class MetricsPanelCtrl extends PanelCtrl {
return
;
}
this
.
loading
=
false
;
// Ignore data in loading state
if
(
data
.
state
===
LoadingState
.
Loading
)
{
this
.
loading
=
true
;
return
;
}
if
(
data
.
request
)
{
const
{
range
,
timeInfo
}
=
data
.
request
;
...
...
@@ -223,12 +224,9 @@ class MetricsPanelCtrl extends PanelCtrl {
}
handleDataFrame
(
data
:
DataFrame
[])
{
this
.
loading
=
false
;
if
(
this
.
dashboard
&&
this
.
dashboard
.
snapshot
)
{
this
.
panel
.
snapshotData
=
data
;
}
// Subclasses that asked for DataFrame will override
}
...
...
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