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
aa87d8eb
Commit
aa87d8eb
authored
Nov 07, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graph: changed style of legend table mode to full width table and with headers, #1030
parent
cd21fa70
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
47 deletions
+29
-47
src/app/panels/graph/axisEditor.html
+0
-1
src/app/panels/graph/legend.js
+8
-7
src/css/less/graph.less
+21
-39
No files found.
src/app/panels/graph/axisEditor.html
View file @
aa87d8eb
...
@@ -43,7 +43,6 @@
...
@@ -43,7 +43,6 @@
<editor-opt-bool
text=
"Show legend"
model=
"panel.legend.show"
change=
"get_data();"
></editor-opt-bool>
<editor-opt-bool
text=
"Show legend"
model=
"panel.legend.show"
change=
"get_data();"
></editor-opt-bool>
<editor-opt-bool
text=
"Include values"
model=
"panel.legend.values"
change=
"render()"
></editor-opt-bool>
<editor-opt-bool
text=
"Include values"
model=
"panel.legend.values"
change=
"render()"
></editor-opt-bool>
<editor-opt-bool
text=
"Align as table"
model=
"panel.legend.alignAsTable"
change=
"render()"
></editor-opt-bool>
<editor-opt-bool
text=
"Align as table"
model=
"panel.legend.alignAsTable"
change=
"render()"
></editor-opt-bool>
<editor-opt-bool
text=
"Big table mode"
model=
"panel.legend.bigTableMode"
change=
"render()"
></editor-opt-bool>
<editor-opt-bool
text=
"Right side"
model=
"panel.legend.rightSide"
change=
"render()"
></editor-opt-bool>
<editor-opt-bool
text=
"Right side"
model=
"panel.legend.rightSide"
change=
"render()"
></editor-opt-bool>
</div>
</div>
...
...
src/app/panels/graph/legend.js
View file @
aa87d8eb
...
@@ -65,16 +65,17 @@ function (angular, app, _, kbn, $) {
...
@@ -65,16 +65,17 @@ function (angular, app, _, kbn, $) {
$container
.
toggleClass
(
'graph-legend-table'
,
panel
.
legend
.
alignAsTable
);
$container
.
toggleClass
(
'graph-legend-table'
,
panel
.
legend
.
alignAsTable
);
if
(
panel
.
legend
.
bigTableMode
)
{
if
(
panel
.
legend
.
alignAsTable
)
{
$container
.
toggleClass
(
'graph-legend-big-table'
,
true
);
var
header
=
'<tr>'
;
var
header
=
'<tr>'
;
header
+=
'<th></th>'
;
header
+=
'<th></th>'
;
header
+=
'<th></th>'
;
header
+=
'<th></th>'
;
header
+=
'<th>min</th>'
;
if
(
panel
.
legend
.
values
)
{
header
+=
'<th>max</th>'
;
if
(
panel
.
legend
.
min
)
{
header
+=
'<th>min</div>'
;
}
header
+=
'<th>avg</th>'
;
if
(
panel
.
legend
.
max
)
{
header
+=
'<th>max</div>'
;
}
header
+=
'<th>current</th>'
;
if
(
panel
.
legend
.
avg
)
{
header
+=
'<th>avg</div>'
;
}
header
+=
'<th>total</th>'
;
if
(
panel
.
legend
.
current
)
{
header
+=
'<th>current</div>'
;
}
if
(
panel
.
legend
.
total
)
{
header
+=
'<th>total</div>'
;
}
}
header
+=
'</tr>'
;
header
+=
'</tr>'
;
$container
.
append
(
$
(
header
));
$container
.
append
(
$
(
header
));
}
}
...
...
src/css/less/graph.less
View file @
aa87d8eb
...
@@ -53,6 +53,8 @@
...
@@ -53,6 +53,8 @@
.graph-legend-table {
.graph-legend-table {
display: table;
display: table;
width: 100%;
margin: 0;
.graph-legend-series {
.graph-legend-series {
display: table-row;
display: table-row;
...
@@ -63,66 +65,39 @@
...
@@ -63,66 +65,39 @@
}
}
}
}
.graph-legend-alias
{
td, .graph-legend-alias, .graph-legend-icon, .graph-legend-value
{
float: none;
float: none;
display: table-cell;
display: table-cell;
white-space: nowrap;
white-space: nowrap;
padding: 2px 10px;
text-align: right;
border-bottom: 1px solid @grafanaListBorderBottom;
}
}
.graph-legend-icon {
.graph-legend-icon {
display: table-cell;
width: 5px;
float: none;
padding: 0;
white-space: nowrap;
top: 0;
padding: 0 4px;
.icon-minus {
position: relative;
top: 2px;
top: 2px;
}
}
}
.graph-legend-value {
.graph-legend-value {
float: none;
display: table-cell;
white-space: nowrap;
padding-left: 15px;
padding-left: 15px;
}
}
}
.graph-legend-big-table {
width: 100%;
margin: 0;
td, .graph-legend-alias, .graph-legend-icon, .graph-legend-value {
padding: 2px 10px;
white-space: nowrap;
text-align: right;
border-bottom: 1px solid @grafanaListBorderBottom;
&:first-child {
text-align: left;
}
&:last-child td {
border: none;
}
}
.graph-legend-icon {
width: 5px;
padding-right: 0;
}
.graph-legend-alias {
.graph-legend-alias {
padding-left: 7px;
text-align: left;
text-align: left;
width: 95%;
width: 95%;
}
}
th {
text-align: right;
padding: 5px 10px;
font-weight: bold;
color: @blue
}
.graph-legend-series:nth-child(odd) {
.graph-legend-series:nth-child(odd) {
background-color: @grafanaListAccent;
background-color: @grafanaListAccent;
}
}
.graph-legend-value {
.graph-legend-value {
&.current, &.max, &.min, &.total, &.avg {
&.current, &.max, &.min, &.total, &.avg {
&:before {
&:before {
...
@@ -130,6 +105,13 @@
...
@@ -130,6 +105,13 @@
}
}
}
}
}
}
th {
text-align: right;
padding: 5px 10px;
font-weight: bold;
color: @blue
}
}
}
.graph-legend-rightside {
.graph-legend-rightside {
...
...
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