UNPKG

@energyweb/node-red-contrib-green-proof-worker

Version:
60 lines (55 loc) 1.81 kB
<script type="text/javascript"> RED.nodes.registerType('source-http-api',{ category: 'Generic Green Proofs', color: '#B28CFF', icon: 'ewf-logo.svg', defaults: { name: { value: "" }, host: { value: "" }, appId: { value: "" }, sqliteConfig: { value:"", type: "sqlite-config", required: false }, }, inputs: 1, outputs: 1, labelStyle: 'ggp-label-style', paletteLabel: 'Source (HTTP API, self-ack)', label: function() { return this.name || 'Source (HTTP API, self-ack)'; } }); </script> <script type="text/html" data-template-name="source-http-api"> <div class="form-row"> <label for="node-input-sqliteConfig"><i class="fa fa-bookmark"></i> SQLite config (defaults to first found SQLite config)</label> <input type="text" id="node-input-sqliteConfig"> </div> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> <div class="form-row"> <label for="node-input-host"><i class="fa fa-tag"></i> Host (ENV default)</label> <input type="text" id="node-input-host"> </div> <div class="form-row"> <label for="node-input-appId"><i class="fa fa-tag"></i> App ID</label> <input type="text" id="node-input-appId"> </div> </script> <script type="text/html" data-help-name="source-http-api"> <p>Source based on HTTP API with self-acking in local database</p> </script><style>.ggp-label-style { /** Text color */ /* fill: #fff; */ } .red-ui-flow-node-icon-group:has(~ .ggp-label-style) { image { width: 15px; height: 15px; x: 9px; y: 7.5px; } } .red-ui-flow-node:has(~ .ggp-label-style) { stroke-width: 0; }</style>