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
70c80813
Commit
70c80813
authored
Jun 28, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
react panels wip
parent
682c792d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
6 deletions
+31
-6
public/app/features/dashboard/dashgrid/PanelEditor.tsx
+8
-5
public/app/features/panel/DataPanel.tsx
+23
-0
public/app/features/plugins/plugin_component.ts
+0
-1
No files found.
public/app/features/dashboard/dashgrid/PanelEditor.tsx
View file @
70c80813
...
...
@@ -19,8 +19,15 @@ interface PanelEditorTab {
@
observer
export
class
PanelEditor
extends
React
.
Component
<
PanelEditorProps
,
any
>
{
tabs
:
PanelEditorTab
[];
constructor
(
props
)
{
super
(
props
);
this
.
tabs
=
[
{
id
:
'queries'
,
text
:
'Queries'
,
icon
:
'fa fa-database'
},
{
id
:
'viz'
,
text
:
'Visualization'
,
icon
:
'fa fa-line-chart'
},
];
}
renderQueriesTab
()
{
...
...
@@ -37,16 +44,12 @@ export class PanelEditor extends React.Component<PanelEditorProps, any> {
render
()
{
const
activeTab
:
string
=
store
.
view
.
query
.
get
(
'tab'
)
||
'queries'
;
const
tabs
:
PanelEditorTab
[]
=
[
{
id
:
'queries'
,
text
:
'Queries'
,
icon
:
'fa fa-database'
},
{
id
:
'viz'
,
text
:
'Visualization'
,
icon
:
'fa fa-line-chart'
},
];
return
(
<
div
className=
"tabbed-view tabbed-view--panel-edit-new"
>
<
div
className=
"tabbed-view-header"
>
<
ul
className=
"gf-tabs"
>
{
tabs
.
map
(
tab
=>
{
{
t
his
.
t
abs
.
map
(
tab
=>
{
return
<
TabItem
tab=
{
tab
}
activeTab=
{
activeTab
}
onClick=
{
this
.
onChangeTab
}
key=
{
tab
.
id
}
/>;
})
}
</
ul
>
...
...
public/app/features/panel/DataPanel.tsx
0 → 100644
View file @
70c80813
import
React
,
{
Component
,
ComponentClass
}
from
'react'
;
import
_
from
'lodash'
;
export
interface
Props
{
type
:
string
;
queries
:
Query
[];
}
interface
State
{
isLoading
:
boolean
;
timeSeries
:
TimeSeriesServerResponse
[];
}
export
interface
OriginalProps
{
data
:
TimeSeriesServerResponse
[];
isLoading
:
boolean
;
}
const
DataPanel
=
(
ComposedComponent
:
ComponentClass
<
OriginalProps
&
Props
>
)
=>
{
class
Wrapper
extends
Component
<
Props
,
State
>
{}
return
Wrapper
;
};
public/app/features/plugins/plugin_component.ts
View file @
70c80813
...
...
@@ -110,7 +110,6 @@ function pluginDirectiveLoader($compile, datasourceSrv, $rootScope, $q, $http, $
let
datasource
=
scope
.
target
.
datasource
||
scope
.
ctrl
.
panel
.
datasource
;
return
datasourceSrv
.
get
(
datasource
).
then
(
ds
=>
{
scope
.
datasource
=
ds
;
console
.
log
(
'scope'
,
scope
);
return
importPluginModule
(
ds
.
meta
.
module
).
then
(
dsModule
=>
{
return
{
...
...
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