Files
nextcloud-collabora-nodered/nodes/nc-collab-config.html
T
dev 6e02c2d31e Fix assets:create 404: form-urlencoded mot /apps/richdocuments/assets, intern CODE över HTTP
- lib/bridge.js createAssetLink: POST <nextcloudUrl>/apps/richdocuments/assets
  (utan index.php), Content-Type application/x-www-form-urlencoded med body
  path=<urlencoded>, path trimmad utan ledande slash (userFolder->get relativt
  filrot), OCS-APIRequest borttagen. Fel inkluderar statusCode + svarskropp.
- Intern collaboraUrl är HTTP: http://code:9980 (fallback http://<bridge-ip>:9980)
  i nc-collab-config default, .env.example, example-flows.json, docker-compose,
  install.sh och integrate-into-nodered.sh resolve_collabora_url.
- Publik WOPI-URL dokumenterad som https://docs.domain.name.
- package-lock.json för deterministisk form-data-install i Docker.
2026-08-22 21:27:02 +02:00

67 lines
3.6 KiB
HTML

<script type="text/javascript">
RED.nodes.registerType('nc-collab-config', {
category: 'config',
defaults: {
name: { value: '' },
nextcloudUrl: { value: 'https://cloud.domain.name', required: true },
collaboraUrl: { value: 'http://code:9980', required: true },
collaboraPublicUrl: { value: 'https://cloud.domain.name' },
username: { value: '', required: true },
verifyTls: { value: false }
},
credentials: {
password: { type: 'password' }
},
label: function () {
return this.name || `NC Collab (${this.username || '?'})`;
}
});
</script>
<script type="text/html" data-template-name="nc-collab-config">
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-config-input-name" placeholder="e.g. cloud.example.com">
</div>
<div class="form-row">
<label for="node-config-input-nextcloudUrl"><i class="fa fa-cloud"></i> Nextcloud URL</label>
<input type="text" id="node-config-input-nextcloudUrl">
</div>
<div class="form-row">
<label for="node-config-input-collaboraUrl"><i class="fa fa-server"></i> Collabora internal URL</label>
<input type="text" id="node-config-input-collaboraUrl">
</div>
<div class="form-row">
<label for="node-config-input-collaboraPublicUrl"><i class="fa fa-globe"></i> Collabora public URL (optional)</label>
<input type="text" id="node-config-input-collaboraPublicUrl">
</div>
<div class="form-row">
<label for="node-config-input-username"><i class="fa fa-user"></i> Username</label>
<input type="text" id="node-config-input-username">
</div>
<div class="form-row">
<label for="node-config-input-password"><i class="fa fa-key"></i> App password</label>
<input type="password" id="node-config-input-password">
</div>
<div class="form-row">
<label for="node-config-input-verifyTls"><i class="fa fa-lock"></i> Verify TLS</label>
<input type="checkbox" id="node-config-input-verifyTls" style="width:auto">
</div>
</script>
<script type="text/html" data-help-name="nc-collab-config">
<p>Config node — not in the flow palette, but all six Collabora nodes need one.</p>
<p>Without this, none of them do anything.</p>
<h4>Two backends</h4>
<ul>
<li><strong>Nextcloud</strong> (<code>nextcloudUrl</code>) — files via WebDAV + Office API (OCS richdocuments)</li>
<li><strong>Collabora CODE</strong> (<code>collaboraUrl</code>) — conversion engine (<code>/cool/...</code>). Internal CODE is plain <strong>HTTP</strong>: <code>http://code:9980</code> (shared Docker network) or fallback <code>http://&lt;bridge-ip&gt;:9980</code>, e.g. <code>http://172.17.0.2:9980</code> after <code>docker network connect bridge nextcloud-node-red</code>. Never HTTPS against the internal bridge.</li>
</ul>
<p><strong>Auth:</strong> username + <em>app password</em>. Not your normal account password.</p>
<p><code>collaboraPublicUrl</code> — what the browser sees for WOPI/editor links, e.g. <code>https://docs.domain.name</code> (CODE proxied via Nextcloud/reverse proxy). Internal HTTP URLs won't work in an iframe.</p>
<p><code>verifyTls</code> — only relevant if you point <code>collaboraUrl</code> at an HTTPS endpoint; the default internal HTTP needs no TLS at all.</p>
<p>Default output folder in bridge if you omit a destination: <code>/Dokument/OfficeOut/</code></p>
</script>