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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
15 deletions
+12
-15
public/app/features/dashboard/dashgrid/DataPanel.tsx
+11
-14
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx
+1
-1
No files found.
public/app/features/dashboard/dashgrid/DataPanel.tsx
View file @
076defdc
// Library
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'
;
// Services
...
...
@@ -12,7 +14,6 @@ import kbn from 'app/core/utils/kbn';
// Types
import
{
DataQueryOptions
,
DataQueryResponse
}
from
'app/types'
;
import
{
TimeRange
,
TimeSeries
,
LoadingState
}
from
'@grafana/ui'
;
import
{
Themes
}
from
'app/core/components/Tooltip/Popper'
;
const
DEFAULT_PLUGIN_ERROR
=
'Error in plugin'
;
...
...
@@ -144,10 +145,10 @@ export class DataPanel extends Component<Props, State> {
this
.
setState
({
loading
:
LoadingState
.
Error
,
isFirstLoad
:
false
,
errorMessage
:
errorMessage
errorMessage
:
errorMessage
,
});
}
}
}
;
render
()
{
const
{
queries
}
=
this
.
props
;
...
...
@@ -171,7 +172,7 @@ export class DataPanel extends Component<Props, State> {
<>
{
this
.
renderLoadingStates
()
}
<
ErrorBoundary
>
{
({
error
,
errorInfo
})
=>
{
{
({
error
,
errorInfo
})
=>
{
if
(
errorInfo
)
{
this
.
onError
(
error
.
message
||
DEFAULT_PLUGIN_ERROR
);
return
null
;
...
...
@@ -200,15 +201,11 @@ export class DataPanel extends Component<Props, State> {
);
}
else
if
(
loading
===
LoadingState
.
Error
)
{
return
(
<
Tooltip
content=
{
errorMessage
}
className=
"popper__manager--block"
refClassName=
{
`panel-info-corner panel-info-corner--error`
}
placement=
"bottom-start"
theme=
{
Themes
.
Error
}
>
<
i
className=
"fa"
/>
<
span
className=
"panel-info-corner-inner"
/>
<
Tooltip
content=
{
errorMessage
}
placement=
"bottom-start"
theme=
{
Themes
.
Error
}
>
<
div
className=
"panel-info-corner panel-info-corner--error"
>
<
i
className=
"fa"
/>
<
span
className=
"panel-info-corner-inner"
/>
</
div
>
</
Tooltip
>
);
}
...
...
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx
View file @
076defdc
...
...
@@ -78,7 +78,7 @@ export class PanelHeaderCorner extends Component<Props> {
{
infoMode
===
InfoModes
.
Info
||
infoMode
===
InfoModes
.
Links
?
(
<
Tooltip
content=
{
this
.
getInfoContent
}
placement=
"bottom-start"
placement=
"bottom-start"
>
<
div
className=
{
`panel-info-corner panel-info-corner--${infoMode.toLowerCase()}`
}
...
...
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