Skip to main content

Terminal user interface (TUI) for Waldur Site Agent.

Project description

Waldur Site Agent TUI

Waldur Site Agent TUI is a terminal user interface (TUI) for Waldur Site Agent.

Peer review

Shortcut to A14 Peer Review and Peer Review Response

Usage

To analyze the code or view the wiki you can navigate to the src and tests or docs folder in this GitHub repository. Another option is to clone the repo into your machine, but be advised that the use will be limited for the lack of data.
To use the TUI, you would need a test environment with simulated data. We have set up a virtual machine for that. We also need your ssh key to give you access to the machine, you can email one of us for that. There you have two options, you can use already pulled source code and installed dependencies or you could try doing it yourself.

Using TUI in the Test VM with everything set up and installed:

  • ssh into ubuntu@193.40.155.199
  • Go to cd development/Waldur if you want to use already pulled code
  • Run the TUI with poetry run python src/WaldurSA_TUI/main.py

Using TUI in the Test VM and setting everything up yourself:

  • ssh into ubuntu@193.40.155.199
  • Go to a review directory if you want to test pulling source code yourself
    • cd review/mentor if you are the mentor
    • cd review/peer if you are the peer reviewer
    • Clone the GitHub project and move into it with cd WaldurSA-TUI
  • To run it from the source code, you'd need to install the following:
    • Install Poetry https://python-poetry.org/docs/#installing-with-pipx
    • Install libsystemd-dev sudo apt install libsystemd-dev
    • In the cloned project install Poetry dependencies with poetry install
      • If you encounter any errors related to cysystemd failing to install then run sudo apt-get install build-essential
    • Run the TUI with poetry run python src/WaldurSA_TUI/main.py

UI

  • You can use either a mouse or a keyboard to navigate
  • Keyboard:
    • Press tab To switch between TUI elements
    • Press Enter to select the current TUI element
    • Press Escape to quit the TUI
    • Use the arrow keys to:
      • Switch tabs while tabs bar is selected
      • Navigate the side menus
      • Choose dates
      • Choose a status
      • Navigate the logs table or the configured offerings table

For developers

From PyPi:

  • To install the PyPi package use the following command:
    • pip install WaldurSA-TUI
    • Or a specific version, for example: pip install WaldurSA-TUI==0.2.0
    • To run the package use the following command: waldur_site_agent_tui

Release notes

Release notes 0.3.0

Overall:

  • Added Exit button for mouse only users
  • Usable with only mouse or only keyboard
  • Added footer with key bindings

Dashboard:

  • Added graphs to show services' CPU and Memory usage
  • Added On Boot column
  • Added Status Details column

Logs tab:

  • Layout changes
  • Internal logic changes - filters are applied and then logs are shown
  • Filtering
    • From and To dates are seperate buttons where date can be chosen
    • From and To timeframe are seperate input fields
    • Added Status sort with options info, error, exception, warning, unknown
    • Removed aplhabetical sort
    • Added Sort by Oldest/Newest
  • Refreshing timer starts after first Search
  • Export path is now choosable by the user
  • Optimizations
    • Logs are loaded instantly or very fast depending on the amount of logs

Configured Offerings:

  • Token is now hidden by default
  • Token value can be seen by selecting it

Known bugs

  • Searching multiple times in a row causes log entries to be out of order
  • Table update sometimes gets KeyError
  • Fixed
    • Search input field works with keywords
    • 'Clear filters' button doesn't delete all visiable data anymore
    • Filters now take affect on all logs
    • Automated tests are working
    • After searching for configured offerings multiple offerings are no longer selected

Release notes 0.2.0

Logs tab:

  • Real log usage
    • The TUI now uses logs realated to the Waldur Site agent
  • Logs are now refreshed automatically
    • Refresh every 30 seconds, which can be paused
  • Filtering
    • Added Sort by Date
      • From, to, and from - to sorting
    • Added Sort by timeframe
      • From, to, and from - to sorting
    • Added Sort alphabetically
      • Sort from A-Z
  • Optimizations
    • loading in logs does not freeze the TUI

Configured offerings tab

  • Real configured offerings usage
    • The TUI now uses configured offerings realated to the Waldur Site agent

Dashboard

  • Real data usage
    • The TUI now fetches services from waldur the Waldur Site agent

Known bugs

  • Logs tab
    • 'Clear filters' button deletes all visiable data
    • Filters do not take affect on new logs
    • When scrolling down in a table with keyboard doesn't show active row on screen
  • Some automated test fail
    • Likely related to how async and threads are implemented in the configured offerings file. Random failing hasn't happened with log testing.
    • Should not impact manual testing
  • Fixed
    • Filtering and async mismatch
      • Filters did not work correctly with async at first

Release notes 0.1.0

  • Added dashboard tab
    • Only includes static test info for now
  • Added logs tab
    • Includes 3 log categories
    • Logs are searchable
    • UI for search by date is added
      • Not yet functional
    • A simple export logs button
      • Export logs that can be viewed
      • May need to change the functionality in the future
    • Table for log info
      • Only includes test logs for now
  • Added configured offerings tab
    • Offerings are searchable
    • A list view for available offerings
    • Each offering has a view for its included items and values
    • Only includes test info for now
  • Added keybindings
    • ‘q’ for quitting the TUI
    • ‘e’ for a simulated error popup
  • Known Bugs
    • None, works with test data

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

waldursa_tui-0.3.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

waldursa_tui-0.3.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file waldursa_tui-0.3.0.tar.gz.

File metadata

  • Download URL: waldursa_tui-0.3.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for waldursa_tui-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b38054e42aeae2b9d82f4f9681d054fedc8c6e6d7e996d7c1e401a6d82f43ee5
MD5 f64c0c2a6d082f2fb41f676f62261b9c
BLAKE2b-256 76d36734efdb9366727a34ef28f43306c7ab48e46010fb13068524592d634c87

See more details on using hashes here.

File details

Details for the file waldursa_tui-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: waldursa_tui-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for waldursa_tui-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ce9222f05c37d5c0e52f8904d205591d3ef672f7b69e27ecfcdf7d5de2181c6
MD5 587fcfa39135de51607e4fa9dd279afc
BLAKE2b-256 e81a10305a7d857240c39118ac6b37058526e926c3bf3ed40ef63193e90dc7e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page