diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..73f59e5e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +pyrightconfig.json diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/api.yml b/spiffworkflow-backend/src/spiffworkflow_backend/api.yml index 2bfa117e..cbd21576 100755 --- a/spiffworkflow-backend/src/spiffworkflow_backend/api.yml +++ b/spiffworkflow-backend/src/spiffworkflow_backend/api.yml @@ -413,7 +413,7 @@ paths: - name: process_status in: query required: false - description: For filtering - not_started, user_input_required, waiting, complete, faulted, or suspended + description: For filtering - not_started, user_input_required, waiting, complete, error, or suspended schema: type: string # process_instance_list diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py b/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py index 37b65157..cfa89252 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py @@ -61,10 +61,9 @@ class ProcessInstanceStatus(SpiffEnum): user_input_required = "user_input_required" waiting = "waiting" complete = "complete" - faulted = "faulted" + error = "error" suspended = "suspended" terminated = "terminated" - erroring = "erroring" class ProcessInstanceModel(SpiffworkflowBaseDBModel): diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance_report.py b/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance_report.py index b6f16288..1425d69f 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance_report.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance_report.py @@ -83,10 +83,6 @@ class ProcessInstanceReportModel(SpiffworkflowBaseDBModel): report_metadata = { "columns": [ {"Header": "id", "accessor": "id"}, - { - "Header": "process_group_identifier", - "accessor": "process_group_identifier", - }, { "Header": "process_model_identifier", "accessor": "process_model_identifier", diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/acceptance_test_fixtures.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/acceptance_test_fixtures.py index c6c1b578..cfea3148 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/acceptance_test_fixtures.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/acceptance_test_fixtures.py @@ -24,7 +24,7 @@ def load_acceptance_test_fixtures() -> list[ProcessInstanceModel]: # user_input_required - 2 hours ago # waiting - 3 hourse ago # complete - 4 hours ago - # faulted - 5 hours ago + # error - 5 hours ago # suspended - 6 hours ago process_instances = [] for i in range(len(statuses)): diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/error_handling_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/error_handling_service.py index 3f1622a4..99e4fbe8 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/error_handling_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/error_handling_service.py @@ -46,7 +46,7 @@ class ErrorHandlingService: # fault is the default self.set_instance_status( _processor.process_instance_model.id, - ProcessInstanceStatus.faulted.value, + ProcessInstanceStatus.error.value, ) if len(process_model.exception_notification_addresses) > 0: diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py index 7854537e..ca9f66aa 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_service.py @@ -64,7 +64,7 @@ class ProcessInstanceService: processor.do_engine_steps(save=True) except Exception as e: db.session.rollback() # in case the above left the database with a bad transaction - process_instance.status = ProcessInstanceStatus.erroring.value + process_instance.status = ProcessInstanceStatus.error.value db.session.add(process_instance) db.session.commit() error_message = ( diff --git a/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py b/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py index 91355e0e..7f9500b0 100644 --- a/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py +++ b/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py @@ -1716,7 +1716,7 @@ class TestProcessApi(BaseTest): .first() ) assert process is not None - assert process.status == "faulted" + assert process.status == "error" def test_error_handler_suspend( self, @@ -1827,7 +1827,7 @@ class TestProcessApi(BaseTest): .first() ) assert process is not None - assert process.status == "faulted" + assert process.status == "error" def test_process_model_file_create( self, diff --git a/spiffworkflow-frontend/src/config.tsx b/spiffworkflow-frontend/src/config.tsx index c9e94eb0..47ff5025 100644 --- a/spiffworkflow-frontend/src/config.tsx +++ b/spiffworkflow-frontend/src/config.tsx @@ -12,10 +12,11 @@ export const PROCESS_STATUSES = [ 'user_input_required', 'waiting', 'complete', - 'faulted', + 'error', 'suspended', ]; // with time: yyyy-MM-dd HH:mm:ss +export const DATE_TIME_FORMAT = 'yyyy-MM-dd HH:mm:ss'; export const DATE_FORMAT = 'yyyy-MM-dd'; export const DATE_FORMAT_CARBON = 'Y-m-d'; diff --git a/spiffworkflow-frontend/src/helpers.tsx b/spiffworkflow-frontend/src/helpers.tsx index 564c99f1..383c3e0a 100644 --- a/spiffworkflow-frontend/src/helpers.tsx +++ b/spiffworkflow-frontend/src/helpers.tsx @@ -1,5 +1,5 @@ import { format } from 'date-fns'; -import { DATE_FORMAT } from './config'; +import { DATE_TIME_FORMAT, DATE_FORMAT } from './config'; import { DEFAULT_PER_PAGE, DEFAULT_PAGE, @@ -51,6 +51,14 @@ export const convertStringToDate = (dateString: string) => { return null; }; +export const convertSecondsToFormattedDateTime = (seconds: number) => { + if (seconds) { + const dateObject = new Date(seconds * 1000); + return format(dateObject, DATE_TIME_FORMAT); + } + return null; +}; + export const convertSecondsToFormattedDate = (seconds: number) => { if (seconds) { const dateObject = new Date(seconds * 1000); diff --git a/spiffworkflow-frontend/src/index.css b/spiffworkflow-frontend/src/index.css index b1eedf70..c2e2e802 100644 --- a/spiffworkflow-frontend/src/index.css +++ b/spiffworkflow-frontend/src/index.css @@ -1,24 +1,79 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', - 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', - sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; +/* site is mainly using white theme. */ +/* header is mainly using g100 */ +/* mockup wanted white, not grey, text */ +.cds--header, a.cds--header__menu-item { + color: white; } +h1{ + height: 36px; + font-family: 'IBM Plex Sans'; + font-style: normal; + font-weight: 400; + font-size: 28px; + line-height: 36px; + color: #161616; + flex: none; + order: 0; + align-self: stretch; + flex-grow: 0; + margin-bottom: 1em +} + +.span-tag { + color: black; +} + +.cds--btn.button-white-background { + color: #393939; + background: #FFFFFF; + background-blend-mode: multiply; + border: 1px solid #393939; +} +.cds--btn.button-white-background:hover { + background: #525252; +} + +.cds--breadcrumb-item a.cds--link:hover { + color: #525252; +} +.cds--breadcrumb-item a.cds--link:visited { + color: #525252; +} +.cds--breadcrumb-item a.cds--link:visited:hover { + color: #525252; +} +.cds--breadcrumb-item a.cds--link { + color: #525252; +} + +.cds--btn--ghost { + color: black; +} +.cds--btn--ghost:visited { + color: black; +} +.cds--btn--ghost:hover { + color: black; +} +.cds--btn--ghost:visited:hover { + color: black; +} + +.cds--header__global .cds--btn--primary { + background-color: #161616 +} +.cds--btn--primary { + background-color: #393939; +} +.cds--btn--primary:hover { + background-color: #474747; +} code { font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } -span.bjs-crumb { - color: #0000ff; -} -.bjs-breadcrumbs li:last-of-type span.bjs-crumb a { - color: black; -} - .app-logo { height: 85%; width: 85%; @@ -52,6 +107,26 @@ span.bjs-crumb { margin-bottom: 2em; } +h1.with-icons { + margin-top: 5px; +} + +.grid-list-title { + font-weight: 600; + font-size: 14px; + line-height: 18px; + color: #161616; +} +.grid-date { + font-size: 14px; + line-height: 18px; + letter-spacing: 0.16px; + color: #525252; +} +.smaller-text { + font-size: 14px; +} + .diagram-editor-canvas { border:1px solid #000000; height:70vh; @@ -59,13 +134,6 @@ span.bjs-crumb { margin:auto; } -.cds--btn.button-white-background { - color: #393939; - background: #FFFFFF; - background-blend-mode: multiply; - border: 1px solid #393939; -} - .with-bottom-margin { margin-bottom: 1em; } diff --git a/spiffworkflow-frontend/src/index.scss b/spiffworkflow-frontend/src/index.scss index 37766c21..86b76998 100644 --- a/spiffworkflow-frontend/src/index.scss +++ b/spiffworkflow-frontend/src/index.scss @@ -15,85 +15,3 @@ @use '@carbon/colors'; // @use '@carbon/react/scss/colors'; @use '@carbon/react/scss/themes'; - -// var(--cds-link-text-color, var(--cds-link-primary, #0f62fe)) - -// site is mainly using white theme. -// header is mainly using g100 -// mockup wanted white, not grey, text -.cds--header, a.cds--header__menu-item { - // background-color: colors.$gray-100; - color: white; -} -h1{ - height: 36px; - font-family: 'IBM Plex Sans'; - font-style: normal; - font-weight: 400; - font-size: 28px; - line-height: 36px; - color: #161616; - flex: none; - order: 0; - align-self: stretch; - flex-grow: 0; - margin-bottom: 1em -} - - -.cds--breadcrumb-item a.cds--link:hover { - color: #525252; -} -.cds--breadcrumb-item a.cds--link:visited { - color: #525252; -} -.cds--breadcrumb-item a.cds--link:visited:hover { - color: #525252; -} -.cds--breadcrumb-item a.cds--link { - color: #525252; -} - -.cds--btn--ghost { - color: black; -} -.cds--btn--ghost:visited { - color: black; -} -.cds--btn--ghost:hover { - color: black; -} -.cds--btn--ghost:visited:hover { - color: black; -} - -$slightly-lighter-gray: #474747; -$spiff-header-background-color: #161616; - -.cds--header__global .cds--btn--primary { - background-color: $spiff-header-background-color; -} -.cds--btn--primary { - background-color: #393939; -} -.cds--btn--primary:hover { - background-color: $slightly-lighter-gray; -} -// .cds--btn--ghost:visited { -// color: black; -// } -// .cds--btn--ghost:hover { -// color: black; -// } -// .cds--btn--ghost:visited:hover { -// color: black; -// } - - -// :root { -// --cds-link-primary: #525252; -// } -// .card { -// background: var(--orange); -// --orange: hsl(255, 72%, var(--lightness)); -// } diff --git a/spiffworkflow-frontend/src/index.tsx b/spiffworkflow-frontend/src/index.tsx index a2fab5c0..7a602be6 100644 --- a/spiffworkflow-frontend/src/index.tsx +++ b/spiffworkflow-frontend/src/index.tsx @@ -3,8 +3,8 @@ import * as ReactDOMClient from 'react-dom/client'; import App from './App'; import 'bootstrap/dist/css/bootstrap.css'; -import './index.css'; import './index.scss'; +import './index.css'; import reportWebVitals from './reportWebVitals'; import UserService from './services/UserService'; diff --git a/spiffworkflow-frontend/src/routes/HomePage.tsx b/spiffworkflow-frontend/src/routes/HomePage.tsx index d80b1c45..71fda73f 100644 --- a/spiffworkflow-frontend/src/routes/HomePage.tsx +++ b/spiffworkflow-frontend/src/routes/HomePage.tsx @@ -122,7 +122,7 @@ export default function HomePage() { }); return ( <> -

