Files
nextcloud-collabora-nodered/nodes/nc-collab-config.html
T

67 lines
3.3 KiB
HTML
Raw Normal View History

<script type="text/javascript">
RED.nodes.registerType('nc-collab-config', {
category: 'config',
defaults: {
name: { value: '' },
nextcloudUrl: { value: 'https://cloud.hannesahlin.se', required: true },
collaboraUrl: { value: 'https://172.17.0.2:9980', required: true },
collaboraPublicUrl: { value: 'https://cloud.hannesahlin.se' },
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 Docker bridge, e.g. <code>https://172.17.0.2:9980</code>. IP is detected at install — don't hardcode blindly on every host.</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 (CODE proxied via Nextcloud). Internal IP won't work in an iframe.</p>
<p><code>verifyTls</code> — turn off for internal CODE when the cert doesn't match IP/hostname.</p>
<p>Default output folder in bridge if you omit a destination: <code>/Dokument/OfficeOut/</code></p>
</script>