-
Notifications
You must be signed in to change notification settings - Fork 366
Include invalid workflows and disable them in the embedded workflow component #9708
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
Include invalid workflows and disable them in the embedded workflow component #9708
Conversation
9fb7738 to
15154ed
Compare
|
@miq-bot add-reviewer @GilbertCherrie |
|
@agrare Please also take a look |
|
I like the idea of greying them out - perhaps we can modify the hover text to say |
|
Weird question - if a valid workflow was chosen as an entrypoint, then the workflow becomes invalid, then we reenter this selection page, is the invalid workflow still selected? |
|
👍 for having
I'd expect that it would be selected but you would be able to submit the form. Maybe we have some way of indicating on the parent object (service template or dialog) that there is an invalid workflow selected. This might be entirely new, I don't know what happens if you delete an automate method that was selected by a service template or dialog but it would be good to check. |
|
Oh i like the idea of the parent service catalog item having an indicator of an invalid workflow file, or perhaps mark the service catalog item as invalid somehow. |
Yeah this was exactly what I was thinking, if we had a |
I'm certain it's just broken. There are a number of ways to "break" a service catalog item, such as deleting the automate entry point and the other big one is deleting the underlying VM template (or associated resource) I've wanted a way to mark service catalog items as "orphaned" or "invalidated" or something for a while now (ref) |
|
@elsamaryv I know you have to rebase this on @GilbertCherrie's changes but just in case these issues aren't resolved in his branch: I marked one of my workflows as invalid, and have a valid TFE ConfigurationScriptPayload: In the ServiceCatalog entrypoint selection I see that I can select provision.asl, and my TFE workspace is in the list greyed out: I'd expect the provision.asl to be greyed out, and the TFE workspace to not show up at all. In the automate dialog editor I don't see the TFE workspace, but I can select an invalid workflow: |
15154ed to
5d6c514
Compare
@agrare Should the dialog editor behave the same way — by keeping invalid workflows disabled, or should it hide them entirely? |
I think it should work the same way keeping invalid workflows disabled. |
|
@elsamaryv I thought it was the same component (@GilbertCherrie ?) so yes it should behave the same way. |
|
Technically there are 2 components - one is a react component, the other is an angular component (I believe in the ui-components repo). Ideally they should work the same way. |
I was going off of this comment #9670 (comment) |
|
@agrare oh yeah I thought they used the same underlying code but I guess not. @Fryguy is right the dialog editor code is here: ManageIQ/ui-components#471. Either way we can't make both components share the same code (which is what I think you initially requested) until that dialog form is converted to react. That pr is in progress by @elsamaryv: #9592. |
Done |
Hi @agrare , I’ve made the updates except for the Service Dialog Editor. Could you please verify the changes on your side? |
Since the react conversion is in progress, @agrare @Fryguy do you think it makes sense to handle the invalid workflow for dialog editor in this PR? |
|
@elsamaryv even if they are two different components for now, they definitely should behave the same way |
|
@elsamaryv you can make a pr to the ui-components repo and change that component there if we need to |
b81a242 to
c3a7ef1
Compare
@agrare @Fryguy @GilbertCherrie Please review this PR for the changes in angular component (Service Dialog editor) |
|
That PR was merged and released in v1.6.1 https://github.com/ManageIQ/ui-components/releases/tag/v1.6.1 |
|
Hi @agrare @Fryguy @GilbertCherrie, Is this PR good to merge? |
agrare
left a comment
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.
| <span | ||
| className="bx--front-line" | ||
| title="Delete" | ||
| title="Click to delete this mapping" |
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.
hey @elsamaryv I just noticed this, this doesn't look related to the invalid embedded workflows change was this added accidentally?
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.
The tests were failing due to outdated snapshots, which were unrelated to the current task. Would it have been better to update them in a separate PR?
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.
No, that's fine - strange they were broken though - I would have thought that would break master.
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.
Actually - can you verify these are broken on master and maybe move into a separate PR? It makes me think something in this PR is changing these.
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.
Yeah I was thinking this might have been from the updated ui-components, in which case should be fixed in a separate PR.
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.
ohhh I hadn't thought of that - good point.
| <span | ||
| className="bx--front-line" | ||
| title="" | ||
| title="Enforce a Value" |
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.
Same with these
| const cellTitle = cell.data.title ? cell.data.title : cell.value; | ||
| const truncateText = ( | ||
| <span title={cell.value} className={classNames('bx--front-line', wrapClass, longerTextClass)}> | ||
| <span title={cellTitle} className={classNames('bx--front-line', wrapClass, longerTextClass)}> |
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.
Okay, so this is the change that caused the snapshot mismatch
@agrare @Fryguy
I made this change to modify the hover text for Invalid workflows
#9708 (comment)






Before
After
@miq-bot add-label enhancement