From 71c1f79742efba0d4d3d4f0fa1a59c863c4a70e1 Mon Sep 17 00:00:00 2001 From: burnettk Date: Wed, 23 Nov 2022 10:42:41 -0500 Subject: [PATCH] rename process_groups_list to process_group_list and fix lint --- src/spiffworkflow_backend/api.yml | 2 +- .../routes/admin_blueprint/admin_blueprint.py | 12 ++++++------ ...cess_groups_list.html => process_group_list.html} | 0 .../templates/process_group_show.html | 2 +- .../routes/process_api_blueprint.py | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) rename src/spiffworkflow_backend/routes/admin_blueprint/templates/{process_groups_list.html => process_group_list.html} (100%) diff --git a/src/spiffworkflow_backend/api.yml b/src/spiffworkflow_backend/api.yml index f85cc74f..23cd66c5 100755 --- a/src/spiffworkflow_backend/api.yml +++ b/src/spiffworkflow_backend/api.yml @@ -160,7 +160,7 @@ paths: schema: type: integer get: - operationId: spiffworkflow_backend.routes.process_api_blueprint.process_groups_list + operationId: spiffworkflow_backend.routes.process_api_blueprint.process_group_list summary: get list tags: - Process Groups diff --git a/src/spiffworkflow_backend/routes/admin_blueprint/admin_blueprint.py b/src/spiffworkflow_backend/routes/admin_blueprint/admin_blueprint.py index 2e480f2a..f98bda4f 100644 --- a/src/spiffworkflow_backend/routes/admin_blueprint/admin_blueprint.py +++ b/src/spiffworkflow_backend/routes/admin_blueprint/admin_blueprint.py @@ -27,10 +27,10 @@ ALLOWED_BPMN_EXTENSIONS = {"bpmn", "dmn"} @admin_blueprint.route("/process-groups", methods=["GET"]) -def process_groups_list() -> str: - """Process_groups_list.""" +def process_group_list() -> str: + """Process_group_list.""" process_groups = ProcessModelService().get_process_groups() - return render_template("process_groups_list.html", process_groups=process_groups) + return render_template("process_group_list.html", process_groups=process_groups) @admin_blueprint.route("/process-groups/", methods=["GET"]) @@ -48,7 +48,7 @@ def process_model_show(process_model_id: str) -> Union[str, Response]: current_file_name = process_model.primary_file_name if current_file_name is None: flash("No primary_file_name", "error") - return redirect(url_for("admin.process_groups_list")) + return redirect(url_for("admin.process_group_list")) bpmn_xml = SpecFileService.get_data(process_model, current_file_name) return render_template( "process_model_show.html", @@ -129,7 +129,7 @@ def process_model_save(process_model_id: str, file_name: str) -> Union[str, Resp SpecFileService.update_file(process_model, file_name, request.get_data()) if process_model.primary_file_name is None: flash("No primary_file_name", "error") - return redirect(url_for("admin.process_groups_list")) + return redirect(url_for("admin.process_group_list")) bpmn_xml = SpecFileService.get_data(process_model, process_model.primary_file_name) return render_template( "process_model_edit.html", @@ -155,7 +155,7 @@ def process_model_run(process_model_id: str) -> Union[str, Response]: current_file_name = process_model.primary_file_name if current_file_name is None: flash("No primary_file_name", "error") - return redirect(url_for("admin.process_groups_list")) + return redirect(url_for("admin.process_group_list")) bpmn_xml = SpecFileService.get_data(process_model, current_file_name) return render_template( diff --git a/src/spiffworkflow_backend/routes/admin_blueprint/templates/process_groups_list.html b/src/spiffworkflow_backend/routes/admin_blueprint/templates/process_group_list.html similarity index 100% rename from src/spiffworkflow_backend/routes/admin_blueprint/templates/process_groups_list.html rename to src/spiffworkflow_backend/routes/admin_blueprint/templates/process_group_list.html diff --git a/src/spiffworkflow_backend/routes/admin_blueprint/templates/process_group_show.html b/src/spiffworkflow_backend/routes/admin_blueprint/templates/process_group_show.html index a5fbab88..2a41abe9 100644 --- a/src/spiffworkflow_backend/routes/admin_blueprint/templates/process_group_show.html +++ b/src/spiffworkflow_backend/routes/admin_blueprint/templates/process_group_show.html @@ -3,7 +3,7 @@ {% block content %} diff --git a/src/spiffworkflow_backend/routes/process_api_blueprint.py b/src/spiffworkflow_backend/routes/process_api_blueprint.py index 31eff335..1f2e776e 100644 --- a/src/spiffworkflow_backend/routes/process_api_blueprint.py +++ b/src/spiffworkflow_backend/routes/process_api_blueprint.py @@ -189,10 +189,10 @@ def process_group_update( return make_response(jsonify(process_group), 200) -def process_groups_list( +def process_group_list( process_group_identifier: Optional[str] = None, page: int = 1, per_page: int = 100 ) -> flask.wrappers.Response: - """Process_groups_list.""" + """Process_group_list.""" if process_group_identifier is not None: process_groups = ProcessModelService().get_process_groups( process_group_identifier