@energyweb/node-red-contrib-green-proof-worker
Version:
## Peer dependencies
55 lines (50 loc) • 1.5 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('source-kafka',{
category: 'Generic Green Proofs',
color: '#B28CFF',
icon: 'ewf-logo.svg',
defaults: {
name: { value: "" },
kafkaConfig: { value: '', type: 'kafka-config', required: true },
topic: { value: '' },
},
inputs: 1,
outputs: 1,
labelStyle: 'ggp-label-style',
paletteLabel: 'Source (Kafka)',
label: function() {
return this.name || 'Source (Kafka)';
}
});
</script>
<script type="text/html" data-template-name="source-kafka">
<div class="form-row">
<label for="node-input-kafkaConfig"><i class="fa fa-bookmark"></i> Kafka config</label>
<input type="text" id="node-input-kafkaConfig">
</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-topic"><i class="fa fa-tag"></i> Topic (ENV default)</label>
<input type="text" id="node-input-topic">
</div>
</script>
<script type="text/html" data-help-name="source-kafka">
<p>Source based on Kafka</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>