source: trunk/templates/widgets.js@ 674

Last change on this file since 674 was 582, checked in by Kris Deugau, 12 years ago

/trunk

Begin adding DNS integration via RPC. See #1.
IPDB.pm

  • Add a global in IPDB.pm to identify the URL for RPC DNS changes. A blank URL means this capability is disabled. (also MyIPDB.pm)
  • Accept extra parameters in addMaster() for DNS changes (default rDNS pattern, DNS location/scope/view) and while we're at it, add space to handle VRF as an informational field
  • Drop maskbits from INSERTs in addMaster()
  • Make the RPC call to add a reverse zone when adding a new master block. To assist with export caching, we split the zone into /16 or /24 chunks and add each one separately.

main.cgi

  • Retrieve DNS locations for adding a master block
  • Pass the HTTP user in to addMaster() for logging in the DNS backend

Modify templates for add master
Remove long-obsolete function in widgets.js, add function for:
Add rDNS pattern reference page

Note the RPC calls require at least dnsadmin:trunk@r447 to work properly.

File size: 1.1 KB
Line 
1function webPath() {
2 var mypath = "";
3 var pathbits = window.location.pathname.split( '/' );
4 for ( i = 0; i <= pathbits.length-2; i++ ) {
5 if (pathbits[i] != 'cgi-bin') {
6 mypath += pathbits[i];
7 mypath += "/";
8 }
9 }
10 return mypath;
11}
12
13function openHelp() {
14 window.open(webPath() + "help.html", "help_window", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=700,height=400")
15}
16function helpAllocTypes() {
17 window.open(webPath() + "alloctypes.html", "alloc_window", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=750,height=550")
18}
19function helpRDNS() {
20 window.open(webPath() + "rDNS.html", "rdns_window", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=850,height=450")
21}
22function popNotes(page) {
23 window.open(page, "IPDB_notes", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=400,height=300");
24}
25function redoParent() {
26 opener.location.reload(true);
27}
Note: See TracBrowser for help on using the repository browser.