Skip to content

Commit

Permalink
Merge branch 'release_24.0' into release_24.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Jul 25, 2024
2 parents 3be3672 + b8cccdc commit 9c507f2
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 10 deletions.
17 changes: 11 additions & 6 deletions client/src/components/User/APIKey/APIKeyItem.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
<script setup>
import { library } from "@fortawesome/fontawesome-svg-core";
import { faEye, faEyeSlash, faKey, faTrash } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { getGalaxyInstance } from "app";
import CopyToClipboard from "components/CopyToClipboard";
import UtcDate from "components/UtcDate";
import { ref } from "vue";
import svc from "./model/service";
library.add(faEye, faEyeSlash, faKey, faTrash);
defineProps({
item: {
type: Object,
Expand Down Expand Up @@ -35,12 +40,7 @@ const deleteKey = () => {
<b-card title="Current API key">
<div class="d-flex justify-content-between w-100">
<div class="w-100">
<b-input-group
class="w-100"
@blur="hover = false"
@focus="hover = true"
@mouseover="hover = true"
@mouseleave="hover = false">
<b-input-group class="w-100">
<b-input-group-prepend>
<b-input-group-text>
<icon icon="key" />
Expand All @@ -57,6 +57,11 @@ const deleteKey = () => {
<b-input-group-text>
<CopyToClipboard message="Key was copied to clipboard" :text="item.key" title="Copy key" />
</b-input-group-text>

<b-button v-b-tooltip.hover title="Show/hide key" @click="hover = !hover">
<FontAwesomeIcon :icon="hover ? faEyeSlash : faEye" />
</b-button>

<b-button title="Delete api key" @click="toggleDeleteModal">
<icon icon="trash" />
</b-button>
Expand Down
3 changes: 1 addition & 2 deletions lib/galaxy/datatypes/tabular.py
Original file line number Diff line number Diff line change
Expand Up @@ -1811,15 +1811,14 @@ def set_meta(
with open(dataset.get_file_name()) as dataset_fh:
comment_lines = 0
column_headers = None
cleaned_column_types = None
cleaned_column_types = []
number_of_columns = 0
for i, line in enumerate(dataset_fh):
line = line.strip("\n")
if line.startswith("#"):
if line.startswith("#h"):
column_headers = line.split("\t")[1:]
elif line.startswith("#f"):
cleaned_column_types = []
for column_type in line.split("\t")[1:]:
if column_type == "Hex":
cleaned_column_types.append("str")
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tools/parameters/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,7 @@ def get_options(self, trans, other_values):
except Exception:
column_list = self.get_column_list(trans, other_values)
if self.numerical: # If numerical was requested, filter columns based on metadata
if hasattr(dataset, "metadata") and hasattr(dataset.metadata, "column_types"):
if hasattr(dataset, "metadata") and getattr(dataset.metadata, "column_types", None) is not None:
if len(dataset.metadata.column_types) >= len(column_list):
numerics = [i for i, x in enumerate(dataset.metadata.column_types) if x in ["int", "float"]]
column_list = [column_list[i] for i in numerics]
Expand Down
3 changes: 2 additions & 1 deletion lib/galaxy/util/zipstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def response(self) -> Iterator[bytes]:
def get_headers(self) -> Dict[str, str]:
headers = {}
if self.archive_name:
headers["Content-Disposition"] = f'attachment; filename="{self.archive_name}.zip"'
archive_name = self.archive_name.encode("latin-1", "replace").decode("latin-1")
headers["Content-Disposition"] = f'attachment; filename="{archive_name}.zip"'
if self.upstream_mod_zip:
headers["X-Archive-Files"] = "zip"
else:
Expand Down
8 changes: 8 additions & 0 deletions lib/galaxy_test/api/test_dataset_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,14 @@ def test_list_list_list_download(self):
namelist = archive.namelist()
assert len(namelist) == 3, f"Expected 3 elements in [{namelist}]"

def test_download_non_english_characters(self):
with self.dataset_populator.test_history() as history_id:
name = "دیتاست"
payload = self.dataset_collection_populator.create_list_payload(history_id, name=name)
hdca_id = self.dataset_populator.fetch(payload, wait=True).json()["outputs"][0]["id"]
create_response = self._download_dataset_collection(history_id=history_id, hdca_id=hdca_id)
self._assert_status_code_is(create_response, 200)

@requires_new_user
def test_hda_security(self):
with self.dataset_populator.test_history(require_new=False) as history_id:
Expand Down

0 comments on commit 9c507f2

Please sign in to comment.