Add button to fast scroll sidebar

Hi,
if you have a lot of things in your sidebar, it is hard to scroll with the mouse as you need multiple scroll actions to get to the end of the sidebar or back up to the start.
It would be nice to have a small button on top and bottom of the sidebar to scroll a complete page by a simple click.
Best regards
Udo

Hi,
this depends on your CMK release: If you have the file bultin.py in the directory share/check_mk/web/plugins/config then you can activate a scrollbar.

Karl

1 Like

@kdeutsch which release is this in? I recently upgraded to 1.6.0p9, but do not have this file anywhere. I’d be interested in trying it out.

@lance do you find the bultin.py file ? if yes then:

##It is possible (but ugly) to enable a scrollbar in the sidebar
sidebar_show_scrollbar = False

set that to True

Nope, don’t see it anywhere:
OMD[webui]:~$ find . -name bultin.py -ls
OMD[webui]:~$

builtin.py typo :smiley: try now

OMD[mysite]:~$ ls share/check_mk/web/plugins/config/
bi.py builtin.py mkeventd.py wato.py

Still no…
OMD[webui]:~$ find . -name builtin.py -ls
OMD[webui]:~$
OMD[webui]:~$ ls share/check_mk/web/plugins/config/
ls: cannot access share/check_mk/web/plugins/config/: No such file or directory
OMD[webui]:~$ ls share/check_mk/web/plugins/
ls: cannot access share/check_mk/web/plugins/: No such file or directory
OMD[webui]:~$ ls share/check_mk/web/
app/ htdocs/
OMD[webui]:~$

I use 1.5 think you are using 1.6 ??

yes, 1.6. Maybe this option was removed?

I dont know, because Im still using 1.5

@lance I think its in: /gui/plugins/config/base.py

OK found it:

OMD[webui]:~$ find -L . -type f -name “*.py” -print | xargs grep sidebar_show_scrollbar
./lib/python/cmk/gui/sidebar.py: html.open_div(class_=“scroll” if config.sidebar_show_scrollbar else None,
./lib/python/cmk/gui/plugins/config/base.py:sidebar_show_scrollbar = False
./version/lib/python/cmk/gui/sidebar.py: html.open_div(class_=“scroll” if config.sidebar_show_scrollbar else None,
./version/lib/python/cmk/gui/plugins/config/base.py:sidebar_show_scrollbar = False
OMD[webui]:~$

didn’t realize it was a setting in the code rather than under the site home though. I’ll probably stay away from that.

of course after every update you have to set it again :slight_smile:

Hello Lance,
I think till release 1.5 - It’s no longer available in 1.6.

Karl

  • This is for a check-mk-raw-1.6.0p16 environment. change False to True.

OMD[site01]:~$ egrep -ir sidebar_show_scrollbar lib/python/cmk/gui/plugins/config/base.py
sidebar_show_scrollbar = False
OMD[site01]:~$

  • restart apache

OMD[site01]:~$ omd restart apache
Stopping apache…killing 31499…OK
Starting apache…OK
OMD[site01]:~$

image

2 Likes