Files

67 lines
3.7 KiB
HTML
Raw Permalink Normal View History

<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: 'https://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 runs <strong>HTTPS</strong> (self-signed, <code>ssl.enable=true</code>): <code>https://code:9980</code> (shared Docker network) or fallback <code>https://&lt;bridge-ip&gt;:9980</code>, e.g. <code>https://172.17.0.2:9980</code>, after <code>docker network connect bridge nextcloud-node-red</code>. Plain HTTP (<code>http://code:9980</code>) fails — CODE refuses it when SSL is enabled.</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> — must stay <strong>unchecked (false)</strong>: internal CODE uses a self-signed cert, so TLS verification would fail. Only enable it if <code>collaboraUrl</code> points at an endpoint with a trusted certificate.</p>
<p>Default output folder in bridge if you omit a destination: <code>/Dokument/OfficeOut/</code></p>
</script>