From 9fcdd2d6ccad186cf4a3e2f2fbd8dd4b5809c263 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 21 Nov 2019 14:10:31 +0100 Subject: [PATCH 1/3] Update application.scss Added CSS for scroll-ability of content if it is too much to fit the widget space --- assets/stylesheets/application.scss | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/assets/stylesheets/application.scss b/assets/stylesheets/application.scss index c2c2520..af74ec4 100644 --- a/assets/stylesheets/application.scss +++ b/assets/stylesheets/application.scss @@ -268,3 +268,16 @@ h3 { .clearfix:after { clear: both; } .clearfix { zoom: 1; } +// ---------------------------------------------------------------------------- +// Adding scrolling functionality to widgets for all browsers +// ---------------------------------------------------------------------------- +.scrollable { + overflow: hidden; +} + +.scrollable .content { + height: 100%; + overflow-y: scroll; + margin-right: -50px; + padding-right: 50px; +} From 0a2bfe1ef80c7f8db0efb2204f4e3b2f22c61bf6 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 21 Nov 2019 14:16:12 +0100 Subject: [PATCH 2/3] Update icinga2.erb made `icinga-severity` scrollable for the demo dashboard. --- dashboards/icinga2.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboards/icinga2.erb b/dashboards/icinga2.erb index 16a2c82..aa400af 100644 --- a/dashboards/icinga2.erb +++ b/dashboards/icinga2.erb @@ -135,7 +135,7 @@ $(function() {
  • -
    +
  • From 236f2c64aac0fcfe7334fad584ab4c6eaf684005 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 21 Nov 2019 14:19:40 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e1f9af8..1b1094c 100644 --- a/README.md +++ b/README.md @@ -544,6 +544,7 @@ The following attributes are important: * `data-title` defines the widget's title on top * `data-min` and `data-max` are widget specific in this example. They are referenced inside the Coffee script file inside the widget code. * `style` can be used to specify certain CSS to make the widget look more beautiful if not already. +* `class=scrollable` allows for scrolling of crammed widgets. Works for most widgets but is mostly meant to be used with `List` and `Simplelist`. ### Dashboard Widgets