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

feat(inventoryList): issues/493 product disable guests setting #510

Merged
merged 2 commits into from
Nov 18, 2020

Conversation

cdcabrera
Copy link
Member

@cdcabrera cdcabrera commented Nov 17, 2020

What's included

  • feat(inventoryList): issues/493 product disable guests setting
    • inventoryList, hasGuests callback setting
    • openshiftView, rhelView, apply basic inventoryList settings

Notes

  • behind the scenes update, no visual changes
  • applies a settings callback that replaces the hasGuests check in inventoryList.js

How to test

Proxy run check

  1. update the NPM packages with $ yarn
  2. make sure Docker is running, plus on network, then
  3. $ yarn start:proxy
  4. confirm that guests/VMs are still expandable when "guests/VMs are greater than zero" for a listing. there should be no errors present
  5. if you wish to confirm the logic works, on one of the product views you can update the initialInventorySettings object with the following snippet, where the "greater than one" represents how many guests it takes to disable the expandable section. After updating a view, hit refresh and you should no longer see an expandable section on the targeted row entries.
       ...
       initialInventorySettings: {
          hasGuests: data => {
             console.log(data);
             const { numberOfGuests = 0, subscriptionManagerId = null } = data;
             return numberOfGuests > 1 && subscriptionManagerId;
          }
      },
       ...
    

Example

...

Updates issue/story

#493

* inventoryList, hasGuests callback setting
* openshiftView, rhelView, apply basic inventoryList settings
@cdcabrera cdcabrera merged commit dcc2b5f into RedHatInsights:ci Nov 18, 2020
cdcabrera added a commit that referenced this pull request Nov 19, 2020
* inventoryList, hasGuests callback setting
* openshiftView, rhelView, apply basic inventoryList settings
cdcabrera added a commit that referenced this pull request Dec 2, 2020
* inventoryList, hasGuests callback setting
* openshiftView, rhelView, apply basic inventoryList settings
cdcabrera added a commit that referenced this pull request Dec 3, 2020
* inventoryList, hasGuests callback setting
* openshiftView, rhelView, apply basic inventoryList settings
cdcabrera added a commit that referenced this pull request Dec 14, 2020
* inventoryList, hasGuests callback setting
* openshiftView, rhelView, apply basic inventoryList settings
cdcabrera added a commit that referenced this pull request Dec 15, 2020
* inventoryList, hasGuests callback setting
* openshiftView, rhelView, apply basic inventoryList settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant