Skip to content

Commit

Permalink
Merge branch 'release_23.1' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Jul 26, 2023
2 parents 43c1ea6 + 2900691 commit 9b0c3c9
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 14 deletions.
11 changes: 8 additions & 3 deletions client/src/components/DatasetInformation/DatasetError.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
v-for="(resultMessage, index) in resultMessages"
:key="index"
:variant="resultMessage[1]"
show
>{{ resultMessage[0] }}</b-alert
>
show>
<span v-html="renderMarkdown(resultMessage[0])"></span>
</b-alert>
<div v-if="showForm" id="fieldsAndButton">
<span class="mr-2 font-weight-bold">{{ emailTitle }}</span>
<span v-if="!!currentUser?.email">{{ currentUser?.email }}</span>
Expand Down Expand Up @@ -93,6 +93,7 @@ import { DatasetProvider } from "components/providers";
import { JobDetailsProvider, JobProblemProvider } from "components/providers/JobProvider";
import { mapState } from "pinia";
import { useMarkdown } from "@/composables/markdown";
import { useUserStore } from "@/stores/userStore";
import DatasetErrorDetails from "./DatasetErrorDetails";
Expand All @@ -115,6 +116,10 @@ export default {
required: true,
},
},
setup() {
const { renderMarkdown } = useMarkdown({ openLinksInNewPage: true });
return { renderMarkdown };
},
data() {
return {
message: null,
Expand Down
5 changes: 4 additions & 1 deletion client/src/components/User/UserPreferences.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ export default {
computed: {
...mapState(useUserStore, ["currentUser"]),
activePreferences() {
const enabledPreferences = Object.entries(getUserPreferencesModel()).filter((f) => !f.disabled);
const userPreferencesEntries = Object.entries(getUserPreferencesModel());
// Object.entries returns an array of arrays, where the first element
// is the key (string) and the second is the value (object)
const enabledPreferences = userPreferencesEntries.filter((f) => !f[1].disabled);
return Object.fromEntries(enabledPreferences);
},
hasLogout() {
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/tool_util/biotools/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class BiotoolsEntry:
def from_json(from_json: Dict[str, Any]) -> "BiotoolsEntry":
entry = BiotoolsEntry()
entry.biotoolsID = from_json["biotoolsID"]
entry.topic = from_json["topic"]
entry.function = from_json["function"]
entry.topic = from_json.get("topic", [])
entry.function = from_json.get("function", [])
return entry

@property
Expand Down
6 changes: 3 additions & 3 deletions lib/galaxy/tools/error_reports/plugins/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ def submit_report(self, dataset, job, tool, **kwargs):
else:
self._append_issue(issue_cache_key, error_title, error_message)
return (
'Submitted error report to GitHub. Your issue number is <a href="{}/{}/issues/{}" '
'target="_blank">#{}</a>.'.format(
"Submitted error report to GitHub. Your issue number is [#%s](%s/%s/issues/%s)"
% (
self.issue_cache[issue_cache_key][error_title].number,
self.github_base_url,
github_projecturl,
self.issue_cache[issue_cache_key][error_title].number,
self.issue_cache[issue_cache_key][error_title].number,
),
"success",
)
Expand Down
10 changes: 5 additions & 5 deletions lib/galaxy/tools/error_reports/plugins/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ def submit_report(self, dataset, job, tool, **kwargs):
)

return (
'Submitted error report to GitLab. Your issue number is <a href="{}/{}/issues/{}" '
'target="_blank">#{}</a>.'.format(
"Submitted error report to GitLab. Your Issue number is [#%s](%s/%s/issues/%s)"
% (
self.issue_cache[issue_cache_key][error_title],
self.gitlab_base_url,
gitlab_projecturl,
self.issue_cache[issue_cache_key][error_title],
self.issue_cache[issue_cache_key][error_title],
),
"success",
)
Expand Down Expand Up @@ -275,7 +275,7 @@ def _append_issue(self, issue_cache_key, error_title, error_message, **kwargs):
"api",
"v4",
"projects",
kwargs.get("gitlab_projecturl"),
urllib.parse.quote(kwargs.get("gitlab_projecturl"), safe=""),
"issues",
str(self.issue_cache[issue_cache_key][error_title]),
"notes",
Expand All @@ -287,7 +287,7 @@ def _fill_issue_cache(self, git_project, issue_cache_key):
self.issue_cache[issue_cache_key] = {}
# Loop over all open issues and add the issue iid to the cache
for issue in git_project.issues.list():
if issue.state != "closed":
if issue.state != "closed" or not self.gitlab_new_issue_on_closed:
log.info("GitLab error reporting - Repo issue: %s", str(issue.iid))
self.issue_cache[issue_cache_key][issue.title] = issue.iid

Expand Down

0 comments on commit 9b0c3c9

Please sign in to comment.