Skip to content
This repository has been archived by the owner on Nov 13, 2019. It is now read-only.

Remove whitelist of apps that appear in navbar by default #295

Closed
ericfranz opened this issue Dec 15, 2017 · 6 comments · Fixed by #385
Closed

Remove whitelist of apps that appear in navbar by default #295

ericfranz opened this issue Dec 15, 2017 · 6 comments · Fixed by #385
Assignees
Milestone

Comments

@ericfranz
Copy link
Contributor

ericfranz commented Dec 15, 2017

There should be a "whitelist" mode. When it is false, the "whitelist" array (currently NavConfig.categories simply specifies the order of the first categories that appear. Any other categories are auto-appended to the end of this list. Then we would default it to false and instruct users who are updating (OOD 1.4?) to enable whitelist mode if suddenly apps appear.

Old description:

Instead of having a default whitelist for the navbar be an ordered list of categories:

  • Files, Jobs, Clusters, Interactive Apps

Lets remove the whitelist by default. If we did that we would order alphabetically, resulting in:

  • Clusters, Files, Interactive Apps, Jobs

Since Files are used the most, we would rename Clusters to Systems, and the default OOD installation would result in this navigation:

  • Files, Interactive Apps, Jobs, Systems

This way, if I add a new app to my default OOD install with the category "Reports" it will immediately appear in the navbar, without any modification in an initializer to specify the whitelist or change the order:

  • Files, Interactive Apps, Jobs, Reports, Systems

For OSC, we could still use our whitelist to limit what drop downs appear (so if we just want Files, Interactive Apps, Jobs, Systems in the top menu, and All Apps to access other apps in other categories in the future).

This seems like a small change that could make custom app deployment easier at other centers.

@ericfranz
Copy link
Contributor Author

This change could also be helpful for the webinar. Though it might annoy some people who have written documentation or done video tutorials of OnDemand, that shows the Clusters menu instead and a different order for the menu.

@nickjer nickjer self-assigned this Apr 3, 2018
@nickjer
Copy link
Contributor

nickjer commented Apr 3, 2018

How will we handle the view for "All Apps"?

image

Maybe we use Masonry?

@ericfranz
Copy link
Contributor Author

Masonry doesn't place apps reliably in the same location every time, so it isn't great for an app launch interface. Also, there is a much simpler solution than the one I suggested.

There should be a "whitelist" mode. When it is false, the "whitelist" array (currently NavConfig.categories simply specifies the order of the first categories that appear. Any other categories are auto-appended to the end of this list. Then we would default it to false and instruct users who are updating (OOD 1.4?) to enable whitelist mode if suddenly apps appear.

@ericfranz
Copy link
Contributor Author

The All Apps view though can definitely be redesigned if it does not handle new categories well, since it is not a documented feature yet.

@ericfranz ericfranz added this to the OOD1.4 milestone Jul 30, 2018
@ericfranz
Copy link
Contributor Author

NavConfig.categories_whitelist? returns true or false, and NavConfig.categories_whitelist = true

We should be able to add automated tests for this to the https://github.com/OSC/ood-dashboard/blob/master/test/controllers/dashboard_controller_test.rb file. A new fixtures directories would be added, one with at least one gateway apps category (like the PseudoFuN app). Tests should include:

  1. NavConfig.categories is empty and whitelist is enabled results in no app menus being created
  2. NavConfig.categories is set to default and whitelist is enabled results in app menus excluding gateways app
  3. NavConfig.categories is set to default listing and whitelist is disabled results in app menus including gateways app menu in end
  4. NavConfig.categories is set to nil or empty array and whitelist is disabled means that all the possible app menus appear, but in alphabetical order

@ericfranz
Copy link
Contributor Author

ericfranz commented Aug 1, 2018

Discussed offline. Talked about adding a OodAppGroup.order method which has the same signature as OodAppGroup.select but instead of filtering the array, it just re-orders it, so that any groups in the titles array with group titles matching the strings in the array appear first in the same order as the titles array, and the remaining groups (if any) are sorted in alphabetical order.

Then after OodAppGroup.order is working, use it in set_nav_groups if whitelist mode is disabled.

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

Successfully merging a pull request may close this issue.

3 participants