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

Merge 23.2 into dev #17407

Merged
merged 11 commits into from
Jan 31, 2024
Merged
12 changes: 6 additions & 6 deletions client/src/components/Upload/DefaultBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ const queue = new UploadQueue({
});

/** Add files to queue */
function addFiles(files) {
function addFiles(files, immediate = false) {
if (!isRunning.value) {
if (immediate || !props.multiple) {
eventReset();
}
if (props.multiple) {
queue.add(files);
} else {
eventReset();
if (files.length > 0) {
queue.add([files[0]]);
}
} else if (files.length > 0) {
queue.add([files[0]]);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Upload/UploadContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const showRegular = computed(() => !props.formats || hasRegularExtension);
const showRules = computed(() => !props.formats || props.multiple);

function immediateUpload(files) {
regular.value?.addFiles(files);
regular.value?.addFiles(files, true);
}

function toData(items, history_id, composite = false) {
Expand Down
1 change: 0 additions & 1 deletion client/src/components/Upload/UploadModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ defineExpose({
<UploadContainer
v-if="currentHistoryId"
ref="content"
:key="showModal"
:current-user-id="currentUser?.id"
:current-history-id="currentHistoryId"
v-bind="options"
Expand Down
5 changes: 5 additions & 0 deletions client/src/stores/notificationsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export const useNotificationsStore = defineStore("notificationsStore", () => {
loadingNotifications.value = true;
await broadcastsStore.loadBroadcasts();
await loadNotifications();
updateUnreadCount();
} else {
const data = await loadNotificationsStatus(lastNotificationUpdate.value);
totalUnreadCount.value = data.total_unread_count;
Expand Down Expand Up @@ -72,6 +73,10 @@ export const useNotificationsStore = defineStore("notificationsStore", () => {
return updateBatchNotification({ notification_ids: [notification.id], changes });
}

function updateUnreadCount() {
totalUnreadCount.value = notifications.value.filter((n) => !n.seen_time).length;
}

return {
notifications,
totalUnreadCount,
Expand Down
4 changes: 3 additions & 1 deletion lib/galaxy/webapps/galaxy/services/history_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,9 @@ def prepare_collection_download(self, trans, id: DecodedDatabaseIdField) -> Asyn

def __stream_dataset_collection(self, trans, dataset_collection_instance):
archive = hdcas.stream_dataset_collection(
dataset_collection_instance=dataset_collection_instance, upstream_mod_zip=trans.app.config.upstream_mod_zip
dataset_collection_instance=dataset_collection_instance,
upstream_mod_zip=trans.app.config.upstream_mod_zip,
upstream_gzip=trans.app.config.upstream_gzip,
)
return archive

Expand Down
30 changes: 30 additions & 0 deletions lib/galaxy_test/selenium/test_uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,36 @@ def test_upload_paired_list(self):
self.history_panel_wait_for_hid_hidden(3)
self.history_panel_wait_for_hid_hidden(4)

@selenium_test
def test_upload_modal_retains_content(self):
self.home()

# initialize 2 uploads and close modal
self.upload_start_click()
self.upload_queue_local_file(self.get_filename("1.sam"))
self.upload_paste_data("some pasted data")
self.wait_for_and_click_selector("button#btn-close")

# reopen modal and check that the files are still there
self.upload_start_click()
self.wait_for_selector_visible("#upload-row-0.upload-init")
self.wait_for_selector_visible("#upload-row-1.upload-init")

# perform upload and close modal
self.upload_start()
self.wait_for_and_click_selector("button#btn-close")

# add another pasted file, but don't upload it
self.upload_start_click()
self.upload_paste_data("some more pasted data")
self.wait_for_and_click_selector("button#btn-close")

# reopen modal and see 2 uploaded, 1 yet to upload
self.upload_start_click()
self.wait_for_selector_visible("#upload-row-0.upload-success")
self.wait_for_selector_visible("#upload-row-1.upload-success")
self.wait_for_selector_visible("#upload-row-2.upload-init")

@selenium_test
@pytest.mark.gtn_screenshot
@pytest.mark.local
Expand Down
12 changes: 8 additions & 4 deletions packages/build_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ cd "$(dirname "$0")"

# ensure ordered by dependency dag
while read -r package_dir; do
printf "\n========= RELEASING PACKAGE ${package_dir} =========\n\n"

if [ -z "$package_dir" ]; then
# Skip empty lines
continue
fi
printf "\n========= RELEASING PACKAGE %s =========\n\n" "$package_dir"

cd "$package_dir"

make clean
make commit-version
make dist
make new-version

cd ..
done < packages_by_dep_dag.txt
Loading