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 hashroute redirect with machine listing fallthrough. #1177

Merged
merged 4 commits into from
May 29, 2020

Conversation

squidsoup
Copy link
Contributor

Done

Add redirect for legacy hash-based routes, with a fall through to the machine listing.

QA

  • Visit a deprecated route such as /MAAS/#/controllers, you should be redirected to /MAAS/l/controllers.
  • Visit an invalid route such as /MAAS/l/foo, you should be redirected to the machine listing.

.state("podDetails", {
url: prefixRoute("/pod/:id"),
redirectTo: prefixRoute("/kvm/:id"),
})
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just reformatting here.

@@ -227,6 +233,26 @@ const configureRoutes = ($stateProvider, $urlRouterProvider) => {
template: dashboardTmpl,
controller: "DashboardController",
});

$urlRouterProvider.otherwise(($injector, $location) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unfortunately $rootScope isn't available in the angularjs config function, so I can't reuse caleb's nice navigation functions.

@squidsoup squidsoup merged commit 60b84f0 into canonical:master May 29, 2020
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.

2 participants