Skip to content

Use curses gem instead of escape characters for ASCII UI

Jonas Larsen requested to merge j_lar/use_curses_gem_for_ascii_ui into master

What does this MR do and why?

For the prototype of the Monitor I escape characters to avoid introducing a new dependency. Now that the monitor has gained some support I think it is time to use the curses gem to manage the screen buffer.

With curses we don't flood the terminal history with old "frames"

How to set up and validate locally

  1. Start the monitor: rails runner scripts/internal_events/monitor.rb i_code_review_user_create_mr
  2. Trigger an event in the Rails console: Gitlab::InternalEvents.track_event("i_code_review_user_create_mr", user: User.first, namespace: Namespace.last)
  3. Verify that the updated metrics and the new Snowplow are highlighted
  4. Exit the monitor: ctrl+c
  5. Verify that the terminal buffer is left nice and clean

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Jonas Larsen

Merge request reports