Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into masthead_update
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Jun 27, 2024
2 parents 2007ac4 + 9524be3 commit 5385a9c
Show file tree
Hide file tree
Showing 305 changed files with 5,390 additions and 2,197 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,7 @@ jobs:
path: 'galaxy root/static'
- name: Build client
if: steps.cache.outputs.cache-hit != 'true'
env:
GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR: 1
run: make client
working-directory: 'galaxy root'
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,14 @@ packages/*/*.egg-info
config/plugins/**/static/dist
config/plugins/**/static/script.js
config/plugins/**/static/main.css
config/plugins/**/static/script.css
config/plugins/**/static/plugin_build_hash.txt
config/plugins/**/static/*.map

# Viz-specific build artifacts to ignore (until these are removed from codebase)
config/plugins/visualizations/annotate_image/static/jquery.contextMenu.css
config/plugins/visualizations/nvd3/nvd3_bar/static/nvd3.js
config/plugins/visualizations/h5web/static/script.css
config/plugins/visualizations/tiffviewer/static/script.css
config/plugins/visualizations/scatterplot/static/scatterplot.js

# CWL conformance tests
lib/galaxy_test/api/cwl/test_cwl_conformance_v1_?.py
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ OPEN_RESOURCE=bash -c 'open $$0 || xdg-open $$0'
SLIDESHOW_TO_PDF?=bash -c 'docker run --rm -v `pwd`:/cwd astefanutti/decktape /cwd/$$0 /cwd/`dirname $$0`/`basename -s .html $$0`.pdf'
YARN := $(shell $(IN_VENV) command -v yarn 2> /dev/null)
YARN_INSTALL_OPTS=--network-timeout 300000 --check-files
# Default to not fail on error, set to 1 to fail client builds on a plugin error.
GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR?=0
# Respect predefined NODE_OPTIONS, otherwise set maximum heap size low for
# compatibility with smaller machines.
NODE_OPTIONS ?= --max-old-space-size=3072
NODE_ENV = env NODE_OPTIONS=$(NODE_OPTIONS)
NODE_ENV = env NODE_OPTIONS=$(NODE_OPTIONS) GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR=$(GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR)
CWL_TARGETS := test/functional/tools/cwl_tools/v1.0/conformance_tests.yaml \
test/functional/tools/cwl_tools/v1.1/conformance_tests.yaml \
test/functional/tools/cwl_tools/v1.2/conformance_tests.yaml \
Expand Down
17 changes: 15 additions & 2 deletions client/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ const STATIC_PLUGIN_BUILD_IDS = [
"msa",
"mvpapp",
"ngl",
"nora",
"nvd3/nvd3_bar",
"openlayers",
"openseadragon",
"PCA_3Dplot",
"phylocanvas",
"pv",
"nora",
"venn",
"scatterplot",
"tiffviewer",
"ts_visjs",
"venn",
];
const DIST_PLUGIN_BUILD_IDS = ["new_user"];
const PLUGIN_BUILD_IDS = Array.prototype.concat(DIST_PLUGIN_BUILD_IDS, STATIC_PLUGIN_BUILD_IDS);
Expand All @@ -56,6 +57,11 @@ const PATHS = {
},
};

const failOnError =
process.env.GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR && process.env.GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR !== "0"
? true
: false;

PATHS.pluginBaseDir =
(process.env.GALAXY_PLUGIN_PATH && process.env.GALAXY_PLUGIN_PATH !== "None"
? process.env.GALAXY_PLUGIN_PATH
Expand Down Expand Up @@ -186,6 +192,13 @@ function buildPlugins(callback, forceRebuild) {
console.error(
`Error building ${pluginName}, not saving build state. Please report this issue to the Galaxy Team.`
);
if (failOnError) {
// Fail on error.
console.error(
"Failing build due to GALAXY_PLUGIN_BUILD_FAIL_ON_ERROR being set, see error(s) above."
);
process.exit(1);
}
}
}
});
Expand Down
4 changes: 4 additions & 0 deletions client/src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ export function isHistorySummaryExtended(history: AnyHistory): history is Histor
return "contents_active" in history && "user_id" in history;
}

export function isHistoryItem(item: object): item is HistoryItemSummary {
return item && "history_content_type" in item;
}

type QuotaUsageResponse = components["schemas"]["UserQuotaUsage"];

/** Represents a registered user.**/
Expand Down
42 changes: 27 additions & 15 deletions client/src/api/schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export interface paths {
post: operations["file_sources__test_new_instance_configuration"];
};
"/api/file_source_instances/{user_file_source_id}": {
/** Get a list of persisted file source instances defined by the requesting user. */
/** Get a persisted user file source instance. */
get: operations["file_sources__instances_get"];
/** Update or upgrade user file source instance. */
put: operations["file_sources__instances_update"];
Expand Down Expand Up @@ -1266,7 +1266,7 @@ export interface paths {
post: operations["object_stores__test_new_instance_configuration"];
};
"/api/object_store_instances/{user_object_store_id}": {
/** Get a persisted object store instances owned by the requesting user. */
/** Get a persisted user object store instance. */
get: operations["object_stores__instances_get"];
/** Update or upgrade user object store instance. */
put: operations["object_stores__instances_update"];
Expand Down Expand Up @@ -5512,6 +5512,15 @@ export interface components {
*/
url: string;
};
/** GroupUpdatePayload */
GroupUpdatePayload: {
/** name of the group */
name?: string | null;
/** role IDs */
role_ids?: string[] | null;
/** user IDs */
user_ids?: string[] | null;
};
/** GroupUserListResponse */
GroupUserListResponse: components["schemas"]["GroupUserResponse"][];
/** GroupUserResponse */
Expand Down Expand Up @@ -6146,6 +6155,8 @@ export interface components {
* @enum {string}
*/
model_class: "HistoryDatasetAssociation";
/** Purged */
purged: boolean;
/**
* State
* @description The current state of this dataset.
Expand Down Expand Up @@ -8394,6 +8405,11 @@ export interface components {
* @default false
*/
use_cached_job?: boolean | null;
/**
* Version
* @description The version of the workflow to invoke.
*/
version?: number | null;
};
/**
* ItemTagsCreatePayload
Expand Down Expand Up @@ -12651,8 +12667,6 @@ export interface components {
device?: string | null;
/** Hidden */
hidden: boolean;
/** Id */
id: number | string;
/** Name */
name?: string | null;
/** Object Store Id */
Expand Down Expand Up @@ -12730,8 +12744,6 @@ export interface components {
description: string | null;
/** Hidden */
hidden: boolean;
/** Id */
id: string | number;
/** Name */
name: string;
/** Purged */
Expand Down Expand Up @@ -14966,13 +14978,13 @@ export interface operations {
};
};
file_sources__instances_get: {
/** Get a list of persisted file source instances defined by the requesting user. */
/** Get a persisted user file source instance. */
parameters: {
/** @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;
};
/** @description The index for a persisted UserFileSourceStore object. */
/** @description The UUID index for a persisted UserFileSourceStore object. */
path: {
user_file_source_id: string;
};
Expand All @@ -14999,7 +15011,7 @@ export interface operations {
header?: {
"run-as"?: string | null;
};
/** @description The index for a persisted UserFileSourceStore object. */
/** @description The UUID index for a persisted UserFileSourceStore object. */
path: {
user_file_source_id: string;
};
Expand Down Expand Up @@ -15034,7 +15046,7 @@ export interface operations {
header?: {
"run-as"?: string | null;
};
/** @description The index for a persisted UserFileSourceStore object. */
/** @description The UUID index for a persisted UserFileSourceStore object. */
path: {
user_file_source_id: string;
};
Expand Down Expand Up @@ -15743,7 +15755,7 @@ export interface operations {
};
requestBody: {
content: {
"application/json": components["schemas"]["GroupCreatePayload"];
"application/json": components["schemas"]["GroupUpdatePayload"];
};
};
responses: {
Expand Down Expand Up @@ -20890,13 +20902,13 @@ export interface operations {
};
};
object_stores__instances_get: {
/** Get a persisted object store instances owned by the requesting user. */
/** Get a persisted user object store instance. */
parameters: {
/** @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;
};
/** @description The identifier used to index a persisted UserObjectStore object. */
/** @description The UUID used to identify a persisted UserObjectStore object. */
path: {
user_object_store_id: string;
};
Expand All @@ -20923,7 +20935,7 @@ export interface operations {
header?: {
"run-as"?: string | null;
};
/** @description The identifier used to index a persisted UserObjectStore object. */
/** @description The UUID used to identify a persisted UserObjectStore object. */
path: {
user_object_store_id: string;
};
Expand Down Expand Up @@ -20958,7 +20970,7 @@ export interface operations {
header?: {
"run-as"?: string | null;
};
/** @description The identifier used to index a persisted UserObjectStore object. */
/** @description The UUID used to identify a persisted UserObjectStore object. */
path: {
user_object_store_id: string;
};
Expand Down
24 changes: 23 additions & 1 deletion client/src/components/Common/FilterMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { faAngleDoubleUp, faQuestion, faSearch } from "@fortawesome/free-solid-s
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { BButton, BModal, BPopover } from "bootstrap-vue";
import { kebabCase } from "lodash";
import { computed, ref } from "vue";
import { computed, ref, set } from "vue";
import type Filtering from "@/utils/filtering";
import { type Alias, type ErrorType, getOperatorForAlias, type ValidFilter } from "@/utils/filtering";
Expand Down Expand Up @@ -91,6 +91,8 @@ const toggleMenuButton = computed(() => {
// Boolean for showing the help modal for the whole filter menu (if provided)
const showHelp = ref(false);
const isDisabled = ref<Record<string, boolean>>({});
const formattedSearchError = computed<ErrorType | null>(() => {
if (props.searchError) {
const { column, col, operation, op, value, val, err_msg, ValueError } = props.searchError;
Expand Down Expand Up @@ -144,6 +146,8 @@ function getValidFilter(filter: string): ValidFilter<any> {
function onOption(filter: string, value: any) {
filters.value[filter] = value;
setDisabled(filter, value);
// for the compact view, we want to immediately search
if (props.view === "compact") {
onSearch();
Expand Down Expand Up @@ -177,6 +181,21 @@ function onToggle() {
emit("update:show-advanced", !props.showAdvanced);
}
function setDisabled(filter: string, newVal: any) {
const disablesFilters = validFilters.value[filter]?.disablesFilters;
const type = validFilters.value[filter]?.type;
if (disablesFilters && type !== Boolean) {
for (const [disabledFilter, disablingValues] of Object.entries(disablesFilters)) {
if (newVal && (disablingValues === null || disablingValues.includes(newVal))) {
set(isDisabled.value, disabledFilter, true);
filters.value[disabledFilter] = undefined;
} else {
set(isDisabled.value, disabledFilter, false);
}
}
}
}
function updateFilterText(newFilterText: string) {
emit("update:filter-text", newFilterText);
}
Expand Down Expand Up @@ -243,6 +262,7 @@ function updateFilterText(newFilterText: string) {
:filters="filters"
:error="formattedSearchError || undefined"
:identifier="identifier"
:disabled="isDisabled[filter] || false"
@change="onOption"
@on-enter="onSearch"
@on-esc="onToggle" />
Expand All @@ -269,6 +289,7 @@ function updateFilterText(newFilterText: string) {
:filter="getValidFilter(filter)"
:filters="filters"
:identifier="identifier"
:disabled="isDisabled[filter] || false"
@change="onOption" />
<FilterMenuInput
v-else-if="validFilters[filter]?.type !== Boolean"
Expand All @@ -277,6 +298,7 @@ function updateFilterText(newFilterText: string) {
:filters="filters"
:error="errorForField(filter) || undefined"
:identifier="identifier"
:disabled="isDisabled[filter] || false"
@change="onOption"
@on-enter="onSearch"
@on-esc="onToggle" />
Expand Down
6 changes: 5 additions & 1 deletion client/src/components/Common/FilterMenuDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ interface Props {
[k: string]: FilterValue;
};
identifier: string;
disabled?: boolean;
}
const props = defineProps<Props>();
Expand Down Expand Up @@ -76,7 +77,9 @@ const helpToggle = ref(false);
const modalTitle = `${capitalize(props.filter.placeholder)} Help`;
function onHelp(_: string, value: string) {
helpToggle.value = false;
localValue.value = value;
if (!props.disabled) {
localValue.value = value;
}
}
// Quota Source refs and operations
Expand Down Expand Up @@ -140,6 +143,7 @@ function setValue(val: string | QuotaUsage | undefined) {
menu-class="w-100"
size="sm"
boundary="window"
:disabled="props.disabled"
:toggle-class="props.error ? 'text-danger' : ''">
<BDropdownItem href="#" @click="setValue(undefined)"><i>(any)</i></BDropdownItem>

Expand Down
11 changes: 9 additions & 2 deletions client/src/components/Common/FilterMenuInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ interface Props {
filters: {
[k: string]: FilterType;
};
disabled?: boolean;
}
const props = defineProps<Props>();
Expand All @@ -47,14 +48,18 @@ const modalTitle = `${capitalize(props.filter.placeholder)} Help`;
function onHelp(_: string, value: string) {
helpToggle.value = false;
localValue.value = value;
if (!props.disabled) {
localValue.value = value;
}
}
watch(
() => localValue.value,
(newFilter) => {
emit("change", props.name, newFilter);
}
},
{ immediate: true }
);
watch(
Expand All @@ -79,6 +84,7 @@ watch(
size="sm"
:state="props.error ? false : null"
:placeholder="`any ${props.filter.placeholder}`"
:disabled="props.disabled"
:list="props.filter.datalist ? `${identifier}-${props.name}-selectList` : null"
@keyup.enter="emit('on-enter')"
@keyup.esc="emit('on-esc')" />
Expand All @@ -99,6 +105,7 @@ watch(
v-model="localValue"
reset-button
button-only
:disabled="props.disabled"
size="sm" />
</BInputGroupAppend>
</BInputGroup>
Expand Down
Loading

0 comments on commit 5385a9c

Please sign in to comment.