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

Add "Last Seen" device badge #1679

Merged
merged 3 commits into from
Feb 10, 2023
Merged

Add "Last Seen" device badge #1679

merged 3 commits into from
Feb 10, 2023

Conversation

joepavitt
Copy link
Contributor

@joepavitt joepavitt commented Feb 7, 2023

Description

  • Adds a new device status badge that shows a clearer picture of device status & connectivity.
  • Change column header to "Last Known Status"

Screenshot 2023-02-07 at 22 34 52

Categorisation:

As implemented currently, shows as green if last seen within the last minute, otherwise red. Will likely want to add more text-based labels to cover more time periods beyond 1 hr ago.

Last Seen Colour
never colourless
< 1 min green
> 1 min red

updated table to: #1679 (comment)

Related Issue(s)

Closes #1599

Checklist

@Pezmc
Copy link
Contributor

Pezmc commented Feb 8, 2023

Are you able to pull some stats to get an idea of the current distribution of last-seen for devices?

@joepavitt
Copy link
Contributor Author

Are you able to pull some stats to get an idea of the current distribution of last-seen for devices?

Not sure I would be able to - they're not too widely used right now on FF Cloud, although with the provisioning work that @Steve-Mcl has done, that should hopefully change.

They auto-ping every 30 seconds, so if they're connected, it'll be every 30 seconds that we hear from them

@knolleary
Copy link
Member

They auto-ping every 30 seconds,

The default ping interval is 60 seconds, but the user can configure that to something else that makes sense for their scenario - and there is a bit of jitter applied so it isn't always exactly 60 seconds - I think it can be +/- 5 seconds by default.

If we assume most users stick to the defaults for now (until we address the broader solution outlined in the original issue), then I suggest:

Last Seen Colour
never colourless
< 90 secs green
90 sec - 3 min yellow
> 3 min red

But if you think green/red is sufficient, then combine yellow/red into one band.

@Steve-Mcl
Copy link
Contributor

1. no see long time

Supposing a customer has distant remote (often offline due to environment) devices. e.g. 1 day unseen is perfectly ok and even expected due to "sleeping" over a weekend etc. They are going to see red entries with 'over an hour ago' - maybe we could expand it to "over x days ago" then to "over x months" ago.

FMPoV,

  • Seeing "over 1 days ago" on a sunday is OK
  • Seeing "over 4 days ago" on a monday is NG
  • Seeing "over 1 month ago" means I should probably delete this device.

2. sorting

Will having a variable "last seen" text break the sorting (or make it unpredictable)?
Does it sort on text or the underlying field value?

@joepavitt
Copy link
Contributor Author

joepavitt commented Feb 9, 2023

FMPoV

Agree there will be variation, i think as a first point of call, we want something in, then as a second phase, we can make this configurable. I have changed the "Over x hrs" to be more descriptive

Does it sort on text or the underlying field value?

It sorts on the lastSeenAt field, which is the UTC string of the date. Ideally we modify this. Will add that change in here.

@joepavitt
Copy link
Contributor Author

e.g:

Screenshot 2023-02-09 at 13 52 29

@joepavitt joepavitt marked this pull request as ready for review February 9, 2023 14:12
@Steve-Mcl
Copy link
Contributor

Steve-Mcl commented Feb 9, 2023

FMPoV

Agree there will be variation, i think as a first point of call, we want something in, then as a second phase, we can make this configurable. I have changed the "Over x hrs" to be more descriptive

Just in case you missed my point (or more likely I wasnt clear) - I agree colour threshold setting can/should be a future iteration however I was mostly trying to convey this...

Only having 'over an hour ago' means I cannot judge if a device is simply sleeping or lost/broke/redundant.

Having additional "time frames" means I can see if a device is actually redundant or lost. Something like...

Last Seen Colour Displays
never colourless never
< 90 secs green 1 minute ago
90 sec - 3 min yellow 2 minutes ago
> 3 min red x minutes ago
> 1h red more than 1 hour ago
> 2h red more than x hours ago
> 24h red more than 1 day
> 48h red more than x days ago
> 1 month red more than 1 month ago

Food for thought hopefully Joe.

EDIT

i should read more carefully

I have changed the "Over x hrs" to be more descriptive

doh!

@joepavitt
Copy link
Contributor Author

joepavitt commented Feb 9, 2023

doh!

😄

Copy link
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

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

purrrfect

@Steve-Mcl Steve-Mcl merged commit dcc8256 into main Feb 10, 2023
@Steve-Mcl Steve-Mcl deleted the 1599-device-status branch February 10, 2023 10:05
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.

Improve communication of Device Last Seen and Status
4 participants