Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a "get more workflows" button to the bottom of the workflow list #16794

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion client/src/components/Workflow/Import/TrsSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ import TrsServerSelection from "./TrsServerSelection.vue";
import TrsTool from "./TrsTool.vue";
import LoadingSpan from "@/components/LoadingSpan.vue";

const props = defineProps({
search: {
type: String,
default: null,
},
});

type TrsSearchData = {
id: string;
name: string;
Expand Down Expand Up @@ -71,7 +78,7 @@ watch(query, async () => {
function onTrsSelection(selection: TrsSelection) {
trsSelection.value = selection;
trsServer.value = selection.id;
query.value = "";
query.value = props.search ? props.search : "";
}

function onTrsSelectionError(message: string) {
Expand Down
17 changes: 17 additions & 0 deletions client/src/components/Workflow/WorkflowList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,17 @@
</b-card>
</template>
</b-table>
<b-alert class="search-more-workflows" variant="info" show>
<div>
<b-button
class="px-1"
title="Search workflows from other sources"
variant="link"
@click.prevent.stop="onSearchMore">
Get more workflows
</b-button>
</div>
</b-alert>
<b-pagination
v-show="rows >= perPage"
v-model="currentPage"
Expand Down Expand Up @@ -304,6 +315,12 @@ export default {
normalizeTag: function (tag) {
return tag.replace(/(tag:')#/g, "$1name:");
},
onSearchMore: function () {
const query = this.filter;
const path = "/workflows/trs_search";
const routerParams = query ? { path, query: { query } } : { path };
this.$router.push(routerParams);
},
},
};
</script>
3 changes: 3 additions & 0 deletions client/src/entry/analysis/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,9 @@ export function getRouter(Galaxy) {
{
path: "workflows/trs_search",
component: TrsSearch,
props: (route) => ({
search: route.query.query,
}),
},
{
path: "workflows/:storedWorkflowId/invocations",
Expand Down