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
42ee81a9
Commit
42ee81a9
authored
Dec 14, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue with switching panels
parent
0823712c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
public/app/core/components/Form/Input.tsx
+4
-0
public/app/features/dashboard/dashgrid/DashboardPanel.tsx
+5
-8
No files found.
public/app/core/components/Form/Input.tsx
View file @
42ee81a9
...
@@ -31,6 +31,10 @@ interface Props extends React.HTMLProps<HTMLInputElement> {
...
@@ -31,6 +31,10 @@ interface Props extends React.HTMLProps<HTMLInputElement> {
}
}
export
class
Input
extends
PureComponent
<
Props
>
{
export
class
Input
extends
PureComponent
<
Props
>
{
static
defaultProps
=
{
className
:
''
,
};
state
=
{
state
=
{
error
:
null
,
error
:
null
,
};
};
...
...
public/app/features/dashboard/dashgrid/DashboardPanel.tsx
View file @
42ee81a9
...
@@ -81,10 +81,10 @@ export class DashboardPanel extends PureComponent<Props, State> {
...
@@ -81,10 +81,10 @@ export class DashboardPanel extends PureComponent<Props, State> {
}
}
if
(
plugin
.
exports
)
{
if
(
plugin
.
exports
)
{
this
.
setState
({
plugin
:
plugin
});
this
.
setState
({
plugin
:
plugin
,
angularPanel
:
null
});
}
else
{
}
else
{
plugin
.
exports
=
await
importPluginModule
(
plugin
.
module
);
plugin
.
exports
=
await
importPluginModule
(
plugin
.
module
);
this
.
setState
({
plugin
:
plugin
});
this
.
setState
({
plugin
:
plugin
,
angularPanel
:
null
});
}
}
}
}
}
}
...
@@ -106,18 +106,15 @@ export class DashboardPanel extends PureComponent<Props, State> {
...
@@ -106,18 +106,15 @@ export class DashboardPanel extends PureComponent<Props, State> {
this
.
setState
({
angularPanel
});
this
.
setState
({
angularPanel
});
}
}
cleanUpAngularPanel
(
unmounted
?:
boolean
)
{
cleanUpAngularPanel
()
{
if
(
this
.
state
.
angularPanel
)
{
if
(
this
.
state
.
angularPanel
)
{
this
.
state
.
angularPanel
.
destroy
();
this
.
state
.
angularPanel
.
destroy
();
this
.
element
=
null
;
if
(
!
unmounted
)
{
this
.
setState
({
angularPanel
:
null
});
}
}
}
}
}
componentWillUnmount
()
{
componentWillUnmount
()
{
this
.
cleanUpAngularPanel
(
true
);
this
.
cleanUpAngularPanel
();
}
}
onMouseEnter
=
()
=>
{
onMouseEnter
=
()
=>
{
...
...
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