From 23bfa0d6d33cb397e25bd19d319e2c7904fbcc77 Mon Sep 17 00:00:00 2001 From: Endi Sukma Dewata Date: Fri, 15 Oct 2010 20:51:52 -0400 Subject: [PATCH] Service certificate status. The service details page has been modified to show certificate status using bullets. It will also show the revocation reason, and display the restore button only if the certificate is on hold. The buttons action handlers have been moved into service_usercertificate_load() so they can update the bullets. A test data file for cert-show operation has been added. Other test data files containing certificate info has been updated for consistency. The certificate_confirmation_dialog() has been removed because it's no longer used. --- install/static/certificate.js | 78 +++---- install/static/service.js | 326 ++++++++++++++++------------ install/static/test/data/cert_request.json | 12 +- install/static/test/data/cert_show.json | 17 ++ install/static/test/data/service_show.json | 2 +- 5 files changed, 249 insertions(+), 186 deletions(-) create mode 100644 install/static/test/data/cert_show.json diff --git a/install/static/certificate.js b/install/static/certificate.js index 4302e2f..a688fe8 100755 --- a/install/static/certificate.js +++ b/install/static/certificate.js @@ -53,38 +53,15 @@ function certificate_parse_dn(dn) { return result; } -function certificate_confirmation_dialog(spec) { - var that = {}; - spec = spec || {}; - - var dialog = $('
', { - 'title': spec.title - }); - - dialog.append(spec.message); - - that.open = function() { - dialog.dialog({ - modal: true, - width: 300, - height: 150, - buttons: { - 'Close': function() { - dialog.dialog('destroy'); - } - } - }); - }; - - return that; -} - function certificate_get_dialog(spec) { var that = {}; spec = spec || {}; + that.title = spec.title || ''; + that.usercertificate = spec.usercertificate || ''; + var dialog = $('
', { - 'title': spec.title + 'title': that.title }); var textarea = $('