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
fa437822
Commit
fa437822
authored
Apr 05, 2018
by
Alexander Zobnin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrollbar: fix graph legend height
parent
b4ef55f5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
8 deletions
+16
-8
public/app/plugins/panel/graph/legend.ts
+4
-4
public/app/plugins/panel/graph/template.ts
+3
-1
public/sass/components/_panel_graph.scss
+7
-1
public/sass/components/_scrollbar.scss
+2
-2
No files found.
public/app/plugins/panel/graph/legend.ts
View file @
fa437822
...
@@ -238,10 +238,10 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
...
@@ -238,10 +238,10 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
tbodyElem
.
append
(
tableHeaderElem
);
tbodyElem
.
append
(
tableHeaderElem
);
tbodyElem
.
append
(
seriesElements
);
tbodyElem
.
append
(
seriesElements
);
elem
.
append
(
tbodyElem
);
elem
.
append
(
tbodyElem
);
tbodyElem
.
wrap
(
'<div class="graph-legend-
content
"></div>'
);
tbodyElem
.
wrap
(
'<div class="graph-legend-
scroll
"></div>'
);
}
else
{
}
else
{
elem
.
append
(
'<div class="graph-legend-
content
"></div>'
);
elem
.
append
(
'<div class="graph-legend-
scroll
"></div>'
);
elem
.
find
(
'.graph-legend-
content
'
).
append
(
seriesElements
);
elem
.
find
(
'.graph-legend-
scroll
'
).
append
(
seriesElements
);
}
}
if
(
!
panel
.
legend
.
rightSide
||
(
panel
.
legend
.
rightSide
&&
legendWidth
!==
legendRightDefaultWidth
))
{
if
(
!
panel
.
legend
.
rightSide
||
(
panel
.
legend
.
rightSide
&&
legendWidth
!==
legendRightDefaultWidth
))
{
...
@@ -261,7 +261,7 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
...
@@ -261,7 +261,7 @@ module.directive('graphLegend', function(popoverSrv, $timeout) {
`
;
`
;
let
scrollRoot
=
elem
;
let
scrollRoot
=
elem
;
let
scroller
=
elem
.
find
(
'.graph-legend-
content
'
);
let
scroller
=
elem
.
find
(
'.graph-legend-
scroll
'
);
// clear existing scroll bar track to prevent duplication
// clear existing scroll bar track to prevent duplication
scrollRoot
.
find
(
'.baron__track'
).
remove
();
scrollRoot
.
find
(
'.baron__track'
).
remove
();
...
...
public/app/plugins/panel/graph/template.ts
View file @
fa437822
...
@@ -3,7 +3,9 @@ var template = `
...
@@ -3,7 +3,9 @@ var template = `
<div class="graph-panel__chart" grafana-graph ng-dblclick="ctrl.zoomOut()">
<div class="graph-panel__chart" grafana-graph ng-dblclick="ctrl.zoomOut()">
</div>
</div>
<div class="graph-legend" graph-legend></div>
<div class="graph-legend">
<div class="graph-legend-content" graph-legend></div>
</div>
</div>
</div>
`
;
`
;
...
...
public/sass/components/_panel_graph.scss
View file @
fa437822
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
}
}
.graph-legend
{
.graph-legend
{
display
:
flex
;
flex
:
0
1
auto
;
flex
:
0
1
auto
;
max-height
:
30%
;
max-height
:
30%
;
margin
:
0
;
margin
:
0
;
...
@@ -56,7 +57,8 @@
...
@@ -56,7 +57,8 @@
padding-top
:
6px
;
padding-top
:
6px
;
position
:
relative
;
position
:
relative
;
height
:
100%
;
// fix for Firefox (white stripe on the right of scrollbar)
width
:
99%
;
.popover-content
{
.popover-content
{
padding
:
0
;
padding
:
0
;
...
@@ -67,6 +69,10 @@
...
@@ -67,6 +69,10 @@
position
:
relative
;
position
:
relative
;
}
}
.graph-legend-scroll
{
position
:
relative
;
}
.graph-legend-icon
{
.graph-legend-icon
{
position
:
relative
;
position
:
relative
;
padding-right
:
4px
;
padding-right
:
4px
;
...
...
public/sass/components/_scrollbar.scss
View file @
fa437822
...
@@ -192,12 +192,12 @@
...
@@ -192,12 +192,12 @@
// Width needs to be set to prevent content width issues
// Width needs to be set to prevent content width issues
// Set to 99% instead of 100% for fixing Firefox issue (white stripe on the right of scrollbar)
// Set to 99% instead of 100% for fixing Firefox issue (white stripe on the right of scrollbar)
min-
width
:
99%
;
width
:
99%
;
}
}
// Fix for side menu on mobile devices
// Fix for side menu on mobile devices
.main-view.baron
{
.main-view.baron
{
min-
width
:
unset
;
width
:
unset
;
}
}
.baron__clipper
{
.baron__clipper
{
...
...
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