From e93d33f207ca1494608f0c8fe609b4272338bf48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=9F=E8=BF=9B?= Date: Wed, 16 Jan 2019 05:13:47 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20index.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/index.html | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/admin/index.html b/admin/index.html index 2a0744c..0fe14aa 100644 --- a/admin/index.html +++ b/admin/index.html @@ -160,40 +160,6 @@ var attempts = 0; var ignoreDialog = 0; - function getComPorts(actualValue) { - var timeout = setTimeout(function () { - getComPorts(actualValue); - }, 2000); - - sendTo(null, 'listUart', null, function (list) { - if (timeout) { - clearTimeout(timeout); - timeout = null; - } - if (!list || !list.length) { - attempts++; - if (attempts < 10) { - setTimeout(function () { - getComPorts(actualValue); - }, 1000); - } - return; - } - var $comName = $('#modbus_comName'); - var text = ''; - for (var j = 0; j < list.length; j++) { - if (list[j].comName === 'Not available') { - text = ''; - $comName.prop('disabled', true); - break; - } else { - text += ''; - } - } - $comName.html(text); - }); - } - function getExport(data, id, delimiter) { delimiter = delimiter || '\t'; var text = ''; @@ -913,7 +879,7 @@ getIsAdapterAlive(function (isAlive) { if (isAlive || common.enabled) { - getComPorts(settings.params.comName); +// } });