[ZBXNEXT-3502] Ability to include custom CSS ("lightweight theme") Created: 2016 Oct 17 Updated: 2017 Sep 19 |
|
Status: | Open |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Frontend (F) |
Affects Version/s: | 3.2.1 |
Fix Version/s: | None |
Type: | New Feature Request | Priority: | Trivial |
Reporter: | Janne Korkkula | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 4 |
Labels: | customisation, style, themes | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() ![]() ![]() ![]() ![]() |
Description |
It would be most convenient, if we could configure an URL for a custom style sheet, which would then be included as the last style sheet when serving pages. Creating a custom theme is too heavy a solution for just tweaking minor issues, not least because a custom theme would not benefit from bugfixes and/or updates in the Zabbix distribution. As it is, I decided to append a hack to browsers.js instead of changing the theme CSS file itself or modifying any PHP code: /* Aalto custom style import, jannek 2016 */ var AaltoCssId = 'AaltoCss'; if (!document.getElementById(AaltoCssId)) { var head = document.getElementsByTagName('head')[0]; var link = document.createElement('link'); link.id = AaltoCssId; link.rel = 'stylesheet'; link.type = 'text/css'; link.href = '/css/aalto_zabbix.css'; link.media = 'all'; head.appendChild(link); } A bit ugly yes, but it works perfectly well and should survive updates nicely. For curiosity, attached is our current additional style sheet for 3.2.1. It's very much more compact than the default. This feature request is naturally related at least to |
Comments |
Comment by richlv [ 2016 Oct 17 ] |
do you have some screenshots of before/after, comparing to zabbix 3.0.5 ? |
Comment by Janne Korkkula [ 2016 Oct 17 ] |
As for 3.0.5, no; We went from 2.2.15 straight to 3.2.1 last Friday (out of context, I was quite impressed when the upgrade "just worked") and our test server doesn't have a database at all at the moment, so I can't do default/comparison shots from 3.2.1. It's a bit of a no-no to publish production stuff, but I'll add something generic with a bit of whiteout here and there. |
Comment by Janne Korkkula [ 2016 Oct 17 ] |
3.2.1 with standard blue theme and custom CSS. Firefox 49 on Ubuntu 14.04. |
Comment by richlv [ 2016 Oct 17 ] |
that's very neat, stuff actually fits onscreen like that |
Comment by Janne Korkkula [ 2016 Oct 17 ] |
Well, thanks, but... |
Comment by richlv [ 2016 Oct 17 ] |
you are absolutely right, i was a bit lazy there |
Comment by richlv [ 2016 Oct 17 ] |
ZBXNEXT-345 asks for css override for the login page only - might be covered by this issue |
Comment by richlv [ 2016 Oct 17 ] |
ZBXNEXT-260 is similar |
Comment by Janne Korkkula [ 2017 Sep 19 ] |
Just added one padding-killer more, .screen-table .list-table td { |