UNPKG

@5minds/node-red-contrib-processcube

Version:
105 lines (88 loc) 4.39 kB
<script type="text/javascript"> RED.nodes.registerType('processcube-engine-config', { category: 'config', defaults: { name: { value: '' }, url: { value: 'http://engine:8000', required: true }, urlType: { type: 'str' }, clientId: { value: '' }, clientIdType: { type: 'str' }, clientSecret: { value: '' }, clientSecretType: { type: 'str' }, scope: { value: 'engine_etw engine_read engine_write engine_observer' }, scopeType: { type: 'str' }, }, label: function () { return this.name || this.url; }, oneditprepare: function () { $('#node-config-input-url').typedInput({ default: 'str', types: ['str', 'env', 'cred'], }); $('#node-config-input-clientId').typedInput({ default: 'str', types: ['str', 'env', 'cred'], }); $('#node-config-input-clientSecret').typedInput({ default: 'str', types: ['str', 'env', 'cred'], }); $('#node-config-input-scope').typedInput({ default: 'str', types: ['str', 'env', 'cred'], }); $('#node-config-input-url').typedInput('value', this.url); $('#node-config-input-url').typedInput('type', this.urlType); $('#node-config-input-clientId').typedInput('value', this.clientId); $('#node-config-input-clientId').typedInput('type', this.clientIdType); $('#node-config-input-clientSecret').typedInput('value', this.clientSecret); $('#node-config-input-clientSecret').typedInput('type', this.clientSecretType); $('#node-config-input-scope').typedInput('value', this.scope); $('#node-config-input-scope').typedInput('type', this.scopeType); }, oneditsave: function () { this.url = $('#node-config-input-url').typedInput('value'); this.urlType = $('#node-config-input-url').typedInput('type'); this.clientId = $('#node-config-input-clientId').typedInput('value'); this.clientIdType = $('#node-config-input-clientId').typedInput('type'); this.clientSecret = $('#node-config-input-clientSecret').typedInput('value'); this.clientSecretType = $('#node-config-input-clientSecret').typedInput('type'); this.scope = $('#node-config-input-scope').typedInput('value'); this.scopeType = $('#node-config-input-scope').typedInput('type'); }, }); </script> <script type="text/html" data-template-name="processcube-engine-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" /> </div> <div class="form-row"> <label for="node-config-input-url"><i class="fa fa-bookmark"></i> Url</label> <input type="text" id="node-config-input-url" /> </div> <div class="form-row"> <label for="node-config-input-clientId"><i class="fa fa-bookmark"></i> Client id</label> <input type="text" id="node-config-input-clientId" /> </div> <div class="form-row"> <label for="node-config-input-clientSecret"><i class="fa fa-bookmark"></i> Client secret</label> <input type="text" id="node-config-input-clientSecret" /> </div> <div class="form-row"> <label for="node-config-input-scope"><i class="fa fa-bookmark"></i> Scope</label> <input type="text" id="node-config-input-scope" /> </div> </script> <script type="text/markdown" data-help-name="processcube-engine-config"> The configuration for the ProcessCube engine. ## Inputs : url (String) : The URL of the ProcessCube engine. : clientId (String) : The client id for the ProcessCube engine. : clientSecret (String) : The client secret for the ProcessCube engine. : scope (String|Secret|ENV) : The scope for the ProcessCube engine. ### References - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy; </script>