Skip to content

Commit

Permalink
richdocuments: add host_session_id parameter
Browse files Browse the repository at this point in the history
"This helps for the web engineers more quickly find logs
for troubleshooting purposes based on a host-specific session identifier".

Signed-off-by: Henry Castro <[email protected]>
  • Loading branch information
hcvcastro committed Jun 27, 2024
1 parent 71db98f commit 4f70c1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import '../css/document.scss'
import axios from '@nextcloud/axios'
import { spawnDialog } from '@nextcloud/dialogs'
import SaveAs from './components/Modal/SaveAs.vue'
import { getCapabilities } from './services/capabilities.ts'

const PostMessages = new PostMessageService({
parent: window.parent,
Expand Down Expand Up @@ -168,6 +169,8 @@ const documentsMain = {
+ '<input name="theme" value="' + getCollaboraTheme() + '" type="hidden"/>'
// buy product for new customer users
+ '<input name="buy_product" value="https://nextcloud.com/pricing" type="hidden"/>'
+ '<input name="host_session_id" value="nextcloud ' + OC.config.version
+ ' - richdocuments ' + getCapabilities().version + '" type="hidden"/>'
+ '</form>'

// iframe that contains the Collabora Online Viewer
Expand Down Expand Up @@ -228,6 +231,8 @@ const documentsMain = {
+ '<input name="theme" value="' + getCollaboraTheme() + '" type="hidden"/>'
// buy product for new customer users
+ '<input name="buy_product" value="https://nextcloud.com/pricing" type="hidden"/>'
+ '<input name="host_session_id" value="nextcloud ' + OC.config.version
+ ' - richdocuments ' + getCapabilities().version + '" type="hidden"/>'
+ '</form>'

// iframe that contains the Collabora Online
Expand Down
2 changes: 2 additions & 0 deletions src/view/Office.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<input name="css_variables" :value="formData.cssVariables" type="hidden">
<input name="theme" :value="formData.theme" type="hidden">
<input name="buy_product" value="https://nextcloud.com/pricing" type="hidden">
<input name="host_session_id" value="formData.hostSessionID" type="hidden">
</form>
<iframe :id="iframeId"
ref="documentFrame"
Expand Down Expand Up @@ -187,6 +188,7 @@ export default {
uiDefaults: getUIDefaults(),
cssVariables: generateCSSVarTokens(),
theme: getCollaboraTheme(),
hostSessionID: 'nextcloud ' + OC.config.version + ' - richdocuments ' + getCapabilities().version
},
}
},
Expand Down

0 comments on commit 4f70c1d

Please sign in to comment.