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 nav bar item to show HCP link status and encourage folks to link #20370

Merged
merged 20 commits into from
Feb 1, 2024

Conversation

chris-hut
Copy link
Contributor

@chris-hut chris-hut commented Jan 26, 2024

Description

We want people to link to HCP!
This PR adds a nice little nav bar item to the sidebar letting users view their linked clusters in HCP as well as begin the linking process. (Although the actual linking start - with modal will happen in https://hashicorp.atlassian.net/browse/CC-7147

Testing & Reproduction steps

  • Just open this up
    • yarn start
    • localhost:4200/ui
  • You should see the purple banner and a new nav icon in the sidebar
  • If you dismiss the banner, the New Item should go away
  • If you've already linked your cluster (Update this to STATE_TRUE) and restart ui server - you should see a link to HCP consul
  • If you pretend to be an hcp hosted consul, you should see the ol Back to HCP link
    • To enable: Scenario('CONSUL_HCP_ENABLE=1'); and Scenario('CONSUL_HCP_URL=https://corn.com')
    • To disable: delete them from your cookies

Links

Screenshots

image
image

image
image

References

image

@chris-hut chris-hut added theme/ui Anything related to the UI pr/no-changelog PR does not need a corresponding .changelog entry pr/no-backport labels Jan 26, 2024
Base automatically changed from CC-7146/convert-consul-hcp-to-a-simpler-component-for-some-upcoming-changes to main January 27, 2024 00:39
Comment on lines +8 to +10
export default class OperatorAbility extends BaseAbility {
resource = 'operator';
}
Copy link
Contributor Author

@chris-hut chris-hut Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would love some eyes on this, from Melissa, we need the operator write permission, is this enough?

By adding this I'm able to do this.abilities.can('write operators'), and it seems to be checking the right permission

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@chris-hut chris-hut force-pushed the CC-7146/hcp-link-item-in-the-nav-bar branch from c2c1d89 to ce347ef Compare January 31, 2024 00:02
Copy link
Contributor

@valeriia-ruban valeriia-ruban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@chris-hut chris-hut merged commit 22e6ce0 into main Feb 1, 2024
59 checks passed
@chris-hut chris-hut deleted the CC-7146/hcp-link-item-in-the-nav-bar branch February 1, 2024 23:04
@david-yu david-yu mentioned this pull request Feb 6, 2024
4 tasks
@chris-hut chris-hut restored the CC-7146/hcp-link-item-in-the-nav-bar branch February 9, 2024 21:29
chris-hut added a commit that referenced this pull request Mar 11, 2024
chris-hut added a commit that referenced this pull request Mar 13, 2024
* Revert "feat: add alert to link to hcp modal to ask a user refresh a page; up… (#20682)"

This reverts commit dd833d9.

* Revert "chor: change cluster name param to have datacenter.name as default value (#20644)"

This reverts commit 8425cd0.

* Revert "chor: adds informative error message when acls disabled and read-only… (#20600)"

This reverts commit 9d712cc.

* Revert "Cc 7147 link to hcp modal (#20474)"

This reverts commit 8c05e57.

* Revert "Add nav bar item to show HCP link status and encourage folks to link (#20370)"

This reverts commit 22e6ce0.

* Revert "Cc 7145 hcp link status api (#20330)"

This reverts commit 049ca10.

* Revert "💜 Cc 7187/purple banner for linking existing clusters (#20275)"

This reverts commit 5119667.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-backport pr/no-changelog PR does not need a corresponding .changelog entry theme/ui Anything related to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants