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 the possibility to collapse the result of the states in the hightstate #459

Merged
merged 2 commits into from
Aug 5, 2022

Conversation

erwindon
Copy link
Owner

@erwindon erwindon commented Aug 3, 2022

Hello,

I am using the separate SaltGUI (1.28.0) solution in a nginx container (nginx:1.21.6).
Everything works fine but I have a problem with the hightstate page:

I have a lot of minions and states, and in the highstate page, the result of the highstate is far too long:
Is it possible to have only the final result with one circle ? and the detail if we click on the green/yellow/red circle ?
or another proper solution to reduce the result ?

I already tried this solution: https://github.com/erwindon/SaltGUI#performance, but I didn't see any change, maybe because I use a separate SaltGUI or maybe its not related with.
Screenshots

image

thanks a lot

@pju51
Copy link
Author

pju51 commented Jun 16, 2022

wrong label sorry :(

@erwindon
Copy link
Owner

I'm thinking of changing the highstate list (the list of coloured balls) as follows:

  • for lists up to total XXX items; keep the same output
  • when there are more then GGG green balls, collapse to something like (27×●)
  • when there are more then YYY yellow balls, collapse in the same way
  • when there are more then RRR red balls, collapse in the same way
  • collapsed items do not have their usual tooltip?
  • clicking on a collapsed item navigates to the first of that category?
  • summary for red comes at the start of the row
  • summary for green+yellow comes at the end of the row, yellow first, then green

I think it is important to keep the individual red balls visible as long as possible, since these give direct insight and access to their category and detail information

initially, the values for XXX, GGG, YYY and RRR are static.

@pju51
Copy link
Author

pju51 commented Jun 16, 2022

maybe we can juste have the choice, collapse or not the green balls and only the green balls, (27×●) is cool.

for me, see the result is important and even more so for the red and yellow balls. I agree with you to keep individual red balls and I will also add the yellow ones, so toolip and/or dedicated pages, I dont know.

When I check the highstate, I only check if my servers are inline with my repostiory Salt, so if it's green, I don't look in fact.

@erwindon
Copy link
Owner

I already tried this solution: https://github.com/erwindon/SaltGUI#performance,
but I didn't see any change,
maybe because I use a separate SaltGUI or maybe its not related with.

this only changes the way that the tooltips are shown.
it does not affect the display of ● itself.

@erwindon
Copy link
Owner

simpler alternative:
when there are more than XXX (e.g. 20) states, then display only a summary where each possible outcome is shown in the form "27×●"
note that there are up to 6 categories: success/failure/skipped; and each with/without changes
this would look like e.g.:
afbeelding

the main reason for the simplification is that mixing 2 representations is so much more work due to the reorganisations needed.

@pju51
Copy link
Author

pju51 commented Jun 21, 2022

It's great!

will there still be the tooltip or not?
will we get the details of the result?

@erwindon
Copy link
Owner

tooltips can only be produced for individual states.
it is always possible to navigate to the original job that did the work. so that all details can be inspected there.
technically it would be possible to produce tooltips such as "40 × failure" or "20 × success"

@pju51
Copy link
Author

pju51 commented Jun 27, 2022

@erwindon

no problem it was just a question.
as long as we can find the detail, because it is the most important, its okey ;)

@erwindon
Copy link
Owner

erwindon commented Aug 3, 2022

migrated issue to PR

@erwindon erwindon force-pushed the collapse_highstates branch 2 times, most recently from d07bdc4 to ddebc65 Compare August 3, 2022 23:16
@erwindon erwindon force-pushed the collapse_highstates branch 4 times, most recently from bc8d8f7 to a3e5853 Compare August 4, 2022 10:30
@erwindon
Copy link
Owner

erwindon commented Aug 4, 2022

@pju51
I've added the required code to this branch.
Can you please take a look at the result?
Just go to page "highstate" and see.

@erwindon erwindon assigned pju51 and unassigned erwindon Aug 4, 2022
@pju51
Copy link
Author

pju51 commented Aug 5, 2022

Hello @erwindon

I confirm its okey. Thanks a lot

image

image

@erwindon
Copy link
Owner

erwindon commented Aug 5, 2022

thx!
I'll merge this soon.

@erwindon erwindon assigned erwindon and unassigned pju51 Aug 5, 2022
@erwindon
Copy link
Owner

erwindon commented Aug 5, 2022

final adjustments:

  • made the max-length a static configuration parameter, still maximum is 20
  • added 1 line in the page tooltip about switching to summary after 20 tasks
  • made the background for the task-icon black, same reason as before: the visibility of the "task-changed" icon, which is yellow, which would be yellow-on-white. this also needed adjustment of the margins for the task-icons as there are now more visible.

@erwindon erwindon merged commit 73c51de into master Aug 5, 2022
@erwindon erwindon deleted the collapse_highstates branch August 5, 2022 20:17
@sonarqubecloud
Copy link

sonarqubecloud bot commented Aug 5, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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

Successfully merging this pull request may close these issues.

2 participants