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

DialogUser - use DialogData.outputConversion before submit and refresh #6291

Merged
merged 4 commits into from Nov 4, 2019
Merged

DialogUser - use DialogData.outputConversion before submit and refresh #6291

merged 4 commits into from Nov 4, 2019

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Oct 10, 2019

Depends on ManageIQ/ui-components#422

Right now, when submitting a service dialog,
we simply take the dialogData object, convert to JSON and send to the API.

To allow for output conversions, adding a DialogData.outputConversion method,
which should return the dialogData in a suitable format.

(Right now, all this really means is that it converts Dates to strings before JSON stringification.)

And the same needs to happen in refreshField for dynamic fields.

https://bugzilla.redhat.com/show_bug.cgi?id=1744413

@miq-bot add_label bug, ivanchuk/yes

@miq-bot miq-bot changed the title DialogUser - use DialogData.outputConversion before submit [WIP] DialogUser - use DialogData.outputConversion before submit Oct 10, 2019
@himdel
Copy link
Contributor Author

himdel commented Oct 22, 2019

@miq-bot remove_label wip

(still depends on ui-components though)

@miq-bot miq-bot changed the title [WIP] DialogUser - use DialogData.outputConversion before submit DialogUser - use DialogData.outputConversion before submit Oct 22, 2019
@miq-bot miq-bot removed the wip label Oct 22, 2019
@himdel himdel requested a review from eclarizio October 22, 2019 23:22
@himdel himdel changed the title DialogUser - use DialogData.outputConversion before submit DialogUser - use DialogData.outputConversion before submit and refresh Oct 22, 2019
@martinpovolny
Copy link

Restarted a travis job.

@himdel
Copy link
Contributor Author

himdel commented Oct 23, 2019

The test failure will stay here until we have the ui-components change in - it fails because the function is not there yet. (TypeError: DialogData.outputConversion is not a function)

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.

As mentioned, ManageIQ/ui-components#422 needs to be merged first, but 👍on this

right now, when submitting a service dialog,
we simply take the dialogData object, convert to JSON and send to the API.

To allow for output conversions, adding a DialogData.outputConversion method,
which should return the dialogData in a suitable format.

(Right now, all this really means is that it converts Dates to strings before JSON stringification.)

https://bugzilla.redhat.com/show_bug.cgi?id=1744413
… unify with SUI

also, we can get rid of the API angular promise to Promise conversion
with the $scope.$apply() removal in dialogUser.ts in ui-components

https://bugzilla.redhat.com/show_bug.cgi?id=1744413
@himdel
Copy link
Contributor Author

himdel commented Nov 4, 2019

(rebased on top of #6371, should be mergable)

@himdel
Copy link
Contributor Author

himdel commented Nov 4, 2019

(for ivanchuk: depends on #6373)

…a being a string

and a surprising promise mock
@miq-bot
Copy link
Member

miq-bot commented Nov 4, 2019

Checked commits https://github.com/himdel/manageiq-ui-classic/compare/8261b82b980d16226fe94668126fc52f80b3ecf9~...d46b0ad3b9b52e53492e5bc15e40fbabb55f3f92 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 👍

@mzazrivec mzazrivec self-assigned this Nov 4, 2019
@mzazrivec mzazrivec added this to the Sprint 124 Ending Nov 11, 2019 milestone Nov 4, 2019
@mzazrivec mzazrivec merged commit c5c9ebd into ManageIQ:master Nov 4, 2019
@himdel himdel deleted the bz1744413 branch November 4, 2019 15:14
simaishi pushed a commit that referenced this pull request Nov 4, 2019
DialogUser - use DialogData.outputConversion before submit and refresh

(cherry picked from commit c5c9ebd)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1768456
@simaishi
Copy link
Contributor

simaishi commented Nov 4, 2019

Ivanchuk backport details:

$ git log -1
commit 03a305ccfac3e72a4ba0c6b3b7397795b8620445
Author: Milan Zázrivec <mzazrivec@redhat.com>
Date:   Mon Nov 4 15:54:50 2019 +0100

    Merge pull request #6291 from himdel/bz1744413
    
    DialogUser - use DialogData.outputConversion before submit and refresh
    
    (cherry picked from commit c5c9ebd194ee0f55632eda855ff3a1146b1375be)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1768456

@himdel
Copy link
Contributor Author

himdel commented Nov 14, 2019

Hammer version in #6415

@simaishi
Copy link
Contributor

Backported to hammer via #6415

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.

None yet

6 participants