spiff-arena/README.md

106 lines
4.4 KiB
Markdown
Raw Normal View History

# spiffworkflow-frontend
[![Tests](https://github.com/sartography/spiffworkflow-frontend/actions/workflows/tests.yml/badge.svg)](https://github.com/sartography/spiffworkflow-frontend/actions/workflows/tests.yml)
## NOTE: This is still in development. NOT READY FOR GENERAL USE!!!!!
This is the frontend part of an app that leverages
[spiffworkflow](https://github.com/sartography/spiffworkflow) for managing and
running business processes. The backend portion can be found at
https://github.com/sartography/spiffworkflow-backend.
This project was bootstrapped with [Create React
App](https://github.com/facebook/create-react-app), and the balance of this
README contains information about how to use apps that are bootstrapped with
that project.
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
The page will reload when you make changes.\
You may also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
### `npm run lint`
Check for lint in code.
### `npm run lint:fix`
Fix lint in code.
### `npm run format`
Probably just stick with lint:fix which also runs prettier.
Squashed 'spiffworkflow-frontend/' changes from f099c181..c22d22ba c22d22ba logs list page should respect the for-me variant dcc3e3b1 show help text for textareas as well w/ burnettk 35b8bf35 default to the for-me path on process instance show page links da646e54 added support to validate custom errors in nested properties in json schema forms 17412e9d make it so the message at the top of form is never strictly wrong 7dea59b7 adding some padding to form text inputs w/ burnettk 3f92f492 added ability to display the environment in the frontend header bar w/ burnettk 85246120 put the env vars in the env section of the github action configs w/ burnettk 58ff9075 added test for quickstart guide w/ burnettk 03e725b0 corrected cypress env var db755731 added some support for using the backend openid server for cypress tests w/ burnettk e76b6429 anything in the Tasks waiting for me table can now be completed by the current user 56403b4c users can always complete tasks on process instance show page and on task group table on home page w/ burnettk e2ab6eff avoid endless redirects on error on authentication list page w/ burnettk 66608837 bug fix 4781d5fc link to the spiff step from a task on the frontend and use the correct db in ci 69eb426c pyl w/ burnettk 3cf036b0 call activities are also working w/ burnettk 40b101a7 add assertions so this fails fast if anything changes in the future 74d2d3fa Update README.md 24c3c431 fix formatting ed977079 document runtime config e62427b9 do not fail if SPIFFWORKFLOW_FRONTEND_RUNTIME_CONFIG is missing 551bdf17 allow setting configs for the frontend through env vars w/ burnettk bc91c62c Merge remote-tracking branch 'origin/main' into frontend/use-api-subpath eeab0d0f Use the same markdown library for displaying as for editing - could enable a security plugin, but doing so would prevent BPMN developers from using the Sub and Sup markdown supported by GitHub. 28d6f75c When searching for human tasks to determine if the current user can complete it, filter on the "completed" flag. 34b36fe2 put setDisabled back in the awkward place since i was seeing the subsequent form stay disabled 4794a8cd Merge branch 'main' of github.com:sartography/spiff-arena into main 78b9ef73 Fix that dreadful unknown "KeyError" exception that was cropping up. Adding a bit of detail to the spiffworkflow exceptions when a duplicate process model is found. Disable the submit button on tasks after you click submit (avoid the double click and give users a better experience) d854a122 Merge pull request #125 from sartography/feature/dynamically-hide-fields-w-task-data eda73854 make form schema and form ui schema both dicts, add support for hiding fields based on task data bda549f3 Prevent double click on submit of forms. 3f02fa80 try to improve exception handling by avoiding raising ApiError from services 06835267 remove duplicate label on radio buttons 5d1e3517 less annoying file name for autocomplete c569acde frontend: use /api subpath instead of subdomain d3dda548 add deps for serve e6173efe Revert "revert Dockerfile until we get it working" 74103b97 revert Dockerfile until we get it working 8e9badd3 get bin as well for script df7a97e6 Merge pull request #116 from sartography/frontend/improve-dockerfile 7a17bc6f remove unneeded divs 2cf58c24 IBM says you can't have more columns than your parents, even if you try to start another grid, with kburnett abc85ee3 make task show wide, and make repeating form icons match site styles. w/ dfunk 6400827e even textareas need to have blank labels since labels are in FieldTemplate 462852d6 replace fieldTemplate with unthemed core version and remove labels since that is handled in there a50dd004 wrap field template so we can style with margin bottom e6a1ca97 new mechanism to handle help more in line with how carbon works cb6ce6b4 frontend: avoid redundant steps in Dockerfile b6b7ceeb we were expecting an object when doing this check, so codify it cfcfe292 use the 403 response to tell if a user has access to task data on the task show page w/ burnettk 355406e2 do not reset error state from the adminroutes component since this causes the error to be removed right away and then cannot be displayed w/ burnettk 3e7962cf if we get a result back it will be a task with a model identifier 0f043f72 use the ProcessInstanceTask interface where we can and move some stuff around better for useEffect 4ee4e5e0 run_pyl had various recommendations that I find a bit of a pain in the butt, but that I did anyway. 84e7d3fa Merge remote-tracking branch 'origin/main' into feature/jinja_errors acbc0a07 Added useMemo to error context No longer clear errors in the task bar, as that will constantly remove them as soon as they are shown. 19c3ab0e TaskShow had a useEffect that depended on params, that dependency caused an infinite request cycle when an error occured. The same issue was happening on the ProcessInstanceListTable, and there it was being managed by a "SafelySetErrorMessage" function in one case, but would not be addressed in all possible cases. c37224ec added the process model identifier for the diagram if it is not the top level w/ burnettk befefb6d Merge pull request #107 from sartography/feature/metadata_on_instance_show 65e42110 use a modal for metadata instead w/ burnettk 4a2f2a00 put process instance show page to match main w/ burnettk 0f1ab490 do not allow deleting primary bpmn file and do not allow instantiating models without a primary bpmn file w/ burnettk 3718f1a3 show metadata on instance show page but for some reason it reorders elements w/ burnettk 400a1469 add process model file name validation for new files w/ burnettk 132c5814 added locking system for process instances so hopefully background jobs will not take instances currently being run by the user w/ burnettk 3fa86949 make sure that all new form field elements are not dropdowns f69d3416 expanded functionality of the form builder 2453938f use the correct place for keycloak w/ burnettk 3d85a5f6 Merges 50d0a8e3 Lots of adjustments from running pyl Main change is in the ErrorDisplay.tsx to assure all error information is provided. and index.css to make it "pretty" git-subtree-dir: spiffworkflow-frontend git-subtree-split: c22d22ba5d8a96dca66a405d9c230284c81b4740
2023-02-23 15:49:57 +00:00
## Runtime configuration options
The frontend docker image respects the following environment variables.
SPIFFWORKFLOW_FRONTEND_RUNTIME_CONFIG_APP_ROUTING_STRATEGY=subdomain_based
SPIFFWORKFLOW_FRONTEND_RUNTIME_CONFIG_APP_ROUTING_STRATEGY=path_based
subdomain_based example: api.spiffworkflow.org goes to backend
path_based example: spiffworkflow.org/api goes to backend
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
### Analyzing the Bundle Size
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
### Making a Progressive Web App
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
### Advanced Configuration
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `npm run build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)