From 4c24581b5cffaffbb200152e1d43931c0d674102 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Fri, 15 Oct 2010 12:22:01 -0500 Subject: Service certificate UI. The service.py has been modified to include certificate info in the service-show result if the service contains usercertificate. A new file certificate.js has been added to store codes related to certificates (e.g. revocation reasons, dialog boxes). The service.js has been modified to provide the UI for certificate management. The certificate.js can also be used for host certificate management. The Makefile.am and index.xhtml has been modified to include certificate.js. New test data files have been added for certificate operations. To test revoke and restore operations the server needs to be installed with dogtag CA instead of self-signed CA. The certificate status and revocation reason in the details page will be implemented in subsequent patches. Unit tests will also be added in subsequent patches. --- install/static/service.js | 250 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 221 insertions(+), 29 deletions(-) (limited to 'install/static/service.js') diff --git a/install/static/service.js b/install/static/service.js index 7b81c4d2..d688b9ad 100644 --- a/install/static/service.js +++ b/install/static/service.js @@ -34,16 +34,19 @@ ipa_entity_set_add_definition('service', [ ]); ipa_entity_set_details_definition('service', [ - ipa_stanza({name:'identity', label:'Service Details'}). + ipa_stanza({name:'details', label:'Service Details'}). input({name:'krbprincipalname', label:'Principal', setup:service_krbprincipalname_setup, load:service_krbprincipalname_load}). input({name:'service', label:'Service', load:service_service_load}). - input({name:'host', label:'Host Name', load:service_host_load}). - input({name:'usercertificate', label:'Certificate', - load:service_usercertificate_load, - save:service_usercertificate_save}) + input({name:'host', label:'Host Name', load:service_host_load}), + ipa_stanza({name:'provisioning', label:'Provisioning'}). + input({name:'provisioning_status', label:'Status', + load:service_provisioning_status_load}), + ipa_stanza({name:'certificate', label:'Service Certificate'}). + input({name:'certificate_status', label:'Status', + load:service_usercertificate_load}) ]); function service_add_krbprincipalname(add_dialog, mode) { @@ -76,45 +79,234 @@ function service_service_load(container, dt, result) { function service_host_load(container, dt, result) { var krbprincipalname = result['krbprincipalname'][0]; - var host = krbprincipalname.replace(/^.*\//, ''); + var host = krbprincipalname.replace(/^.*\//, '').replace(/@.*$/, ''); var dd = ipa_create_first_dd(this.name, host); dt.after(dd); } -function service_usercertificate_load(container, dt, result) { - var textarea = $("