summaryrefslogtreecommitdiffstats
path: root/dogtag/ca-ui/shared/webapps/ca/agent/ca/updateCRL.template
blob: 2b05486b4fdf8ada508c1ff7f6f9050f93126562 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!-- --- BEGIN COPYRIGHT BLOCK ---
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; version 2 of the License.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License along
     with this program; if not, write to the Free Software Foundation, Inc.,
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

     Copyright (C) 2007 Red Hat, Inc.
     All rights reserved.
     --- END COPYRIGHT BLOCK --- -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD><TITLE> Update Certificate Revocation List </TITLE>
<CMS_TEMPLATE>
</HEAD>
<BODY bgcolor="white">
<font size="+1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
Update Certificate Revocation List Result 
</font>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="100%" BACKGROUND="/pki/images/hr.gif" >
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>

<font size="-1" face="PrimaSans BT, Verdana, Arial, Helvetica, sans-serif">
<SCRIPT LANGUAUGE="JavaScript">
if (result.header.crlPublished == 'Success') {
    document.write('The Certificate Revocation List has been updated and published successfully');
//    if (result.header.time != null) {
//        var sec = result.header.time / 1000;
//        document.write(' in '+sec+' seconds');
//    }
    document.writeln('.');
} else if (result.header.crlPublished == 'Failure') {
    document.writeln('The Certificate Revocation List has been updated successfully.<br>');
    document.writeln('The Certificate Revocation List has not been published successfully.<br>');
    if (result.header.error != null) {
        document.writeln('<br>&nbsp;&nbsp;&nbsp;&nbsp;Additional information:<br>');
        document.writeln('<blockquote><b><pre>'+result.header.error+'</pre></b></blockquote>');
    }
} else if (result.header.crlUpdate == 'Success') {
    document.writeln('The Certificate Revocation List has been updated successfully.');
    if (result.recordSet.length > 0) {i
        var fontStr = '<font size=-1 face="PrimaSans BT, Verdana, sans-serif">';
        document.writeln('<br>&nbsp;<br>&nbsp;<br>The Certificate Revocation List test statistics:<br>&nbsp;<br>');
        document.writeln('<table border="0" cellspacing="2" cellpadding="2" width="100%">');
        document.writeln('<td align="right" bgcolor="#eeeeee">&nbsp;</td>');
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+'CRL Numbers</font></td>');
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+'CRL Sizes</font></td>');
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+'Total Time</font></td>');
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+'Cache</font></td>');
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+'CRL</font></td>');
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+'Full</font></td>');
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+'Delta</font></td>');
        var cols = 0;
        if (result.recordSet[0].crlSplits != null && result.recordSet[0].crlSplits.length > 0) {
            cols = result.recordSet[0].crlSplits.split(',').length;
        }
        if (cols > 0) {
            document.writeln('<td bgcolor="#eeeeee" colspan="'+cols+'">'+fontStr+'&nbsp;&nbsp;CRL Generation Split Times</font></td>');
            //document.writeln('<td align="right" bgcolor="#eeeeee" colspan="'+cols+'">'+fontStr+'CRL Generation Split Times</font></td>');
        } else {
            document.writeln('<td bgcolor="#eeeeee">'+fontStr+'&nbsp;&nbsp;CRL Generation Split Times</font></td>');
        }
        var t0 = 0;
        var t1 = 0;
        var t2 = 0;
        var t3 = 0;
        var t4 = 0;
        var t5 = 0;
        for (var i = 0; i < result.recordSet.length; i++) {
            var crlTime;
            if (result.recordSet[i].crlSplits != null && result.recordSet[i].crlSplits.length > 0) {
                crlTime = result.recordSet[i].crlSplits.split(',');
            } else {
                crlTime = null;
            }
            var total = 0;
            var crlTotal = 0;
            var deltaCrlTotal = 0;
            var fullCrlTotal = 0;
            for (k = 0; crlTime != null && k < crlTime.length; k++) {
                if (k > 0 && k < 5) {
                    deltaCrlTotal += parseInt(crlTime[k]);
                } else {
                    fullCrlTotal += parseInt(crlTime[k]);
                }
                crlTotal += parseInt(crlTime[k]);
            }
            t0 = parseInt(result.recordSet[i].cacheUpdate);
            total += t0 + crlTotal;
            t1 += total;
            t2 += t0;
            t3 += crlTotal;
            t4 += fullCrlTotal;
            t5 += deltaCrlTotal;
            document.writeln('<tr>');
            document.writeln('<td align="right">'+fontStr+(i+1)+'</font></td>');
            document.writeln('<td align="right">'+fontStr+result.recordSet[i].crlNumbers+'</font></td>');
            document.writeln('<td align="right">'+fontStr+result.recordSet[i].crlSizes+'</font></td>');
            document.writeln('<td align="right">'+fontStr+total+'</font></td>');
            document.writeln('<td align="right">'+fontStr+result.recordSet[i].cacheUpdate+'</font></td>');
            document.writeln('<td align="right">'+fontStr+crlTotal+'</font></td>');
            document.writeln('<td align="right">'+fontStr+fullCrlTotal+'</font></td>');
            document.writeln('<td align="right">'+fontStr+deltaCrlTotal+'</font></td>');
            if (cols > 0) {
                for (k = 0; crlTime != null && k < crlTime.length; k++) {
                    document.writeln('<td align="right">'+fontStr+crlTime[k]+'</font></td>');
                }
            } else {
                document.writeln('<td>'+fontStr+'&nbsp;&nbsp;'+result.recordSet[i].crlSplits+'</font></td>');
            }
            document.writeln('</tr>');
        }
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+'Totals</td>');
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+'</font></td>');
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+'</font></td>');
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+t1+'</font></td>');
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+t2+'</font></td>');
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+t3+'</font></td>');
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+t4+'</font></td>');
        document.writeln('<td align="right" bgcolor="#eeeeee">'+fontStr+t5+'</font></td>');
        if (cols > 0) {
            for (k = 0; crlTime != null && k < crlTime.length; k++) {
                document.writeln('<td bgcolor="#eeeeee">'+fontStr+'</font></td>');
            }
        } else {
            document.writeln('<td bgcolor="#eeeeee">'+fontStr+'</font></td>');
        }

        document.writeln('</table>');
    }
} else if (result.header.crlUpdate == 'Failure') {
    document.writeln('The Certificate Revocation List has not been updated successfully.<br>');
    if (result.header.error != null) {
        document.writeln('<br>&nbsp;&nbsp;&nbsp;&nbsp;Additional information:<br>');
        document.writeln('<blockquote><b><pre>'+result.header.error+'</pre></b></blockquote>');
    }
} else if (result.header.crlUpdate == 'missingParameters') {
    document.writeln('The Certificate Revocation List test cannot be performed because some parameters are defined.');
} else if (result.header.crlUpdate == 'testingNotEnabled') {
    document.writeln('The Certificate Revocation List testing is not enabled.');
} else if (result.header.crlUpdate == 'testingInProgress') {
    document.writeln('The Certificate Revocation List testing is in progress.');
} else if (result.header.crlUpdate == 'Scheduled') {
    document.writeln('The Certificate Revocation List update has been scheduled.<br>');
    document.writeln('Check the CS logs to see results.');
} else if (result.header.crlUpdate == 'inProgress') {
    document.writeln('The Certificate Revocation List update is in progress.<br>');
    document.writeln('Check the CS logs to see results.');
} else if (result.header.crlUpdate == 'Disabled') {
    document.writeln('The Certificate Revocation List updates are disabled.<br>');
} else if (result.header.crlUpdate == 'notInitialized') {
    document.write('CRL Issuing Point');
    if (result.header.crlIssuingPoint != null) {
        document.write(' <i>'+result.header.crlIssuingPoint+'</i>');
    }
    document.writeln(' has not been initialized.<br>');
    document.writeln('Check the CS logs to see results.');
} else {
    document.write('The Certificate Revocation List has been updated successfully');
//    if (result.header.time != null) {
//        var sec = result.header.time / 1000;
//        document.write(' in '+sec+' seconds');
//    }
    document.writeln('.');
}
</SCRIPT>
</font>
</BODY>
</HTML>