/* Authors: * Adam Young * * Copyright (C) 2010 Red Hat * see file 'COPYING' for use and warranty information * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; version 2 only * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* REQUIRES: ipa.js, details.js, search.js, add.js, entity.js */ /* DNS */ ipa_entity_set_search_definition('dns', [ ['idnsname', 'Zone Name', null] ]); ipa_entity_set_add_definition('dns', [ 'dialog-add-dns', 'Add New Zone', [ ['idnsname', 'Name', null], ['idnssoamname', 'Authoritative name server'], ['idnssoarname','administrator e-mail address'] ] ]); ipa_entity_set_details_definition('dns', [ ipa_stanza({name:'identity', label:'DNS Zone Details'}). input({name:'idnsname', label:'DNS Name'}). input({name:'idnszoneactive', label:'Zone Active'}). input({name:'idnssoamname', label:'Authoritative name server'}). input({name:'idnssoarname', label:'administrator e-mail address'}). input({name:'idnssoaserial', label:'SOA serial'}). input({name:'idnssoarefresh', label:'SOA refresh'}). input({name:'idnssoaretry', label:'SOA retry'}). input({name:'idnssoaexpire', label:'SOA expire'}). input({name:'idnssoaminimum', label:'SOA minimum'}). input({name:'dnsttl', label:'SOA time to live'}). input({name:'dnsclass', label:'SOA class'}). input({name:'idnsallowdynupdate', label:'allow dynamic update?'}). input({name:'idnsupdatepolicy', label:'BIND update policy'}) ]); ipa_entity_set_association_definition('dns', { }); ipa_entity_set_facet_definition('dns', [ ipa_records_facet({ 'name': 'records', 'label': 'Records' })] ); function ipa_records_facet(spec){ spec = spec || {}; var that = ipa_facet(spec); that.record = null; var record_types =[ 'a', 'aaaa', 'dname', 'cname', 'mx', 'ns', 'ptr', 'srv', 'txt', 'a6', 'afsdb', 'cert', 'ds', 'hinfo', 'key', 'kx', 'loc', 'md', 'minfo', 'naptr', 'nsec', 'nxt', 'rrsig', 'sshfp']; function create_type_select(id,add_none) { var type_select = $(''))); dl.append('
Type
'); dl.append( $('
').append(create_type_select('dns-record-type'))); dl.append('
Data
'); dl.append($('
').append($('