I’m setting up a Grafana monitoring solution and while I love Grafana overall, I’ve needed to make a few changes here and there over the past few months. One of these changes was to a small UI element that was truely driving me nuts.

Very Annoying Page Shift

This loading spinner was causing the entire page to shift down about 10 pixels and then back up every 20 seconds or so. There are few things that annoy me more when it comes to web usability, so I knew I would need to disable this guy.

Here’s how I used rpmrebuild to do this. First, enter into the interactive rpmrebuild flow which opens the rpm spec file with your default editor.

rpmrebuild -e -p grafana-9.0.7-1.x86_64.rpm

While this file is open, you know have access to the contents of the rpm in a temporary directory which you can access like this:

vim ~/.tmp/rpmrebuild.23591/work/root/usr/share/grafana/public/build/AlertGroups.98ab02c233dab193b78e.js

Once you are finished making your edits and have saved the changes, you can return to your rpmrebuild session, increment the Release: field in the spec (this will allow you to differentiate your rpm from the stock version, and will allow your version to be cleanly installed over the stock install), and then save and exit the editor. rpmrebuild will then generate a new rpm in ~/rpmbuild/RPMS/x86_64/.