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
add2e444
Unverified
Commit
add2e444
authored
Oct 27, 2018
by
Torkel Ödegaard
Committed by
GitHub
Oct 27, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13849 from grafana/mode-change-performance-changes
Reduce re-renderings when changing view modes
parents
10e5d725
c5f9d809
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
public/app/features/dashboard/dashgrid/DashboardGrid.tsx
+4
-4
public/app/plugins/panel/graph2/module.tsx
+5
-1
No files found.
public/app/features/dashboard/dashgrid/DashboardGrid.tsx
View file @
add2e444
...
...
@@ -21,16 +21,15 @@ function GridWrapper({
className
,
isResizable
,
isDraggable
,
isFullscreen
,
})
{
if
(
size
.
width
===
0
)
{
console
.
log
(
'size is zero!'
);
}
const
width
=
size
.
width
>
0
?
size
.
width
:
lastGridWidth
;
if
(
width
!==
lastGridWidth
)
{
if
(
!
isFullscreen
&&
Math
.
abs
(
width
-
lastGridWidth
)
>
8
)
{
onWidthChange
();
lastGridWidth
=
width
;
}
}
return
(
<
ReactGridLayout
...
...
@@ -197,6 +196,7 @@ export class DashboardGrid extends React.Component<DashboardGridProps, any> {
onDragStop=
{
this
.
onDragStop
}
onResize=
{
this
.
onResize
}
onResizeStop=
{
this
.
onResizeStop
}
isFullscreen=
{
this
.
props
.
dashboard
.
meta
.
fullscreen
}
>
{
this
.
renderPanels
()
}
</
SizedReactLayoutGrid
>
...
...
public/app/plugins/panel/graph2/module.tsx
View file @
add2e444
...
...
@@ -36,7 +36,11 @@ export class Graph2 extends PureComponent<Props> {
export
class
TextOptions
extends
PureComponent
<
any
>
{
render
()
{
return
<
p
>
Text2 Options component
</
p
>;
return
(
<
div
className=
"section gf-form-group"
>
<
h5
className=
"section-heading"
>
Draw Modes
</
h5
>
</
div
>
);
}
}
...
...
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