diff mod_admin_web/admin_web/www_files/js/main.js @ 396:8cb21ef24e5d

mod_admin_web: Show S2S certificate validity
author Florian Zeitz <florob@babelmonkeys.de>
date Fri, 29 Jul 2011 22:26:02 +0200
parents 54d4445cc5c6
children 99465bbfa205
line wrap: on
line diff
--- a/mod_admin_web/admin_web/www_files/js/main.js	Tue Jul 26 13:19:09 2011 +0000
+++ b/mod_admin_web/admin_web/www_files/js/main.js	Fri Jul 29 22:26:02 2011 +0200
@@ -25,15 +25,19 @@
 }
 
 function _cbNewS2S(e) {
-    var items, entry, retract, id, jid;
+    var items, entry, tmp, retract, id, jid;
     items = e.getElementsByTagName('item');
     for (i = 0; i < items.length; i++) {
         id = items[i].attributes['id'].value;
         jid = items[i].getElementsByTagName('session')[0].attributes['jid'].value;
 
         entry = $('<li id="' + id + '">' + jid + '</li>');
-        if (items[i].getElementsByTagName('encrypted')[0]) {
-            entry.append('<img src="images/encrypted.png" title="encrypted" alt=" (encrypted)" />');
+        if (tmp = items[i].getElementsByTagName('encrypted')[0]) {
+            if (tmp.getElementsByTagName('valid')[0]) {
+                entry.append('<img src="images/secure.png" title="encrypted (certificate valid)" alt=" (secure) (encrypted)" />');
+            } else {
+                entry.append('<img src="images/encrypted.png" title="encrypted (certificate invalid)" alt=" (encrypted)" />');
+            }
         }
         if (items[i].getElementsByTagName('compressed')[0]) {
             entry.append('<img src="images/compressed.png" title="compressed" alt=" (compressed)" />');