Skip to content

Commit

Permalink
Merge pull request #16857 from yanyixing/chartfix
Browse files Browse the repository at this point in the history
pybind: fix chart size become bigger when refresh

Reviewed-by: John Spray <john.spray@redhat.com>
  • Loading branch information
John Spray committed Aug 28, 2017
2 parents 315e419 + edf9342 commit bc2daa6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
5 changes: 5 additions & 0 deletions src/pybind/mgr/dashboard/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@
font-weight: bold;
}

.chart-container {
width: 100%;
height: 100%;
}

.dataTables_wrapper .dataTables_filter {
color: #ddd
}
Expand Down
16 changes: 9 additions & 7 deletions src/pybind/mgr/dashboard/health.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
},
options: {
center_text: raw_usage_text,
responsive: false,
responsive: true,
legend: {display: false},
animation: {duration: 0}
}
Expand Down Expand Up @@ -199,7 +199,7 @@
]
},
options: {
responsive: false,
responsive: true,
legend: {display: false},
animation: {duration: 0}
}
Expand Down Expand Up @@ -297,13 +297,15 @@
<td>
<span style="font-size: 45px;">{df.stats.total_objects | dimless}</span>
</td>
<td>
<canvas id="raw_usage_chart"
style="height:120px; width:120px;"></canvas>
<td >
<div style="height:120px; width: 120px;">
<canvas id="raw_usage_chart"></canvas>
</div>
</td>
<td>
<canvas id="pool_usage_chart"
style="height:120px; width: 120px;"></canvas>
<div style="height:120px; width: 120px;">
<canvas id="pool_usage_chart"></canvas>
</div>
</td>
</tr>
<tr>
Expand Down

0 comments on commit bc2daa6

Please sign in to comment.