equal
deleted
inserted
replaced
486 |
486 |
487 # Configure the web interface to include the Modbus config parameters |
487 # Configure the web interface to include the Modbus config parameters |
488 def __OnButtonSave(**kwargs): |
488 def __OnButtonSave(**kwargs): |
489 OnButtonSave(WebNode_id=WebNode_id, **kwargs) |
489 OnButtonSave(WebNode_id=WebNode_id, **kwargs) |
490 |
490 |
491 WebSettings = NS.newExtensionSetting("Modbus "+config_hash) |
491 WebSettings = NS.newExtensionSetting("Modbus #"+ str(WebNode_id), config_hash) |
492 |
492 |
493 WebSettings.addSettings( |
493 WebSettings.addSettings( |
494 "ModbusConfigParm" + config_hash, # name (internal, may not contain spaces, ...) |
494 "ModbusConfigParm" + config_hash, # name (internal, may not contain spaces, ...) |
495 _("Modbus Configuration: ") + config_name, # description (user visible label) |
495 _("Modbus Configuration: ") + config_name, # description (user visible label) |
496 webFormInterface, # fields |
496 webFormInterface, # fields |
603 |
603 |
604 #PLCObject.LogMessage("Modbus web server extension::OnUnLoadPLC() Called...") |
604 #PLCObject.LogMessage("Modbus web server extension::OnUnLoadPLC() Called...") |
605 |
605 |
606 # Delete the Modbus specific web interface extensions |
606 # Delete the Modbus specific web interface extensions |
607 # (Safe to ask to delete, even if it has not been added!) |
607 # (Safe to ask to delete, even if it has not been added!) |
608 global _WebNodeList |
608 global _WebNodeList |
609 for WebNode_entry in _WebNodeList: |
609 for index, WebNode_entry in enumerate(_WebNodeList): |
610 config_hash = WebNode_entry["config_hash"] |
610 config_hash = WebNode_entry["config_hash"] |
611 NS.removeExtensionSetting("Modbus "+config_hash) |
611 NS.removeExtensionSetting(config_hash) |
612 |
612 |
613 # Dele all entries... |
613 # Dele all entries... |
614 _WebNodeList = [] |
614 _WebNodeList = [] |
615 |
615 |