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(core/infrastructure): Fix deep links with filters #7459

Conversation

christopherthielen
Copy link
Contributor

This fixes a problem where deep links to infrastructure items (such as an instance chiclet) where filters are applied will lose the filters when the deep link is activated. This was due to a but introduced when refactoring the filter save/restore code a few months back. We started using router hooks to manage saving/restoring the filters. However, the case where a user was navigating deeply was not accounted for in the router trigger criteria. It only took effect when the top level view was activated.

This change switches to triggering the router hook on a wildcard glob on the beginning and end of the state names.
This causes the AngularJS compatibility code to be run whether you're activating the clusters tab, or deep linking to an instance within the clusters tab.

This fixes a problem where deep links to infrastructure items (such as an instance chiclet) where filters are applied will lose the filters when the deep link is activated.  This was due to a but introduced when refactoring the filter save/restore code a few months back.  We started using router hooks to manage saving/restoring the filters.  However, the case where a user was navigating deeply was not accounted for in the router trigger criteria.  It only took effect when the top level view was activated.

This change switches to triggering the router hook on a wildcard glob on the beginning and end of the state names.
This causes the AngularJS compatibility code to be run whether you're activating the clusters tab, or deep linking to an instance _within_ the clusters tab.
@christopherthielen christopherthielen merged commit f41d955 into spinnaker:master Sep 30, 2019
@christopherthielen christopherthielen deleted the infrastructure-view-deep-link-strips-filters branch September 30, 2019 17:20
christopherthielen added a commit to christopherthielen/deck that referenced this pull request Sep 30, 2019
57d28c9 fix(core/task): properly cleanup TaskMonitor polling, fix digest thrashing (spinnaker#7458)
564af88 feat(displayName): Adding display name property for the bakery baseOS options (spinnaker#7464)
e0c57af fix(bakeManifest): fix bake manifest UI rendering (spinnaker#7463)
f41d955 fix(core/infrastructure): Fix deep links with filters (spinnaker#7459)
01bc0da fix(help text): update webhook help text (spinnaker#7456)
53300b1 refactor(core/validation): move FormValidator classes to separate files (spinnaker#7460)
1873094 feat(core/utils): Add `traverseObject` which deeply walks object properties (spinnaker#7452)
f535e52 refactor(pipeline): reactify pipeline config actions dropdown (spinnaker#7447)
677ab6b fix(bake/kustomize): fix name validation (spinnaker#7450)
4f24db3 fix(core/pipeline): Revision history is vertically challenged in Safari (spinnaker#7449)
592e74f feat(core/utils): Add 'api' to window.spinnaker object for interactive debugging (spinnaker#7439)
585ac15 fix(pipeline): unset `locked` instead of `lock` when unlocking pipeline (spinnaker#7445)
67fc87e fix(core/pipeline): "Depends On" doesn't always update when reverting (spinnaker#7441)
bd4ba0e fix(core/pipeline): Fix revert button for non-templated pipelines (spinnaker#7440)
45f3c24 feat(core/presentation): Migrate form validation API to class-based API
447d76f fix(core/presentation): In min/max validators, validate that the value is a number
christopherthielen added a commit that referenced this pull request Sep 30, 2019
57d28c9 fix(core/task): properly cleanup TaskMonitor polling, fix digest thrashing (#7458)
564af88 feat(displayName): Adding display name property for the bakery baseOS options (#7464)
e0c57af fix(bakeManifest): fix bake manifest UI rendering (#7463)
f41d955 fix(core/infrastructure): Fix deep links with filters (#7459)
01bc0da fix(help text): update webhook help text (#7456)
53300b1 refactor(core/validation): move FormValidator classes to separate files (#7460)
1873094 feat(core/utils): Add `traverseObject` which deeply walks object properties (#7452)
f535e52 refactor(pipeline): reactify pipeline config actions dropdown (#7447)
677ab6b fix(bake/kustomize): fix name validation (#7450)
4f24db3 fix(core/pipeline): Revision history is vertically challenged in Safari (#7449)
592e74f feat(core/utils): Add 'api' to window.spinnaker object for interactive debugging (#7439)
585ac15 fix(pipeline): unset `locked` instead of `lock` when unlocking pipeline (#7445)
67fc87e fix(core/pipeline): "Depends On" doesn't always update when reverting (#7441)
bd4ba0e fix(core/pipeline): Fix revert button for non-templated pipelines (#7440)
45f3c24 feat(core/presentation): Migrate form validation API to class-based API
447d76f fix(core/presentation): In min/max validators, validate that the value is a number
Jammy-Louie pushed a commit to pivotal/deck that referenced this pull request Oct 2, 2019
This fixes a problem where deep links to infrastructure items (such as an instance chiclet) where filters are applied will lose the filters when the deep link is activated.  This was due to a but introduced when refactoring the filter save/restore code a few months back.  We started using router hooks to manage saving/restoring the filters.  However, the case where a user was navigating deeply was not accounted for in the router trigger criteria.  It only took effect when the top level view was activated.

This change switches to triggering the router hook on a wildcard glob on the beginning and end of the state names.
This causes the AngularJS compatibility code to be run whether you're activating the clusters tab, or deep linking to an instance _within_ the clusters tab.
Jammy-Louie pushed a commit to pivotal/deck that referenced this pull request Oct 2, 2019
57d28c9 fix(core/task): properly cleanup TaskMonitor polling, fix digest thrashing (spinnaker#7458)
564af88 feat(displayName): Adding display name property for the bakery baseOS options (spinnaker#7464)
e0c57af fix(bakeManifest): fix bake manifest UI rendering (spinnaker#7463)
f41d955 fix(core/infrastructure): Fix deep links with filters (spinnaker#7459)
01bc0da fix(help text): update webhook help text (spinnaker#7456)
53300b1 refactor(core/validation): move FormValidator classes to separate files (spinnaker#7460)
1873094 feat(core/utils): Add `traverseObject` which deeply walks object properties (spinnaker#7452)
f535e52 refactor(pipeline): reactify pipeline config actions dropdown (spinnaker#7447)
677ab6b fix(bake/kustomize): fix name validation (spinnaker#7450)
4f24db3 fix(core/pipeline): Revision history is vertically challenged in Safari (spinnaker#7449)
592e74f feat(core/utils): Add 'api' to window.spinnaker object for interactive debugging (spinnaker#7439)
585ac15 fix(pipeline): unset `locked` instead of `lock` when unlocking pipeline (spinnaker#7445)
67fc87e fix(core/pipeline): "Depends On" doesn't always update when reverting (spinnaker#7441)
bd4ba0e fix(core/pipeline): Fix revert button for non-templated pipelines (spinnaker#7440)
45f3c24 feat(core/presentation): Migrate form validation API to class-based API
447d76f fix(core/presentation): In min/max validators, validate that the value is a number
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
This fixes a problem where deep links to infrastructure items (such as an instance chiclet) where filters are applied will lose the filters when the deep link is activated.  This was due to a but introduced when refactoring the filter save/restore code a few months back.  We started using router hooks to manage saving/restoring the filters.  However, the case where a user was navigating deeply was not accounted for in the router trigger criteria.  It only took effect when the top level view was activated.

This change switches to triggering the router hook on a wildcard glob on the beginning and end of the state names.
This causes the AngularJS compatibility code to be run whether you're activating the clusters tab, or deep linking to an instance _within_ the clusters tab.
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
57d28c9 fix(core/task): properly cleanup TaskMonitor polling, fix digest thrashing (spinnaker#7458)
564af88 feat(displayName): Adding display name property for the bakery baseOS options (spinnaker#7464)
e0c57af fix(bakeManifest): fix bake manifest UI rendering (spinnaker#7463)
f41d955 fix(core/infrastructure): Fix deep links with filters (spinnaker#7459)
01bc0da fix(help text): update webhook help text (spinnaker#7456)
53300b1 refactor(core/validation): move FormValidator classes to separate files (spinnaker#7460)
1873094 feat(core/utils): Add `traverseObject` which deeply walks object properties (spinnaker#7452)
f535e52 refactor(pipeline): reactify pipeline config actions dropdown (spinnaker#7447)
677ab6b fix(bake/kustomize): fix name validation (spinnaker#7450)
4f24db3 fix(core/pipeline): Revision history is vertically challenged in Safari (spinnaker#7449)
592e74f feat(core/utils): Add 'api' to window.spinnaker object for interactive debugging (spinnaker#7439)
585ac15 fix(pipeline): unset `locked` instead of `lock` when unlocking pipeline (spinnaker#7445)
67fc87e fix(core/pipeline): "Depends On" doesn't always update when reverting (spinnaker#7441)
bd4ba0e fix(core/pipeline): Fix revert button for non-templated pipelines (spinnaker#7440)
45f3c24 feat(core/presentation): Migrate form validation API to class-based API
447d76f fix(core/presentation): In min/max validators, validate that the value is a number
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.

3 participants