diff --git a/client/src/api/histories.ts b/client/src/api/histories.ts index 65ad7e2d6b1d..cae87c145b8e 100644 --- a/client/src/api/histories.ts +++ b/client/src/api/histories.ts @@ -2,5 +2,6 @@ import { fetcher } from "@/api/schema"; export const historiesFetcher = fetcher.path("/api/histories").method("get").create(); export const archivedHistoriesFetcher = fetcher.path("/api/histories/archived").method("get").create(); +export const deleteHistory = fetcher.path("/api/histories/{history_id}").method("delete").create(); export const undeleteHistory = fetcher.path("/api/histories/deleted/{history_id}/undelete").method("post").create(); -export const purgeHistory = fetcher.path("/api/histories/{history_id}").method("delete").create(); +export const historiesQuery = fetcher.path("/api/histories/query").method("get").create(); diff --git a/client/src/api/schema/schema.ts b/client/src/api/schema/schema.ts index f42c45fedc52..826aa9070b13 100644 --- a/client/src/api/schema/schema.ts +++ b/client/src/api/schema/schema.ts @@ -521,6 +521,10 @@ export interface paths { /** Return all histories that are published. */ get: operations["published_api_histories_published_get"]; }; + "/api/histories/query": { + /** Returns histories available to the current user. */ + get: operations["query_api_histories_query_get"]; + }; "/api/histories/shared_with_me": { /** Return all histories that are shared with the current user. */ get: operations["shared_with_me_api_histories_shared_with_me_get"]; @@ -6352,6 +6356,61 @@ export interface components { user_id?: string | null; [key: string]: unknown | undefined; }; + /** HistoryQueryResult */ + HistoryQueryResult: { + /** + * Annotation + * @description The annotation of this History. + */ + annotation?: string | null; + /** + * Create Time + * @description The time and date this item was created. + */ + create_time: string | null; + /** + * Deleted + * @description Whether this History has been deleted. + */ + deleted: boolean; + /** + * ID + * @description Encoded ID of the History. + * @example 0123456789ABCDEF + */ + id: string; + /** + * Importable + * @description Whether this History can be imported. + */ + importable: boolean; + /** + * Name + * @description The name of the History. + */ + name: string; + /** + * Published + * @description Whether this History has been published. + */ + published: boolean; + /** + * Tags + * @description A list of tags to add to this item. + */ + tags: components["schemas"]["TagCollection"] | null; + /** + * Update Time + * @description The last time and date this item was updated. + */ + update_time: string | null; + [key: string]: unknown | undefined; + }; + /** + * HistoryQueryResultList + * @default [] + */ + HistoryQueryResultList: components["schemas"]["HistoryQueryResult"][]; /** * HistorySummary * @description History summary information. @@ -14017,6 +14076,76 @@ export interface operations { }; }; }; + query_api_histories_query_get: { + /** Returns histories available to the current user. */ + parameters?: { + /** @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 index by this specified attribute */ + /** @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 + * `:` or `:''`. 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 + * + * `name` + * : The history's name. + * + * `annotation` + * : The history's annotation. (The tag `a` can be used a short hand alias for this tag to filter on this attribute.) + * + * `tag` + * : The history's tags. (The tag `t` 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 + * Historys: `title`, `description`, `slug`, `tag`. + */ + query?: { + limit?: number | null; + offset?: number | null; + show_own?: boolean; + show_published?: boolean; + show_shared?: boolean; + sort_by?: "create_time" | "name" | "update_time" | "username"; + sort_desc?: boolean; + search?: string | null; + }; + /** @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 | null; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + content: { + "application/json": components["schemas"]["HistoryQueryResultList"]; + }; + }; + /** @description Validation Error */ + 422: { + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; shared_with_me_api_histories_shared_with_me_get: { /** Return all histories that are shared with the current user. */ parameters?: { diff --git a/client/src/components/Grid/GridElements/GridDatasets.vue b/client/src/components/Grid/GridElements/GridDatasets.vue new file mode 100644 index 000000000000..005f5d96ce99 --- /dev/null +++ b/client/src/components/Grid/GridElements/GridDatasets.vue @@ -0,0 +1,82 @@ + + + + + diff --git a/client/src/components/Grid/GridElements/GridOperations.vue b/client/src/components/Grid/GridElements/GridOperations.vue index 8f1fae493d6b..ff85e9832054 100644 --- a/client/src/components/Grid/GridElements/GridOperations.vue +++ b/client/src/components/Grid/GridElements/GridOperations.vue @@ -38,15 +38,16 @@ function hasCondition(conditionHandler: (rowData: RowData, config: GalaxyConfigu data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" - class="ui-link font-weight-bold"> + class="ui-link font-weight-bold text-nowrap"> {{ title }}