diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-01-06 01:18:48 -0600 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2012-01-13 10:57:59 -0600 |
commit | f56f8a34d39ba13403e7a693b639b6b37fcd0a04 (patch) | |
tree | 6503617f5530db7332f9434302dd56f2cf672eca /install/ui/host.js | |
parent | 3d1b864024255b97999f100d05c3bf63d99dacb5 (diff) | |
download | freeipa.git-f56f8a34d39ba13403e7a693b639b6b37fcd0a04.tar.gz freeipa.git-f56f8a34d39ba13403e7a693b639b6b37fcd0a04.tar.xz freeipa.git-f56f8a34d39ba13403e7a693b639b6b37fcd0a04.zip |
Added instructions to generate CSR.
The certificate request dialog box has been modified to show
the OpenSSL commands for generating a CSR.
The realm and entry names in the test data have been fixed to
be more consistent.
Ticket #1012
Diffstat (limited to 'install/ui/host.js')
-rw-r--r-- | install/ui/host.js | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/install/ui/host.js b/install/ui/host.js index 88635955..b6b1ebf3 100644 --- a/install/ui/host.js +++ b/install/ui/host.js @@ -861,14 +861,35 @@ IPA.host_password_field = function (spec) { IPA.widget_factories['host_password'] = IPA.host_password_widget; IPA.field_factories['host_password'] = IPA.host_password_field; -IPA.host_certificate_status_widget = function (spec) { +IPA.host.certificate_status_field = function(spec) { + + spec = spec || {}; + + var that = IPA.cert.status_field(spec); + + that.load = function(result) { + + that.widget.result = result; + + var message = IPA.messages.objects.cert.request_message; + message = message.replace(/\$\{hostname\}/g, result.fqdn[0]); + message = message.replace(/\$\{realm\}/g, IPA.env.realm); + that.widget.request_message = message; + + that.reset(); + }; + + return that; +}; + +IPA.host.certificate_status_widget = function(spec) { spec = spec || {}; var that = IPA.cert.status_widget(spec); that.get_entity_pkey = function(result) { - var values = result['fqdn']; + var values = result.fqdn; return values ? values[0] : null; }; @@ -877,19 +898,19 @@ IPA.host_certificate_status_widget = function (spec) { }; that.get_entity_principal = function(result) { - var values = result['krbprincipalname']; + var values = result.krbprincipalname; return values ? values[0] : null; }; that.get_entity_certificate = function(result) { - var values = result['usercertificate']; + var values = result.usercertificate; return values ? values[0].__base64__ : null; }; return that; }; -IPA.widget_factories['host_certificate_status'] = IPA.host_certificate_status_widget; -IPA.field_factories['host_certificate_status'] = IPA.cert.status_field; +IPA.widget_factories['host_certificate_status'] = IPA.host.certificate_status_widget; +IPA.field_factories['host_certificate_status'] = IPA.host.certificate_status_field; IPA.register('host', IPA.host.entity); |