function editIPPool(ippool, editable) { var content = $(`
`); skyapi().getJson( "/DHCP/collections/IPPool/" + ippool, function(ippool){ PopulateForm( ippool, { top: content, }); content.dialog( "open" ); } ); content.dialog({ modal: true, closeOnEscape: true, draggable: false, title: "IP Pool", minWidth: 600, autoOpen: false, buttons: [ { text: "abbrechen", click: function(){ $(this).dialog( "close" ); }, }, { text: "OK", click: function(){ $(this).dialog( "close" ); }, }, ] }); } 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) ); } ); skyapi().getJson( "/DHCP/collections/DHCPServerInterface/" + intf, function(intf){ PopulateForm( intf, { top: content, properties: { "Pool": { transform: function(d){ return d.Name; }, }, } } ); content.dialog( "open" ); } ); 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" ); }, }, ] }); }