diff options
Diffstat (limited to 'install/ui/host.js')
-rw-r--r-- | install/ui/host.js | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/install/ui/host.js b/install/ui/host.js index 6b5e3606e..fe9eabf0b 100644 --- a/install/ui/host.js +++ b/install/ui/host.js @@ -39,7 +39,10 @@ IPA.entity_factories.host = function () { { name:'details', fields: [ - 'fqdn', + { factory: IPA.host_dnsrecord_entity_link_widget, + name: 'fqdn', + other_entity:'dnsrecord' + }, 'krbprincipalname', { factory: IPA.text_widget, @@ -124,6 +127,21 @@ IPA.entity_factories.host = function () { }; +IPA.host_dnsrecord_entity_link_widget = function(spec){ + var that = IPA.entity_link_widget(spec); + + that.other_pkeys = function(){ + var entity = IPA.get_entity(that.entity_name); + var pkey = entity.get_primary_key()[0]; + var first_dot = pkey.search(/\./); + var pkeys = []; + pkeys[1] = pkey.substring(0,first_dot); + pkeys[0] = pkey.substring(first_dot+1); + return pkeys; + }; + return that; +}; + /* Take an LDAP format date in UTC and format it */ IPA.utc_date_column_format = function(value){ if (!value) { |