diff --git a/client/src/components/Common/Tags.vue b/client/src/components/Common/Tags.vue index e6470d138d3..972fe3daee1 100644 --- a/client/src/components/Common/Tags.vue +++ b/client/src/components/Common/Tags.vue @@ -1,5 +1,5 @@ diff --git a/client/src/components/Workflow/WorkflowList.vue b/client/src/components/Workflow/WorkflowList.vue index 93e336382f2..306a33abbb9 100644 --- a/client/src/components/Workflow/WorkflowList.vue +++ b/client/src/components/Workflow/WorkflowList.vue @@ -33,24 +33,37 @@ @onRemove="onRemove" @onUpdate="onUpdate" @onSuccess="onSuccess" - @onError="onError" /> + @onError="onError" + @onRestore="onRestore" /> -

This textbox box can be used to filter the workflows displayed. +

This input can be used to filter the workflows displayed.

-

Text entered here will be searched against workflow names and tags. Additionally, advanced -filtering tags can be used to refine the search more precisely. Tags are of the form -<tag_name>:<tag_value> or <tag_name>:'<tag_value>'. -For instance to search just for RNAseq in the workflow name, name:rnsseq can be used. -Notice by default the search is not case-sensitive. +

+ Text entered here will be searched against workflow names and workflow + tags. Additionally, advanced filtering tags can be used to refine the + search more precisely. Filtering tags are of the form + <tag_name>:<tag_value> or + <tag_name>:'<tag_value>'. For instance to + search just for RNAseq in the workflow name, + name:rnsseq can be used. Notice by default the search is + not case-sensitive. If the quoted version of tag is used, the search is + case sensitive and only full matches will be returned. So + name:'RNAseq' would show only workflows named exactly + RNAseq. +

-If the quoted version of tag is used, the search is not case sensitive and only full matches will be -returned. So name:'RNAseq' would show only workflows named exactly RNAseq. - -

The available tags are: -

-
name
-
This filters only against the workflow name.
-
tag
-
This filters only against the workflow tag. You may also just click on a tag in your list of workflows to filter on that tag using this directly.
-
is:published
-
This filters the workflows such that only published workflows are shown. You may also just click on the "published" icon of a workflow in your list to filter on this directly.
-
is:shared
-
This filters the workflows such that only workflows shared from another user directly with you are are shown. You may also just click on the "shared with me" icon of a workflow in your list to filter on this directly.
-
- -`; +

The available filtering tags are:

+
+
name
+
+ Shows workflows with given sequence of characters in their names. +
+
tag
+
+ Shows workflows with the given workflow tag. You may also just click + on a tag in your list of workflows to filter on that tag directly. +
+
is:published
+
+ Shows published workflows. You may also just click on the + "published" icon of a workflow in your list to filter on this + directly. +
+
is:shared
+
+ Shows workflows shared by another user directly with you. You may + also just click on the "shared with me" icon of a workflow in your + list to filter on this directly. +
+
is:deleted
+
Shows deleted workflows.
+
+`; export default { components: { @@ -234,6 +266,9 @@ export default { onUpdate: function (id, data) { this.refresh(); }, + onRestore: function (id) { + this.refresh(); + }, }, }; diff --git a/client/src/components/Workflow/services.js b/client/src/components/Workflow/services.js index cf54aa1f76b..93a0833b8e1 100644 --- a/client/src/components/Workflow/services.js +++ b/client/src/components/Workflow/services.js @@ -37,6 +37,16 @@ export class Services { } } + async undeleteWorkflow(id) { + const url = safePath(`/api/workflows/${id}/undelete`); + try { + const response = await axios.post(url); + return response.data; + } catch (e) { + rethrowSimple(e); + } + } + async updateWorkflow(id, data) { const url = safePath(`/api/workflows/${id}`); try { diff --git a/lib/galaxy/managers/workflows.py b/lib/galaxy/managers/workflows.py index e98d12fc191..795ea44fa84 100644 --- a/lib/galaxy/managers/workflows.py +++ b/lib/galaxy/managers/workflows.py @@ -166,7 +166,6 @@ class WorkflowsManager(sharable.SharableModelManager, deletable.DeletableManager query = query.options(latest_workflow_load) query = query.filter(or_(*filters)) query = query.filter(model.StoredWorkflow.table.c.hidden == (true() if show_hidden else false())) - query = query.filter(model.StoredWorkflow.table.c.deleted == (true() if show_deleted else false())) if payload.search: search_query = payload.search parsed_search = parse_filters_structured(search_query, INDEX_SEARCH_FILTERS) @@ -194,6 +193,9 @@ class WorkflowsManager(sharable.SharableModelManager, deletable.DeletableManager elif key == "is": if q == "published": query = query.filter(model.StoredWorkflow.published == true()) + elif q == "deleted": + query = query.filter(model.StoredWorkflow.deleted == true()) + show_deleted = true elif q == "shared_with_me": if not show_shared: message = "Can only use tag is:shared_with_me if show_shared parameter also true." @@ -213,6 +215,7 @@ class WorkflowsManager(sharable.SharableModelManager, deletable.DeletableManager term, ) ) + query = query.filter(model.StoredWorkflow.table.c.deleted == (true() if show_deleted else false())) if include_total_count: total_matches = query.count() else: diff --git a/lib/galaxy_test/selenium/test_workflow_management.py b/lib/galaxy_test/selenium/test_workflow_management.py index 25996a9f135..87e0b4fb806 100644 --- a/lib/galaxy_test/selenium/test_workflow_management.py +++ b/lib/galaxy_test/selenium/test_workflow_management.py @@ -158,7 +158,6 @@ class TestWorkflowManagement(SeleniumTestCase, TestsGalaxyPagers, UsesWorkflowAs self.workflow_index_rename("fordelete") self._assert_showing_n_workflows(1) self.workflow_index_click_option("Delete") - self.accept_alert() self._assert_showing_n_workflows(0) self.workflow_index_open()