mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Apply suggestions from code review
This commit is contained in:
		| @@ -84,7 +84,7 @@ | ||||
|  | ||||
|             <div class="form-row"> | ||||
|                 <label for="node-input-timeout"><i class="fa fa-clock"></i> <span data-i18n="function.label.timeout"></span></label> | ||||
|                 <input id="node-input-timeout" style="width: 60px;" value="1000"> | ||||
|                 <input id="node-input-timeout" style="width: 60px;" data-i18n="[placeholder]join.seconds"> | ||||
|             </div> | ||||
|  | ||||
|             <div class="form-row node-input-libs-row hide" style="margin-bottom: 0px;"> | ||||
| @@ -470,10 +470,10 @@ | ||||
|                 } | ||||
|             }); | ||||
|  | ||||
|             // 4294967295 is max in node.js timeout. | ||||
|             // 4294967 is max in node.js timeout. | ||||
|             $( "#node-input-timeout" ).spinner({ | ||||
|                 min: 0, | ||||
|                 max: 4294967294, | ||||
|                 max: 4294967, | ||||
|                 change: function(event, ui) { | ||||
|                     var value = this.value; | ||||
|                     if(value == ""){ | ||||
|   | ||||
| @@ -96,7 +96,7 @@ module.exports = function(RED) { | ||||
|         node.name = n.name; | ||||
|         node.func = n.func; | ||||
|         node.outputs = n.outputs; | ||||
|         node.timeout = n.timeout*1; | ||||
|         node.timeout = n.timeout*1000; | ||||
|         if(node.timeout>0){ | ||||
|             node.timeoutOptions = { | ||||
|                 timeout:node.timeout, | ||||
|   | ||||
| @@ -217,7 +217,7 @@ | ||||
|             "finalize": "Stopp", | ||||
|             "outputs": "Ausgänge", | ||||
|             "modules": "Module", | ||||
|             "timeout": "Timeout (ms)" | ||||
|             "timeout": "Timeout" | ||||
|         }, | ||||
|         "text": { | ||||
|             "initialize": "// Der Code hier wird ausgeführt,\n// wenn der Node gestartet wird\n", | ||||
|   | ||||
| @@ -253,7 +253,7 @@ | ||||
|             "finalize": "On Stop", | ||||
|             "outputs": "Outputs", | ||||
|             "modules": "Modules", | ||||
|             "timeout": "Timeout (ms)" | ||||
|             "timeout": "Timeout" | ||||
|         }, | ||||
|         "text": { | ||||
|             "initialize": "// Code added here will be run once\n// whenever the node is started.\n", | ||||
|   | ||||
| @@ -213,7 +213,7 @@ | ||||
|             "initialize": "Настройка", | ||||
|             "finalize": "Закрытие", | ||||
|             "outputs": "Выходы", | ||||
|             "timeout":"Время ожидания (мс)" | ||||
|             "timeout":"Время ожидания" | ||||
|         }, | ||||
|         "text": { | ||||
|             "initialize": "// Добавленный здесь код будет исполняться\n// однократно при развертывании узла.\n", | ||||
|   | ||||
| @@ -1425,7 +1425,7 @@ describe('function node', function() { | ||||
|     }); | ||||
|  | ||||
|     it('should timeout if timeout is set', function(done) { | ||||
|         var flow = [{id:"n1",type:"function",wires:[["n2"]],timeout:"10",func:"while(1==1){};\nreturn msg;"}]; | ||||
|         var flow = [{id:"n1",type:"function",wires:[["n2"]],timeout:"0.010",func:"while(1==1){};\nreturn msg;"}]; | ||||
|         helper.load(functionNode, flow, function() { | ||||
|             var n1 = helper.getNode("n1"); | ||||
|             n1.receive({payload:"foo",topic: "bar"}); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user