From fb7456a0e850290961c0f8be59c09fdd425f15f1 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Wed, 27 Oct 2021 14:22:53 +0300 Subject: Rename metadata edit endpoints --- wqflask/wqflask/metadata_edits.py | 8 ++++---- wqflask/wqflask/templates/edit_phenotype.html | 2 +- wqflask/wqflask/templates/edit_probeset.html | 2 +- wqflask/wqflask/templates/show_trait_details.html | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/wqflask/wqflask/metadata_edits.py b/wqflask/wqflask/metadata_edits.py index 7e237976..08ff4704 100644 --- a/wqflask/wqflask/metadata_edits.py +++ b/wqflask/wqflask/metadata_edits.py @@ -116,7 +116,7 @@ def edit_probeset(conn, name): } -@metadata_edit.route("//traits//edit") +@metadata_edit.route("//traits/") @edit_access_required def display_phenotype_metadata(dataset_id: str, name: str): conn = MySQLdb.Connect(db=current_app.config.get("DB_NAME"), @@ -136,7 +136,7 @@ def display_phenotype_metadata(dataset_id: str, name: str): ) -@metadata_edit.route("/traits//edit") +@metadata_edit.route("/traits/") @edit_access_required def display_probeset_metadata(name: str): conn = MySQLdb.Connect(db=current_app.config.get("DB_NAME"), @@ -153,7 +153,7 @@ def display_probeset_metadata(name: str): ) -@metadata_edit.route("//traits//update", methods=("POST",)) +@metadata_edit.route("//traits/", methods=("POST",)) @edit_access_required def update_phenotype(dataset_id: str, name: str): conn = MySQLdb.Connect(db=current_app.config.get("DB_NAME"), @@ -276,5 +276,5 @@ def update_phenotype(dataset_id: str, name: str): editor=author, json_data=json.dumps(diff_data))) flash(f"Diff-data: \n{diff_data}\nhas been uploaded", "success") - return redirect(f"/datasets/{dataset_id}/traits/{name}/edit" + return redirect(f"/datasets/{dataset_id}/traits/{name}" f"?resource-id={request.args.get('resource-id')}") diff --git a/wqflask/wqflask/templates/edit_phenotype.html b/wqflask/wqflask/templates/edit_phenotype.html index 5166a903..6b08163e 100644 --- a/wqflask/wqflask/templates/edit_phenotype.html +++ b/wqflask/wqflask/templates/edit_phenotype.html @@ -62,7 +62,7 @@ {% endif %} -
+

Trait Information:

diff --git a/wqflask/wqflask/templates/edit_probeset.html b/wqflask/wqflask/templates/edit_probeset.html index 85d49561..cd7b1379 100644 --- a/wqflask/wqflask/templates/edit_probeset.html +++ b/wqflask/wqflask/templates/edit_probeset.html @@ -53,7 +53,7 @@ Submit Trait | Reset {% endif %} - +Probeset Information:
diff --git a/wqflask/wqflask/templates/show_trait_details.html b/wqflask/wqflask/templates/show_trait_details.html index b0639879..7a09f52e 100644 --- a/wqflask/wqflask/templates/show_trait_details.html +++ b/wqflask/wqflask/templates/show_trait_details.html @@ -237,11 +237,11 @@ {% if admin_status.get('metadata', Datarole.VIEW) > DataRole.VIEW %} {% if this_trait.dataset.type == 'Publish' %} {{ this_trait }} - + {% endif %} {% if this_trait.dataset.type == 'ProbeSet' %} - + {% endif %} {% if admin_status.get('metadata', DataRole.VIEW) > DataRole.VIEW %} -- cgit v1.2.3