Squashed 'spiffworkflow-frontend/' changes from b0000877..647a428c
647a428c Merge pull request #93 from sartography/test_arena_push 9d119258 Pause/resume process instances (#2) 0c4b7541 Merge commit '5adbec7e67d36fd582fc01da083e531ff0925b9e' 73a17f29 Merge commit '2a5690772af8fcd121b257dd0b0ba606c57be47a' 3ecfc4f3 Merge commit 'f930f96d1b389e239d05e865afe4db339cb49cbf' 0c9e869f Merge commit '75729ba3df3a8e1eccbae237d96efa7f17f72b26' 93891c60 Merge commit '8d86fe710d083e1d5b2f031ddcf3443b044785e3' e63af290 Merge commit 'a087961fab0d73cc54f9cae658e9eb50ab060f96' 1b737265 Merge commit '3cfc1bd3834a5ed8ec9d1aa91886ebf0a0c69053' 12b8b32f CI fixes e8451a3e Merge main, resolve conflicts 716bb3cb Updaging the jinja processing so it doesn't leave a bunch of blank lines in the markdown that has strong feelings about white space. Updating the front end to render markdown formatted instructions. And adding a little css love to tables that are generated in Markdown. git-subtree-dir: spiffworkflow-frontend git-subtree-split: 647a428c7eb93b2a0c501b64903e5fbfc59b87cc
This commit is contained in:
parent
5adbec7e67
commit
3a0b6f634c
|
@ -62,8 +62,13 @@ export default function HomePage() {
|
||||||
{rowToUse.title}
|
{rowToUse.title}
|
||||||
</td>
|
</td>
|
||||||
<td>{rowToUse.state}</td>
|
<td>{rowToUse.state}</td>
|
||||||
|
<td>{rowToUse.process_instance_status}</td>
|
||||||
<td>
|
<td>
|
||||||
<Button variant="primary" href={taskUrl}>
|
<Button
|
||||||
|
variant="primary"
|
||||||
|
href={taskUrl}
|
||||||
|
hidden={rowToUse.process_instance_status === 'suspended'}
|
||||||
|
>
|
||||||
Complete Task
|
Complete Task
|
||||||
</Button>
|
</Button>
|
||||||
</td>
|
</td>
|
||||||
|
@ -78,6 +83,7 @@ export default function HomePage() {
|
||||||
<th>Process Instance</th>
|
<th>Process Instance</th>
|
||||||
<th>Task Name</th>
|
<th>Task Name</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
|
<th>Process Instance Status</th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
@ -53,6 +53,22 @@ export default function ProcessInstanceShow() {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const suspendProcessInstance = () => {
|
||||||
|
HttpService.makeCallToBackend({
|
||||||
|
path: `/process-models/${params.process_group_id}/${params.process_model_id}/process-instances/${params.process_instance_id}/suspend`,
|
||||||
|
successCallback: refreshPage,
|
||||||
|
httpMethod: 'POST',
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const resumeProcessInstance = () => {
|
||||||
|
HttpService.makeCallToBackend({
|
||||||
|
path: `/process-models/${params.process_group_id}/${params.process_model_id}/process-instances/${params.process_instance_id}/resume`,
|
||||||
|
successCallback: refreshPage,
|
||||||
|
httpMethod: 'POST',
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const getTaskIds = () => {
|
const getTaskIds = () => {
|
||||||
const taskIds = { completed: [], readyOrWaiting: [] };
|
const taskIds = { completed: [], readyOrWaiting: [] };
|
||||||
if (tasks) {
|
if (tasks) {
|
||||||
|
@ -126,6 +142,32 @@ export default function ProcessInstanceShow() {
|
||||||
return <div />;
|
return <div />;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const suspendButton = (processInstanceToUse: any) => {
|
||||||
|
if (
|
||||||
|
['complete', 'terminated', 'faulted', 'suspended'].indexOf(
|
||||||
|
processInstanceToUse.status
|
||||||
|
) === -1
|
||||||
|
) {
|
||||||
|
return (
|
||||||
|
<Button onClick={suspendProcessInstance} variant="warning">
|
||||||
|
Suspend
|
||||||
|
</Button>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return <div />;
|
||||||
|
};
|
||||||
|
|
||||||
|
const resumeButton = (processInstanceToUse: any) => {
|
||||||
|
if (processInstanceToUse.status === 'suspended') {
|
||||||
|
return (
|
||||||
|
<Button onClick={resumeProcessInstance} variant="warning">
|
||||||
|
Resume
|
||||||
|
</Button>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return <div />;
|
||||||
|
};
|
||||||
|
|
||||||
const handleClickedDiagramTask = (shapeElement: any) => {
|
const handleClickedDiagramTask = (shapeElement: any) => {
|
||||||
if (tasks) {
|
if (tasks) {
|
||||||
const matchingTask = tasks.find(
|
const matchingTask = tasks.find(
|
||||||
|
@ -217,6 +259,8 @@ export default function ProcessInstanceShow() {
|
||||||
buttonLabel="Delete"
|
buttonLabel="Delete"
|
||||||
/>
|
/>
|
||||||
{terminateButton(processInstanceToUse)}
|
{terminateButton(processInstanceToUse)}
|
||||||
|
{suspendButton(processInstanceToUse)}
|
||||||
|
{resumeButton(processInstanceToUse)}
|
||||||
</Stack>
|
</Stack>
|
||||||
{getInfoTag(processInstanceToUse)}
|
{getInfoTag(processInstanceToUse)}
|
||||||
{taskDataDisplayArea()}
|
{taskDataDisplayArea()}
|
||||||
|
|
Loading…
Reference in New Issue