source: trunk/web/xslt/cws-status-resp.xsl@ 20

Last change on this file since 20 was 20, checked in by bowman, 14 years ago

Added max-cw-wait, max-cache-wait and congestion limit to profile status and clarified related web view + loggings.

File size: 47.4 KB
Line 
1<?xml version="1.0"?>
2<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3 <xsl:output method="html"/>
4
5 <xsl:template match="cws-status-resp">
6 <div id="header">
7 <div id="headerInfoLeft"><xsl:call-template name="jvm"/></div>
8 <div id="headerInfo">
9 <img id="busyImg" src="/images/bigrotation.gif" alt="loading" style="visibility: hidden;"/>
10 </div>
11
12 </div>
13 <div id="subheader">
14 <a href="#" id="events">Events</a>&#160;
15 <a href="#" id="channels">Channels</a>&#160;
16 <a href="#" id="status">Status</a>&#160;
17 <a href="#" id="sessions">Sessions</a>&#160;
18 <a href="#" id="admin" style="visibility: hidden">Admin</a>&#160;
19 <a href="#" id="config" style="visibility: hidden">Config</a>&#160;
20 <!-- <a href="#" id="viewXml">View XML</a>&#160; -->
21 <a href="#" id="logout" style="visibility: visible; position: absolute; left: 745px">Logout</a>
22 </div>
23 <div id="mainstart">&#160;</div>
24 <div id="main">
25 <div id="content">
26 <xsl:apply-templates/>
27 </div>
28 </div>
29 <div id="footer">&#160;</div>
30 </xsl:template>
31
32 <xsl:template match="error-log">
33 <xsl:call-template name="profile-filter"/>
34 <fieldset>
35 <legend><strong>CWS Events</strong> (connector activities) <input id="clearEventsBtn" type="button" value="Clear"/> </legend>
36 <table class="error-log">
37 <tbody>
38 <tr><td>
39 <xsl:for-each select="event">
40 <xsl:value-of select="@timestamp"/> -
41 <strong> <xsl:value-of select="@label"/>: </strong>
42 <strong>
43 <xsl:choose>
44 <xsl:when test="@type = 1">Channel changed</xsl:when>
45 <xsl:when test="@type = 2">Successfully connected</xsl:when>
46 <xsl:when test="@type = 3">Disconnected</xsl:when>
47 <xsl:when test="@type = 4">Connection attempt failed</xsl:when>
48 <xsl:when test="@type = 5">Warning (timeout)</xsl:when>
49 <xsl:when test="@type = 6">Lost service</xsl:when>
50 <xsl:when test="@type = 8">Invalid card data</xsl:when>
51 <xsl:when test="@type = 10">Startup</xsl:when>
52 <xsl:otherwise>Unknown</xsl:otherwise>
53 </xsl:choose>
54 </strong> - <xsl:value-of select="@msg"/><br />
55 </xsl:for-each>
56 <xsl:if test="@size = 0">No events</xsl:if>
57 </td></tr>
58 </tbody>
59 </table>
60 </fieldset><br /><br />
61 </xsl:template>
62
63 <xsl:template match="file-log">
64 <xsl:if test="@size > -1">
65 <fieldset>
66 <legend><strong>File Log Events</strong> (recent WARNING and SEVERE level loggings) <input id="clearFileLogBtn" type="button" value="Clear"/> </legend>
67 <table class="error-log">
68 <tbody>
69 <tr><td>
70 <xsl:for-each select="event">
71 <xsl:value-of select="@timestamp"/> -
72 <strong> <xsl:value-of select="@log-level"/>: </strong>
73 <strong><xsl:value-of select="@label"/></strong> - <xsl:value-of select="@msg"/><br />
74 </xsl:for-each>
75 <xsl:if test="@size = 0">No events</xsl:if>
76 </td></tr>
77 </tbody>
78 </table>
79 </fieldset><br /><br />
80 </xsl:if>
81 </xsl:template>
82
83 <xsl:key name="ev-by-time" match="ecm" use="substring(@timestamp, 1, string-length(@timestamp) - 3)"/>
84
85 <xsl:template match="user-warning-log">
86 <fieldset>
87 <legend><strong>User Transaction Warnings</strong> (recent potential traffic problems) <input id="clearWarningsBtn" type="button" value="Clear"/> </legend>
88 <table class="error-log">
89 <tbody>
90 <tr><td> <!-- bwahaha, this is just an insane amount of xsl crud just to get grouping of events per minute -->
91 <xsl:for-each select="ecm[generate-id(.) = generate-id(key('ev-by-time', substring(@timestamp, 1, string-length(@timestamp) - 3))[1])]">
92 <xsl:variable name="curcount" select="count(key('ev-by-time', substring(@timestamp, 1, string-length(@timestamp) - 3)))"/>
93 <xsl:variable name="trunctime" select="substring(@timestamp, 1, string-length(@timestamp) - 3)"/>
94 <xsl:choose>
95 <xsl:when test="$curcount = 1"> <!-- show as single event, no indentation -->
96 <xsl:call-template name="user-warning-entry">
97 <xsl:with-param name="indent" select="''"/>
98 </xsl:call-template>
99 </xsl:when>
100 <xsl:otherwise>
101 <a id="openhref"> <!-- show as group, indented and collapsible with the minute-timestamp as href -->
102 <xsl:attribute name="href"><xsl:value-of select="translate($trunctime, ' ', '_')"/></xsl:attribute>
103 <xsl:value-of select="$trunctime"/> (<xsl:value-of select="$curcount"/> events)
104 </a>
105 <br /><div>
106 <xsl:attribute name="style">display: <xsl:value-of select="@display"/>;</xsl:attribute>
107 <xsl:attribute name="id"><xsl:value-of select="translate($trunctime, ' ', '_')"/></xsl:attribute>
108 <xsl:for-each select="key('ev-by-time', $trunctime)">
109 <xsl:call-template name="user-warning-entry">
110 <xsl:with-param name="indent" select="'&#160;&#160;&#160;'"/>
111 </xsl:call-template>
112 </xsl:for-each>
113 </div>
114 </xsl:otherwise>
115 </xsl:choose>
116 </xsl:for-each>
117 <xsl:if test="count(ecm) = 0">No warnings (debugging must be enabled per ca-profile for these to be logged)</xsl:if>
118 </td></tr>
119 </tbody>
120 </table>
121 </fieldset><br /><br />
122 <xsl:if test="count(ecm) &gt; 0">
123 <xsl:call-template name="flag-legend"/>
124 </xsl:if>
125 </xsl:template>
126
127 <xsl:template match="cws-connectors">
128 <xsl:call-template name="proxy-status"/>
129 <br />
130 <xsl:call-template name="cache-status"/>
131 <xsl:call-template name="proxy-plugins"/>
132 <br />
133 <xsl:call-template name="ca-profiles"/>
134 <br />
135 <fieldset>
136 <legend><strong>Connectors (<xsl:value-of select="count(connector)"/>)</strong></legend>
137 <xsl:for-each select="connector">
138 <xsl:sort select="@profile"/>
139 <xsl:sort select="@name"/>
140 <div class="cwsheader">
141 <table border="0" width="98%" cellspacing="0" cellpadding="0"><tr>
142 <td width="25%"><strong><xsl:value-of select="@protocol"/>Cws: </strong>
143 <xsl:choose>
144 <xsl:when test="@duration"> <!-- duration exists == connector is connected -->
145 <a id="openhref">
146 <xsl:attribute name="href"><xsl:value-of select="@name"/></xsl:attribute>
147 <xsl:value-of select="@name"/>
148 </a>
149 </xsl:when>
150 <xsl:otherwise>
151 <xsl:value-of select="@name"/>
152 </xsl:otherwise>
153 </xsl:choose>
154 </td>
155 <td width="20%"><strong>Status: </strong><xsl:value-of select="@status"/></td>
156 <td width="20%"><strong>Profile: </strong><xsl:value-of select="@profile"/></td>
157 <td width="15%">
158 <xsl:if test="@service-count">
159 <strong>Services: </strong><xsl:value-of select="@service-count"/>
160 </xsl:if>
161 <xsl:if test="@disconnected">
162 <strong>Disconnected: </strong><br /><xsl:value-of select="@disconnected"/>
163 </xsl:if>
164 </td>
165 <td width="10%">
166 <xsl:if test="@metric != 1">
167 <strong>Metric: </strong><xsl:value-of select="@metric"/>
168 </xsl:if>
169 </td>
170 <td width="20%" align="right">
171 <xsl:if test="@utilization">
172 <xsl:choose>
173 <xsl:when test="@utilization &gt; 100">
174 <strong><font color="red"><xsl:value-of select="@utilization"/>%</font></strong>
175 </xsl:when>
176 <xsl:otherwise>
177 <xsl:value-of select="@utilization"/>%
178 </xsl:otherwise>
179 </xsl:choose>
180 &#160;(<xsl:value-of select="@ecm-load"/>)
181 </xsl:if>
182 <xsl:if test="@next-attempt">
183 <strong>Retry in: </strong><xsl:value-of select="@next-attempt"/>
184 </xsl:if>
185 </td>
186 </tr>
187 </table>
188 <div class="cwscontent">
189 <xsl:attribute name="style">display: <xsl:value-of select="@display"/>;</xsl:attribute>
190 <xsl:attribute name="id"><xsl:value-of select="concat('toggle-', @name)"/></xsl:attribute>
191 <xsl:if test="@host"><strong>Host: </strong><xsl:value-of select="@host"/><br /></xsl:if>
192 <xsl:if test="@provider-idents"><strong>Provider-idents: </strong><xsl:value-of select="@provider-idents"/><br /></xsl:if>
193 <strong>Connected: </strong><xsl:value-of select="@connected"/><br />
194 <strong>Uptime: </strong><xsl:value-of select="@duration"/><br />
195 <xsl:if test="@card-data1"><strong>Card-data: </strong><xsl:value-of select="@card-data1"/><br /></xsl:if>
196 <strong>Processing time: </strong><xsl:value-of select="@cutime"/> ms (avg: <xsl:value-of select="@avgtime"/> ms)<br />
197 <strong>Utilization: </strong><xsl:value-of select="@utilization"/>% (total: <xsl:value-of select="@avgutilization"/>%)<br />
198 <strong>Estimated capacity: </strong><xsl:value-of select="@capacity"/><br />
199 <strong>Queue size: </strong><xsl:value-of select="@sendq"/><br />
200 <strong>ECM count: </strong><xsl:value-of select="@ecm-count"/><br />
201 <strong>ECM load: </strong><xsl:value-of select="@ecm-load"/> (over the last cw-max-age period)<br />
202 <xsl:if test="@emm-count &gt; 0"><strong>EMM count: </strong><xsl:value-of select="@emm-count"/><br /></xsl:if>
203 <strong>Timeouts: </strong><xsl:value-of select="@timeout-count"/><br />
204 <xsl:if test="@cws-log">
205 <strong>Transaction log: </strong>
206 <a target="_blank">
207 <xsl:attribute name="href">/xmlHandler?command=cws-log&amp;name=<xsl:value-of select="@name"/></xsl:attribute>
208 <xsl:value-of select="@cws-log"/>
209 </a>
210 <br />
211 </xsl:if>
212 <br />
213 <table width="95%" cellspacing="0" cellpadding="0"><tr>
214 <td width="55%" valign="top">
215 <strong>Services: </strong>&#160;
216 <xsl:if test="count(service) > 0">
217 <a target="_blank">
218 <xsl:attribute name="href">/xmlHandler?command=export-services&amp;name=<xsl:value-of select="@name"/></xsl:attribute>
219 show full
220 </a>&#160;
221 <a target="_blank">
222 <xsl:attribute name="href">/xmlHandler?command=export-services&amp;name=<xsl:value-of select="@name"/>&amp;format=hex</xsl:attribute>
223 show hex
224 </a>
225 </xsl:if>
226 <ul>
227 <xsl:for-each select="service">
228 <xsl:sort select="@name"/>
229 <li>
230 <xsl:choose>
231 <xsl:when test="@hit = 'true'"><font color="blue"><strong><xsl:value-of select="@name"/></strong></font></xsl:when>
232 <xsl:otherwise><xsl:value-of select="@name"/></xsl:otherwise>
233 </xsl:choose>
234 <xsl:choose>
235 <xsl:when test="not(starts-with(@name, 'Unknown '))"> (<xsl:value-of select="@hex-id"/><xsl:if test="@profile">:<xsl:value-of select="@profile"/></xsl:if>)</xsl:when>
236 <xsl:otherwise><xsl:if test="@profile"> (<xsl:value-of select="@profile"/>)</xsl:if></xsl:otherwise>
237 </xsl:choose>
238 </li>
239 </xsl:for-each>
240 </ul>
241 </td>
242 <td valign="top">
243 <strong>Remote properties: </strong>
244 <ul>
245 <xsl:for-each select="remote-info/cws-param"><li>
246 <strong><xsl:value-of select="@name"/>: </strong>
247 <xsl:choose>
248 <xsl:when test="@name = 'url'">
249 <a target="_blank">
250 <xsl:attribute name="href"><xsl:value-of select="@value"/></xsl:attribute>
251 <xsl:value-of select="@value"/>
252 </a>
253 </xsl:when>
254 <xsl:otherwise>
255 <xsl:value-of select="@value"/>
256 </xsl:otherwise>
257 </xsl:choose>
258 </li>
259 </xsl:for-each>
260 </ul>
261 </td>
262 </tr></table>
263 </div>
264 </div>
265 </xsl:for-each>
266 </fieldset><br />
267 </xsl:template>
268
269 <xsl:template match="watched-services">
270 <xsl:call-template name="profile-filter"/>
271 <!-- xsl:for-each select="//watched-services" -->
272 <fieldset>
273 <legend><strong>Currently watched channels (<xsl:value-of select="@count"/>)</strong></legend><br />
274 <xsl:for-each select="service">
275 <xsl:sort select="@profile"/>
276 <strong><xsl:value-of select="@name"/></strong> (<xsl:value-of select="@profile"/>:<xsl:value-of select="@hex-id"/>) - <strong><xsl:value-of select="@watchers"/></strong> viewers<br />
277 </xsl:for-each>
278 <xsl:if test="count(service) = 0">No channels</xsl:if>
279 <br />
280 </fieldset><br />
281 <!-- /xsl:for-each -->
282
283 <xsl:if test="count(//all-services) = 0">
284 <br />
285 <strong>All mapped channels: </strong><a href="#" id="showAllServices"> show</a>
286 </xsl:if>
287 </xsl:template>
288
289 <xsl:template match="all-services">
290 <!-- xsl:call-template name="profile-filter"/ -->
291 <!-- xsl:call-template name="watched-services"/ -->
292 <br />
293 <fieldset>
294 <legend><strong>All mapped channels (<xsl:value-of select="@count"/>)</strong></legend><br />
295 <ul id="chanList">
296 <xsl:for-each select="service">
297 <li class="channel">
298 <xsl:attribute name="id"><xsl:value-of select="concat('channel', @id)"/></xsl:attribute>
299 <img width="40">
300 <xsl:attribute name="src"><xsl:value-of select="concat('picon/', @id, '.', @profile, '.png')"/></xsl:attribute>
301 </img>
302 <input name="chanId" type="checkbox">
303 <xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute>
304 <xsl:attribute name="id"><xsl:value-of select="concat('chan', @id)"/></xsl:attribute>
305 </input>
306 <label>
307 <xsl:attribute name="for"><xsl:value-of select="concat('chan', @id)"/></xsl:attribute>
308 <strong><xsl:value-of select="@name"/></strong> (<xsl:value-of select="@profile"/>:<xsl:value-of select="@hex-id"/>)
309 </label>
310 </li>
311 </xsl:for-each>
312 </ul><br />
313 <xsl:if test="count(service) > 0">
314 <input name="checkAllCb" id="checkAllCb" type="checkbox"/>
315 <label for="checkAllCb">Check all</label>&#160;
316 <input name="enigma2Cb" id="enigma2Cb" type="checkbox"/>
317 <label for="enigma2Cb">Use enigma2 format</label>&#160;
318 <input value="Create bouquet file" type="button" id="createChannelFileBtn"/><br />
319 </xsl:if>
320 <xsl:if test="count(service) = 0">
321 No channels<br />
322 </xsl:if>
323 </fieldset>
324 </xsl:template>
325
326 <xsl:template match="last-seen">
327 <strong>Name: </strong><xsl:value-of select="../proxy-status/@name"/><br />
328 <strong>State: </strong>up<br />
329 <br />
330 <strong>Sessions: </strong><a href="javascript:clickSection('sessions');">show current</a><br />
331 <br />
332 <xsl:for-each select="//last-seen">
333 <xsl:if test="count(entry) > 0">
334 <fieldset id="disconnectedUsers">
335 <legend><strong>Disconnected users (last seen)</strong></legend>
336 <div class="cwsheader">
337 <table border="0" width="80%"><tbody>
338 <tr>
339 <td><strong>User</strong></td><td><strong>Profile</strong></td><td><strong>Last login</strong></td><td><strong>Last seen (or logout)</strong></td><td><strong>IP</strong></td><td><strong>Log</strong></td>
340 </tr>
341 <xsl:for-each select="entry">
342 <xsl:sort order="descending" select="@last-seen"/>
343 <tr>
344 <xsl:if test="position() mod 2 = 1">
345 <xsl:attribute name="bgcolor">#ffffff</xsl:attribute>
346 </xsl:if>
347 <td><xsl:value-of select="@name"/></td>
348 <td><xsl:value-of select="@profile"/></td>
349 <td><xsl:value-of select="@last-login"/></td>
350 <td><xsl:value-of select="@last-seen"/></td>
351 <td><xsl:value-of select="@host"/></td>
352 <td><a target="_blank">
353 <xsl:attribute name="href">/xmlHandler?command=user-log&amp;name=<xsl:value-of select="@name"/>&amp;profile=<xsl:value-of select="@profile"/></xsl:attribute>
354 <xsl:value-of select="@user-log"/>
355 </a></td>
356 </tr>
357 </xsl:for-each>
358 </tbody></table>
359 </div>
360 </fieldset>
361 </xsl:if>
362 </xsl:for-each>
363 <br />
364 </xsl:template>
365
366 <xsl:template match="login-failures">
367 <strong>Name: </strong><xsl:value-of select="../proxy-status/@name"/><br />
368 <strong>State: </strong>up<br />
369 <br />
370 <strong>Sessions: </strong><a href="javascript:clickSection('sessions');">show current</a><br />
371 <br />
372 <xsl:for-each select="//login-failures">
373 <xsl:if test="count(entry) > 0">
374 <fieldset id="disconnectedUsers">
375 <legend><strong>Login failures/connection attempts</strong></legend>
376 <div class="cwsheader">
377 <table border="0" width="99%"><tbody>
378 <tr>
379 <td><strong>User</strong></td><td><strong>Context</strong></td><td><strong>Count</strong></td><td><strong>Last failure</strong></td><td><strong>IP</strong></td><td><strong>Reason</strong></td>
380 </tr>
381 <xsl:for-each select="entry">
382 <xsl:sort order="descending" select="@last-failure"/>
383 <tr>
384 <xsl:if test="position() mod 2 = 1">
385 <xsl:attribute name="bgcolor">#ffffff</xsl:attribute>
386 </xsl:if>
387 <td><xsl:value-of select="@name"/></td>
388 <td><xsl:value-of select="@context"/></td>
389 <td><xsl:value-of select="@failure-count"/></td>
390 <td><xsl:value-of select="@last-failure"/></td>
391 <td><xsl:value-of select="@host"/></td>
392 <td><xsl:value-of select="@reason"/></td>
393 </tr>
394 </xsl:for-each>
395 </tbody></table>
396 </div>
397 </fieldset>
398 </xsl:if>
399 </xsl:for-each>
400 <br />
401 </xsl:template>
402
403 <xsl:template match="proxy-users">
404 <strong>Name: </strong><xsl:value-of select="../proxy-status/@name"/><br />
405 <strong>State: </strong>up<br />
406 <strong>Profiles: </strong><xsl:value-of select="count(../ca-profiles/profile)"/><br />
407 <xsl:if test="@count > 1"><strong>Users: </strong><xsl:value-of select="@count"/><br /></xsl:if>
408 <strong>Sessions: </strong><xsl:value-of select="../proxy-status/@sessions"/> (active: <xsl:value-of select="../proxy-status/@active-sessions"/>)<br />
409 <br />
410 <strong>Disconnected users/last seen: </strong><a href="javascript:clickSection('seen');">show log</a><br />
411 <strong>Login failures/connect attempts: </strong><a href="javascript:clickSection('failures');">show log</a><br />
412 <br />
413 <input type="checkbox" name="hideInactiveCb" id="hideInactiveCb">
414 <xsl:if test="@hide-inactive">
415 <xsl:attribute name="checked">checked</xsl:attribute>
416 </xsl:if>
417 </input>
418 <label for="hideInactiveCb">Hide idle sessions</label><br />
419 <br />
420 <div class="cwsheader" style="width: 750px;">
421 <table id="userSessions" border="0" width="100%"><tbody>
422 <tr>
423 <td><strong>User</strong></td><td title="Number of connections/maximum"><strong>#</strong></td><td><strong>IP</strong></td>
424 <td><strong>
425 <xsl:choose>
426 <xsl:when test="@toggle-duration"><a href="#" id="toggleDuration" title="Toggle Connected/Zapped Time">Zapped</a></xsl:when>
427 <xsl:otherwise><a href="#" id="toggleDuration" title="Toggle Connected/Zapped Time">Connected</a></xsl:otherwise>
428 </xsl:choose>
429 </strong></td>
430 <td title="ECMs sent by client since connect"><strong>ECM</strong></td><td title="EMMs sent by client since connect"><strong>EMM</strong></td>
431 <td title="Interval between ECMs (sliding window average)"><strong>Iv</strong></td><td title="Processing time for last ECM transaction"><strong>Time</strong></td>
432 <td title="Proxy flags for last ECM transaction"><strong>Flags</strong></td><td><strong>ClientID</strong></td><td><strong>Service</strong></td>
433 </tr>
434 <xsl:for-each select="../ca-profiles/profile">
435 <xsl:sort select="@name"/>
436 <tr>
437 <td colspan="11" align="left" bgcolor="#dddddd">
438 <div><xsl:value-of select="@name"/> (capacity: <xsl:value-of select="@capacity"/>, mapped-services: <xsl:value-of select="@mapped-services"/>)</div>
439 </td>
440 </tr>
441 <xsl:variable name="profile" select="@name"/>
442 <xsl:for-each select="../../proxy-users/user/session[@profile=$profile]">
443 <tr>
444 <xsl:if test="@active = 'false'">
445 <xsl:attribute name="style">font-style: italic</xsl:attribute>
446 <xsl:if test="@keepalive-count">
447 <xsl:attribute name="style">font-style: italic; color: blue</xsl:attribute>
448 </xsl:if>
449 </xsl:if>
450 <xsl:if test="position() mod 2 = 0">
451 <xsl:attribute name="bgcolor">#ffffff</xsl:attribute>
452 </xsl:if>
453 <td>&#160;&#160;
454 <a target="_blank">
455 <xsl:attribute name="id"><xsl:value-of select="../@name"/></xsl:attribute>
456 <xsl:if test="@active = 'false'">
457 <xsl:attribute name="style">font-style: italic</xsl:attribute>
458 </xsl:if>
459 <xsl:attribute name="href">/xmlHandler?command=proxy-users&amp;name=<xsl:value-of select="../@name"/></xsl:attribute>
460 <xsl:attribute name="title">Show session xml for user</xsl:attribute>
461 <xsl:choose>
462 <xsl:when test="../@display-name">
463 <xsl:value-of select="../@display-name"/>
464 </xsl:when>
465 <xsl:otherwise>
466 <xsl:value-of select="../@name"/>
467 </xsl:otherwise>
468 </xsl:choose>
469 </a>
470 </td>
471 <td><xsl:value-of select="@count"/></td>
472 <td><xsl:value-of select="@host"/>
473 <xsl:variable name="host" select="@host"/>
474 <xsl:variable name="count" select="count(//proxy-users/user/session[@host=$host])"/>
475 <xsl:if test="$count > 1">&#160;(<xsl:value-of select="$count"/>)</xsl:if>
476 </td>
477 <td>
478 <xsl:value-of select="@duration"/>
479 <xsl:if test="@last-zap">
480 <xsl:value-of select="@last-zap"/>
481 </xsl:if>
482 </td>
483 <td><a target="_blank">
484 <xsl:attribute name="href">/xmlHandler?command=user-log&amp;name=<xsl:value-of select="../@name"/>&amp;profile=<xsl:value-of select="@profile"/></xsl:attribute>
485 <xsl:attribute name="title">Show ECM transaction log for user</xsl:attribute>
486 <xsl:value-of select="@ecm-count"/>
487 </a></td>
488 <td>
489 <xsl:value-of select="@emm-count"/><xsl:if test="@au"> -&gt; <br /><xsl:value-of select="@au"/></xsl:if>
490 </td>
491 <td>
492 <xsl:choose>
493 <xsl:when test="@avg-ecm-interval &lt; 7 and @avg-ecm-interval &gt; 0">
494 <strong><font color="red"><xsl:value-of select="@avg-ecm-interval"/></font></strong>
495 </xsl:when>
496 <xsl:otherwise>
497 <xsl:if test="@avg-ecm-interval &gt; -1">
498 <xsl:value-of select="@avg-ecm-interval"/>
499 </xsl:if>
500 </xsl:otherwise>
501 </xsl:choose>
502 <xsl:if test="@pending-count &gt; 1">
503 (<strong><font color="red"><xsl:value-of select="@pending-count"/></font></strong>)
504 </xsl:if>
505 </td>
506 <td>
507 <xsl:choose>
508 <xsl:when test="@last-transaction &gt; 4500">
509 <strong><font color="red"><xsl:value-of select="@last-transaction"/></font></strong>
510 </xsl:when>
511 <xsl:otherwise>
512 <xsl:if test="@last-transaction &gt; -1">
513 <xsl:value-of select="@last-transaction"/>
514 </xsl:if>
515 </xsl:otherwise>
516 </xsl:choose>
517 </td>
518 <td><xsl:value-of select="@flags"/></td>
519 <td><xsl:value-of select="@client-id"/></td>
520 <td>
521 <xsl:value-of select="service/@name"/>
522 <xsl:if test="service/@profile">:<xsl:value-of select="service/@profile"/></xsl:if>
523 </td>
524 </tr>
525 </xsl:for-each>
526 <tr><td colspan="11">&#160;</td></tr>
527 </xsl:for-each>
528 </tbody></table>
529 </div><br />
530 <xsl:call-template name="flag-legend"/>
531 <!-- xsl:call-template name="last-seen"/ -->
532 </xsl:template>
533
534 <xsl:template match="ctrl-commands">
535 <xsl:for-each select="command-group">
536 <fieldset>
537 <legend><strong><xsl:value-of select="@name"/> commands</strong> (<xsl:value-of select="@handler"/>)</legend>
538 <xsl:for-each select="command">
539 <form action="">
540 <xsl:attribute name="name"><xsl:value-of select="concat(@name, '-form')"/></xsl:attribute>
541 <xsl:attribute name="id"><xsl:value-of select="@name"/></xsl:attribute>
542 <xsl:value-of select="@label"/>
543 <xsl:for-each select="command-param">
544 <xsl:if test="@label != '' and position() = 1">&#160;-&#160;</xsl:if>
545 <xsl:value-of select="@label"/>:
546 <xsl:choose>
547 <xsl:when test="@allow-arbitrary = 'true'">
548 <xsl:choose>
549 <xsl:when test="@size">
550 <textarea>
551 <xsl:attribute name="style">vertical-align: middle;</xsl:attribute>
552 <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
553 <xsl:attribute name="rows"><xsl:value-of select="@size"/></xsl:attribute>
554 <xsl:attribute name="cols">45</xsl:attribute>
555 <xsl:value-of select="@label"/>
556 </textarea>&#160;
557 </xsl:when>
558 <xsl:otherwise>
559 <input type="text">
560 <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
561 <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute>
562 </input>&#160;
563 </xsl:otherwise>
564 </xsl:choose>
565 </xsl:when>
566 <xsl:otherwise>
567 <xsl:choose>
568 <xsl:when test="@boolean">
569 <input type="checkbox">
570 <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
571 </input>&#160;
572 </xsl:when>
573 <xsl:otherwise>
574 <select>
575 <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
576 <xsl:for-each select="option">
577 <xsl:variable name="listname" select="@value"/>
578 <xsl:choose>
579 <xsl:when test="starts-with(@value, '@')"> <!-- @ indicates named list of options -->
580 <xsl:for-each select="//ctrl-commands/option-list[@name=$listname]/option">
581 <option>
582 <xsl:if test="position() = 1">
583 <xsl:attribute name="selected">selected</xsl:attribute>
584 </xsl:if>
585 <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute>
586 <xsl:value-of select="@value"/>
587 </option>
588 </xsl:for-each>
589 </xsl:when>
590 <xsl:otherwise> <!-- no named list of options -->
591 <option>
592 <xsl:if test="position() = 1">
593 <xsl:attribute name="selected">selected</xsl:attribute>
594 </xsl:if>
595 <xsl:attribute name="value"><xsl:value-of select="@value"/></xsl:attribute>
596 <xsl:value-of select="@value"/>
597 </option>
598 </xsl:otherwise>
599 </xsl:choose>
600
601 </xsl:for-each>
602 </select>&#160;
603 </xsl:otherwise>
604 </xsl:choose>
605 </xsl:otherwise>
606 </xsl:choose>
607 </xsl:for-each>
608 <xsl:if test="@confirm = 'true'">
609 <input type="hidden" name="confirm" value="true"/>
610 </xsl:if>
611 &#160; <input value="OK" type="submit"/><br />
612 &#8226; <xsl:value-of select="@description"/>
613 </form>
614 </xsl:for-each>
615 </fieldset><br />
616 <br />
617 </xsl:for-each>
618 </xsl:template>
619
620 <!-- common named templates for elements that appear in the root but should only be rendered where explicitly called -->
621
622 <xsl:template name="proxy-status">
623 <xsl:for-each select="//proxy-status">
624 <strong>Name: </strong><xsl:value-of select="@name"/><br />
625 <strong>State: </strong>up<br />
626 <strong>Started: </strong><xsl:value-of select="@started"/><br />
627 <strong>Uptime: </strong><xsl:value-of select="@duration"/><br />
628 <strong>Connectors: </strong><xsl:value-of select="@connectors"/><br />
629 <strong>Sessions: </strong><xsl:value-of select="@sessions"/> (active: <xsl:value-of select="@active-sessions"/>)<br />
630 <strong>Estimated total capacity: </strong><xsl:value-of select="@capacity"/> (ECM-&gt;CW transactions per CW-validity-period)<br />
631 <strong>Estimated total load: </strong><xsl:value-of select="sum(//connector/@ecm-load)"/> (forwards during the last period)<br />
632 <strong>ECM total: </strong><xsl:value-of select="@ecm-count"/> (average rate: <xsl:value-of select="@ecm-rate"/>/s)<br />
633 <strong>ECM forwards: </strong><xsl:value-of select="@ecm-forwards"/>&#160;
634 <xsl:if test="@ecm-count &gt; 0">(<xsl:value-of select="format-number(@ecm-forwards div @ecm-count, '##.0%')"/>)</xsl:if><br />
635 <strong>ECM cache hits: </strong><xsl:value-of select="@ecm-cache-hits"/>&#160;
636 <xsl:if test="@ecm-count &gt; 0">(<xsl:value-of select="format-number(@ecm-cache-hits div @ecm-count, '##.0%')"/>)</xsl:if><br />
637 <strong>ECM denied: </strong><xsl:value-of select="@ecm-denied"/>&#160;
638 <xsl:if test="@ecm-denied &gt; 0">(<xsl:value-of select="format-number(@ecm-denied div @ecm-count, '##.0%')"/>)</xsl:if><br />
639 <strong>ECM filtered: </strong><xsl:value-of select="@ecm-filtered"/>&#160;
640 <xsl:if test="@ecm-filtered &gt; 0">(<xsl:value-of select="format-number(@ecm-filtered div @ecm-count, '##.0%')"/>)</xsl:if><br />
641 <strong>ECM failures: </strong><xsl:value-of select="@ecm-failures"/><br />
642 <strong>EMM total: </strong><xsl:value-of select="@emm-count"/><br />
643 </xsl:for-each>
644 </xsl:template>
645
646 <xsl:template name="jvm">
647 <span style="font-size: smaller">
648 <xsl:for-each select="//proxy-status/jvm">
649 <strong>CSP <xsl:value-of select="../@version"/> <xsl:value-of select="../@build"/></strong> - <strong>JVM: </strong>
650 <span id="jvm">[<xsl:value-of select="@name"/> <xsl:value-of select="@version"/>]</span><strong> Heap: </strong>
651 [<xsl:value-of select="@heap-total - @heap-free"/>k/<xsl:value-of select="@heap-total"/>k] <strong>TC: </strong>
652 <span id="tc"> [<xsl:value-of select="@threads"/>]</span>
653 <xsl:if test="@filedesc-open">
654 <strong> FD: </strong> [<xsl:value-of select="@filedesc-open"/>/<xsl:value-of select="@filedesc-max"/>]
655 </xsl:if>
656 <strong> OS: </strong> [<xsl:value-of select="@os"/>]
657 <div style="position: absolute; top: 30px; left: 120px;"><strong><xsl:value-of select="@time"></xsl:value-of></strong></div>
658 <div id="autoPollDiv" style="position: absolute; top: 26px; left: 660px;">
659 <input type="checkbox" name="autoPollCb" id="autoPollCb" checked="checked"/>
660 <label for="autoPollCb">Auto polling</label>
661 </div>
662 </xsl:for-each>
663 </span>
664 </xsl:template>
665
666 <xsl:template name="cache-status">
667 <xsl:for-each select="//cache-status">
668 <div class="cwsheader"><strong>Cache-Handler: </strong>
669 <a id="openhref">
670 <xsl:attribute name="href"><xsl:value-of select="@type"/></xsl:attribute>
671 <xsl:value-of select="@type"/>
672 </a><br />
673 <div class="cwscontent">
674 <xsl:attribute name="style">display: <xsl:value-of select="@display"/>;</xsl:attribute>
675 <xsl:attribute name="id"><xsl:value-of select="concat('toggle-', @type)"/></xsl:attribute>
676 <xsl:for-each select="cache-param">
677 <strong><xsl:value-of select="@name"/>: </strong> <xsl:value-of select="@value"/><br />
678 </xsl:for-each>
679 </div>
680 </div>
681 </xsl:for-each>
682 </xsl:template>
683
684 <xsl:template name="ca-profiles">
685 <xsl:for-each select="//ca-profiles">
686 <fieldset>
687 <legend><strong>Profiles (<xsl:value-of select="count(profile)"/>)</strong></legend>
688 <xsl:for-each select="profile">
689 <xsl:sort select="@name"/>
690 <xsl:variable name="profile" select="@name"/>
691 <div class="cwsheader">
692
693 <table border="0" width="98%" cellspacing="0" cellpadding="0"><tr>
694 <td width="30%"><strong>CA-Profile: </strong>
695 <a id="openhref">
696 <xsl:attribute name="href">profile<xsl:value-of select="@name"/></xsl:attribute>
697 <xsl:value-of select="@name"/>
698 <xsl:choose>
699 <xsl:when test="@network-id"> (<xsl:value-of select="@network-id"/>)</xsl:when>
700 <xsl:otherwise> (ALL)</xsl:otherwise>
701 </xsl:choose>
702 </a><br /></td>
703 <td width="25%">
704 <xsl:if test="@ca-id"><strong>CA-Id: </strong><xsl:value-of select="@ca-id"/></xsl:if>
705 <xsl:if test="not(@network-id)">
706 <div style="position: relative; left: -70px">(multi-context connectors/sessions)</div>
707 </xsl:if>
708 </td>
709 <td width="15%"><strong>Sessions: </strong><xsl:value-of select="@sessions"/></td>
710 <td width="15%"><strong>
711 <xsl:choose>
712 <xsl:when test="@network-id">Local services: </xsl:when>
713 <xsl:otherwise>Services: </xsl:otherwise>
714 </xsl:choose>
715 </strong><xsl:value-of select="@mapped-services"/>
716 </td>
717 <td width="5%">&#160;</td>
718 <td width="20%" align="right">&#160;(<xsl:value-of select="sum(//connector[@profile=$profile]/@ecm-load)"/>)
719
720 </td>
721 </tr>
722 </table>
723
724 <div class="cwscontent">
725 <xsl:attribute name="style">display: <xsl:value-of select="@display"/>;</xsl:attribute>
726 <xsl:attribute name="id"><xsl:value-of select="concat('toggle-profile', @name)"/></xsl:attribute>
727 <xsl:if test="@network-id"><strong>Network-id: </strong> <xsl:value-of select="@network-id"/><br /></xsl:if>
728 <xsl:if test="@ca-id"><strong>Ca-id: </strong> <xsl:value-of select="@ca-id"/><br /></xsl:if>
729 <xsl:if test="@provider-idents"><strong>Provider-idents: </strong> <xsl:value-of select="@provider-idents"/><br /></xsl:if>
730 <xsl:if test="@provider-match"><strong>Require-provider-match: </strong> <xsl:value-of select="@provider-match"/>
731 <xsl:if test="@provider-match='true'"> (provider-ident in requests must exist on connector for forwards to proceed)</xsl:if>
732 <xsl:if test="@provider-match='false'"> (provider-ident in requests not considered when forwarding)</xsl:if>
733 <br />
734 </xsl:if>
735 <strong>Debug: </strong> <xsl:value-of select="@debug"/>
736 <xsl:if test="@debug='true'"> (backlog of 100 transactions kept for every session - memory intensive)</xsl:if>
737 <xsl:if test="@debug='false'"> (no transaction backlogs kept)</xsl:if>
738 <br />
739 <strong>Estimated capacity: </strong> <xsl:value-of select="@capacity"/><br />
740 <strong>Estimated load: </strong><xsl:value-of select="sum(//connector[@profile=$profile]/@ecm-load)"/><br />
741 <strong>
742 <xsl:choose>
743 <xsl:when test="@network-id">Locally mapped services: </xsl:when>
744 <xsl:otherwise>Services: </xsl:otherwise>
745 </xsl:choose>
746 </strong><xsl:value-of select="@mapped-services"/>
747 <xsl:if test="@parsed-services"> (<xsl:value-of select="@parsed-services"/> parsed from services file, with <xsl:value-of select="@parsed-conflicts"/> conflicts)</xsl:if>
748 <br />
749 <strong>Max-cw-wait: </strong> <xsl:value-of select="@max-cw-wait"/> ms
750 <xsl:if test="@congestion-limit"> (congestion-limit at <xsl:value-of select="@congestion-limit"/> ms)</xsl:if>
751 <br />
752 <strong>Max-cache-wait: </strong> <xsl:value-of select="@max-cache-wait"/> ms<br />
753
754 <xsl:if test="count(listen-port) > 0">
755 <br /><strong>Listen-ports: </strong>
756 <ul>
757 <xsl:for-each select="listen-port"><li>
758 <span>
759 <xsl:if test="@alive = 'false'">
760 <xsl:attribute name="style">text-decoration: line-through; font-weight: bold</xsl:attribute>
761 </xsl:if>
762 <xsl:value-of select="@name"/>&#160;
763 </span>
764 <xsl:value-of select="@properties"/>
765
766 </li></xsl:for-each>
767 </ul>
768 </xsl:if>
769
770 </div>
771 </div>
772 </xsl:for-each>
773 </fieldset><br />
774 </xsl:for-each>
775 </xsl:template>
776
777 <xsl:template name="proxy-plugins">
778 <xsl:for-each select="//proxy-plugins">
779 <xsl:if test="count(plugin) > 0">
780 <br /><fieldset>
781 <legend><strong>Plugins (<xsl:value-of select="count(plugin)"/>)</strong></legend>
782 <xsl:for-each select="plugin">
783 <xsl:sort select="@name"/>
784 <div class="cwsheader">
785
786 <table border="0" width="98%" cellspacing="0" cellpadding="0"><tr>
787 <td width="25%"><strong>Plugin: </strong>
788 <xsl:choose>
789 <xsl:when test="count(plugin-param) > 0">
790 <a id="openhref">
791 <xsl:attribute name="href">plugin<xsl:value-of select="@name"/></xsl:attribute>
792 <xsl:value-of select="@name"/>
793 </a>
794 </xsl:when>
795 <xsl:otherwise>
796 <xsl:value-of select="@name"/>
797 </xsl:otherwise>
798 </xsl:choose>
799 <br />
800 </td>
801 <td width="75%"><xsl:value-of select="@description"/></td>
802 </tr>
803 </table>
804
805 <div class="cwscontent">
806 <xsl:attribute name="style">display: <xsl:value-of select="@display"/>;</xsl:attribute>
807 <xsl:attribute name="id"><xsl:value-of select="concat('toggle-plugin', @name)"/></xsl:attribute>
808
809 <xsl:if test="count(plugin-param) > 0">
810 <xsl:for-each select="plugin-param">
811 <strong><xsl:value-of select="@name"/>: </strong> <xsl:value-of select="@value"/><br />
812 </xsl:for-each>
813 </xsl:if>
814 &#160;
815
816 </div>
817 </div>
818 </xsl:for-each>
819 </fieldset><br />
820 </xsl:if>
821 </xsl:for-each>
822 </xsl:template>
823
824 <xsl:template name="flag-legend">
825 <fieldset>
826 <legend><strong>Transaction Flags</strong></legend>
827 <table class="error-log">
828 <tbody>
829 <tr><td>
830 Normal traffic flags: <br />
831 <strong>F</strong> = Normal forward to CWS<br />
832 <strong>C</strong> = Cache hit (local)<br />
833 <strong>R</strong> = Cache hit (received from remote cache)<br />
834 <strong>I</strong> = Instant cache hit (no waiting at all in cache, both request and reply already available)<br />
835 <strong>1</strong> = This was the first transaction performed by a new session.<br />
836 <strong>Z</strong> = SID changed (compared to previous transaction = user zap, can also indicate multiple tuners or users in one session if it occurs every time)<br />
837
838 <br />Service mapper flags: <br />
839 <strong>N</strong> = Cannot decode (service mapper says service not on any card, or service blocked)<br />
840 <strong>P</strong> = Service mapper didn't know status for this SID on one or more cards (may have triggered probing if accepted by connectors)<br />
841 <strong>2</strong> = Triggered broadcast to additional cards besides the selected one (broadcast-missing-sid or redundant-forwarding in use)<br />
842 <strong>+</strong> = Caused an addition to the service map (found service, after probing/successful decode)<br />
843 <strong>-</strong> = Caused a removal from the service map (lost service, after repeated failed decodes)<br />
844
845 <br />Flags indicating possible problems/recovery situations: <br />
846 <strong>B</strong> = Blocked by exceeded limits or by filters (plugins)<br />
847 <strong>M</strong> = Ca-id mismatch. The ecm reply didn't have the same ca-id as the request, indicates some clients are sending ecms to the wrong ports.<br />
848 <strong>E</strong> = Client got an empty reply (cannot-decode received from CWS, or from the proxy itself with situation <strong>N</strong>)<br />
849 <strong>Y</strong> = Forward retry performed (first chosen CWS disconnected during the transaction, but alternatives exist)<br />
850 <strong>A</strong> = Abort when forwarding (CWS connection was closed before forward, because of other request timeouts or by the network/server).<br />
851 <strong>T</strong> = Timeout when forwarding (no response from CWS within time limit, i.e max-cw-wait)<br />
852 <strong>O</strong> = Timeout while waiting in cache (waited for max-cache-wait, but no reply was reported to the cache).<br />
853 <strong>Q</strong> = Abort while waiting in cache (the forward the cache was waiting for failed, either locally or remotely).<br />
854 <strong>G</strong> = Congestion when forwarding (time was > max-cw-wait/2, but forward still performed)<br />
855 <strong>X</strong> = Cache hit after failed forward (situation <strong>Y</strong>, but reply became available in cache so no need for new forward)<br />
856
857 <br />Internal/debugging flags: <br />
858 <strong>S</strong> = Timeout in send queue (when trying to forward to connector, should normally not occur)<br />
859 <strong>W</strong> = Triggered cannot-decode-wait (would have been situation <strong>N</strong>, but waiting for remote cache paid off)<br />
860 <strong>H</strong> = Caused an internal failed rechecking of the cache, represents an attempt to recover from an immediately preceeding problem.<br />
861 <strong>U</strong> = Interrupt in the no-sid-delay sleep, a request without sid was delayed but disconnected during the delay.<br />
862 <strong>D</strong> = The user session disconnected before it could receive the reply (likely reached the client ecm timeout)<br />
863 </td></tr>
864 </tbody>
865 </table>
866 </fieldset><br /><br />
867 </xsl:template>
868
869 <xsl:template name="profile-filter">
870 <xsl:for-each select="//ca-profiles">
871 <xsl:if test="count(profile) > 1">
872 <strong>Profile filter: </strong>
873 <select name="profileFilter" id="profileFilter">
874 <option>
875 <xsl:attribute name="value">ALL</xsl:attribute>
876 ALL
877 </option>
878 <xsl:for-each select="profile">
879 <xsl:if test="@name != '*'">
880 <option>
881 <xsl:attribute name="value"><xsl:value-of select="@name"/></xsl:attribute>
882 <xsl:value-of select="@name"/>
883 </option>
884 </xsl:if>
885 </xsl:for-each>
886 </select>
887 <br /><br />
888 </xsl:if>
889 </xsl:for-each>
890 </xsl:template>
891
892 <xsl:template name="user-warning-entry">
893 <xsl:param name="indent"/>
894 <xsl:value-of select="$indent"/><xsl:text> </xsl:text><xsl:value-of select="@timestamp"/> -
895 <strong> <xsl:value-of select="@name"/> </strong>
896 <xsl:text> </xsl:text><xsl:value-of select="@session-id"/> -
897 <xsl:text> </xsl:text><xsl:value-of select="@service-name"/> -
898 <strong> <xsl:value-of select="@time"/> ms</strong> -
899 <strong> "<xsl:value-of select="@flags"/>" </strong>
900 <xsl:if test="@count"> - (<xsl:value-of select="@count"/> occurances)</xsl:if>
901 <br />
902 <xsl:if test="@time-cache and @time &gt; 5000">
903 <xsl:value-of select="$indent"/>&#160; - Time breakdown - Cache wait: <strong><xsl:value-of select="@time-cache"/> ms </strong>
904 Send queue: <strong><xsl:value-of select="@time-queue"/> ms </strong>
905 Server wait: <strong><xsl:value-of select="@time-cws"/> ms </strong>
906 <xsl:if test="@cws-name"> (<xsl:value-of select="@cws-name"/>) </xsl:if>
907 Client writeback: <strong><xsl:value-of select="@time-client"/> ms </strong>
908 <br />
909 </xsl:if>
910 </xsl:template>
911
912</xsl:stylesheet>
913
Note: See TracBrowser for help on using the repository browser.