Ver código fonte

HPCC-2966 Configmgr - Should warn if duplicate IPs assigned

Signed-off-by: Gleb Aronsky <gleb.aronsky@lexisnexis.com>
Gleb Aronsky 12 anos atrás
pai
commit
ce6cbcceec
1 arquivos alterados com 14 adições e 0 exclusões
  1. 14 0
      esp/files/scripts/configmgr/configmgr.js

+ 14 - 0
esp/files/scripts/configmgr/configmgr.js

@@ -852,6 +852,20 @@ function handleConfigCellClickEvent(oArgs, caller, isComplex) {
         column.editor.cancel();
         return false;
       }
+
+      for (count = 0; count < caller.getRecordSet()._records.length; count++)
+      {
+        if (caller.getRecordIndex(caller.getSelectedRows()[0]) == count)
+          continue;
+
+        if (caller.getRecord(count).getData('netAddress') == newValue)
+        {
+          if (confirm('IP address ' + newValue + '  is already in use, proceed?'))
+            break;
+          else
+            return;
+        }
+      }
     }
 
     if (bldSet === "roxie" && attrName === "dataDirectory") {