diff options
author | Endi DeWata <edewata@redhat.com> | 2010-09-10 12:59:33 -0400 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-09-10 12:59:33 -0400 |
commit | fd056918e6c61d601903c144e3ed3d509c221e28 (patch) | |
tree | e5c87faa5b9b0f386493df929af241c89dc9bc9c /install/static/hostgroup.js | |
parent | f87bd57c1d3a86ade7419ea17ddee65bacda4b7f (diff) | |
download | freeipa-fd056918e6c61d601903c144e3ed3d509c221e28.tar.gz freeipa-fd056918e6c61d601903c144e3ed3d509c221e28.tar.xz freeipa-fd056918e6c61d601903c144e3ed3d509c221e28.zip |
Splitting service principal into service name and hostname.
The EntityBuilder has been modified to obtain the pkey value by
invoking getPKey(). This function can be overriden for different
entities.
The addOptionsFunction() has been renamed to getOptions() and it
can be overriden for different entities. Each entity that uses this
function has been modified accordingly.
The addEdit(), addAnother(), add_fail() has been moved into the
EntityBuilder class. The global builders is no longer needed because
a reference to the builder object can be obtained via enclosure.
The ServiceForms has been modified to take service name and
hostname and combine them to generate the service principal by
overriding the getPKey().
Diffstat (limited to 'install/static/hostgroup.js')
-rw-r--r-- | install/static/hostgroup.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/install/static/hostgroup.js b/install/static/hostgroup.js index 2f40f0b3f..3872d125d 100644 --- a/install/static/hostgroup.js +++ b/install/static/hostgroup.js @@ -12,14 +12,6 @@ var hostgroupFacets = ["details","hosts","assignhosts"]; -function hostgroupAddOptionsFunction (){ - var options = { - name: $('#pkey').val(), - description: $('#description').val() - }; - return options; -} - var hostgroupForms = new HostgroupsForms(); function HostgroupsForms(){ @@ -75,7 +67,15 @@ function HostgroupsForms(){ this.details = new DetailsForm("hostgroup",hostgroup_details_list,"cn",hostgroupFacets) ; - this.add = new EntityBuilder("hostgroup",this.hostgroupAddProperties,hostgroupAddOptionsFunction); + this.add = new EntityBuilder("hostgroup",this.hostgroupAddProperties); + + this.add.getOptions = function() { + var options = { + name: $('#pkey').val(), + description: $('#description').val() + }; + return options; + } this.search = new SearchForm("hostgroup", "find", this.hostgroupSearchColumns); this.unspecified = this.search; |