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

Document meanings of status colours #877

Closed
tomviner opened this issue Dec 18, 2023 · 3 comments · Fixed by #940
Closed

Document meanings of status colours #877

tomviner opened this issue Dec 18, 2023 · 3 comments · Fixed by #940
Labels
documentation Improvements or additions to documentation

Comments

@tomviner
Copy link

I can see from

fn render_status_cell(hop: &Hop, is_target: bool) -> Cell<'static> {
let lost = hop.total_sent() - hop.total_recv();
Cell::from(match (lost, is_target) {
(lost, target) if target && lost == hop.total_sent() => "🔴",
(lost, target) if target && lost > 0 => "🟡",
(lost, target) if !target && lost == hop.total_sent() => "🟤",
(lost, target) if !target && lost > 0 => "🔵",
_ => "🟢",
the names of the conditions needed for each status colour.

The "is target" condition is explained here

/// Is a given `Hop` the target hop for a given flow?
///
/// A `Hop` is considered to be the target if it has the highest `ttl` value observed.
///
/// Note that if the target host does not respond to probes then the the highest `ttl` observed
/// will be one greater than the `ttl` of the last host which did respond.

Would be nice to add a short section to the docs explaining these colours.

@fujiapple852
Copy link
Owner

Hi @tomviner,

Yes I agree this should be documented. Maybe also shown in the help dialog box of the TUI?

For background; The above was only every intended as a placeholder until some more comprehensive status logic could be written, but alas I haven't attempted that yet. This came up recently as part of a HN discussion and I created #860 on the back of that discussion to explore ideas.

@fujiapple852 fujiapple852 added documentation Improvements or additions to documentation and removed triage labels Dec 19, 2023
@c-git
Copy link
Collaborator

c-git commented Dec 19, 2023

That's how life goes, don't stress. There's only 24 hours in each day.

@fujiapple852
Copy link
Owner

fujiapple852 commented Jan 21, 2024

@tomviner I have documented all Tui columns, including the status column:

https://github.com/fujiapple852/trippy?tab=readme-ov-file#column-reference

WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants