Executions info panel tweaks#776
Conversation
…xecutions_info-panel-tweaks
…xecutions_info-panel-tweaks
…xecutions_info-panel-tweaks
…tiator, previousVersionName
…xecutions_info-panel-tweaks
…xecutions_info-panel-tweaks
jjoderis
left a comment
There was a problem hiding this comment.
Very nice UI.
One thing I'm not sure about is the fact that we show no information at all when no instance is selected. Some of the data exists outside the instance like the "Process/Step image", "Planned" Budget, some of the information in "Details" and the existing Variables shown in "Data". So it might make sense to show that data even when no instance is selected.
| const activityEntries: ReactNode[][] = []; | ||
|
|
||
| const activityLog: [string, 'INFO' | 'WARN', string][] = [ |
There was a problem hiding this comment.
I think as of now there is no indication in the logs of an instance that links a log output to a specific activity so this might be a bit harder to do with actual instance data.
There was a problem hiding this comment.
I think activity is just supposed to be the frontend name for the log display
| } | ||
| } | ||
|
|
||
| export async function getProcessVersion(processDefinitionsId?: string, versionId?: string) { |
There was a problem hiding this comment.
Why are the parameters optional?
| } | ||
|
|
||
| export async function getProcessVersion(processDefinitionsId?: string, versionId?: string) { | ||
| return processDefinitionsId && versionId |
There was a problem hiding this comment.
Please add a permissions check and optimally error handling similar to the other functions.
| status = instance.instanceState.reduce((overallState, state) => { | ||
| return ['ENDED', 'STOPPED'].includes(overallState) ? state : overallState; | ||
| }); |
There was a problem hiding this comment.
I'm not completely sure if I understand what this is doing. If you are checking if the instance is still running you could use the "isActive" function. There is also a "executionStatus" value on the extended instance info returned by the server that indicates if an instance is "Running", "Ended" or "Failed".
There was a problem hiding this comment.
Previously only the state of the first token was returned which resulted in situations were the instance was declared "ended" even though other tokens were still active. That's why I wanted to display the proper status texts but give priority to status other than "ended" and "stopped". (or maybe "aborted" which I yould have added).
It still picks the first one that is not one of the list (or one of the list if nothing else exists) so it ist still not that elaborate or expressive, but I wasen given any other hierarchy or ordering. Do you have an idea which status to display when multiple tokens are/were running?
Summary
This branch started as little tweaks for the instance info panel but evolved to a whole revamp of the panel and most of it's components.
Details