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

Format TTL for humans #147

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

smortex
Copy link
Member

@smortex smortex commented Jan 7, 2025

When viewing details of events with a long TTL, it is not straightforward to check if it is about to expire or not.

Instead of displayer the raw TTL as a number of seconds, format it by using an appropriate unit of time and fixed precision:

  • 42 => "42 seconds"
  • 420 => "7.0 minutes"
  • 4200 => "70.0 minutes"
  • 42000 => "11.7 hours"
  • 420000 => "4.9 days"

Also include:

smortex added 3 commits June 30, 2024 18:27
The lockfile allow reproducible build, which are awesome.  However, we
also want to support multiple versions of Ruby, and a lockfile is
unfortunately not a one-size-fit-all solution in this case:

  * Older versions of bundler cannot run on recent versions of Ruby;
  * Recent versions of bundler cannot run on older versions of Ruby;
  * Some dependencies are available for some versions of Ruby but not
    all the ones we support, so a version of Ruby may be unable to run
    the bundle generated by another version of Ruby.

The lock file is only used when someone clone the repository and run
`bundle install`.  When installing with `gem install riemann-dash` (the
way recommanded in the README), the dependencies only have to be in the
bounds of what is authorized in the gemspec file, so this will only
affect a fraction of our users which are probably aware of what they are
doing.

This allows us to run the test suite on all supported versions of Ruby.
When a large table is displayed and is larger than the screen size, it
is not possible to scroll to see *all* the data.  One can zoom-out to
have a accomodate more data, but this does not fix the issue as:
  1. The displayed data is smaller, making it harder to read it beyond
     checking the color that represent the state of the metric;
  2. Zooming out is limited and at some point more data is still out of
     sight.

This make the table scrollable in its container.  Both horizontal and
vertical headers stick to their position to make it easier to track what
is being viewed.
When viewing details of events with a long TTL, it is not
straightforward to check if it is about to expire or not.

Instead of displayer the raw TTL as a number of seconds, format it by
using an appropriate unit of time and fixed precision:
  * 42 => "42 seconds"
  * 420 => "7.0 minutes"
  * 4200 => "70.0 minutes"
  * 42000 => "11.7 hours"
  * 420000 => "4.9 days"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant