Skip to content

Commit 1473ed1

Browse files
add username filter to published visualizations grid
1 parent f62c8ff commit 1473ed1

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

client/src/components/Grid/GridVisualization.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ library.add(faPlus);
1818
1919
interface Props {
2020
activeList?: "my" | "shared" | "published";
21+
username?: string;
2122
}
2223
23-
withDefaults(defineProps<Props>(), {
24+
const props = withDefaults(defineProps<Props>(), {
2425
activeList: "my",
26+
username: undefined,
2527
});
2628
</script>
2729

@@ -59,6 +61,6 @@ withDefaults(defineProps<Props>(), {
5961
</BNav>
6062
<GridList v-if="activeList === 'my'" :grid-config="visualizationsGridConfig" embedded />
6163
<GridList v-else-if="activeList === 'shared'" :grid-config="visualizationsSharedGridConfig" embedded />
62-
<GridList v-else :grid-config="visualizationsPublishedGridConfig" embedded />
64+
<GridList v-else :grid-config="visualizationsPublishedGridConfig" embedded :username-search="props.username" />
6365
</div>
6466
</template>

client/src/components/Grid/configs/visualizationsPublished.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ const validFilters: Record<string, ValidFilter<string | boolean | undefined>> =
103103
handler: contains("tag", "tag", expandNameTag),
104104
menuItem: true,
105105
},
106+
user: { placeholder: "user", type: String, handler: contains("username"), menuItem: true },
106107
};
107108

108109
/**

client/src/entry/analysis/router.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,9 +662,10 @@ export function getRouter(Galaxy) {
662662
{
663663
path: "visualizations/list_published",
664664
component: GridVisualization,
665-
props: {
665+
props: (route) => ({
666666
activeList: "published",
667-
},
667+
username: route.query["f-username"],
668+
}),
668669
},
669670
{
670671
path: "visualizations/list_shared",

0 commit comments

Comments
 (0)