Chengyu Fan | 45d1a76 | 2014-07-08 14:21:32 -0600 | [diff] [blame] | 1 | <xsl:stylesheet version="1.0" |
Chengyu Fan | 45d1a76 | 2014-07-08 14:21:32 -0600 | [diff] [blame] | 2 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 3 | xmlns:nfd="ndn:/localhost/nfd/status/1"> |
Joao Pereira | 4e274ac | 2015-07-23 11:54:20 -0400 | [diff] [blame] | 4 | <xsl:output method="html" encoding="utf-8" indent="yes" doctype-system="about:legacy-compat"/> |
Chengyu Fan | 45d1a76 | 2014-07-08 14:21:32 -0600 | [diff] [blame] | 5 | |
| 6 | <xsl:template match="/"> |
| 7 | <html> |
| 8 | <head> |
| 9 | <title>NFD Status</title> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 10 | <link rel="stylesheet" type="text/css" href="style.css" /> |
Chengyu Fan | 45d1a76 | 2014-07-08 14:21:32 -0600 | [diff] [blame] | 11 | </head> |
| 12 | <body> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 13 | <header> |
| 14 | <h1>NFD Status</h1> |
| 15 | </header> |
| 16 | <article> |
| 17 | <div id="content"> |
| 18 | <xsl:apply-templates/> |
| 19 | </div> |
| 20 | </article> |
| 21 | <footer> |
| 22 | <xsl:variable name="version"> |
| 23 | <xsl:apply-templates select="nfd:nfdStatus/nfd:generalStatus/nfd:version"/> |
| 24 | </xsl:variable> |
Alexander Afanasyev | 01bbd09 | 2017-08-14 23:56:19 +0000 | [diff] [blame] | 25 | <span class="grey">Powered by </span><a target="_blank" href="https://named-data.net/doc/NFD/"><span class="green">NFD version <xsl:value-of select="$version"/></span></a><span class="grey">.</span> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 26 | </footer> |
Chengyu Fan | 45d1a76 | 2014-07-08 14:21:32 -0600 | [diff] [blame] | 27 | </body> |
| 28 | </html> |
| 29 | </xsl:template> |
| 30 | |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 31 | |
| 32 | <xsl:template name="formatDate"> |
| 33 | <xsl:param name="date" /> |
| 34 | <xsl:value-of select="substring($date, 0, 11)"/> <xsl:value-of select="substring($date, 12, 8)"/> |
| 35 | </xsl:template> |
| 36 | |
| 37 | <xsl:template name="formatDuration"> |
| 38 | <xsl:param name="duration" /> |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 39 | <xsl:variable name="milliseconds"> |
| 40 | <xsl:choose> |
| 41 | <xsl:when test="contains($duration, '.')"> |
| 42 | <xsl:value-of select="substring($duration, string-length($duration)-4, 3)" /> |
| 43 | </xsl:when> |
| 44 | <xsl:otherwise> |
| 45 | 0 |
| 46 | </xsl:otherwise> |
| 47 | </xsl:choose> |
| 48 | </xsl:variable> |
| 49 | <xsl:variable name="seconds"> |
| 50 | <xsl:choose> |
| 51 | <xsl:when test="contains($duration, '.')"> |
| 52 | <xsl:value-of select="substring($duration, 3, string-length($duration)-7)" /> |
| 53 | </xsl:when> |
| 54 | <xsl:otherwise> |
| 55 | <xsl:value-of select="substring($duration, 3, string-length($duration)-3)" /> |
| 56 | </xsl:otherwise> |
| 57 | </xsl:choose> |
| 58 | </xsl:variable> |
Chengyu Fan | a55663d | 2014-08-13 20:31:03 -0600 | [diff] [blame] | 59 | <xsl:variable name="days"><xsl:value-of select="floor($seconds div 86400)" /></xsl:variable> |
| 60 | <xsl:variable name="hours"><xsl:value-of select="floor($seconds div 3600)" /></xsl:variable> |
| 61 | <xsl:variable name="minutes"><xsl:value-of select="floor($seconds div 60)" /></xsl:variable> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 62 | <xsl:choose> |
Chengyu Fan | a55663d | 2014-08-13 20:31:03 -0600 | [diff] [blame] | 63 | <xsl:when test="$days = 1"> |
| 64 | <xsl:value-of select="$days"/> day |
| 65 | </xsl:when> |
| 66 | <xsl:when test="$days > 1"> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 67 | <xsl:value-of select="$days"/> days |
| 68 | </xsl:when> |
Chengyu Fan | a55663d | 2014-08-13 20:31:03 -0600 | [diff] [blame] | 69 | <xsl:when test="$hours = 1"> |
| 70 | <xsl:value-of select="$hours"/> hour |
| 71 | </xsl:when> |
| 72 | <xsl:when test="$hours > 1"> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 73 | <xsl:value-of select="$hours"/> hours |
| 74 | </xsl:when> |
Chengyu Fan | a55663d | 2014-08-13 20:31:03 -0600 | [diff] [blame] | 75 | <xsl:when test="$minutes = 1"> |
| 76 | <xsl:value-of select="$minutes"/> minute |
| 77 | </xsl:when> |
| 78 | <xsl:when test="$minutes > 1"> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 79 | <xsl:value-of select="$minutes"/> minutes |
| 80 | </xsl:when> |
Chengyu Fan | a55663d | 2014-08-13 20:31:03 -0600 | [diff] [blame] | 81 | <xsl:when test="$seconds = 1"> |
| 82 | <xsl:value-of select="$seconds"/> second |
| 83 | </xsl:when> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 84 | <xsl:otherwise> |
| 85 | <xsl:value-of select="$seconds"/> seconds |
| 86 | </xsl:otherwise> |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 87 | <xsl:when test="$milliseconds > 1"> |
| 88 | <xsl:value-of select="$milliseconds"/> milliseconds |
| 89 | </xsl:when> |
| 90 | <xsl:when test="$milliseconds = 1"> |
| 91 | <xsl:value-of select="$milliseconds"/> millisecond |
| 92 | </xsl:when> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 93 | </xsl:choose> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 94 | </xsl:template> |
| 95 | |
Chengyu Fan | 45d1a76 | 2014-07-08 14:21:32 -0600 | [diff] [blame] | 96 | <xsl:template match="nfd:generalStatus"> |
| 97 | <h2>General NFD status</h2> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 98 | <table class="item-list"> |
| 99 | <thead> |
| 100 | <tr> |
| 101 | <th>Version</th> |
| 102 | <th>Start time</th> |
| 103 | <th>Current time</th> |
| 104 | <th>Uptime</th> |
| 105 | <th>NameTree Entries</th> |
| 106 | <th>FIB entries</th> |
| 107 | <th>PIT entries</th> |
| 108 | <th>Measurements entries</th> |
| 109 | <th>CS entries</th> |
| 110 | <th>In Interests</th> |
| 111 | <th>Out Interests</th> |
| 112 | <th>In Data</th> |
| 113 | <th>Out Data</th> |
Weiwei Liu | ace83ac | 2016-04-25 10:16:37 -0700 | [diff] [blame] | 114 | <th>In Nacks</th> |
| 115 | <th>Out Nacks</th> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 116 | </tr> |
| 117 | </thead> |
| 118 | <tbody> |
| 119 | <tr class="center"> |
Hila Ben Abraham | 2ef9957 | 2014-12-02 02:45:51 -0600 | [diff] [blame] | 120 | <td><xsl:value-of select="nfd:version"/></td> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 121 | <td><xsl:call-template name="formatDate"><xsl:with-param name="date" select="nfd:startTime" /></xsl:call-template></td> |
| 122 | <td><xsl:call-template name="formatDate"><xsl:with-param name="date" select="nfd:currentTime" /></xsl:call-template></td> |
| 123 | <td><xsl:call-template name="formatDuration"><xsl:with-param name="duration" select="nfd:uptime" /></xsl:call-template></td> |
| 124 | <td><xsl:value-of select="nfd:nNameTreeEntries"/></td> |
| 125 | <td><xsl:value-of select="nfd:nFibEntries"/></td> |
| 126 | <td><xsl:value-of select="nfd:nPitEntries"/></td> |
| 127 | <td><xsl:value-of select="nfd:nMeasurementsEntries"/></td> |
| 128 | <td><xsl:value-of select="nfd:nCsEntries"/></td> |
| 129 | <td><xsl:value-of select="nfd:packetCounters/nfd:incomingPackets/nfd:nInterests"/></td> |
| 130 | <td><xsl:value-of select="nfd:packetCounters/nfd:outgoingPackets/nfd:nInterests"/></td> |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 131 | <td><xsl:value-of select="nfd:packetCounters/nfd:incomingPackets/nfd:nData"/></td> |
| 132 | <td><xsl:value-of select="nfd:packetCounters/nfd:outgoingPackets/nfd:nData"/></td> |
Weiwei Liu | ace83ac | 2016-04-25 10:16:37 -0700 | [diff] [blame] | 133 | <td><xsl:value-of select="nfd:packetCounters/nfd:incomingPackets/nfd:nNacks"/></td> |
| 134 | <td><xsl:value-of select="nfd:packetCounters/nfd:outgoingPackets/nfd:nNacks"/></td> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 135 | </tr> |
| 136 | </tbody> |
Chengyu Fan | 45d1a76 | 2014-07-08 14:21:32 -0600 | [diff] [blame] | 137 | </table> |
| 138 | </xsl:template> |
| 139 | |
| 140 | <xsl:template match="nfd:channels"> |
| 141 | <h2>Channels</h2> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 142 | <table class="item-list"> |
| 143 | <thead> |
| 144 | <tr> |
| 145 | <th>Channel URI</th> |
| 146 | </tr> |
| 147 | </thead> |
| 148 | <tbody> |
| 149 | <xsl:for-each select="nfd:channel"> |
| 150 | <xsl:variable name="style"> |
| 151 | <xsl:choose> |
| 152 | <xsl:when test="position() mod 2 = 1"> |
| 153 | <xsl:text>odd</xsl:text> |
| 154 | </xsl:when> |
| 155 | <xsl:otherwise>even</xsl:otherwise> |
| 156 | </xsl:choose> |
| 157 | </xsl:variable> |
| 158 | <tr class="{$style}"> |
| 159 | <td><xsl:value-of select="nfd:localUri"/></td> |
| 160 | </tr> |
| 161 | </xsl:for-each> |
| 162 | </tbody> |
Chengyu Fan | 45d1a76 | 2014-07-08 14:21:32 -0600 | [diff] [blame] | 163 | </table> |
| 164 | </xsl:template> |
| 165 | |
| 166 | <xsl:template match="nfd:faces"> |
| 167 | <h2>Faces</h2> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 168 | <table class="item-list"> |
| 169 | <thead> |
| 170 | <tr> |
| 171 | <th>Face ID</th> |
| 172 | <th>Remote URI</th> |
| 173 | <th>Local URI</th> |
Chengyu Fan | 27d570a | 2014-10-09 11:52:17 -0600 | [diff] [blame] | 174 | <th>Scope</th> |
| 175 | <th>Persistency</th> |
| 176 | <th>LinkType</th> |
Eric Newberry | 6d932e8 | 2016-11-24 05:05:43 +0000 | [diff] [blame] | 177 | <th>Flags</th> |
Chengyu Fan | 6717964 | 2014-08-15 16:00:43 -0600 | [diff] [blame] | 178 | <th>Expires in</th> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 179 | <th>In Interests</th> |
| 180 | <th>In Data</th> |
Weiwei Liu | ace83ac | 2016-04-25 10:16:37 -0700 | [diff] [blame] | 181 | <th>In Nacks</th> |
Chengyu Fan | 3331cfa | 2014-07-25 17:36:31 -0600 | [diff] [blame] | 182 | <th>In Bytes</th> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 183 | <th>Out Interests</th> |
| 184 | <th>Out Data</th> |
Weiwei Liu | ace83ac | 2016-04-25 10:16:37 -0700 | [diff] [blame] | 185 | <th>Out Nacks</th> |
Chengyu Fan | 3331cfa | 2014-07-25 17:36:31 -0600 | [diff] [blame] | 186 | <th>Out Bytes</th> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 187 | </tr> |
| 188 | </thead> |
| 189 | <tbody> |
| 190 | <xsl:for-each select="nfd:face"> |
| 191 | <xsl:variable name="style"> |
| 192 | <xsl:choose> |
| 193 | <xsl:when test="position() mod 2 = 1"> |
| 194 | <xsl:text>odd</xsl:text> |
| 195 | </xsl:when> |
| 196 | <xsl:otherwise>even</xsl:otherwise> |
| 197 | </xsl:choose> |
| 198 | </xsl:variable> |
| 199 | <tr class="{$style}"> |
| 200 | <td><xsl:value-of select="nfd:faceId"/></td> |
| 201 | <td><xsl:value-of select="nfd:remoteUri"/></td> |
| 202 | <td><xsl:value-of select="nfd:localUri"/></td> |
Chengyu Fan | 27d570a | 2014-10-09 11:52:17 -0600 | [diff] [blame] | 203 | <td><xsl:value-of select="nfd:faceScope"/></td> |
| 204 | <td><xsl:value-of select="nfd:facePersistency"/></td> |
| 205 | <td><xsl:value-of select="nfd:linkType"/></td> |
Chengyu Fan | 6717964 | 2014-08-15 16:00:43 -0600 | [diff] [blame] | 206 | <td> |
| 207 | <xsl:choose> |
Eric Newberry | 6d932e8 | 2016-11-24 05:05:43 +0000 | [diff] [blame] | 208 | <xsl:when test="nfd:flags/nfd:localFieldsEnabled"> |
| 209 | local-fields |
| 210 | </xsl:when> |
Eric Newberry | de33245 | 2018-01-30 11:45:32 -0700 | [diff] [blame] | 211 | <xsl:when test="nfd:flags/nfd:lpReliabilityEnabled"> |
| 212 | reliability |
| 213 | </xsl:when> |
| 214 | <xsl:when test="nfd:flags/nfd:congestionMarkingEnabled"> |
| 215 | congestion-marking |
| 216 | </xsl:when> |
Eric Newberry | 6d932e8 | 2016-11-24 05:05:43 +0000 | [diff] [blame] | 217 | </xsl:choose> |
| 218 | </td> |
| 219 | <td> |
| 220 | <xsl:choose> |
Chengyu Fan | 6717964 | 2014-08-15 16:00:43 -0600 | [diff] [blame] | 221 | <xsl:when test="nfd:expirationPeriod"> |
| 222 | <xsl:call-template name="formatDuration"><xsl:with-param name="duration" select="nfd:expirationPeriod" /></xsl:call-template> |
| 223 | </xsl:when> |
| 224 | <xsl:otherwise> |
| 225 | Never |
| 226 | </xsl:otherwise> |
| 227 | </xsl:choose> |
| 228 | </td> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 229 | <td><xsl:value-of select="nfd:packetCounters/nfd:incomingPackets/nfd:nInterests"/></td> |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 230 | <td><xsl:value-of select="nfd:packetCounters/nfd:incomingPackets/nfd:nData"/></td> |
Weiwei Liu | ace83ac | 2016-04-25 10:16:37 -0700 | [diff] [blame] | 231 | <td><xsl:value-of select="nfd:packetCounters/nfd:incomingPackets/nfd:nNacks"/></td> |
Chengyu Fan | 3331cfa | 2014-07-25 17:36:31 -0600 | [diff] [blame] | 232 | <td><xsl:value-of select="nfd:byteCounters/nfd:incomingBytes"/></td> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 233 | <td><xsl:value-of select="nfd:packetCounters/nfd:outgoingPackets/nfd:nInterests"/></td> |
Junxiao Shi | f03d479 | 2017-04-06 16:41:22 +0000 | [diff] [blame] | 234 | <td><xsl:value-of select="nfd:packetCounters/nfd:outgoingPackets/nfd:nData"/></td> |
Weiwei Liu | ace83ac | 2016-04-25 10:16:37 -0700 | [diff] [blame] | 235 | <td><xsl:value-of select="nfd:packetCounters/nfd:outgoingPackets/nfd:nNacks"/></td> |
Chengyu Fan | 3331cfa | 2014-07-25 17:36:31 -0600 | [diff] [blame] | 236 | <td><xsl:value-of select="nfd:byteCounters/nfd:outgoingBytes"/></td> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 237 | </tr> |
| 238 | </xsl:for-each> |
| 239 | </tbody> |
Chengyu Fan | 45d1a76 | 2014-07-08 14:21:32 -0600 | [diff] [blame] | 240 | </table> |
| 241 | </xsl:template> |
| 242 | |
| 243 | <xsl:template match="nfd:fib"> |
| 244 | <h2>FIB</h2> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 245 | <table class="item-list"> |
| 246 | <thead> |
| 247 | <tr> |
Chengyu Fan | 30aa207 | 2014-07-20 13:52:32 -0600 | [diff] [blame] | 248 | <th width="20%">Prefix</th> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 249 | <th>NextHops</th> |
| 250 | </tr> |
| 251 | </thead> |
| 252 | <tbody> |
| 253 | <xsl:for-each select="nfd:fibEntry"> |
| 254 | <xsl:variable name="style"> |
| 255 | <xsl:choose> |
| 256 | <xsl:when test="position() mod 2 = 1"> |
| 257 | <xsl:text>odd</xsl:text> |
| 258 | </xsl:when> |
| 259 | <xsl:otherwise>even</xsl:otherwise> |
| 260 | </xsl:choose> |
| 261 | </xsl:variable> |
| 262 | <tr class="{$style}"> |
| 263 | <td style="text-align:left;vertical-align:top;padding:0"><xsl:value-of select="nfd:prefix"/></td> |
| 264 | <td> |
Chengyu Fan | 30aa207 | 2014-07-20 13:52:32 -0600 | [diff] [blame] | 265 | <table class="item-sublist"> |
| 266 | <tr> |
| 267 | <th>FaceId</th> |
| 268 | <xsl:for-each select="nfd:nextHops/nfd:nextHop"> |
| 269 | <td><xsl:value-of select="nfd:faceId"/></td> |
| 270 | </xsl:for-each> |
| 271 | </tr> |
| 272 | <tr> |
| 273 | <th>Cost</th> |
| 274 | <xsl:for-each select="nfd:nextHops/nfd:nextHop"> |
| 275 | <td><xsl:value-of select="nfd:cost"/></td> |
| 276 | </xsl:for-each> |
| 277 | </tr> |
| 278 | </table> |
| 279 | </td> |
| 280 | </tr> |
| 281 | </xsl:for-each> |
| 282 | </tbody> |
| 283 | </table> |
| 284 | </xsl:template> |
| 285 | |
| 286 | <xsl:template match="nfd:rib"> |
| 287 | <h2>RIB</h2> |
| 288 | <table class="item-list"> |
| 289 | <thead> |
| 290 | <tr> |
| 291 | <th width="20%">Prefix</th> |
| 292 | <th>Routes</th> |
| 293 | </tr> |
| 294 | </thead> |
| 295 | <tbody> |
| 296 | <xsl:for-each select="nfd:ribEntry"> |
| 297 | <xsl:variable name="style"> |
| 298 | <xsl:choose> |
| 299 | <xsl:when test="position() mod 2 = 1"> |
| 300 | <xsl:text>odd</xsl:text> |
| 301 | </xsl:when> |
| 302 | <xsl:otherwise>even</xsl:otherwise> |
| 303 | </xsl:choose> |
| 304 | </xsl:variable> |
| 305 | <tr class="{$style}"> |
| 306 | <td style="text-align:left;vertical-align:top;padding:0"><xsl:value-of select="nfd:prefix"/></td> |
| 307 | <td> |
| 308 | <table class="item-sublist"> |
| 309 | <tr> |
| 310 | <th>FaceId</th> |
| 311 | <xsl:for-each select="nfd:routes/nfd:route"> |
| 312 | <td><xsl:value-of select="nfd:faceId"/></td> |
| 313 | </xsl:for-each> |
| 314 | </tr> |
| 315 | <tr> |
| 316 | <th>Origin</th> |
| 317 | <xsl:for-each select="nfd:routes/nfd:route"> |
| 318 | <td><xsl:value-of select="nfd:origin"/></td> |
| 319 | </xsl:for-each> |
| 320 | </tr> |
| 321 | <tr> |
| 322 | <th>Cost</th> |
| 323 | <xsl:for-each select="nfd:routes/nfd:route"> |
| 324 | <td><xsl:value-of select="nfd:cost"/></td> |
| 325 | </xsl:for-each> |
| 326 | </tr> |
| 327 | <tr> |
Chengyu Fan | 1c630ba | 2014-08-20 13:27:58 -0500 | [diff] [blame] | 328 | <th>ChildInherit</th> |
Chengyu Fan | 30aa207 | 2014-07-20 13:52:32 -0600 | [diff] [blame] | 329 | <xsl:for-each select="nfd:routes/nfd:route"> |
Chengyu Fan | 1c630ba | 2014-08-20 13:27:58 -0500 | [diff] [blame] | 330 | <td> |
| 331 | <xsl:if test="nfd:flags/nfd:childInherit"> |
| 332 | Y |
| 333 | </xsl:if> |
| 334 | </td> |
| 335 | </xsl:for-each> |
| 336 | </tr> |
| 337 | <tr> |
| 338 | <th>RibCapture</th> |
| 339 | <xsl:for-each select="nfd:routes/nfd:route"> |
| 340 | <td> |
| 341 | <xsl:if test="nfd:flags/nfd:ribCapture"> |
| 342 | Y |
| 343 | </xsl:if> |
| 344 | </td> |
Chengyu Fan | 30aa207 | 2014-07-20 13:52:32 -0600 | [diff] [blame] | 345 | </xsl:for-each> |
| 346 | </tr> |
| 347 | <tr> |
| 348 | <th>Expires in</th> |
| 349 | <xsl:for-each select="nfd:routes/nfd:route"> |
| 350 | <td> |
| 351 | <xsl:choose> |
| 352 | <xsl:when test="nfd:expirationPeriod"> |
| 353 | <xsl:call-template name="formatDuration"><xsl:with-param name="duration" select="nfd:expirationPeriod" /></xsl:call-template> |
| 354 | </xsl:when> |
| 355 | <xsl:otherwise> |
| 356 | Never |
| 357 | </xsl:otherwise> |
| 358 | </xsl:choose> |
| 359 | </td> |
| 360 | </xsl:for-each> |
| 361 | </tr> |
| 362 | </table> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 363 | </td> |
| 364 | </tr> |
Chengyu Fan | 45d1a76 | 2014-07-08 14:21:32 -0600 | [diff] [blame] | 365 | </xsl:for-each> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 366 | </tbody> |
Chengyu Fan | 45d1a76 | 2014-07-08 14:21:32 -0600 | [diff] [blame] | 367 | </table> |
| 368 | </xsl:template> |
| 369 | |
Junxiao Shi | 3160a3f | 2018-01-09 21:25:15 +0000 | [diff] [blame] | 370 | <xsl:template match="nfd:cs"> |
| 371 | <h2>CS Information</h2> |
| 372 | <table class="item-list"> |
| 373 | <thead> |
| 374 | <tr> |
| 375 | <th>Hits</th> |
| 376 | <th>Misses</th> |
| 377 | </tr> |
| 378 | </thead> |
| 379 | <tbody> |
| 380 | <tr class="center"> |
| 381 | <td><xsl:value-of select="nfd:nHits"/></td> |
| 382 | <td><xsl:value-of select="nfd:nMisses"/></td> |
| 383 | </tr> |
| 384 | </tbody> |
| 385 | </table> |
| 386 | </xsl:template> |
| 387 | |
Chengyu Fan | 45d1a76 | 2014-07-08 14:21:32 -0600 | [diff] [blame] | 388 | <xsl:template match="nfd:strategyChoices"> |
| 389 | <h2>Strategy Choices</h2> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 390 | <table class="item-list"> |
| 391 | <thead> |
| 392 | <tr> |
Chengyu Fan | 30aa207 | 2014-07-20 13:52:32 -0600 | [diff] [blame] | 393 | <th width="20%">Namespace</th> |
Alexander Afanasyev | 8a09376 | 2014-07-16 18:43:09 -0700 | [diff] [blame] | 394 | <th>Strategy Name</th> |
| 395 | </tr> |
| 396 | </thead> |
| 397 | <tbody> |
| 398 | <xsl:for-each select="nfd:strategyChoice"> |
| 399 | <tr> |
| 400 | <td><xsl:value-of select="nfd:namespace"/></td> |
| 401 | <td><xsl:value-of select="nfd:strategy/nfd:name"/></td> |
| 402 | </tr> |
| 403 | </xsl:for-each> |
| 404 | </tbody> |
Chengyu Fan | 45d1a76 | 2014-07-08 14:21:32 -0600 | [diff] [blame] | 405 | </table> |
| 406 | </xsl:template> |
| 407 | |
| 408 | </xsl:stylesheet> |