function editIPPool(ippool, editable) { skyapi().getJson( "/DHCP/collections/IPPool/" + ippool, function(pool){ $.skyForm( pool, { title: "DHCP IP Pool", fields: [ { key: "Name", label: "Bezeichnung", }, { key: "FirstIP", label: "Erste IP", type: "IPv4", }, { key: "LastIP", label: "Letzte IP", type: "IPv4", }, { key: "DefaultLeaseTime", label: "Standard Gültigkeit", } ], accept: function(pool){ alert("OK: " + pool); }, } ); } ); } function editDHCPServerInterface(intf, editable){ skyapi().getJson( "/DHCP/collections/DHCPServerInterface/" + intf, function(intf){ $.skyForm( intf, { title: "DHCP Server Interface", fields: [ { key: "Name", label: "Bezeichnung", }, { key: "InterfaceAddress", label: "Interface IP", }, { key: "IPPool", label: "IP Pool", type: "IPPool", toEditor: function(p){ return p.Name; } }, ] } ); } ); } function __editDHCPServerInterface(intf, editable) { var content = $(`
`); var pools = skyapi().getJson("/DHCP/collections/IPPool"); pools.forEach( function(e){ $("") .attr("id", e.Name) .text( e.Name ) .appendTo( $("#Pool", content) ); } ); content.dialog({ modal: true, closeOnEscape: true, draggable: false, title: "DHCP Server Interface", minWidth: 600, autoOpen: false, buttons: [ { text: "abbrechen", click: function(){ $(this).dialog( "close" ); }, }, { text: "OK", click: function(){ $(this).dialog( "close" ); }, }, ] }); }