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

Change service dialog api call to match CUI #1438

Merged
merged 1 commit into from
May 31, 2018

Conversation

d-m-u
Copy link
Contributor

@d-m-u d-m-u commented May 23, 2018

Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1578080

The classic ui api call for service dialogs is the one we should be using so we don't end up with eeeeeeeetooooomaaaaaany automate calls.

@d-m-u
Copy link
Contributor Author

d-m-u commented May 23, 2018

@eclarizio can you 👀 please?

@miq-bot miq-bot added the wip label May 23, 2018
@d-m-u d-m-u force-pushed the fixing_sui_api_call_to_match_cui branch from 25aeac6 to 4b05bc5 Compare May 23, 2018 15:27
@d-m-u d-m-u changed the title [WIP] Change service dialog api call to match CUI Change service dialog api call to match CUI May 23, 2018
@miq-bot miq-bot removed the wip label May 23, 2018
@d-m-u d-m-u force-pushed the fixing_sui_api_call_to_match_cui branch from 4b05bc5 to 9a2df89 Compare May 23, 2018 15:30
@d-m-u d-m-u changed the title Change service dialog api call to match CUI [WIP] Change service dialog api call to match CUI May 23, 2018
@miq-bot miq-bot added the wip label May 23, 2018
@@ -113,7 +113,7 @@ function Controller ($stateParams, CollectionsApi, EventNotifications, ShoppingC

init()
function setDialogUrl (serviceTemplateCatalogId) {
vm.dialogUrl = `service_catalogs/${serviceTemplateCatalogId}/service_templates`
vm.dialogUrl = `/api/service_dialogs/`
Copy link

Choose a reason for hiding this comment

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

@d-m-u
Can we use the href_slug here? it encapsulates the internal names so this doesn't have to be aware if its called service_catalogs or service_dialogs

@JPrause
Copy link
Member

JPrause commented May 23, 2018

@miq-bot add_label blocker

@JPrause
Copy link
Member

JPrause commented May 23, 2018

@d-m-u if this can be backported, can you add the gaprindashvili/yes label.

@d-m-u
Copy link
Contributor Author

d-m-u commented May 23, 2018

@eclarizio ya think should this be backported?

@chalettu
Copy link
Contributor

@d-m-u has this been tested with a drop down in a service dialog by chance?

Copy link
Member

@eclarizio eclarizio left a comment

Choose a reason for hiding this comment

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

The spec is broken since you didn't change it to expect the new URL, but otherwise I think it looks fine.

Also, yes, this should be backported since the BZ is requesting a fix for 5.9

@@ -136,7 +136,7 @@ function Controller ($stateParams, CollectionsApi, EventNotifications, ShoppingC
targetId: vm.serviceTemplate.id,
targetType: 'service_template'
}
const url = `${vm.dialogUrl}/${vm.serviceTemplate.id}`
const url = `${vm.dialogUrl}/${vm.dialogId}`
Copy link
Member

Choose a reason for hiding this comment

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

Ah, this won't work. You'll either have to use the id from one of the previous lines (idList.dialogId) or use vm.parsedDialogs.id.

@d-m-u d-m-u force-pushed the fixing_sui_api_call_to_match_cui branch from 9a2df89 to 70f1c3d Compare May 24, 2018 14:50
@d-m-u
Copy link
Contributor Author

d-m-u commented May 24, 2018

@miq-bot add_label gaprindashvili/yes

@@ -113,7 +113,7 @@ function Controller ($stateParams, CollectionsApi, EventNotifications, ShoppingC

init()
function setDialogUrl (serviceTemplateCatalogId) {
Copy link
Member

Choose a reason for hiding this comment

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

We can remove this argument now that we're not using it. Also will need to be removed from any callers.

@d-m-u d-m-u force-pushed the fixing_sui_api_call_to_match_cui branch 2 times, most recently from d19e172 to 266f1d8 Compare May 24, 2018 17:17
@d-m-u
Copy link
Contributor Author

d-m-u commented May 24, 2018

@chalettu yeah, it looks fine

@d-m-u d-m-u changed the title [WIP] Change service dialog api call to match CUI Change service dialog api call to match CUI May 24, 2018
@miq-bot miq-bot removed the wip label May 24, 2018
Copy link
Member

@AllenBW AllenBW left a comment

Choose a reason for hiding this comment

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

@d-m-u any chance yah can throw up a gif of the pr in action?

TOTALLY down with the change, just wanta seeeeeeee it... work......

@d-m-u d-m-u changed the title Change service dialog api call to match CUI [WIP] Change service dialog api call to match CUI May 29, 2018
@miq-bot miq-bot added the wip label May 29, 2018
@d-m-u d-m-u force-pushed the fixing_sui_api_call_to_match_cui branch 3 times, most recently from c42d731 to 8d9c6b9 Compare May 29, 2018 20:20
@d-m-u
Copy link
Contributor Author

d-m-u commented May 29, 2018

The request and the payload with correct values:

screen shot 2018-05-29 at 4 21 13 pm
screen shot 2018-05-29 at 4 21 02 pm

@d-m-u d-m-u changed the title [WIP] Change service dialog api call to match CUI Change service dialog api call to match CUI May 29, 2018
@d-m-u
Copy link
Contributor Author

d-m-u commented May 29, 2018

@miq-bot miq-bot removed the wip label May 29, 2018
AllenBW
AllenBW previously approved these changes May 30, 2018
Copy link
Member

@AllenBW AllenBW left a comment

Choose a reason for hiding this comment

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

LG2M

@eclarizio @chalettu yah good with this?

@miq-bot
Copy link
Member

miq-bot commented May 31, 2018

Checked commit d-m-u@03b12f0 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. 🍪

Copy link
Member

@eclarizio eclarizio left a comment

Choose a reason for hiding this comment

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

Yeah we can address the other issue in a separate PR.

👍

Copy link
Contributor

@chalettu chalettu left a comment

Choose a reason for hiding this comment

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

LGTM. Great work

Copy link
Member

@AllenBW AllenBW left a comment

Choose a reason for hiding this comment

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

🌮 💃

@AllenBW AllenBW merged commit c0f89fc into ManageIQ:master May 31, 2018
@himdel himdel added this to the Sprint 87 Ending Jun 4, 2018 milestone May 31, 2018
simaishi pushed a commit that referenced this pull request Jun 4, 2018
@simaishi
Copy link
Contributor

simaishi commented Jun 4, 2018

Gaprindashvili backport details:

$ git log -1
commit be89d8475ec00011f837708376ac3af5d5b27671
Author: Allen Wight <[email protected]>
Date:   Thu May 31 10:51:36 2018 -0400

    Merge pull request #1438 from d-m-u/fixing_sui_api_call_to_match_cui
    
    Change service dialog api call to match CUI
    (cherry picked from commit c0f89fc93a69c40af56b98f38f99134481edfe40)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1585709

@d-m-u d-m-u deleted the fixing_sui_api_call_to_match_cui branch July 9, 2018 13:32
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.

9 participants