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

Kantui refactor #36

Merged
merged 25 commits into from
May 2, 2023

Conversation

vasilvas99
Copy link
Contributor

@vasilvas99 vasilvas99 commented Apr 4, 2023

Changes in this pull request

Refactor:

  • IO, UI and main thread split in separate modules
  • New views added (help and describe)
  • Config module expanded to be able to parse complex keyboard mappings

IO

  • Logs now use the gRPC call to CM and read the grpc stream, rather than reading files from the filesystem
  • Added "get_container_by_id" (container description call) in kanto_api

Config

  • Add log_tail_lines to set the number of lines in the logs view to be tail-ed
  • The KeyConfig struct now has complex (de)serialization behaviour: instead of simple char-s for key-bindings, Combinations with Ctrl (^) and Alt(@) are now allowed in the format "^" or "@". If no modifier is specified, the first char of the string will be taken as the key monitored for events.
  • Some of the keys in the default kantui_conf.toml have been remapped (e.g. quit is now Ctrl+Q)
  • Refresh cotainer list refresh FPS now an option and reduced to 15 to save on CPU usage.

UI

  • Describe screen added (see screenshot below)
  • Help screen added (see screenshot below)
  • UI becomes side-to-side scrollable if it can't reasonably be rescaled to fit the sceen.

Other

  • Pruned unused default features for dependencies - (debug binary reduced from 150 MB to 90mb, stripped release binary is now 3.9M)
  • Fixed dependencies to EXACT semvers to ensure reproducible builds in the future
  • Re-generated Cargo.lock to match dependency changes

Not in this PR:

  • Log following/watching

@vasilvas99
Copy link
Contributor Author

image

@vasilvas99
Copy link
Contributor Author

Describe screen:
image

@vasilvas99 vasilvas99 marked this pull request as ready for review April 18, 2023 14:14
@mikehaller
Copy link
Contributor

Tested on qemuarm64 (leda 0.0.5 in docker) and Raspberry Pi 4 64-Bit (leda 0.0.6) with large display connected via HDMI.
Running this version of kantui on serial console (terminal 1)

Looks good to me.

Copy link
Contributor

@mikehaller mikehaller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

License header must be added

src/rust/kanto-tui/kantui_conf.toml Outdated Show resolved Hide resolved
src/rust/kanto-tui/src/io.rs Show resolved Hide resolved
Copy link
Contributor

@mikehaller mikehaller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now.

@mikehaller mikehaller merged commit 0c61bbc into eclipse-leda:main May 2, 2023
@mikehaller mikehaller deleted the kantui-refactor branch May 2, 2023 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants