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
076defdc
Commit
076defdc
authored
Jan 09, 2019
by
Dominik Prokop
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post merge updates
parent
1e7f3f28
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
12 deletions
+9
-12
public/app/features/dashboard/dashgrid/DataPanel.tsx
+9
-12
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx
+0
-0
No files found.
public/app/features/dashboard/dashgrid/DataPanel.tsx
View file @
076defdc
// Library
// Library
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
Tooltip
from
'app/core/components/Tooltip/Tooltip'
;
import
{
Tooltip
}
from
'@grafana/ui'
;
import
{
Themes
}
from
'@grafana/ui/src/components/Tooltip/Popper'
;
import
ErrorBoundary
from
'app/core/components/ErrorBoundary/ErrorBoundary'
;
import
ErrorBoundary
from
'app/core/components/ErrorBoundary/ErrorBoundary'
;
// Services
// Services
...
@@ -12,7 +14,6 @@ import kbn from 'app/core/utils/kbn';
...
@@ -12,7 +14,6 @@ import kbn from 'app/core/utils/kbn';
// Types
// Types
import
{
DataQueryOptions
,
DataQueryResponse
}
from
'app/types'
;
import
{
DataQueryOptions
,
DataQueryResponse
}
from
'app/types'
;
import
{
TimeRange
,
TimeSeries
,
LoadingState
}
from
'@grafana/ui'
;
import
{
TimeRange
,
TimeSeries
,
LoadingState
}
from
'@grafana/ui'
;
import
{
Themes
}
from
'app/core/components/Tooltip/Popper'
;
const
DEFAULT_PLUGIN_ERROR
=
'Error in plugin'
;
const
DEFAULT_PLUGIN_ERROR
=
'Error in plugin'
;
...
@@ -144,10 +145,10 @@ export class DataPanel extends Component<Props, State> {
...
@@ -144,10 +145,10 @@ export class DataPanel extends Component<Props, State> {
this
.
setState
({
this
.
setState
({
loading
:
LoadingState
.
Error
,
loading
:
LoadingState
.
Error
,
isFirstLoad
:
false
,
isFirstLoad
:
false
,
errorMessage
:
errorMessage
errorMessage
:
errorMessage
,
});
});
}
}
}
}
;
render
()
{
render
()
{
const
{
queries
}
=
this
.
props
;
const
{
queries
}
=
this
.
props
;
...
@@ -171,7 +172,7 @@ export class DataPanel extends Component<Props, State> {
...
@@ -171,7 +172,7 @@ export class DataPanel extends Component<Props, State> {
<>
<>
{
this
.
renderLoadingStates
()
}
{
this
.
renderLoadingStates
()
}
<
ErrorBoundary
>
<
ErrorBoundary
>
{
({
error
,
errorInfo
})
=>
{
{
({
error
,
errorInfo
})
=>
{
if
(
errorInfo
)
{
if
(
errorInfo
)
{
this
.
onError
(
error
.
message
||
DEFAULT_PLUGIN_ERROR
);
this
.
onError
(
error
.
message
||
DEFAULT_PLUGIN_ERROR
);
return
null
;
return
null
;
...
@@ -200,15 +201,11 @@ export class DataPanel extends Component<Props, State> {
...
@@ -200,15 +201,11 @@ export class DataPanel extends Component<Props, State> {
);
);
}
else
if
(
loading
===
LoadingState
.
Error
)
{
}
else
if
(
loading
===
LoadingState
.
Error
)
{
return
(
return
(
<
Tooltip
<
Tooltip
content=
{
errorMessage
}
placement=
"bottom-start"
theme=
{
Themes
.
Error
}
>
content=
{
errorMessage
}
<
div
className=
"panel-info-corner panel-info-corner--error"
>
className=
"popper__manager--block"
refClassName=
{
`panel-info-corner panel-info-corner--error`
}
placement=
"bottom-start"
theme=
{
Themes
.
Error
}
>
<
i
className=
"fa"
/>
<
i
className=
"fa"
/>
<
span
className=
"panel-info-corner-inner"
/>
<
span
className=
"panel-info-corner-inner"
/>
</
div
>
</
Tooltip
>
</
Tooltip
>
);
);
}
}
...
...
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx
View file @
076defdc
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