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
211e0f21
Commit
211e0f21
authored
Jul 11, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip: another baby step, another million to go
parent
902eba90
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
4 deletions
+24
-4
public/app/features/dashboard/dashgrid/DashboardPanel.tsx
+1
-1
public/app/features/dashboard/dashgrid/PanelEditor.tsx
+14
-1
public/app/plugins/panel/text2/module.tsx
+7
-1
public/app/types/plugins.ts
+1
-0
public/sass/components/_viz_editor.scss
+1
-1
No files found.
public/app/features/dashboard/dashgrid/DashboardPanel.tsx
View file @
211e0f21
...
...
@@ -107,7 +107,6 @@ export class DashboardPanel extends React.Component<Props, State> {
// this might look strange with these classes that change when edit, but
// I want to try to keep markup (parents) for panel the same in edit mode to avoide unmount / new mount of panel
// plugin component
return
(
<
div
className=
{
containerClass
}
>
<
div
className=
{
panelWrapperClass
}
>
...
...
@@ -124,6 +123,7 @@ export class DashboardPanel extends React.Component<Props, State> {
panelType=
{
this
.
props
.
panel
.
type
}
dashboard=
{
this
.
props
.
dashboard
}
onTypeChanged=
{
this
.
onPluginTypeChanged
}
pluginExports=
{
pluginExports
}
/>
</
div
>
)
}
...
...
public/app/features/dashboard/dashgrid/PanelEditor.tsx
View file @
211e0f21
...
...
@@ -5,13 +5,14 @@ import { DashboardModel } from '../dashboard_model';
import
{
store
}
from
'app/stores/store'
;
import
{
observer
}
from
'mobx-react'
;
import
{
QueriesTab
}
from
'./QueriesTab'
;
import
{
PanelPlugin
}
from
'app/types/plugins'
;
import
{
PanelPlugin
,
PluginExports
}
from
'app/types/plugins'
;
import
{
VizTypePicker
}
from
'./VizTypePicker'
;
interface
PanelEditorProps
{
panel
:
PanelModel
;
dashboard
:
DashboardModel
;
panelType
:
string
;
pluginExports
:
PluginExports
;
onTypeChanged
:
(
newType
:
PanelPlugin
)
=>
void
;
}
...
...
@@ -38,6 +39,17 @@ export class PanelEditor extends React.Component<PanelEditorProps, any> {
return
<
QueriesTab
panel=
{
this
.
props
.
panel
}
dashboard=
{
this
.
props
.
dashboard
}
/>;
}
renderPanelOptions
()
{
const
{
pluginExports
}
=
this
.
props
;
if
(
pluginExports
.
PanelOptions
)
{
const
PanelOptions
=
pluginExports
.
PanelOptions
;
return
<
PanelOptions
/>;
}
else
{
return
<
p
>
Visualization has no options
</
p
>;
}
}
renderVizTab
()
{
return
(
<
div
className=
"viz-editor"
>
...
...
@@ -46,6 +58,7 @@ export class PanelEditor extends React.Component<PanelEditorProps, any> {
</
div
>
<
div
className=
"viz-editor-col2"
>
<
h5
className=
"page-heading"
>
Options
</
h5
>
{
this
.
renderPanelOptions
()
}
</
div
>
</
div
>
);
...
...
public/app/plugins/panel/text2/module.tsx
View file @
211e0f21
...
...
@@ -18,4 +18,10 @@ export class ReactTestPanel extends PureComponent<PanelProps> {
}
}
export
{
ReactTestPanel
as
PanelComponent
};
export
class
TextOptions
extends
PureComponent
<
any
>
{
render
()
{
return
<
p
>
Text2 Options component
</
p
>;
}
}
export
{
ReactTestPanel
as
PanelComponent
,
TextOptions
as
PanelOptions
};
public/app/types/plugins.ts
View file @
211e0f21
...
...
@@ -5,6 +5,7 @@ export interface PluginExports {
QueryCtrl
?:
any
;
ConfigCtrl
?:
any
;
AnnotationsQueryCtrl
?:
any
;
PanelOptions
?:
any
;
}
export
interface
PanelPlugin
{
...
...
public/sass/components/_viz_editor.scss
View file @
211e0f21
...
...
@@ -23,7 +23,7 @@
padding-top
:
$spacer
;
display
:
flex
;
flex-direction
:
column
;
overflow
:
hidden
;
overflow
:
auto
;
flex-grow
:
1
;
}
...
...
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