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
4f3be31e
Unverified
Commit
4f3be31e
authored
Sep 29, 2020
by
Ryan McKinley
Committed by
GitHub
Sep 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chore: show error/warning notice with a different icon (#27872)
parent
15a3b97d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx
+9
-3
No files found.
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx
View file @
4f3be31e
...
...
@@ -3,7 +3,7 @@ import classNames from 'classnames';
import
{
isEqual
}
from
'lodash'
;
import
{
DataLink
,
LoadingState
,
PanelData
,
PanelMenuItem
,
QueryResultMetaNotice
,
ScopedVars
}
from
'@grafana/data'
;
import
{
AngularComponent
}
from
'@grafana/runtime'
;
import
{
ClickOutsideWrapper
,
Icon
,
Tooltip
}
from
'@grafana/ui'
;
import
{
ClickOutsideWrapper
,
Icon
,
IconName
,
Tooltip
}
from
'@grafana/ui'
;
import
{
selectors
}
from
'@grafana/e2e-selectors'
;
import
PanelHeaderCorner
from
'./PanelHeaderCorner'
;
...
...
@@ -112,16 +112,22 @@ export class PanelHeader extends Component<Props, State> {
});
};
// This will show one icon for each severity
renderNotice
=
(
notice
:
QueryResultMetaNotice
)
=>
{
let
iconName
:
IconName
=
'info-circle'
;
if
(
notice
.
severity
===
'error'
||
notice
.
severity
===
'warning'
)
{
iconName
=
'exclamation-triangle'
;
}
return
(
<
Tooltip
content=
{
notice
.
text
}
key=
{
notice
.
severity
}
>
{
notice
.
inspect
?
(
<
div
className=
"panel-info-notice pointer"
onClick=
{
e
=>
this
.
openInspect
(
e
,
notice
.
inspect
!
)
}
>
<
Icon
name=
"info-circle"
style=
{
{
marginRight
:
'8px'
}
}
/>
<
Icon
name=
{
iconName
}
style=
{
{
marginRight
:
'8px'
}
}
/>
</
div
>
)
:
(
<
a
className=
"panel-info-notice"
href=
{
notice
.
link
}
target=
"_blank"
>
<
Icon
name=
"info-circle"
style=
{
{
marginRight
:
'8px'
}
}
/>
<
Icon
name=
{
iconName
}
style=
{
{
marginRight
:
'8px'
}
}
/>
</
a
>
)
}
</
Tooltip
>
...
...
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