comparison 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
comparison
equal deleted inserted replaced
395:77ca0947647b 396:8cb21ef24e5d
23 function rawOutput(data) { 23 function rawOutput(data) {
24 log('SENT: ' + data); 24 log('SENT: ' + data);
25 } 25 }
26 26
27 function _cbNewS2S(e) { 27 function _cbNewS2S(e) {
28 var items, entry, retract, id, jid; 28 var items, entry, tmp, retract, id, jid;
29 items = e.getElementsByTagName('item'); 29 items = e.getElementsByTagName('item');
30 for (i = 0; i < items.length; i++) { 30 for (i = 0; i < items.length; i++) {
31 id = items[i].attributes['id'].value; 31 id = items[i].attributes['id'].value;
32 jid = items[i].getElementsByTagName('session')[0].attributes['jid'].value; 32 jid = items[i].getElementsByTagName('session')[0].attributes['jid'].value;
33 33
34 entry = $('<li id="' + id + '">' + jid + '</li>'); 34 entry = $('<li id="' + id + '">' + jid + '</li>');
35 if (items[i].getElementsByTagName('encrypted')[0]) { 35 if (tmp = items[i].getElementsByTagName('encrypted')[0]) {
36 entry.append('<img src="images/encrypted.png" title="encrypted" alt=" (encrypted)" />'); 36 if (tmp.getElementsByTagName('valid')[0]) {
37 entry.append('<img src="images/secure.png" title="encrypted (certificate valid)" alt=" (secure) (encrypted)" />');
38 } else {
39 entry.append('<img src="images/encrypted.png" title="encrypted (certificate invalid)" alt=" (encrypted)" />');
40 }
37 } 41 }
38 if (items[i].getElementsByTagName('compressed')[0]) { 42 if (items[i].getElementsByTagName('compressed')[0]) {
39 entry.append('<img src="images/compressed.png" title="compressed" alt=" (compressed)" />'); 43 entry.append('<img src="images/compressed.png" title="compressed" alt=" (compressed)" />');
40 } 44 }
41 45