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
827ffacc
Commit
827ffacc
authored
Dec 05, 2018
by
Johannes Schill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass some panel props down as strings to trigger render #14333
parent
ed034b42
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
4 deletions
+27
-4
public/app/features/dashboard/dashgrid/PanelChrome.tsx
+10
-1
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx
+13
-3
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx
+4
-0
No files found.
public/app/features/dashboard/dashgrid/PanelChrome.tsx
View file @
827ffacc
...
...
@@ -95,7 +95,16 @@ export class PanelChrome extends PureComponent<Props, State> {
return
(
<
div
className=
"panel-container panel-container--absolute"
>
<
PanelHeader
panel=
{
panel
}
dashboard=
{
dashboard
}
timeInfo=
{
timeInfo
}
/>
<
PanelHeader
panel=
{
panel
}
dashboard=
{
dashboard
}
timeInfo=
{
timeInfo
}
title=
{
panel
.
title
}
description=
{
panel
.
description
}
scopedVars=
{
panel
.
scopedVars
}
links=
{
panel
.
links
}
/>
<
DataPanel
datasource=
{
datasource
}
queries=
{
targets
}
...
...
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx
View file @
827ffacc
import
React
,
{
Pure
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
classNames
from
'classnames'
;
import
PanelHeaderCorner
from
'./PanelHeaderCorner'
;
...
...
@@ -12,13 +12,17 @@ export interface Props {
panel
:
PanelModel
;
dashboard
:
DashboardModel
;
timeInfo
:
string
;
title
?:
string
;
description
?:
string
;
scopedVars
?:
string
;
links
?:
[];
}
interface
State
{
panelMenuOpen
:
boolean
;
}
export
class
PanelHeader
extends
Pure
Component
<
Props
,
State
>
{
export
class
PanelHeader
extends
Component
<
Props
,
State
>
{
state
=
{
panelMenuOpen
:
false
,
};
...
...
@@ -44,7 +48,13 @@ export class PanelHeader extends PureComponent<Props, State> {
const
{
panel
,
dashboard
,
timeInfo
}
=
this
.
props
;
return
(
<>
<
PanelHeaderCorner
panel=
{
panel
}
/>
<
PanelHeaderCorner
panel=
{
panel
}
title=
{
panel
.
title
}
description=
{
panel
.
description
}
scopedVars=
{
panel
.
scopedVars
}
links=
{
panel
.
links
}
/>
<
div
className=
{
panelHeaderClass
}
>
{
isLoading
&&
(
<
span
className=
"panel-loading"
>
...
...
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx
View file @
827ffacc
...
...
@@ -14,6 +14,10 @@ enum InfoModes {
interface
Props
{
panel
:
PanelModel
;
title
?:
string
;
description
?:
string
;
scopedVars
?:
string
;
links
?:
[];
}
export
class
PanelHeaderCorner
extends
PureComponent
<
Props
>
{
...
...
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