Skip to content

Commit

Permalink
Merge pull request #99 from mocdaniel/master
Browse files Browse the repository at this point in the history
Scrolling of crammed widgets
  • Loading branch information
dnsmichi authored Nov 27, 2019
2 parents 5ce63b1 + 3a1d20c commit 68cf8b2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 13 additions & 0 deletions assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
2 changes: 1 addition & 1 deletion dashboards/icinga2.erb
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ $(function() {

<!-- Takes two rows for all service problems by severity -->
<li data-row="1" data-col="5" data-sizex="1" data-sizey="3">
<div data-id="icinga-severity" data-view="List" data-unordered="true" data-title="Problems"></div>
<div class="scrollable" data-id="icinga-severity" data-view="List" data-unordered="true" data-title="Problems"></div>
</li>

<!-- Icinga Web 2 iFrame. getIcingaWeb2Url() is defined in config.ru and reads from config/icinga2*.json -->
Expand Down

0 comments on commit 68cf8b2

Please sign in to comment.