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

Broken endpoint fix for dialog from GO instance detail page #6049

Closed

Conversation

pkomanek
Copy link
Contributor

Description

Fixing broken endpoint for dialog from GenericObject(GO) detail page. As we can see from logs in BZ, endpoint url contains GO ID instead of related Service ID. In the case where there is no such a service with same ID as GO, you will get the error.

Links

Steps for Testing/QA

Steps are included in the BZ above

@miq-bot miq-bot added the wip label Aug 16, 2019
@pkomanek pkomanek force-pushed the generic_object_dialog_endpoint_fix branch from 55b40bf to ec83744 Compare August 16, 2019 16:24
@pkomanek pkomanek changed the title [WIP] Broken endpoint fix for dialog from GO instance detail page Broken endpoint fix for dialog from GO instance detail page Aug 16, 2019
@miq-bot miq-bot removed the wip label Aug 16, 2019
@miq-bot
Copy link
Member

miq-bot commented Aug 16, 2019

Checked commit pkomanek@ec83744 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. ⭐

@h-kataria
Copy link
Contributor

else
# Determine related service ID for selected GO
@breadcrumbs.last[:url][/\/\d*\?/][1..-2]
end
Copy link
Member

Choose a reason for hiding this comment

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

We should not determine ID from breadcrumbs :-(

Copy link
Member

Choose a reason for hiding this comment

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

Breadcrumbs are a presentation "detail". The should not be used to determine what's an ID of an object we are going to work with.

Such code is guaranteed to cause regression. Not now. But once someone tries to actually fix this.

@pkomanek pkomanek closed this Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants