summaryrefslogtreecommitdiffstats
path: root/install/static/service.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-11-18 20:17:14 -0600
committerEndi Sukma Dewata <edewata@redhat.com>2010-11-19 16:53:30 -0500
commit379a9cc41f04d36538aee11839c1222d408b4f99 (patch)
tree266b4f51f95a60921ce7b15df5698cb1bfb4f96b /install/static/service.js
parentd4f25453e116ca132208e99d5e320500efbe5d9c (diff)
downloadfreeipa-379a9cc41f04d36538aee11839c1222d408b4f99.tar.gz
freeipa-379a9cc41f04d36538aee11839c1222d408b4f99.tar.xz
freeipa-379a9cc41f04d36538aee11839c1222d408b4f99.zip
SUDO Rule Search and Details Pages
The search and details pages for SUDO Rule have been added. Codes that are shared with HBAC have been moved to rule.js. The following methods were renamed for consistency: - ipa_details_load() -> ipa_details_refresh() - ipa_details_display() -> ipa_details_load() The ipa_details_cache has been removed because the cache is now stored in each widget. The index.xhtml has been removed. All references to it has been changed to index.html. The Unselect All checkbox has been fixed. Unnecessary parameter 'container' has been removed. The unit test has been updated and new test data has been added.
Diffstat (limited to 'install/static/service.js')
-rw-r--r--install/static/service.js24
1 files changed, 14 insertions, 10 deletions
diff --git a/install/static/service.js b/install/static/service.js
index cf8d2cea1..229602dd4 100644
--- a/install/static/service.js
+++ b/install/static/service.js
@@ -136,10 +136,10 @@ function ipa_service_add_dialog(spec) {
var record = {};
var field = that.get_field('service');
- var service = field.save(that.container)[0];
+ var service = field.save()[0];
field = that.get_field('host');
- var host = field.save(that.container)[0];
+ var host = field.save()[0];
record['krbprincipalname'] = service+'/'+host;
@@ -223,24 +223,28 @@ function ipa_service_details_facet(spec) {
return that;
}
-function service_service_load(container, result) {
+function service_service_load(result) {
- $('dd', container).remove();
+ var that = this;
+
+ $('dd', that.container).remove();
var dd = ipa_create_first_dd(this.name);
- dd.appendTo(container);
+ dd.appendTo(that.container);
var krbprincipalname = result['krbprincipalname'][0];
var service = krbprincipalname.replace(/\/.*$/, '');
dd.append(service);
}
-function service_host_load(container, result) {
+function service_host_load(result) {
+
+ var that = this;
- $('dd', container).remove();
+ $('dd', that.container).remove();
var dd = ipa_create_first_dd(this.name);
- dd.appendTo(container);
+ dd.appendTo(that.container);
var krbprincipalname = result['krbprincipalname'][0];
var host = krbprincipalname.replace(/^.*\//, '').replace(/@.*$/, '');
@@ -290,7 +294,7 @@ function service_provisioning_status_widget(spec) {
that.setup = function(container) {
- that.container = container;
+ that.widget_setup(container);
that.valid = $('li.key-status-valid', that.container);
that.missing = $('li.key-status-missing', that.container);
@@ -340,7 +344,7 @@ function service_provisioning_status_widget(spec) {
return false;
};
- that.load = function(container, result) {
+ that.load = function(result) {
that.result = result;
var krblastpwdchange = result['krblastpwdchange'];
set_status(krblastpwdchange ? 'valid' : 'missing');