Processes I can start

+

Processes I can start

@@ -145,7 +145,7 @@ export default function HomePage() { ); return ( <> -

Tasks waiting for me

+

Tasks waiting for me

); @@ -125,7 +126,7 @@ export default function MessageInstanceList() { return ( <> {breadcrumbElement} -

Messages

+

Messages

-

Edit Process Group: {(processGroup as any).id}

+

Edit Process Group: {(processGroup as any).id}

-

Add Process Group

+

Add Process Group

{ - return

Process Instances

; + return

Process Instances

; }; const toggleShowFilterOptions = () => { diff --git a/spiffworkflow-frontend/src/routes/ProcessInstanceLogList.tsx b/spiffworkflow-frontend/src/routes/ProcessInstanceLogList.tsx index 22303dec..bb8ef4c1 100644 --- a/spiffworkflow-frontend/src/routes/ProcessInstanceLogList.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessInstanceLogList.tsx @@ -88,9 +88,10 @@ export default function ProcessInstanceLogList() { )}:link`, ], [ - `${params.process_instance_id}`, + `Process Instance: ${params.process_instance_id}`, `/admin/process-models/${params.process_model_id}/process-instances/${params.process_instance_id}`, ], + ['Logs'], ]} /> -

Edit Process Instance Report: {params.report_identifier}

+

Edit Process Instance Report: {params.report_identifier}

-

Reports for Process Model: {params.process_model_id}

+

Reports for Process Model: {params.process_model_id}

+ + + + + ); }; const terminateButton = (processInstanceToUse: any) => { if ( - ['complete', 'terminated', 'faulted'].indexOf( + ['complete', 'terminated', 'error'].indexOf( processInstanceToUse.status ) === -1 ) { return ( - + ); } return
; @@ -226,14 +283,19 @@ export default function ProcessInstanceShow() { const suspendButton = (processInstanceToUse: any) => { if ( - ['complete', 'terminated', 'faulted', 'suspended'].indexOf( + ['complete', 'terminated', 'error', 'suspended'].indexOf( processInstanceToUse.status ) === -1 ) { return ( - + +
diff --git a/spiffworkflow-frontend/src/routes/SecretNew.tsx b/spiffworkflow-frontend/src/routes/SecretNew.tsx index 016fec2e..329d7e2f 100644 --- a/spiffworkflow-frontend/src/routes/SecretNew.tsx +++ b/spiffworkflow-frontend/src/routes/SecretNew.tsx @@ -46,7 +46,7 @@ export default function SecretNew() { return (
-

Add Secret

+

Add Secret

diff --git a/spiffworkflow-frontend/src/routes/SecretShow.tsx b/spiffworkflow-frontend/src/routes/SecretShow.tsx index 9882247b..6dd446b0 100644 --- a/spiffworkflow-frontend/src/routes/SecretShow.tsx +++ b/spiffworkflow-frontend/src/routes/SecretShow.tsx @@ -65,7 +65,7 @@ export default function SecretShow() { if (secret) { return ( <> -

Secret Key: {secret.key}

+

Secret Key: {secret.key}