Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrolling of crammed widgets #99

Merged
merged 4 commits into from
Nov 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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