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

Vueify Visualizations Grid #16892

Merged
merged 97 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
768d804
Replace visualization grid
guerler Oct 16, 2023
8d74a1f
Move visualizations api to fast api
guerler Oct 16, 2023
5b4387c
Add operations, date column and sharing details
guerler Oct 16, 2023
1a1a845
Add handling for async operations
guerler Oct 16, 2023
2776504
Place visualizations grid details into separate directory
guerler Oct 16, 2023
a5d7086
Add typing, add registry file
guerler Oct 17, 2023
5705069
Add more typing
guerler Oct 17, 2023
27aa150
Draft tag handler
guerler Oct 17, 2023
9e64745
Add field key handler typing
guerler Oct 17, 2023
92dd64f
Add copy operation for visualizations
guerler Oct 17, 2023
6363cd1
Draft deleted filter and allow setting deleted flag, should probably …
guerler Oct 17, 2023
ed85439
Add link to open visualization
guerler Oct 17, 2023
6cbdaa6
Add tag handling for visualizations grid
guerler Oct 17, 2023
dac10f2
Add sharing status icons to visualizations grid
guerler Oct 17, 2023
f36c568
Add more typing for visualizations backend
guerler Oct 18, 2023
c40ec6d
Add search, filter and order queries to visualizations manager
guerler Oct 19, 2023
93be013
Remove unused imports, apply return types
guerler Oct 19, 2023
83003b6
Add separate api endpoint for detailed visualization indexing
guerler Oct 19, 2023
1570c7b
Add typing for sharing status, add endpoints for summary and detailed…
guerler Oct 19, 2023
06d44c5
Use model variables
guerler Oct 19, 2023
a90478b
Use share model, prep for re-usability
guerler Oct 19, 2023
5c30389
Adjust dropdown and grid appearance
guerler Oct 19, 2023
fbe875f
Place sharing details into separate component
guerler Oct 20, 2023
c02ce5d
Strictly place grid elements into individual components
guerler Oct 20, 2023
25cf946
Add pagination to visualizations grid, delete unused debug file
guerler Oct 20, 2023
a56dc4d
Add timeout helper, fade out opration messages
guerler Oct 20, 2023
4908a52
Add sorting option
guerler Oct 20, 2023
33bd72e
Add temporary width control to avoid flickering when resorting
guerler Oct 20, 2023
f764d0f
use `FilterMenu` in new viz grid
ahmedhamidawan Oct 20, 2023
8974e22
Add dropdown item icons
guerler Oct 21, 2023
5bc0dd6
Alphabetically sort functions and attributes, move axios call to grid…
guerler Oct 21, 2023
d6cde50
Move bootstrap classes into template
guerler Oct 21, 2023
9ffd3fe
Add grid actions
guerler Oct 21, 2023
c11d313
Update open api schema
guerler Oct 21, 2023
642a1ad
Remove unused python imports
guerler Oct 21, 2023
4f3e05b
Explicitly import bootstrap vue components
guerler Oct 21, 2023
6e04fe8
Fix visualizations typing
guerler Oct 21, 2023
b38b78d
Remove legacy url attribute from visualizations index test
guerler Oct 21, 2023
14646f5
Parse data and total count as tuple
guerler Oct 21, 2023
14d8cb2
replace `GridSharing` with `SharingIndicators` in `GridList`
ahmedhamidawan Oct 23, 2023
cbf2aae
Remove grid sharing component, fix python linting in visualization se…
guerler Oct 24, 2023
1221897
Fix linting
guerler Oct 24, 2023
461e57f
Increase items per page to 25
guerler Oct 25, 2023
7f97f79
Fix filter handler
guerler Oct 25, 2023
4ddea75
Add basic jest test
guerler Oct 27, 2023
120cb4b
Use api schema to fetch visualizations
guerler Oct 30, 2023
291ca7b
Use api schema instead of axios
guerler Oct 30, 2023
7d41b50
Switch visualizations config to typescript
guerler Oct 30, 2023
1f4e128
Fix numeric type of total matches
guerler Oct 30, 2023
8bd1165
Fix typing
guerler Oct 30, 2023
a8dbb2c
explicitly type `ValidFilter` object for the vizualization config
ahmedhamidawan Oct 31, 2023
790fac5
Fix sortkeyliteral typing, restore router import
guerler Nov 1, 2023
0c1e0fe
Use axios for existing non-fastapi visualization api endpoints
guerler Nov 7, 2023
6106976
Add deleted filter to visaulziation grids
guerler Nov 7, 2023
9daeb4a
Allow users to undelete visualizations
guerler Nov 7, 2023
88ef88e
Fix alert
guerler Nov 7, 2023
99b8700
Avoid serializer, switch over to using schema only
guerler Nov 7, 2023
91e443f
Adjust visualizations index query
guerler Nov 7, 2023
cea2c95
Fix linting, update schema
guerler Nov 8, 2023
0ef4aa6
Allow changing tags for published visualizations
guerler Nov 8, 2023
e99734a
Adjust visualization manager queries
guerler Nov 8, 2023
39c4857
Add filter to visualizations grid
guerler Nov 8, 2023
2ee1f63
Accessing user through composable or store leads to race condition, u…
guerler Nov 8, 2023
e6707b0
Fix
guerler Nov 8, 2023
c70f09e
Replace legacy published grid with vue based grid
guerler Nov 8, 2023
659ef8a
Remove legacy grid shared module
guerler Nov 8, 2023
5f61af2
Add ordering test to visualizations api
guerler Nov 9, 2023
4788f8f
Add filtering test to visualizations api
guerler Nov 9, 2023
1abea75
Remove unused attribute from grid config, fix failing test
guerler Nov 9, 2023
304340c
Parse grid config to grid list wrapper, add test grid
guerler Nov 9, 2023
2959481
Add basic link field test for grid list component
guerler Nov 9, 2023
1632c26
Add basic column sort event handling tests to grid component
guerler Nov 9, 2023
bbb6bfd
Adjust api tests to account for additional visualization entries from…
guerler Nov 9, 2023
37ad99a
Add missing prefix helper to api calls
guerler Nov 11, 2023
867dad8
Add generic grid list operation rendering and handling test
guerler Nov 15, 2023
c539bd0
Add filter grid request handling jest test
guerler Nov 15, 2023
94a1ca6
Add grid list pagination test
guerler Nov 15, 2023
8ee334c
Update lib/galaxy/schema/visualization.py
guerler Nov 15, 2023
54f9c33
Update lib/galaxy/schema/visualization.py
guerler Nov 15, 2023
50edba2
Update lib/galaxy/webapps/galaxy/services/visualizations.py
guerler Nov 15, 2023
3314e14
Fix labeling
guerler Nov 15, 2023
49c9be6
Consistently use encoded types in visualizations schema
guerler Nov 15, 2023
a96a381
Import fontawesome icon classes
guerler Nov 15, 2023
3cd64c6
Explicitly declare emits
guerler Nov 15, 2023
a4fe8af
Remove unnecessary ts-ignore for utcdate component
guerler Nov 15, 2023
d1f7e83
Switch links to buttons looking like links
guerler Nov 15, 2023
ae39ef7
Narrow down width to a percentage number
guerler Nov 15, 2023
2de314f
Attempt to enforce type script type validation
guerler Nov 15, 2023
ed14cd0
Add router type to grid configuration
guerler Nov 15, 2023
cb41ce3
Force type guards by explicitly specifiying field type
guerler Nov 15, 2023
3585aeb
Add additional types to config initialization, expect type specific i…
guerler Nov 16, 2023
07c1bcd
Fix visualization api type mismatch
guerler Nov 16, 2023
048ec93
Fix copy operation relying on non-fastapi endpoint
guerler Nov 16, 2023
98c71d4
Adjust grid link test, use button instead
guerler Nov 16, 2023
3a54fdf
Remove unused shareindicator component section for now
guerler Nov 16, 2023
3039faa
Use IconDefinition instead of IconProp
guerler Nov 16, 2023
8e23476
Fix typing warnings
guerler Nov 16, 2023
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
159 changes: 157 additions & 2 deletions client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,10 @@ export interface paths {
*/
get: operations["version_api_version_get"];
};
"/api/visualizations": {
/** Returns visualizations for the current user. */
get: operations["index_api_visualizations_get"];
};
"/api/visualizations/{id}/disable_link_access": {
/**
* Makes this item inaccessible by a URL link.
Expand Down Expand Up @@ -1534,7 +1538,7 @@ export interface paths {
};
"/api/visualizations/{id}/sharing": {
/**
* Get the current sharing status of the given Page.
* Get the current sharing status of the given Visualization.
* @description Return the sharing status of the item.
*/
get: operations["sharing_api_visualizations__id__sharing_get"];
Expand Down Expand Up @@ -9446,6 +9450,81 @@ export interface components {
* @description Base model definition with common configuration used by all derived models.
*/
Visualization: Record<string, never>;
/**
* VisualizationSummary
* @description Base model definition with common configuration used by all derived models.
*/
VisualizationSummary: {
/**
* Annotation
* @description The annotation of this Visualization.
*/
annotation?: string;
/**
* Create Time
* Format: date-time
* @description The time and date this item was created.
*/
create_time?: string;
/**
* DbKey
* @description The database key of the visualization.
*/
dbkey?: string;
/**
* Deleted
* @description Whether this Visualization has been deleted.
*/
deleted: boolean;
/**
* ID
* @description Encoded ID of the Visualization.
* @example 0123456789ABCDEF
*/
id: string;
/**
* Importable
* @description Whether this Visualization can be imported.
*/
importable: boolean;
/**
* Published
* @description Whether this Visualization has been published.
*/
published: boolean;
/**
* Tags
* @description A list of tags to add to this item.
*/
tags: components["schemas"]["TagCollection"];
/**
* Title
* @description The name of the visualization.
*/
title: string;
/**
* Type
* @description The type of the visualization.
*/
type: string;
/**
* Update Time
* Format: date-time
* @description The last time and date this item was updated.
*/
update_time?: string;
/**
* Username
* @description The name of the user owning this Visualization.
*/
username: string;
};
/**
* VisualizationSummaryList
* @description Base model definition with common configuration used by all derived models.
* @default []
*/
VisualizationSummaryList: components["schemas"]["VisualizationSummary"][];
/**
* WorkflowInvocationStateSummary
* @description Base model definition with common configuration used by all derived models.
Expand Down Expand Up @@ -17858,6 +17937,82 @@ export interface operations {
};
};
};
index_api_visualizations_get: {
/** Returns visualizations for the current user. */
parameters?: {
/** @description Whether to include deleted visualizations in the result. */
/** @description The maximum number of items to return. */
/** @description Starts at the beginning skip the first ( offset - 1 ) items and begin returning at the Nth item */
/** @description Sort visualization index by this specified attribute on the visualization model */
/** @description Sort in descending order? */
/**
* @description A mix of free text and GitHub-style tags used to filter the index operation.
*
* ## Query Structure
*
* GitHub-style filter tags (not be confused with Galaxy tags) are tags of the form
* `<tag_name>:<text_no_spaces>` or `<tag_name>:'<text with potential spaces>'`. The tag name
* *generally* (but not exclusively) corresponds to the name of an attribute on the model
* being indexed (i.e. a column in the database).
*
* If the tag is quoted, the attribute will be filtered exactly. If the tag is unquoted,
* generally a partial match will be used to filter the query (i.e. in terms of the implementation
* this means the database operation `ILIKE` will typically be used).
*
* Once the tagged filters are extracted from the search query, the remaining text is just
* used to search various documented attributes of the object.
*
* ## GitHub-style Tags Available
*
* `title`
* : The visualization's title.
*
* `slug`
* : The visualization's slug. (The tag `s` can be used a short hand alias for this tag to filter on this attribute.)
*
* `tag`
* : The visualization's tags. (The tag `t` can be used a short hand alias for this tag to filter on this attribute.)
*
* `user`
* : The visualization's owner's username. (The tag `u` can be used a short hand alias for this tag to filter on this attribute.)
*
* ## Free Text
*
* Free text search terms will be searched against the following attributes of the
* Visualizations: `title`, `slug`, `tag`, `type`.
*/
query?: {
deleted?: boolean;
limit?: number;
offset?: number;
user_id?: string;
show_own?: boolean;
show_published?: boolean;
show_shared?: boolean;
sort_by?: "create_time" | "title" | "update_time" | "username";
sort_desc?: boolean;
search?: string;
};
/** @description The user ID that will be used to effectively make this API call. Only admins and designated users can make API calls on behalf of other users. */
header?: {
"run-as"?: string;
};
};
responses: {
/** @description Successful Response */
200: {
content: {
"application/json": components["schemas"]["VisualizationSummaryList"];
};
};
/** @description Validation Error */
422: {
content: {
"application/json": components["schemas"]["HTTPValidationError"];
};
};
};
};
disable_link_access_api_visualizations__id__disable_link_access_put: {
/**
* Makes this item inaccessible by a URL link.
Expand Down Expand Up @@ -17985,7 +18140,7 @@ export interface operations {
};
sharing_api_visualizations__id__sharing_get: {
/**
* Get the current sharing status of the given Page.
* Get the current sharing status of the given Visualization.
* @description Return the sharing status of the item.
*/
parameters: {
Expand Down
13 changes: 13 additions & 0 deletions client/src/components/Grid/GridElements/GridLink.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script setup lang="ts">
interface Props {
text: string;
}
defineProps<Props>();
const emit = defineEmits<{
(e: "click"): void;
}>();
</script>

<template>
<button class="ui-link font-weight-bold" @click="emit('click')">{{ text }}</button>
</template>
52 changes: 52 additions & 0 deletions client/src/components/Grid/GridElements/GridOperations.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<script setup lang="ts">
import { library } from "@fortawesome/fontawesome-svg-core";
import { faCaretDown } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";

import type { Operation, RowData } from "@/components/Grid/configs/types";

library.add(faCaretDown);

interface Props {
rowData: RowData;
operations: Array<Operation>;
}

const props = defineProps<Props>();

const emit = defineEmits<{
(e: "execute", operation: Operation): void;
}>();

/**
* Availibility of operations might required certain conditions
*/
function hasCondition(conditionHandler: (rowData: RowData) => Boolean) {
return conditionHandler ? conditionHandler(props.rowData) : true;
}
</script>

<template>
<span>
<button
id="grid-operations"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
class="ui-link font-weight-bold">
<FontAwesomeIcon icon="caret-down" class="fa-lg" />
<span class="font-weight-bold">{{ rowData.title }}</span>
</button>
<div v-if="operations" class="dropdown-menu" aria-labelledby="dataset-dropdown">
<span v-for="(operation, operationIndex) in operations" :key="operationIndex">
<button
v-if="operation && operation.condition && hasCondition(operation.condition)"
class="dropdown-item"
@click.prevent="emit('execute', operation)">
<icon :icon="operation.icon" />
<span v-localize>{{ operation.title }}</span>
</button>
</span>
</div>
</span>
</template>
10 changes: 10 additions & 0 deletions client/src/components/Grid/GridElements/GridText.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script setup lang="ts">
interface Props {
text?: string;
}
defineProps<Props>();
</script>

<template>
<span v-localize>{{ text ?? "Not available." }}</span>
</template>
Loading
Loading