rename process_groups_list to process_group_list and fix lint

This commit is contained in:
burnettk 2022-11-23 10:42:41 -05:00
parent 0eeebc497b
commit 4e1e99f24a
6 changed files with 11 additions and 11 deletions

View File

@ -160,7 +160,7 @@ paths:
schema: schema:
type: integer type: integer
get: get:
operationId: spiffworkflow_backend.routes.process_api_blueprint.process_groups_list operationId: spiffworkflow_backend.routes.process_api_blueprint.process_group_list
summary: get list summary: get list
tags: tags:
- Process Groups - Process Groups

View File

@ -27,10 +27,10 @@ ALLOWED_BPMN_EXTENSIONS = {"bpmn", "dmn"}
@admin_blueprint.route("/process-groups", methods=["GET"]) @admin_blueprint.route("/process-groups", methods=["GET"])
def process_groups_list() -> str: def process_group_list() -> str:
"""Process_groups_list.""" """Process_group_list."""
process_groups = ProcessModelService().get_process_groups() 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/<process_group_id>", methods=["GET"]) @admin_blueprint.route("/process-groups/<process_group_id>", 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 current_file_name = process_model.primary_file_name
if current_file_name is None: if current_file_name is None:
flash("No primary_file_name", "error") 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) bpmn_xml = SpecFileService.get_data(process_model, current_file_name)
return render_template( return render_template(
"process_model_show.html", "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()) SpecFileService.update_file(process_model, file_name, request.get_data())
if process_model.primary_file_name is None: if process_model.primary_file_name is None:
flash("No primary_file_name", "error") 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) bpmn_xml = SpecFileService.get_data(process_model, process_model.primary_file_name)
return render_template( return render_template(
"process_model_edit.html", "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 current_file_name = process_model.primary_file_name
if current_file_name is None: if current_file_name is None:
flash("No primary_file_name", "error") 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) bpmn_xml = SpecFileService.get_data(process_model, current_file_name)
return render_template( return render_template(

View File

@ -3,7 +3,7 @@
{% block content %} {% block content %}
<button <button
type="button" type="button"
onclick="window.location.href='{{ url_for( 'admin.process_groups_list') }}';" onclick="window.location.href='{{ url_for( 'admin.process_group_list') }}';"
> >
Back Back
</button> </button>

View File

@ -189,10 +189,10 @@ def process_group_update(
return make_response(jsonify(process_group), 200) 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 process_group_identifier: Optional[str] = None, page: int = 1, per_page: int = 100
) -> flask.wrappers.Response: ) -> flask.wrappers.Response:
"""Process_groups_list.""" """Process_group_list."""
if process_group_identifier is not None: if process_group_identifier is not None:
process_groups = ProcessModelService().get_process_groups( process_groups = ProcessModelService().get_process_groups(
process_group_identifier process_group_identifier

View File

@ -783,7 +783,7 @@ export default function ProcessInstanceListTable({
); );
} }
if (textToShowIfEmpty) { if (textToShowIfEmpty) {
return <>{textToShowIfEmpty}</>; return <span>{textToShowIfEmpty}</span>;
} }
return null; return null;