mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00:00 
			
		
		
		
	Change address back to server for backwards compatibility
This commit is contained in:
		
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							8ab9aff3de
						
					
				
				
					commit
					b764efdd5a
				
			| @@ -113,9 +113,9 @@ | |||||||
| </script> | </script> | ||||||
|  |  | ||||||
| <script type="text/html" data-template-name="stomp-server"> | <script type="text/html" data-template-name="stomp-server"> | ||||||
|     <div class="form-row node-input-address"> |     <div class="form-row node-input-server"> | ||||||
|         <label for="node-config-input-address"><i class="fa fa-bookmark"></i> Address</label> |         <label for="node-config-input-server"><i class="fa fa-bookmark"></i> Server</label> | ||||||
|         <input class="input-append-left" type="text" id="node-config-input-address" placeholder="localhost" style="width: 45%;" > |         <input class="input-append-left" type="text" id="node-config-input-server" placeholder="localhost" style="width: 45%;" > | ||||||
|         <label for="node-config-input-port" style="margin-left: 10px; width: 35px; "> Port</label> |         <label for="node-config-input-port" style="margin-left: 10px; width: 35px; "> Port</label> | ||||||
|         <input type="text" id="node-config-input-port" placeholder="Port" style="width:45px"> |         <input type="text" id="node-config-input-port" placeholder="Port" style="width:45px"> | ||||||
|     </div> |     </div> | ||||||
| @@ -157,7 +157,7 @@ | |||||||
|     RED.nodes.registerType('stomp-server',{ |     RED.nodes.registerType('stomp-server',{ | ||||||
|         category: 'config', |         category: 'config', | ||||||
|         defaults: { |         defaults: { | ||||||
|             address: {required:true}, |             server: {required:true}, | ||||||
|             port: {value:61613,required:true,validate:RED.validators.number()}, |             port: {value:61613,required:true,validate:RED.validators.number()}, | ||||||
|             protocolVersion: {value:"1.0",required:true}, |             protocolVersion: {value:"1.0",required:true}, | ||||||
|             vhost: {}, |             vhost: {}, | ||||||
|   | |||||||
| @@ -90,7 +90,7 @@ module.exports = function(RED) { | |||||||
|             } |             } | ||||||
|  |  | ||||||
|             // Apply property changes (only if the property exists in the options object) |             // Apply property changes (only if the property exists in the options object) | ||||||
|             setIfHasProperty(options, node, "address", init); |             setIfHasProperty(options, node, "server", init); | ||||||
|             setIfHasProperty(options, node, "port", init); |             setIfHasProperty(options, node, "port", init); | ||||||
|             setIfHasProperty(options, node, "protocolVersion", init); |             setIfHasProperty(options, node, "protocolVersion", init); | ||||||
|             setIfHasProperty(options, node, "vhost", init); |             setIfHasProperty(options, node, "vhost", init); | ||||||
| @@ -110,7 +110,7 @@ module.exports = function(RED) { | |||||||
|  |  | ||||||
|             // Build options for passing to the stomp-client API |             // Build options for passing to the stomp-client API | ||||||
|             node.options = { |             node.options = { | ||||||
|                 address: node.address, |                 address: node.server, | ||||||
|                 port: node.port * 1, |                 port: node.port * 1, | ||||||
|                 user: node.username, |                 user: node.username, | ||||||
|                 pass: node.password, |                 pass: node.password, | ||||||
| @@ -431,7 +431,7 @@ module.exports = function(RED) { | |||||||
|         } else { |         } else { | ||||||
|             node.error("Missing server config"); |             node.error("Missing server config"); | ||||||
|         } |         } | ||||||
|          |  | ||||||
|         node.on("close", function(removed, done) { |         node.on("close", function(removed, done) { | ||||||
|             if (node.serverConnection) { |             if (node.serverConnection) { | ||||||
|                 node.serverConnection.deregister(node, true, done); |                 node.serverConnection.deregister(node, true, done); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user