[go: nahoru, domu]

Skip to content

Commit

Permalink
add a "get more workflows" button to the bottom of the workflow list
Browse files Browse the repository at this point in the history
  • Loading branch information
martenson committed Oct 6, 2023
1 parent f51f64b commit a39f078
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
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

0 comments on commit a39f078

Please sign in to comment.