mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-02-04 22:23:56 +00:00
Report URL fixes (#29)
This commit is contained in:
parent
cdae9553f9
commit
3dc70132db
@ -708,33 +708,6 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: "#/components/schemas/Workflow"
|
$ref: "#/components/schemas/Workflow"
|
||||||
|
|
||||||
/process-models/{process_group_id}/{process_model_id}/process-instances/reports:
|
|
||||||
parameters:
|
|
||||||
- name: process_group_id
|
|
||||||
in: path
|
|
||||||
required: true
|
|
||||||
description: The unique id of an existing process group
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- name: process_model_id
|
|
||||||
in: path
|
|
||||||
required: true
|
|
||||||
description: The unique id of an existing process model.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- name: page
|
|
||||||
in: query
|
|
||||||
required: false
|
|
||||||
description: The page number to return. Defaults to page 1.
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
- name: per_page
|
|
||||||
in: query
|
|
||||||
required: false
|
|
||||||
description: The page number to return. Defaults to page 1.
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
post:
|
post:
|
||||||
operationId: spiffworkflow_backend.routes.process_api_blueprint.process_instance_report_create
|
operationId: spiffworkflow_backend.routes.process_api_blueprint.process_instance_report_create
|
||||||
summary: Returns all process instance reports for process model
|
summary: Returns all process instance reports for process model
|
||||||
@ -782,39 +755,6 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: "#/components/schemas/Workflow"
|
$ref: "#/components/schemas/Workflow"
|
||||||
|
|
||||||
/process-models/{process_group_id}/{process_model_id}/process-instances/reports/{report_identifier}:
|
|
||||||
parameters:
|
|
||||||
- name: process_group_id
|
|
||||||
in: path
|
|
||||||
required: true
|
|
||||||
description: The unique id of an existing process group
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- name: process_model_id
|
|
||||||
in: path
|
|
||||||
required: true
|
|
||||||
description: The unique id of an existing process model.
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- name: report_identifier
|
|
||||||
in: path
|
|
||||||
required: true
|
|
||||||
description: The unique id of an existing report
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
- name: page
|
|
||||||
in: query
|
|
||||||
required: false
|
|
||||||
description: The page number to return. Defaults to page 1.
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
- name: per_page
|
|
||||||
in: query
|
|
||||||
required: false
|
|
||||||
description: The page number to return. Defaults to page 1.
|
|
||||||
schema:
|
|
||||||
type: integer
|
|
||||||
put:
|
put:
|
||||||
operationId: spiffworkflow_backend.routes.process_api_blueprint.process_instance_report_update
|
operationId: spiffworkflow_backend.routes.process_api_blueprint.process_instance_report_update
|
||||||
summary: Updates a process instance report
|
summary: Updates a process instance report
|
||||||
|
5
spiffworkflow-frontend/package-lock.json
generated
5
spiffworkflow-frontend/package-lock.json
generated
@ -46545,7 +46545,7 @@
|
|||||||
"@csstools/postcss-text-decoration-shorthand": "^1.0.0",
|
"@csstools/postcss-text-decoration-shorthand": "^1.0.0",
|
||||||
"@csstools/postcss-trigonometric-functions": "^1.0.2",
|
"@csstools/postcss-trigonometric-functions": "^1.0.2",
|
||||||
"@csstools/postcss-unset-value": "^1.0.2",
|
"@csstools/postcss-unset-value": "^1.0.2",
|
||||||
"autoprefixer": "10.4.5",
|
"autoprefixer": "10.4.8",
|
||||||
"browserslist": "^4.21.3",
|
"browserslist": "^4.21.3",
|
||||||
"css-blank-pseudo": "^3.0.3",
|
"css-blank-pseudo": "^3.0.3",
|
||||||
"css-has-pseudo": "^3.0.4",
|
"css-has-pseudo": "^3.0.4",
|
||||||
@ -46583,8 +46583,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"autoprefixer": {
|
"autoprefixer": {
|
||||||
"version": "10.4.5",
|
"version": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.5.tgz",
|
||||||
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.5.tgz",
|
|
||||||
"integrity": "sha512-Fvd8yCoA7lNX/OUllvS+aS1I7WRBclGXsepbvT8ZaPgrH24rgXpZzF0/6Hh3ZEkwg+0AES/Osd196VZmYoEFtw==",
|
"integrity": "sha512-Fvd8yCoA7lNX/OUllvS+aS1I7WRBclGXsepbvT8ZaPgrH24rgXpZzF0/6Hh3ZEkwg+0AES/Osd196VZmYoEFtw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"browserslist": "^4.20.2",
|
"browserslist": "^4.20.2",
|
||||||
|
@ -38,6 +38,10 @@ export default function NavigationBar() {
|
|||||||
let newActiveKey = '/admin/process-groups';
|
let newActiveKey = '/admin/process-groups';
|
||||||
if (location.pathname.match(/^\/admin\/messages\b/)) {
|
if (location.pathname.match(/^\/admin\/messages\b/)) {
|
||||||
newActiveKey = '/admin/messages';
|
newActiveKey = '/admin/messages';
|
||||||
|
} else if (
|
||||||
|
location.pathname.match(/^\/admin\/process-instances\/reports\b/)
|
||||||
|
) {
|
||||||
|
newActiveKey = '/admin/process-instances/reports';
|
||||||
} else if (location.pathname.match(/^\/admin\/process-instances\b/)) {
|
} else if (location.pathname.match(/^\/admin\/process-instances\b/)) {
|
||||||
newActiveKey = '/admin/process-instances';
|
newActiveKey = '/admin/process-instances';
|
||||||
} else if (location.pathname.match(/^\/admin\/secrets\b/)) {
|
} else if (location.pathname.match(/^\/admin\/secrets\b/)) {
|
||||||
@ -119,6 +123,12 @@ export default function NavigationBar() {
|
|||||||
>
|
>
|
||||||
Authentications
|
Authentications
|
||||||
</HeaderMenuItem>
|
</HeaderMenuItem>
|
||||||
|
<HeaderMenuItem
|
||||||
|
href="/admin/process-instances/reports"
|
||||||
|
isCurrentPage={isActivePage('/admin/process-instances/reports')}
|
||||||
|
>
|
||||||
|
Reports
|
||||||
|
</HeaderMenuItem>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -10,6 +10,10 @@ export default function SubNavigation() {
|
|||||||
let newActiveKey = '/admin/process-groups';
|
let newActiveKey = '/admin/process-groups';
|
||||||
if (location.pathname.match(/^\/admin\/messages\b/)) {
|
if (location.pathname.match(/^\/admin\/messages\b/)) {
|
||||||
newActiveKey = '/admin/messages';
|
newActiveKey = '/admin/messages';
|
||||||
|
} else if (
|
||||||
|
location.pathname.match(/^\/admin\/process-instances\/reports\b/)
|
||||||
|
) {
|
||||||
|
newActiveKey = '/admin/process-instances/reports';
|
||||||
} else if (location.pathname.match(/^\/admin\/process-instances\b/)) {
|
} else if (location.pathname.match(/^\/admin\/process-instances\b/)) {
|
||||||
newActiveKey = '/admin/process-instances';
|
newActiveKey = '/admin/process-instances';
|
||||||
} else if (location.pathname.match(/^\/admin\/secrets\b/)) {
|
} else if (location.pathname.match(/^\/admin\/secrets\b/)) {
|
||||||
@ -45,6 +49,9 @@ export default function SubNavigation() {
|
|||||||
<Nav.Item>
|
<Nav.Item>
|
||||||
<Nav.Link href="/admin/authentications">Authentications</Nav.Link>
|
<Nav.Link href="/admin/authentications">Authentications</Nav.Link>
|
||||||
</Nav.Item>
|
</Nav.Item>
|
||||||
|
<Nav.Item>
|
||||||
|
<Nav.Link href="/admin/process-instances/reports">Reports</Nav.Link>
|
||||||
|
</Nav.Item>
|
||||||
</Nav>
|
</Nav>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -81,19 +81,19 @@ export default function AdminRoutes() {
|
|||||||
element={<ProcessInstanceShow />}
|
element={<ProcessInstanceShow />}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path="process-models/:process_model_id/process-instances/reports"
|
path="process-instances/reports"
|
||||||
element={<ProcessInstanceReportList />}
|
element={<ProcessInstanceReportList />}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path="process-models/:process_group_id/:process_model_id/process-instances/reports/:report_identifier"
|
path="process-instances/reports/:report_identifier"
|
||||||
element={<ProcessInstanceReportShow />}
|
element={<ProcessInstanceReportShow />}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path="process-models/:process_group_id/:process_model_id/process-instances/reports/new"
|
path="process-instances/reports/new"
|
||||||
element={<ProcessInstanceReportNew />}
|
element={<ProcessInstanceReportNew />}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path="process-models/:process_group_id/:process_model_id/process-instances/reports/:report_identifier/edit"
|
path="process-instances/reports/:report_identifier/edit"
|
||||||
element={<ProcessInstanceReportEdit />}
|
element={<ProcessInstanceReportEdit />}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { useNavigate, useParams } from 'react-router-dom';
|
import { useNavigate, useParams } from 'react-router-dom';
|
||||||
import ProcessBreadcrumb from '../components/ProcessBreadcrumb';
|
|
||||||
import HttpService from '../services/HttpService';
|
import HttpService from '../services/HttpService';
|
||||||
import ButtonWithConfirmation from '../components/ButtonWithConfirmation';
|
import ButtonWithConfirmation from '../components/ButtonWithConfirmation';
|
||||||
|
|
||||||
@ -24,15 +23,11 @@ export default function ProcessInstanceReportEdit() {
|
|||||||
const [filterBy, setFilterBy] = useState('');
|
const [filterBy, setFilterBy] = useState('');
|
||||||
|
|
||||||
const navigateToProcessInstanceReport = (_result: any) => {
|
const navigateToProcessInstanceReport = (_result: any) => {
|
||||||
navigate(
|
navigate(`/admin/process-instances/reports/${params.report_identifier}`);
|
||||||
`/admin/process-models/${params.process_group_id}/${params.process_model_id}/process-instances/reports/${params.report_identifier}`
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const navigateToProcessInstanceReports = (_result: any) => {
|
const navigateToProcessInstanceReports = (_result: any) => {
|
||||||
navigate(
|
navigate(`/admin/process-instances/reports`);
|
||||||
`/admin/process-models/${params.process_group_id}/${params.process_model_id}/process-instances/reports`
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -111,7 +106,6 @@ export default function ProcessInstanceReportEdit() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ProcessBreadcrumb />
|
|
||||||
<h1>Edit Process Instance Report: {params.report_identifier}</h1>
|
<h1>Edit Process Instance Report: {params.report_identifier}</h1>
|
||||||
<ButtonWithConfirmation
|
<ButtonWithConfirmation
|
||||||
description={`Delete Report ${params.report_identifier}?`}
|
description={`Delete Report ${params.report_identifier}?`}
|
||||||
|
@ -2,16 +2,11 @@ import { useEffect, useState } from 'react';
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { Button, Table } from '@carbon/react';
|
import { Button, Table } from '@carbon/react';
|
||||||
import { useParams, Link } from 'react-router-dom';
|
import { useParams, Link } from 'react-router-dom';
|
||||||
import ProcessBreadcrumb from '../components/ProcessBreadcrumb';
|
|
||||||
import HttpService from '../services/HttpService';
|
import HttpService from '../services/HttpService';
|
||||||
import { modifyProcessModelPath } from '../helpers';
|
|
||||||
|
|
||||||
export default function ProcessInstanceReportList() {
|
export default function ProcessInstanceReportList() {
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
const [processInstanceReports, setProcessInstanceReports] = useState([]);
|
const [processInstanceReports, setProcessInstanceReports] = useState([]);
|
||||||
const modifiedProcessModelId = modifyProcessModelPath(
|
|
||||||
params.process_model_id || ''
|
|
||||||
);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
HttpService.makeCallToBackend({
|
HttpService.makeCallToBackend({
|
||||||
@ -27,7 +22,7 @@ export default function ProcessInstanceReportList() {
|
|||||||
<tr key={(row as any).id}>
|
<tr key={(row as any).id}>
|
||||||
<td>
|
<td>
|
||||||
<Link
|
<Link
|
||||||
to={`/admin/process-models/${modifiedProcessModelId}/process-instances/reports/${rowToUse.identifier}`}
|
to={`/admin/process-instances/reports/${rowToUse.identifier}`}
|
||||||
>
|
>
|
||||||
{rowToUse.identifier}
|
{rowToUse.identifier}
|
||||||
</Link>
|
</Link>
|
||||||
@ -49,15 +44,8 @@ export default function ProcessInstanceReportList() {
|
|||||||
|
|
||||||
const headerStuff = (
|
const headerStuff = (
|
||||||
<>
|
<>
|
||||||
<ProcessBreadcrumb
|
<h1>Process Instance Reports</h1>
|
||||||
processGroupId={params.process_group_id}
|
<Button href="/admin/process-instances/reports/new">
|
||||||
processModelId={params.process_model_id}
|
|
||||||
linkProcessModel
|
|
||||||
/>
|
|
||||||
<h1>Reports for Process Model: {params.process_model_id}</h1>
|
|
||||||
<Button
|
|
||||||
href={`/admin/process-models/${modifiedProcessModelId}/process-instances/reports/new`}
|
|
||||||
>
|
|
||||||
Add a process instance report
|
Add a process instance report
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { useNavigate, useParams } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import ProcessBreadcrumb from '../components/ProcessBreadcrumb';
|
import ProcessBreadcrumb from '../components/ProcessBreadcrumb';
|
||||||
import HttpService from '../services/HttpService';
|
import HttpService from '../services/HttpService';
|
||||||
|
|
||||||
export default function ProcessInstanceReportNew() {
|
export default function ProcessInstanceReportNew() {
|
||||||
const params = useParams();
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const [identifier, setIdentifier] = useState('');
|
const [identifier, setIdentifier] = useState('');
|
||||||
@ -13,9 +12,7 @@ export default function ProcessInstanceReportNew() {
|
|||||||
const [filterBy, setFilterBy] = useState('');
|
const [filterBy, setFilterBy] = useState('');
|
||||||
|
|
||||||
const navigateToNewProcessInstance = (_result: any) => {
|
const navigateToNewProcessInstance = (_result: any) => {
|
||||||
navigate(
|
navigate(`/admin/process-instances/reports/${identifier}`);
|
||||||
`/admin/process-models/${params.process_group_id}/${params.process_model_id}/process-instances/reports/${identifier}`
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const addProcessInstanceReport = (event: any) => {
|
const addProcessInstanceReport = (event: any) => {
|
||||||
|
@ -82,7 +82,7 @@ export default function ProcessInstanceReport() {
|
|||||||
/>
|
/>
|
||||||
<h1>Process Instance Report: {params.report_identifier}</h1>
|
<h1>Process Instance Report: {params.report_identifier}</h1>
|
||||||
<Button
|
<Button
|
||||||
href={`/admin/process-models/${params.process_group_id}/${params.process_model_id}/process-instances/reports/${params.report_identifier}/edit`}
|
href={`/admin/process-instances/reports/${params.report_identifier}/edit`}
|
||||||
>
|
>
|
||||||
Edit process instance report
|
Edit process instance report
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -378,14 +378,6 @@ export default function ProcessModelShow() {
|
|||||||
List
|
List
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<Link
|
|
||||||
to={`/admin/process-models/${modifiedProcessModelId}/process-instances/reports`}
|
|
||||||
data-qa="process-instance-reports-link"
|
|
||||||
>
|
|
||||||
Reports
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user