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

Fix broken links in network tab #412

Merged
merged 1 commit into from
Nov 7, 2019
Merged

Fix broken links in network tab #412

merged 1 commit into from
Nov 7, 2019

Conversation

steverydz
Copy link
Contributor

@steverydz steverydz commented Nov 6, 2019

Done

Add correct href values for the links to DHCP snippet settings and DHCP snippets docs on the network tab of a machine detail page. Fixes #396 and #392.

QA

  • Go to /MAAS/#/machines
  • Go to the detail page of a machine that has DHCP snippets (on Karura actual-swine.maas qualifies)
  • Go to the network tab of the machine
  • Click the About DHCP snippets link and see that you are taken to https://maas.io/docs/dhcp in a new tab
  • Click the All snippets: Settings > DHCP snippets link and see that you are taken to /MAAS/r/settings/dhcp

@@ -192,11 +192,11 @@ <h2 data-ng-click="snippetAddCancel()" class="u-float--left">Adding snippet</h2>
</div>
<ul class="p-inline-list--middot">
<li class="p-inline-list__item" data-ng-if="!hideAllSnippetsLink">
<a href="/#/settings/dhcp">All snippets: Settings > DHCP snippets</a>
<a href="/MAAS/r/settings/dhcp">All snippets: Settings > DHCP snippets</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to use the env vars here to add the "/MAAS" and "/r" parts? In ./legacy/.env there should be two variables:

BASENAME="/MAAS"
REACT_BASENAME="/r"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@huwshimi No, they don't work in the HTML templates

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nevermind - I found a way :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for figuring that out! Looks great.

Copy link
Contributor

@Caleb-Ellis Caleb-Ellis left a comment

Choose a reason for hiding this comment

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

LGTM!

@steverydz steverydz merged commit f3ede05 into canonical:master Nov 7, 2019
@steverydz steverydz deleted the fix-broken-links-in-network-tab branch November 7, 2019 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken links on Network tab, when DHCP snippets present
3 participants