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
a6fc74e3
Unverified
Commit
a6fc74e3
authored
Oct 24, 2018
by
David
Committed by
GitHub
Oct 24, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13803 from grafana/davkal/explore-fix-resize
Explore: fix graph resize on window resize
parents
1fbef171
d6ff16fe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
20 deletions
+12
-20
public/app/features/explore/Graph.tsx
+2
-4
public/app/features/explore/__snapshots__/Graph.test.tsx.snap
+10
-16
No files found.
public/app/features/explore/Graph.tsx
View file @
a6fc74e3
...
@@ -168,7 +168,8 @@ export class Graph extends PureComponent<GraphProps, GraphState> {
...
@@ -168,7 +168,8 @@ export class Graph extends PureComponent<GraphProps, GraphState> {
const
data
=
this
.
getGraphData
();
const
data
=
this
.
getGraphData
();
return
(
return
(
<>
<
div
className=
"panel-container"
>
{
loading
&&
<
div
className=
"explore-graph__loader"
/>
}
{
this
.
props
.
data
&&
{
this
.
props
.
data
&&
this
.
props
.
data
.
length
>
MAX_NUMBER_OF_TIME_SERIES
&&
this
.
props
.
data
.
length
>
MAX_NUMBER_OF_TIME_SERIES
&&
!
this
.
state
.
showAllTimeSeries
&&
(
!
this
.
state
.
showAllTimeSeries
&&
(
...
@@ -180,12 +181,9 @@ export class Graph extends PureComponent<GraphProps, GraphState> {
...
@@ -180,12 +181,9 @@ export class Graph extends PureComponent<GraphProps, GraphState> {
}`
}
</
span
>
}`
}
</
span
>
</
div
>
</
div
>
)
}
)
}
<
div
className=
"panel-container"
>
{
loading
&&
<
div
className=
"explore-graph__loader"
/>
}
<
div
id=
{
id
}
className=
"explore-graph"
style=
{
{
height
}
}
/>
<
div
id=
{
id
}
className=
"explore-graph"
style=
{
{
height
}
}
/>
<
Legend
data=
{
data
}
/>
<
Legend
data=
{
data
}
/>
</
div
>
</
div
>
</>
);
);
}
}
}
}
...
...
public/app/features/explore/__snapshots__/Graph.test.tsx.snap
View file @
a6fc74e3
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Render should render component 1`] = `
exports[`Render should render component 1`] = `
<Fragment>
<div
<div
className="panel-container"
className="panel-container"
>
>
<div
<div
className="explore-graph"
className="explore-graph"
id="graph"
id="graph"
...
@@ -457,12 +456,13 @@ exports[`Render should render component 1`] = `
...
@@ -457,12 +456,13 @@ exports[`Render should render component 1`] = `
]
]
}
}
/>
/>
</div>
</div>
</Fragment>
`;
`;
exports[`Render should render component with disclaimer 1`] = `
exports[`Render should render component with disclaimer 1`] = `
<Fragment>
<div
className="panel-container"
>
<div
<div
className="time-series-disclaimer"
className="time-series-disclaimer"
>
>
...
@@ -478,9 +478,6 @@ exports[`Render should render component with disclaimer 1`] = `
...
@@ -478,9 +478,6 @@ exports[`Render should render component with disclaimer 1`] = `
</span>
</span>
</div>
</div>
<div
<div
className="panel-container"
>
<div
className="explore-graph"
className="explore-graph"
id="graph"
id="graph"
style={
style={
...
@@ -955,15 +952,13 @@ exports[`Render should render component with disclaimer 1`] = `
...
@@ -955,15 +952,13 @@ exports[`Render should render component with disclaimer 1`] = `
]
]
}
}
/>
/>
</div>
</div>
</Fragment>
`;
`;
exports[`Render should show query return no time series 1`] = `
exports[`Render should show query return no time series 1`] = `
<Fragment>
<div
<div
className="panel-container"
className="panel-container"
>
>
<div
<div
className="explore-graph"
className="explore-graph"
id="graph"
id="graph"
...
@@ -976,6 +971,5 @@ exports[`Render should show query return no time series 1`] = `
...
@@ -976,6 +971,5 @@ exports[`Render should show query return no time series 1`] = `
<Legend
<Legend
data={Array []}
data={Array []}
/>
/>
</div>
</div>
</Fragment>
`;
`;
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