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

[pull] main from apache:main #21

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -2036,3 +2036,5 @@ scripts.iml
index.test.js
# scripts/check-junit-report-results/tests/reports/empty.xml
empty.xml
# packages/runtime-tools-process-gateway-api/src/graphql/types.tsx
types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,5 @@ quarkus.http.test-port=0
quarkus.swagger-ui.always-include=true
quarkus.kogito.data-index.graphql.ui.always-include=true

# Development tasks users
%dev.jbpm.devui.users.jdoe.groups=admin,HR,IT
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import React from "react";
import React, { useCallback } from "react";
import { TextContent, Text, TextVariants } from "@patternfly/react-core/dist/js/components/Text";
import { Modal } from "@patternfly/react-core/dist/js/components/Modal";
import { Flex, FlexItem } from "@patternfly/react-core/dist/js/layouts/Flex";
Expand Down Expand Up @@ -45,28 +45,46 @@ export const JobsDetailsModal: React.FC<IOwnProps & OUIAProps> = ({
ouiaId,
ouiaSafe,
}) => {
const modalContent = () => {
const checkNumericProperty = useCallback((propertyValue?: number) => {
return propertyValue !== undefined && propertyValue !== null;
}, []);

const modalContent = useCallback(() => {
return (
<div className="kogito-management-console-shared--jobsModal__detailsModal">
<TextContent>
<Flex direction={{ default: "column" }}>
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>Process Id: </Text>{" "}
</SplitItem>
<SplitItem>{job.processId}</SplitItem>
</Split>
</FlexItem>
<FlexItem>
<Split hasGutter>
<SplitItem>
{" "}
<Text component={TextVariants.h6}>Process Instance Id: </Text>{" "}
</SplitItem>
<SplitItem>{job.processInstanceId}</SplitItem>
</Split>
</FlexItem>
{job.processId && (
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>Process Id: </Text>{" "}
</SplitItem>
<SplitItem>{job.processId}</SplitItem>
</Split>
</FlexItem>
)}
{job.processInstanceId && (
<FlexItem>
<Split hasGutter>
<SplitItem>
{" "}
<Text component={TextVariants.h6}>Process Instance Id: </Text>{" "}
</SplitItem>
<SplitItem>{job.processInstanceId}</SplitItem>
</Split>
</FlexItem>
)}
{job.nodeInstanceId && (
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>Node Instance Id: </Text>
</SplitItem>
<SplitItem>{job.nodeInstanceId}</SplitItem>
</Split>
</FlexItem>
)}
<FlexItem>
<Split hasGutter>
<SplitItem>
Expand All @@ -75,83 +93,95 @@ export const JobsDetailsModal: React.FC<IOwnProps & OUIAProps> = ({
<SplitItem>{job.status}</SplitItem>
</Split>
</FlexItem>
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>Priority: </Text>{" "}
</SplitItem>
<SplitItem>{job.priority}</SplitItem>
</Split>
</FlexItem>
{job.repeatInterval && (
{checkNumericProperty(job.priority) && (
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>RepeatInterval: </Text>
<Text component={TextVariants.h6}>Priority: </Text>{" "}
</SplitItem>
<SplitItem>{job.priority}</SplitItem>
</Split>
</FlexItem>
)}
{checkNumericProperty(job.repeatInterval) && (
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>Repeat Interval: </Text>
</SplitItem>
<SplitItem>{job.repeatInterval}</SplitItem>
</Split>
</FlexItem>
)}
{job.repeatLimit && (
{checkNumericProperty(job.repeatLimit) && (
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>RepeatLimit: </Text>
<Text component={TextVariants.h6}>Repeat Limit: </Text>
</SplitItem>
<SplitItem>{job.repeatLimit}</SplitItem>
</Split>
</FlexItem>
)}
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>ScheduledId: </Text>
</SplitItem>
<SplitItem>{job.scheduledId}</SplitItem>
</Split>
</FlexItem>
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>Retries: </Text>
</SplitItem>
<SplitItem>{job.retries}</SplitItem>
</Split>
</FlexItem>
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>Execution counter: </Text>
</SplitItem>
<SplitItem>{job.executionCounter}</SplitItem>
</Split>
</FlexItem>
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>Last Updated: </Text>
</SplitItem>
<SplitItem>
<Moment fromNow>{new Date(`${job.lastUpdate}`)}</Moment>
</SplitItem>
</Split>
</FlexItem>
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6} className="kogito-management-console-shared--jobsModal__text">
Callback Endpoint:{" "}
</Text>
</SplitItem>
<SplitItem>{job.callbackEndpoint}</SplitItem>
</Split>
</FlexItem>
{job.scheduledId && (
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>Scheduled Id: </Text>
</SplitItem>
<SplitItem>{job.scheduledId}</SplitItem>
</Split>
</FlexItem>
)}
{checkNumericProperty(job.retries) && (
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>Retries: </Text>
</SplitItem>
<SplitItem>{job.retries}</SplitItem>
</Split>
</FlexItem>
)}
{checkNumericProperty(job.executionCounter) && (
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>Execution counter: </Text>
</SplitItem>
<SplitItem>{job.executionCounter}</SplitItem>
</Split>
</FlexItem>
)}
{job.lastUpdate && (
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6}>Last Updated: </Text>
</SplitItem>
<SplitItem>
<Moment fromNow>{new Date(`${job.lastUpdate}`)}</Moment>
</SplitItem>
</Split>
</FlexItem>
)}
{job.callbackEndpoint && (
<FlexItem>
<Split hasGutter>
<SplitItem>
<Text component={TextVariants.h6} className="kogito-management-console-shared--jobsModal__text">
Callback Endpoint:{" "}
</Text>
</SplitItem>
<SplitItem>{job.callbackEndpoint}</SplitItem>
</Split>
</FlexItem>
)}
</Flex>
</TextContent>
</div>
);
};
}, [job, checkNumericProperty]);
return (
<Modal
variant={"large"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,23 +342,19 @@ const ProcessDetailsTimelinePanel: React.FC<IOwnProps & OUIAProps> = ({
};

const renderTimerIcon = (id: string) => {
return jobs.length > 0 ? (
jobs.map((job, idx) => {
if (id === job.nodeInstanceId) {
return (
<Tooltip content={"Node has job"} key={idx}>
<OutlinedClockIcon
className="pf-u-ml-sm"
color="var(--pf-global--icon--Color--dark)"
onClick={() => handleJobDetails(job)}
/>
</Tooltip>
);
}
})[0]
) : (
<></>
);
const job = jobs.find((job) => id === job.nodeInstanceId);
if (job) {
return (
<Tooltip content={"Node has job"} key={`${id}-job-tooltip-${job.id}`}>
<OutlinedClockIcon
className="pf-u-ml-sm"
color="var(--pf-global--icon--Color--dark)"
onClick={() => handleJobDetails(job)}
/>
</Tooltip>
);
}
return <></>;
};

const detailsAction: JSX.Element[] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2110,6 +2110,16 @@
"ofType": null
},
"defaultValue": null
},
{
"name": "variables",
"description": null,
"type": {
"kind": "SCALAR",
"name": "JSON",
"ofType": null
},
"defaultValue": null
}
],
"interfaces": null,
Expand Down Expand Up @@ -2827,6 +2837,18 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "slaDueDate",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
"name": "DateTime",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "source",
"description": null,
Expand Down Expand Up @@ -3100,6 +3122,18 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "slaDueDate",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
"name": "DateTime",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "type",
"description": null,
Expand Down Expand Up @@ -3695,6 +3729,18 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "externalReferenceId",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "id",
"description": null,
Expand Down Expand Up @@ -3916,6 +3962,18 @@
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "slaDueDate",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
"name": "DateTime",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "started",
"description": null,
Expand Down Expand Up @@ -7300,6 +7358,12 @@
}
]
},
{
"name": "oneOf",
"description": "Indicates an Input Object is a OneOf Input Object.",
"locations": ["INPUT_OBJECT"],
"args": []
},
{
"name": "skip",
"description": "Directs the executor to skip this field or fragment when the `if` argument is true.",
Expand Down
Loading
Loading