Skip to content

Commit

Permalink
fix(xo-web/settings/logs): use template when reporting
Browse files Browse the repository at this point in the history
Related to #7142
  • Loading branch information
julien-f committed Nov 10, 2023
1 parent 96025df commit eaef4f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@

- @xen-orchestra/backups patch
- xo-server minor
- xo-web patch

<!--packages-end-->
9 changes: 6 additions & 3 deletions packages/xo-web/src/common/report-bug-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const ADDITIONAL_FILES_FETCH_TIMEOUT = 5e3
const jsonStringify = json => JSON.stringify(json, null, 2)
const logger = createLogger('report-bug-button')

const GITHUB_URL = 'https://github.com/vatesfr/xen-orchestra/issues/new'
const GITHUB_URL = 'https://github.com/vatesfr/xen-orchestra/issues/new/choose'
const XO_SUPPORT_URL = 'https://xen-orchestra.com/#!/member/support'
const SUPPORT_PANEL_URL = './api/support/create/ticket'

Expand All @@ -42,9 +42,12 @@ const ADDITIONAL_FILES = [
]

const reportInNewWindow = (url, { title, message, formatMessage = identity }) => {
// message is ignored for the moment
//
// see https://github.com/vatesfr/xen-orchestra/issues/7142

const encodedTitle = encodeURIComponent(title == null ? '' : title)
const encodedMessage = encodeURIComponent(message == null ? '' : formatMessage(message))
window.open(`${url}?title=${encodedTitle}&body=${encodedMessage}`)
window.open(`${url}?title=${encodedTitle}`)
}

export const reportOnSupportPanel = async ({ files = [], formatMessage = identity, message, title } = {}) => {
Expand Down

0 comments on commit eaef4f2

Please sign in to comment.