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
63bf2a02
Commit
63bf2a02
authored
Oct 09, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grid: need to find a way to add angular component inside react
parent
6cd2624c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
8 deletions
+29
-8
public/app/features/dashboard/dashgrid/DashboardGrid.tsx
+2
-8
public/app/features/dashboard/dashgrid/DashboardPanel.tsx
+24
-0
public/app/features/dashboard/dashgrid/dashboard_plugin.ts
+3
-0
No files found.
public/app/features/dashboard/dashgrid/DashboardGrid.tsx
View file @
63bf2a02
...
...
@@ -2,6 +2,7 @@ import React from 'react';
import
coreModule
from
'app/core/core_module'
;
import
ReactGridLayout
from
'react-grid-layout'
;
import
{
DashboardModel
}
from
'../model'
;
import
{
DashboardPanel
}
from
'./DashboardPanel'
;
import
sizeMe
from
'react-sizeme'
;
const
COLUMN_COUNT
=
24
;
...
...
@@ -68,14 +69,7 @@ export class DashboardGrid extends React.Component<DashboardGridProps, any> {
for
(
let
panel
of
this
.
props
.
dashboard
.
panels
)
{
panelElements
.
push
(
<
div
key=
{
panel
.
id
.
toString
()
}
className=
"panel"
>
<
div
className=
"panel-container"
>
<
div
className=
"panel-header grid-drag-handle"
>
<
div
className=
"panel-title-container"
>
{
panel
.
type
}
</
div
>
</
div
>
<
div
className=
"panel-content"
>
{
panel
.
title
}
-
{
panel
.
type
}
</
div
>
</
div
>
<
DashboardPanel
panel=
{
panel
}
/>
</
div
>,
);
}
...
...
public/app/features/dashboard/dashgrid/DashboardPanel.tsx
0 → 100644
View file @
63bf2a02
import
React
from
'react'
;
export
interface
DashboardPanelProps
{
panel
:
any
;
}
export
class
DashboardPanel
extends
React
.
Component
<
DashboardPanelProps
,
any
>
{
private
element
:
any
;
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{};
}
componentDidMount
()
{
}
render
()
{
return
(
<
div
ref=
{
element
=>
this
.
element
=
element
}
/>
);
}
}
public/app/features/dashboard/dashgrid/dashboard_plugin.ts
0 → 100644
View file @
63bf2a02
import
coreModule
from
'app/core/core'
;
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