hajimari icon indicating copy to clipboard operation
hajimari copied to clipboard

Add status indicators to hajimari apps

Open h3mmy opened this issue 2 years ago • 4 comments

Description

This PR adds status indicators to the dashboard. There is a passive feature toggle-ish setting currently defaulting to true that can be flipped if desired.

Type of Change

Feature: ~~Non-Breaking~~ Change that adds functionality. While the annotation parser defaults to true, this could be considered slightly breaking as it could cause things to not work as expected. It will require some documentation update(s)

Issues pertaining to this PR

technically resolves #20

Other Notes

  • Tested against k3s v1.23.3. Used Vivaldi and Chrome.
  • There may be a method or two that are extraneous as it was for a templating thing I was trying to do that hasn't worked yet.
  • I'm hoping to eventually build on this to segment the indicator based on # of replicas and have the indicators work for each.
  • Indicators do not refresh live. It uses the state it gets when the page loads.

I'm happy to add more unit tests or make tweaks if you want me to before this is merged. I'm also happy to make tweaks and improvements after provided an issue is defined for it.

sample_indicators_draft_1

h3mmy avatar Feb 09 '22 01:02 h3mmy

Thank you so much for your efforts, this is a fantastic feature!

Do you think it will look cleaner if we use simple dots like the mock up below? (just my personal opinion, please ignore if you don't)

mockup_hajimari

khuedoan avatar Feb 17 '22 09:02 khuedoan

It should be pretty trivial to make that switch if it's what's desired. On one of my instances I only use icons so I was probably just subconsciously going for this approach.

For the case with tracking liveness of multiple replicas would you want multiple dots? I was imagining it as just segmenting the line into pieces as needed so I'd need a dot equivalent to run off.

I'm not a graphic designer. At work I implement other people's graphic designs. I just went with what was most convenient for me at the time so I will happily make adjustments or add toggles.

h3mmy avatar Feb 18 '22 20:02 h3mmy

I think we can use multiple dots or multiple colors:

  • green: all replicas are available
  • orange: at least 1 replica is available
  • red: none available

khuedoan avatar Feb 20 '22 18:02 khuedoan

@toboshii Is that something you want me to add in this PR or keep it for the next PR as the replica detection is new functionality?

h3mmy avatar Feb 24 '22 13:02 h3mmy

Closing in favor of #45

h3mmy avatar Sep 04 '22 17:09 h3mmy