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
19a080a4
Commit
19a080a4
authored
Feb 14, 2019
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restored loading spinner to DataPanel
parent
79008a7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
public/app/features/dashboard/dashgrid/DataPanel.tsx
+19
-9
No files found.
public/app/features/dashboard/dashgrid/DataPanel.tsx
View file @
19a080a4
...
@@ -188,11 +188,7 @@ export class DataPanel extends Component<Props, State> {
...
@@ -188,11 +188,7 @@ export class DataPanel extends Component<Props, State> {
const
panelData
=
this
.
getPanelData
();
const
panelData
=
this
.
getPanelData
();
if
(
isFirstLoad
&&
loading
===
LoadingState
.
Loading
)
{
if
(
isFirstLoad
&&
loading
===
LoadingState
.
Loading
)
{
return
(
return
this
.
renderLoadingState
();
<
div
className=
"panel-loading"
>
<
i
className=
"fa fa-spinner fa-spin"
/>
</
div
>
);
}
}
if
(
!
queries
.
length
)
{
if
(
!
queries
.
length
)
{
...
@@ -203,9 +199,23 @@ export class DataPanel extends Component<Props, State> {
...
@@ -203,9 +199,23 @@ export class DataPanel extends Component<Props, State> {
);
);
}
}
return
this
.
props
.
children
({
return
(
loading
,
<>
panelData
,
{
this
.
renderLoadingState
()
}
});
{
this
.
props
.
children
({
loading
,
panelData
})
}
</>
);
}
private
renderLoadingState
():
JSX
.
Element
{
const
{
loading
}
=
this
.
state
;
if
(
loading
===
LoadingState
.
Loading
)
{
return
(
<
div
className=
"panel-loading"
>
<
i
className=
"fa fa-spinner fa-spin"
/>
</
div
>
);
}
return
null
;
}
}
}
}
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