mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-12 18:44:14 +00:00
added bin/console command that runs flask shell and align zoom tooltips to the bottom w/ burnettk
This commit is contained in:
parent
6c41d54502
commit
8220aa42ef
14
spiffworkflow-backend/bin/console
Executable file
14
spiffworkflow-backend/bin/console
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function error_handler() {
|
||||||
|
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
||||||
|
exit "$2"
|
||||||
|
}
|
||||||
|
trap 'error_handler ${LINENO} $?' ERR
|
||||||
|
set -o errtrace -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
|
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||||
|
. "${script_dir}/local_development_environment_setup"
|
||||||
|
|
||||||
|
export SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER_IN_CREATE_APP=false
|
||||||
|
poetry run flask shell
|
50
spiffworkflow-backend/bin/local_development_environment_setup
Executable file
50
spiffworkflow-backend/bin/local_development_environment_setup
Executable file
@ -0,0 +1,50 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function error_handler() {
|
||||||
|
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
||||||
|
exit "$2"
|
||||||
|
}
|
||||||
|
trap 'error_handler ${LINENO} $?' ERR
|
||||||
|
set -o errtrace -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
|
if [ "${BASH_SOURCE[0]}" -ef "$0" ]; then
|
||||||
|
echo "Hey, you should source this script, not execute it!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
port="${SPIFFWORKFLOW_BACKEND_PORT:-7000}"
|
||||||
|
|
||||||
|
process_model_dir="${1:-}"
|
||||||
|
|
||||||
|
if [[ -z "${SPIFFWORKFLOW_BACKEND_BPMN_SPEC_ABSOLUTE_DIR:-}" ]]; then
|
||||||
|
if [[ -n "${process_model_dir}" ]] && [[ -d "${process_model_dir}" ]]; then
|
||||||
|
SPIFFWORKFLOW_BACKEND_BPMN_SPEC_ABSOLUTE_DIR="$process_model_dir"
|
||||||
|
else
|
||||||
|
SPIFFWORKFLOW_BACKEND_BPMN_SPEC_ABSOLUTE_DIR=$(./bin/find_sample_process_models)
|
||||||
|
fi
|
||||||
|
export SPIFFWORKFLOW_BACKEND_BPMN_SPEC_ABSOLUTE_DIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$process_model_dir" == "acceptance" ]]; then
|
||||||
|
export SPIFFWORKFLOW_BACKEND_LOAD_FIXTURE_DATA=true
|
||||||
|
export SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME=acceptance_tests.yml
|
||||||
|
elif [[ "$process_model_dir" == "localopenid" ]]; then
|
||||||
|
export SPIFFWORKFLOW_BACKEND_OPEN_ID_SERVER_URL="http://localhost:$port/openid"
|
||||||
|
export SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME="example.yml"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "${SPIFFWORKFLOW_BACKEND_ENV:-}" ]]; then
|
||||||
|
export SPIFFWORKFLOW_BACKEND_ENV=local_development
|
||||||
|
fi
|
||||||
|
|
||||||
|
export FLASK_SESSION_SECRET_KEY="e7711a3ba96c46c68e084a86952de16f"
|
||||||
|
export SPIFFWORKFLOW_BACKEND_APPLICATION_ROOT="/"
|
||||||
|
|
||||||
|
export FLASK_DEBUG=1
|
||||||
|
|
||||||
|
if [[ -z "${SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER_IN_CREATE_APP:-}" ]]; then
|
||||||
|
SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER_IN_CREATE_APP=true
|
||||||
|
fi
|
||||||
|
export SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER_IN_CREATE_APP
|
||||||
|
|
||||||
|
export FLASK_APP=src/spiffworkflow_backend
|
@ -7,35 +7,8 @@ function error_handler() {
|
|||||||
trap 'error_handler ${LINENO} $?' ERR
|
trap 'error_handler ${LINENO} $?' ERR
|
||||||
set -o errtrace -o errexit -o nounset -o pipefail
|
set -o errtrace -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
port="${SPIFFWORKFLOW_BACKEND_PORT:-7000}"
|
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||||
|
. "${script_dir}/local_development_environment_setup"
|
||||||
process_model_dir="${1:-}"
|
|
||||||
|
|
||||||
if [[ -z "${SPIFFWORKFLOW_BACKEND_BPMN_SPEC_ABSOLUTE_DIR:-}" ]]; then
|
|
||||||
if [[ -n "${process_model_dir}" ]] && [[ -d "${process_model_dir}" ]]; then
|
|
||||||
SPIFFWORKFLOW_BACKEND_BPMN_SPEC_ABSOLUTE_DIR="$process_model_dir"
|
|
||||||
else
|
|
||||||
SPIFFWORKFLOW_BACKEND_BPMN_SPEC_ABSOLUTE_DIR=$(./bin/find_sample_process_models)
|
|
||||||
fi
|
|
||||||
export SPIFFWORKFLOW_BACKEND_BPMN_SPEC_ABSOLUTE_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$process_model_dir" == "acceptance" ]]; then
|
|
||||||
export SPIFFWORKFLOW_BACKEND_LOAD_FIXTURE_DATA=true
|
|
||||||
export SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME=acceptance_tests.yml
|
|
||||||
elif [[ "$process_model_dir" == "localopenid" ]]; then
|
|
||||||
export SPIFFWORKFLOW_BACKEND_OPEN_ID_SERVER_URL="http://localhost:$port/openid"
|
|
||||||
export SPIFFWORKFLOW_BACKEND_PERMISSIONS_FILE_NAME="example.yml"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "${SPIFFWORKFLOW_BACKEND_ENV:-}" ]]; then
|
|
||||||
export SPIFFWORKFLOW_BACKEND_ENV=local_development
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# export FLASK_SESSION_SECRET_KEY="super_secret_key"
|
|
||||||
export FLASK_SESSION_SECRET_KEY="e7711a3ba96c46c68e084a86952de16f"
|
|
||||||
export SPIFFWORKFLOW_BACKEND_APPLICATION_ROOT="/"
|
|
||||||
|
|
||||||
if [[ -n "${SPIFFWORKFLOW_BACKEND_LOAD_FIXTURE_DATA:-}" ]]; then
|
if [[ -n "${SPIFFWORKFLOW_BACKEND_LOAD_FIXTURE_DATA:-}" ]]; then
|
||||||
./bin/boot_server_in_docker
|
./bin/boot_server_in_docker
|
||||||
@ -46,10 +19,6 @@ else
|
|||||||
SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER_IN_CREATE_APP=false SPIFFWORKFLOW_BACKEND_FAIL_ON_INVALID_PROCESS_MODELS=false poetry run python bin/save_all_bpmn.py
|
SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER_IN_CREATE_APP=false SPIFFWORKFLOW_BACKEND_FAIL_ON_INVALID_PROCESS_MODELS=false poetry run python bin/save_all_bpmn.py
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "${SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER_IN_CREATE_APP:-}" ]]; then
|
|
||||||
SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER_IN_CREATE_APP=true
|
|
||||||
fi
|
|
||||||
|
|
||||||
# this line blocks
|
# this line blocks
|
||||||
SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER_IN_CREATE_APP="${SPIFFWORKFLOW_BACKEND_RUN_BACKGROUND_SCHEDULER_IN_CREATE_APP}" FLASK_APP=src/spiffworkflow_backend poetry run flask run -p "$port" --host=0.0.0.0
|
poetry run flask run -p "$port" --host=0.0.0.0
|
||||||
fi
|
fi
|
||||||
|
2004
spiffworkflow-backend/realmstuff/master-realm.json
Normal file
2004
spiffworkflow-backend/realmstuff/master-realm.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -750,12 +750,15 @@ export default function ReactDiagramEditor({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const diagramControlButtons = () => {
|
const diagramControlButtons = () => {
|
||||||
|
// align the iconDescription to the bottom so it doesn't cover up the Save button
|
||||||
|
// when mousing through them
|
||||||
return (
|
return (
|
||||||
<div className="diagram-control-buttons">
|
<div className="diagram-control-buttons">
|
||||||
<Button
|
<Button
|
||||||
kind="ghost"
|
kind="ghost"
|
||||||
renderIcon={ZoomIn}
|
renderIcon={ZoomIn}
|
||||||
iconDescription="Zoom In"
|
align="bottom-left"
|
||||||
|
iconDescription="Zoom in"
|
||||||
hasIconOnly
|
hasIconOnly
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
zoom(1);
|
zoom(1);
|
||||||
@ -764,7 +767,8 @@ export default function ReactDiagramEditor({
|
|||||||
<Button
|
<Button
|
||||||
kind="ghost"
|
kind="ghost"
|
||||||
renderIcon={ZoomOut}
|
renderIcon={ZoomOut}
|
||||||
iconDescription="Zoom Out"
|
align="bottom-left"
|
||||||
|
iconDescription="Zoom out"
|
||||||
hasIconOnly
|
hasIconOnly
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
zoom(-1);
|
zoom(-1);
|
||||||
@ -773,7 +777,8 @@ export default function ReactDiagramEditor({
|
|||||||
<Button
|
<Button
|
||||||
kind="ghost"
|
kind="ghost"
|
||||||
renderIcon={ZoomFit}
|
renderIcon={ZoomFit}
|
||||||
iconDescription="Zoom Fit"
|
align="bottom-left"
|
||||||
|
iconDescription="Zoom fit"
|
||||||
hasIconOnly
|
hasIconOnly
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
zoom(0);
|
zoom(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user