mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Fix bug in websocket node
This commit is contained in:
		@@ -238,3 +238,27 @@
 | 
				
			|||||||
        <p id="node-config-ws-tip"><span data-i18n="[html]websocket.tip.path2"></span><code><span id="node-config-ws-path"></span></code>.</p>
 | 
					        <p id="node-config-ws-tip"><span data-i18n="[html]websocket.tip.path2"></span><code><span id="node-config-ws-path"></span></code>.</p>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<!-- WebSocket Client configuration node -->
 | 
				
			||||||
 | 
					<script type="text/x-red" data-template-name="websocket-client">
 | 
				
			||||||
 | 
					    <div class="form-row">
 | 
				
			||||||
 | 
					        <label for="node-config-input-path"><i class="fa fa-bookmark"></i> <span data-i18n="websocket.label.url"></span></label>
 | 
				
			||||||
 | 
					        <input id="node-config-input-path" type="text" placeholder="ws://example.com/ws">
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="form-row node-config-row-tls hide">
 | 
				
			||||||
 | 
					        <label for="node-config-input-tls" data-i18n="httpin.tls-config"></label>
 | 
				
			||||||
 | 
					        <input type="text" id="node-config-input-tls">
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div class="form-row">
 | 
				
			||||||
 | 
					        <label for="node-config-input-wholemsg" data-i18n="websocket.sendrec"></label>
 | 
				
			||||||
 | 
					        <select type="text" id="node-config-input-wholemsg" style="width: 70%;">
 | 
				
			||||||
 | 
					            <option value="false" data-i18n="websocket.payload"></option>
 | 
				
			||||||
 | 
					            <option value="true" data-i18n="websocket.message"></option>
 | 
				
			||||||
 | 
					        </select>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="form-tips">
 | 
				
			||||||
 | 
					        <p><span data-i18n="[html]websocket.tip.url1"></span></p>
 | 
				
			||||||
 | 
					        <span data-i18n="[html]websocket.tip.url2"></span>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -38,30 +38,6 @@
 | 
				
			|||||||
   <p>This configuration node creates a WebSocket Server endpoint using the specified path.</p>
 | 
					   <p>This configuration node creates a WebSocket Server endpoint using the specified path.</p>
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!-- WebSocket Client configuration node -->
 | 
					 | 
				
			||||||
<script type="text/x-red" data-template-name="websocket-client">
 | 
					 | 
				
			||||||
    <div class="form-row">
 | 
					 | 
				
			||||||
        <label for="node-config-input-path"><i class="fa fa-bookmark"></i> <span data-i18n="websocket.label.url"></span></label>
 | 
					 | 
				
			||||||
        <input id="node-config-input-path" type="text" placeholder="ws://example.com/ws">
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <div class="form-row node-config-row-tls hide">
 | 
					 | 
				
			||||||
        <label for="node-config-input-tls" data-i18n="httpin.tls-config"></label>
 | 
					 | 
				
			||||||
        <input type="text" id="node-config-input-tls">
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <div class="form-row">
 | 
					 | 
				
			||||||
        <label for="node-config-input-wholemsg" data-i18n="websocket.sendrec"></label>
 | 
					 | 
				
			||||||
        <select type="text" id="node-config-input-wholemsg" style="width: 70%;">
 | 
					 | 
				
			||||||
            <option value="false" data-i18n="websocket.payload"></option>
 | 
					 | 
				
			||||||
            <option value="true" data-i18n="websocket.message"></option>
 | 
					 | 
				
			||||||
        </select>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <div class="form-tips">
 | 
					 | 
				
			||||||
        <p><span data-i18n="[html]websocket.tip.url1"></span></p>
 | 
					 | 
				
			||||||
        <span data-i18n="[html]websocket.tip.url2"></span>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<script type="text/x-red" data-help-name="websocket-client">
 | 
					<script type="text/x-red" data-help-name="websocket-client">
 | 
				
			||||||
   <p>This configuration node connects a WebSocket client to the specified URL.</p>
 | 
					   <p>This configuration node connects a WebSocket client to the specified URL.</p>
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user