fix: Fixed height of widget boxes (#6282)

* Fix height of widget boxes

This pracitcally reverts #5644 and instead applies the correct fix by
calculating the dimensions of the widget box correctly.

* I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md.
This commit is contained in:
Jan-Philipp Litza
2017-03-28 17:02:10 +02:00
committed by Neil Lathwood
parent 3712ca91fe
commit 323df86d40
3 changed files with 3 additions and 2 deletions

View File

@@ -195,6 +195,7 @@ LibreNMS contributors:
- Hubert Ladet <mail4git38@gmail.com> (mail4git38)
- Deeps (deepseth)
- Jari Schäfer <jari.schaefer@gmail.com> (jarischaefer)
- Jan-Philipp Litza <janphilipp@litza.de> (jplitza)
Observium was written by:
- Adam Armstrong

View File

@@ -1895,7 +1895,7 @@ label {
.widget_body {
overflow-y: auto;
width: 100%;
height: calc(100% - 5px);
height: calc(100% - 38px);
}
.device-availability, .service-availability {

View File

@@ -583,7 +583,7 @@ foreach (dbFetchRows("SELECT * FROM `widgets` ORDER BY `widget_title`") as $widg
$.ajax({
type: 'POST',
url: 'ajax_dash.php',
data: {type: data_type, id: id, dimensions: {x:$("#widget_body_"+id).innerWidth()-50, y:$("#widget_body_"+id).innerHeight()-50}, settings:settings},
data: {type: data_type, id: id, dimensions: {x:$("#widget_body_"+id).innerWidth()-20, y:$("#widget_body_"+id).innerHeight()-20}, settings:settings},
dataType: "json",
success: function (data) {
if (data.status == 'ok') {