@siglesiasg/node-red-hyperledger-fabric-gateway
Version:
Hyperledger Fabric 2.x nodes for node-red with latest fabric-gateway library
55 lines (46 loc) • 2.09 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('fabric-channel-info', {
category: 'Hyperledger Gateway',
color: '#E6E0F8',
paletteLabel: 'channel info',
defaults: {
name: { value: '' },
gatewaySelector: { value: '', required: true, type: 'fabric-gateway' },
identitySelector: { value: '', required: true, type: 'fabric-identity' },
channelSelector: { value: '', required: true, type: 'fabric-channel' },
},
inputs: 1,
outputs: 1,
icon: 'icon.png',
align: 'left',
label: function () {
return this.name || 'hlf get channel info';
},
});
</script>
<script type="text/html" data-template-name="fabric-channel-info">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
<div class="form-row">
<label for="node-input-gatewaySelector"><i class="fa"></i>Gateway</label>
<input type="select" id="node-input-gatewaySelector" />
</div>
<div class="form-row">
<label for="node-input-identitySelector"><i class="fa"></i>Identity</label>
<input type="select" id="node-input-identitySelector" />
</div>
<div class="form-row">
<label for="node-input-channelSelector"><i class="fa"></i>Channel</label>
<input type="select" id="node-input-channelSelector" placeholder="" />
</div>
</script>
<script type="text/html" data-help-name="fabric-channel-info">
<span class="red-ui-text-bidi-aware">
<h2>Hyperledger Fabric Channel Info</h2>
<p>Query the ledger and return the channel info</p>
<h3 class="red-ui-help-info-header">Details</h3>
<p>Basic connection config nodes must be provided: <code>Gateway</code>, <code>Identity</code> and <code>Channel</code> </p>
</span>
</script>