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

Sort values fields when editing a variable through the UI #17336

Closed
TrueBrain opened this issue May 27, 2023 · 3 comments
Closed

Sort values fields when editing a variable through the UI #17336

TrueBrain opened this issue May 27, 2023 · 3 comments
Assignees
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/ui theme/variables Variables feature type/enhancement

Comments

@TrueBrain
Copy link
Contributor

Nomad version

Nomad v1.5.5
BuildDate 2023-05-05T12:50:14Z
Revision 3d63bc62b35cbe3f79cdd245d50b61f130ee1a79

Operating system and Environment details

Linux

Issue

When looking at Nomad Variables, they are in alphabetical order.
But when you press Edit, they are in a seemingly random order.

To make matters a bit worse, every time you hit Save, the order can change.

Needless to say, I might or might not have edited the wrong variables a few times already :D

Reproduction steps

  • Add some variables to a single key.
  • Enjoy an alphabetical view when viewing.
  • Edit them. Sometimes it still is alphabetical .. but just hit Save a few times and go back.
  • Be a bit confused when editing, as the order is already rather unpredictable.

Expected Result

I guess the best option would be to have both view alphabetical.

Actual Result

image
image

(when looking at the JSON, it is also visible the order has changed; so by the looks, editing always follows the order as in the JSON, where viewing sorts it).

Job file (if appropriate)

Nomad Server logs (if appropriate)

Nomad Client logs (if appropriate)

@lgfa29 lgfa29 added type/enhancement theme/ui stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/variables Variables feature and removed type/bug labels May 29, 2023
@lgfa29 lgfa29 changed the title Nomad Variables in seemingly random order when editing Sort values fields when editing a variable through the UI May 29, 2023
@lgfa29
Copy link
Contributor

lgfa29 commented May 29, 2023

Thanks for the report @TrueBrain.

I'm guessing this behaviour stems from Go's randomized map key iteration, but the UI should be able to sort them client-side to keep them consistent.

I added this to our roadmap and edited the title a bit to better reflect the request.

Thanks again for the report!

@github-project-automation github-project-automation bot moved this to Backlog in Nomad UI May 31, 2023
@philrenaud philrenaud moved this from Backlog to Todo in Nomad UI May 31, 2023
@philrenaud philrenaud self-assigned this Jul 27, 2023
@philrenaud philrenaud moved this from Todo to Done in Nomad UI Jul 27, 2023
@philrenaud
Copy link
Contributor

This was fixed in #18051 — thanks for raising the issue, @TrueBrain !

Copy link

github-actions bot commented Jan 8, 2025

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/ui theme/variables Variables feature type/enhancement
Projects
Status: Done
Development

No branches or pull requests

3 participants