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

NAS-129460 / 24.10 / add more keys to webui.enclosure.dashboard (per UI team) #13859

Merged
merged 6 commits into from
Jun 7, 2024

Conversation

yocalebo
Copy link
Contributor

@yocalebo yocalebo commented Jun 7, 2024

UI has requested that we add some more keys to the new enclosure endpoint. The summary of these keys are below (NOTE: I'm documenting keys that already exist AS WELL AS the new ones. I'm doing this for posterity sake)

For each enclosure object there are the following keys with their definitions:

  1. rackmount: boolean, represents whether the system is "rack mountable"
  2. top_loaded: boolean, represents whether the disk drives are loaded into the "top" of the enclosure
  3. top_slots: integer, represents the total number of disk bays that are loaded into the "top" of the enclosure
  4. front_loaded: boolean, represents whether the disk drives are loaded into the "front" of the enclosure (NOTE: this is an exclusive OR from top_loaded (i.e. they can never be true at the same time))
  5. front_slots: integer, represents the total number of disk bays that are loaded into the "front" of the enclosure
  6. rear_slots: integer, represents the total number of disk bays that are loaded into the "rear" of the enclosure
  7. internal_slots: integer, represents the total number of disk bays that are loaded "internally" (NOTE: we only have 1 platform that has this type of configuration (R30) and internal is a big ambiguous but it's the best we came up with and it's concrete on what it's definition is at this point in time.)

For each disk object there are 4 boolean keys that are all exclusive OR's from each other (i.e. only 1 can be true at any given time)

  1. is_top: boolean, represents whether this disk bay in the enclosure is a "top" slot
  2. is_front: boolean, represents whether this disk bay in the enclosure is a "front" slot
  3. is_rear: boolean, represents whether this disk bay in the enclosure is a "rear" slot
  4. is_internal: boolean, represents whether this disk bay in the enclosure is an "internal" slot

Tested these changes on an internal M40.

TODO: another PR to add the minis in this logic, it seems those are ignored in the enclosure_class.py::Enclosure object. Looks like a simple omission when this was written.

@yocalebo yocalebo requested a review from a team June 7, 2024 15:57
@bugclerk bugclerk changed the title add more keys to webui.enclosure.dashboard (per UI team) NAS-129460 / 24.10 / add more keys to webui.enclosure.dashboard (per UI team) Jun 7, 2024
@bugclerk
Copy link
Contributor

bugclerk commented Jun 7, 2024

@yocalebo yocalebo merged commit b924f97 into master Jun 7, 2024
2 of 3 checks passed
@yocalebo yocalebo deleted the NAS-129460 branch June 7, 2024 16:10
@bugclerk
Copy link
Contributor

bugclerk commented Jun 7, 2024

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Jun 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants