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

[HAMMER] DialogUser - use DialogData.outputConversion before submit and refresh #6415

Merged
merged 5 commits into from Nov 18, 2019
Merged

Conversation

himdel
Copy link
Contributor

@himdel himdel commented Nov 14, 2019

This is a hammer version of #6291
Depends on #6408 (merged and rebased)

(there was a conflict with dependency injection in dialog_user - there is no dialogReplaceData in hammer)


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

@mzazrivec
Copy link
Contributor

@himdel The current CI failures seem related.

@himdel
Copy link
Contributor Author

himdel commented Nov 18, 2019

Ah, we don't have object.values shimmed in hammer, looking :)

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
(cherry picked from commit 8261b82)
… 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
(cherry picked from commit 178a283)
…a being a string

and a surprising promise mock

(cherry picked from commit d46b0ad)
just for the specs, we don't support browsers without it
@miq-bot
Copy link
Member

miq-bot commented Nov 18, 2019

Checked commits https://github.com/himdel/manageiq-ui-classic/compare/40b825d55b3b6661b73faaf674efe201a64158af~...57a6c8129d37d109688626996833dc6fe26fd4fb with ruby 2.5.5, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 🍰

@himdel
Copy link
Contributor Author

himdel commented Nov 18, 2019

Whew, spec:javascript is finally green :)

@simaishi simaishi merged commit 6a9e8c2 into ManageIQ:hammer Nov 18, 2019
@simaishi simaishi added this to the Sprint 125 Ending Nov 25, 2019 milestone Nov 18, 2019
@himdel himdel deleted the hammer-6291 branch November 18, 2019 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants