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

Topology screens - fix parseUrl to deal with hash router #4403

Merged
merged 1 commit into from
Aug 3, 2018
Merged

Topology screens - fix parseUrl to deal with hash router #4403

merged 1 commit into from
Aug 3, 2018

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Aug 2, 2018

Since #4284, our urls can end with a hash + a route.

But the topology "where am I" url parsing code failed to take that into account, resulting in gets for undefined urls:

angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js:14962 Error: [$http:badreq] Http request configuration url must be a string or a $sce trusted object.  Received: undefined
https://errors.angularjs.org/1.6.10/$http/badreq?p0=undefined
    at angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js:126
    at $http (angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js:12345)
    at Function.$http.(anonymous function) [as get] (http://localhost:3000/assets/angular/angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js?body=1:12626:18)
    at NetworkTopologyCtrl.controller.refresh (topology_service.self-c603c946f63ec7a10e96c995629c8421ebdce0c741ab4f07065db80c7cdb9c8e.js:287)
    at Object.mixinTopology (topology_service.self-c603c946f63ec7a10e96c995629c8421ebdce0c741ab4f07065db80c7cdb9c8e.js:326)
    at NetworkTopologyCtrl (network_topology_controller.self-066c5e882e6e89f073cc47542bc7827285fb13d00dc65516ac1bfac5a07f4cc9.js:10)
    at Object.invoke (angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js:5118)
    at $controllerInit (angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js:11140)
    at nodeLinkFn (angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js:10003)
    at compositeLinkFn (angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js:9312)

Cc @Hyperkid123

Since #4284,
our urls can end with a hash + a route.

But the topology "where am I" url parsing code failed to take that into account, resulting in gets for undefined urls:

    angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js:14962 Error: [$http:badreq] Http request configuration url must be a string or a $sce trusted object.  Received: undefined
    https://errors.angularjs.org/1.6.10/$http/badreq?p0=undefined
        at angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js:126
        at $http (angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js:12345)
        at Function.$http.(anonymous function) [as get] (http://localhost:3000/assets/angular/angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js?body=1:12626:18)
        at NetworkTopologyCtrl.controller.refresh (topology_service.self-c603c946f63ec7a10e96c995629c8421ebdce0c741ab4f07065db80c7cdb9c8e.js:287)
        at Object.mixinTopology (topology_service.self-c603c946f63ec7a10e96c995629c8421ebdce0c741ab4f07065db80c7cdb9c8e.js:326)
        at NetworkTopologyCtrl (network_topology_controller.self-066c5e882e6e89f073cc47542bc7827285fb13d00dc65516ac1bfac5a07f4cc9.js:10)
        at Object.invoke (angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js:5118)
        at $controllerInit (angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js:11140)
        at nodeLinkFn (angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js:10003)
        at compositeLinkFn (angular.self-f52e96200e93eab5e5989b1cfc1563dcd14957ec50245b37ea763e6abd127a54.js:9312)
@miq-bot
Copy link
Member

miq-bot commented Aug 2, 2018

Checked commit https://github.com/himdel/manageiq-ui-classic/commit/ca9ebc5b2a4c0d2fe0cfb72a4a8501b1caf17ead with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 🍰

@mzazrivec mzazrivec self-assigned this Aug 3, 2018
@mzazrivec mzazrivec added this to the Sprint 92 Ending Aug 13, 2018 milestone Aug 3, 2018
@mzazrivec mzazrivec merged commit a9add5d into ManageIQ:master Aug 3, 2018
@himdel himdel deleted the fix-topologies branch August 3, 2018 11:11
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