-
Notifications
You must be signed in to change notification settings - Fork 43
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
[#400] Plan details playbooks support #442
[#400] Plan details playbooks support #442
Conversation
61848e7
to
8135419
Compare
}} | ||
<DropdownButton | ||
id={`${task.id}-${task.descriptionPrefix}_download_log_dropdown`} | ||
title="Download Log" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__('Download Log')
{__('Download Log')} | ||
</a> | ||
{task.options.showPreMigrationOption && ( | ||
<MenuItem eventKey="preMigration">Pre-migration log</MenuItem> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more 18n "Pre-migration" / "Post-migration"
517c077
to
def1e45
Compare
7676f71
to
bca7de1
Compare
dispatch({ | ||
type: V2V_NOTIFICATION_ADD, | ||
message: successMsg, | ||
notificationType: 'success', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit... later on - we can move notificationType
to a constant...
|
||
if (hasPlaybookService) { | ||
taskDetails.options.prePlaybookRunning = | ||
task.options.playbooks.pre && task.options.playbooks.pre.job_state === 'active'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use PLAN_JOB_STATE constants later on - not a blocker at all right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preliminary checks are all good here...
Would be nice to merge and get QE feedback.
f91dac0
to
2fe745f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😋 👍 mostly majorly ok with this, just a few nits and questions 🙇♀️ 🌄
itzah wonderful addition! 🤗
type: DOWNLOAD_LOG_COMPLETED, | ||
payload: task.id | ||
}); | ||
dispatch({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe we need to add this notification, as this is a catch on an API.get
miq notification system should take over signaling the error should any arise...
@@ -57,6 +67,20 @@ const processVMTasks = vmTasks => { | |||
options: {} | |||
}; | |||
|
|||
const hasPlaybookService = task.options.playbooks; | |||
|
|||
if (hasPlaybookService) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super minor nit, but we don't use hasPlaybookService
anywhere but here, why not save a line, just do task.options.playbooks
here?
overlayTriggerClick = task => { | ||
if (task.options.playbooks) { | ||
const playbookStatuses = task.options.playbooks; | ||
let runningPlaybook; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another nit... any chance we can set this = null? I know I know, undefined will also be evaluated to false on line 258.... 😬 (if not 'saul good 🤗)
e.preventDefault(); | ||
downloadLogAction(task); | ||
}} | ||
<DropdownButton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok quick question.. I have no idea how this worked before... but If a user doesn't use a pre/post migration playbook, will they still have a log to download here? If so... maybe there should be a third option shown... to download that...
(before we had playbook support there were logs to download, just want to make sure we don't lose those)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, you're totally correct. The regular Migration Log
option is down here line 494
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which, apparently I didn't translate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh see thats what I meant! 😏 🤣
35faee6
to
039b918
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yer a 👨🎤 @michaelkro, this is wonderful 🤗 💃
* Dropdown button for log downloads * Pre/post playbook logs will be obtained from the stdout attribute on their associated OrchestrationStack * Update task info popover to indicate when a pre/post playbook is running * Fetch running playbook template in order to display name in popover
039b918
to
3d3fe1d
Compare
Looks good! Will be testing this some more on the appliance today. |
Cherry picked from commit 3d3fe1d Upstream PR: ManageIQ#442 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1608420
Cherry picked from commit 3d3fe1d Upstream PR: ManageIQ#442 Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1608420
[#400] Plan details playbooks support (cherry picked from commit 18e320d) https://bugzilla.redhat.com/show_bug.cgi?id=1608420
Gaprindashvili backport details:
|
@michaelkro @AparnaKarve Travis is now failing in Gaprindashvili branch. I think it's caused by this PR. Can you please take a look?
https://travis-ci.org/ManageIQ/miq_v2v_ui_plugin/jobs/410122179 |
@simaishi @AparnaKarve I've put up a PR against G to fix the errors #524 |
fixes #400
Notes
Will squash all the WIP commits after review (reason: see 2)DoneOne way to test this locally is toThings to checkreset --hard HEAD^^
. That will undo a cleanup commit and the commit that removes the mocked data/API responses. Using thenightly
db (or any db you have that has in progress plans), go toPlans in Progress
and click on any plan.Download Log
dropdownsScreens
Running Post-migration Playbook
No Playbooks
Running Pre-migration Playbook
Playbook Log Download Success
Playbook Log Download Failure
https://bugzilla.redhat.com/show_bug.cgi?id=1564250