Chengyu Fan | 45d1a76 | 2014-07-08 14:21:32 -0600 | [diff] [blame^] | 1 | <xsl:stylesheet version="1.0" |
| 2 | xmlns="http://www.w3.org/1999/xhtml" |
| 3 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 4 | xmlns:nfd="ndn:/localhost/nfd/status/1"> |
| 5 | |
| 6 | <xsl:template match="/"> |
| 7 | <html> |
| 8 | <head> |
| 9 | <title>NFD Status</title> |
| 10 | </head> |
| 11 | <body> |
| 12 | <xsl:apply-templates/> |
| 13 | </body> |
| 14 | </html> |
| 15 | </xsl:template> |
| 16 | |
| 17 | <xsl:template match="nfd:generalStatus"> |
| 18 | <h2>General NFD status</h2> |
| 19 | <table> |
| 20 | <tr> |
| 21 | <td>Version</td> |
| 22 | <td><xsl:value-of select="nfd:version"/></td> |
| 23 | </tr> |
| 24 | <tr> |
| 25 | <td>startTime</td> |
| 26 | <td><xsl:value-of select="nfd:startTime"/></td> |
| 27 | </tr> |
| 28 | <tr> |
| 29 | <td>currentTime</td> |
| 30 | <td><xsl:value-of select="nfd:currentTime"/></td> |
| 31 | </tr> |
| 32 | <tr> |
| 33 | <td>upTime</td> |
| 34 | <td><xsl:value-of select="nfd:uptime"/></td> |
| 35 | </tr> |
| 36 | <tr> |
| 37 | <td>nNameTreeEntries</td> |
| 38 | <td><xsl:value-of select="nfd:nNameTreeEntries"/></td> |
| 39 | </tr> |
| 40 | <tr> |
| 41 | <td>nFibEntries</td> |
| 42 | <td><xsl:value-of select="nfd:nFibEntries"/></td> |
| 43 | </tr> |
| 44 | <tr> |
| 45 | <td>nPitEntries</td> |
| 46 | <td><xsl:value-of select="nfd:nPitEntries"/></td> |
| 47 | </tr> |
| 48 | <tr> |
| 49 | <td>nMeasurementsEntries</td> |
| 50 | <td><xsl:value-of select="nfd:nMeasurementsEntries"/></td> |
| 51 | </tr> |
| 52 | <tr> |
| 53 | <td>nCsEntries</td> |
| 54 | <td><xsl:value-of select="nfd:nCsEntries"/></td> |
| 55 | </tr> |
| 56 | <tr> |
| 57 | <td>nInInterests</td> |
| 58 | <td><xsl:value-of select="nfd:packetCounters/nfd:incomingPackets/nfd:nInterests"/></td> |
| 59 | </tr> |
| 60 | <tr> |
| 61 | <td>nOutInterests</td> |
| 62 | <td><xsl:value-of select="nfd:packetCounters/nfd:outgoingPackets/nfd:nInterests"/></td> |
| 63 | </tr> |
| 64 | <tr> |
| 65 | <td>nInDatas</td> |
| 66 | <td><xsl:value-of select="nfd:packetCounters/nfd:incomingPackets/nfd:nDatas"/></td> |
| 67 | </tr> |
| 68 | <tr> |
| 69 | <td>nOutDatas</td> |
| 70 | <td><xsl:value-of select="nfd:packetCounters/nfd:outgoingPackets/nfd:nDatas"/></td> |
| 71 | </tr> |
| 72 | </table> |
| 73 | </xsl:template> |
| 74 | |
| 75 | <xsl:template match="nfd:channels"> |
| 76 | <h2>Channels</h2> |
| 77 | <table> |
| 78 | <xsl:for-each select="nfd:channel"> |
| 79 | <tr> |
| 80 | <td><xsl:value-of select="nfd:localUri"/></td> |
| 81 | </tr> |
| 82 | </xsl:for-each> |
| 83 | </table> |
| 84 | </xsl:template> |
| 85 | |
| 86 | <xsl:template match="nfd:faces"> |
| 87 | <h2>Faces</h2> |
| 88 | <table> |
| 89 | <tr style="background-color: #9acd32;"> |
| 90 | <th>faceID</th> |
| 91 | <th>remoteUri</th> |
| 92 | <th>localUri</th> |
| 93 | <th>nInInterests</th> |
| 94 | <th>nInDatas</th> |
| 95 | <th>nOutInterests</th> |
| 96 | <th>nOutDatas</th> |
| 97 | </tr> |
| 98 | <xsl:for-each select="nfd:face"> |
| 99 | <tr> |
| 100 | <td><xsl:value-of select="nfd:faceId"/></td> |
| 101 | <td><xsl:value-of select="nfd:remoteUri"/></td> |
| 102 | <td><xsl:value-of select="nfd:localUri"/></td> |
| 103 | <td><xsl:value-of select="nfd:packetCounters/nfd:incomingPackets/nfd:nInterests"/></td> |
| 104 | <td><xsl:value-of select="nfd:packetCounters/nfd:incomingPackets/nfd:nDatas"/></td> |
| 105 | <td><xsl:value-of select="nfd:packetCounters/nfd:outgoingPackets/nfd:nInterests"/></td> |
| 106 | <td><xsl:value-of select="nfd:packetCounters/nfd:outgoingPackets/nfd:nDatas"/></td> |
| 107 | </tr> |
| 108 | </xsl:for-each> |
| 109 | </table> |
| 110 | </xsl:template> |
| 111 | |
| 112 | <xsl:template match="nfd:fib"> |
| 113 | <h2>FIB</h2> |
| 114 | <table> |
| 115 | <tr style="background-color: #9acd32;"> |
| 116 | <th>prefix</th> |
| 117 | <th>nextHops</th> |
| 118 | </tr> |
| 119 | <xsl:for-each select="nfd:fibEntry"> |
| 120 | <tr> |
| 121 | <td style="text-align:left;vertical-align:top;padding:0"><xsl:value-of select="nfd:prefix"/></td> |
| 122 | <td> |
| 123 | <xsl:for-each select="nfd:nextHops/nfd:nextHop"> |
| 124 | faceid=<xsl:value-of select="nfd:faceId"/> (cost=<xsl:value-of select="nfd:cost"/>); |
| 125 | </xsl:for-each> |
| 126 | </td> |
| 127 | </tr> |
| 128 | </xsl:for-each> |
| 129 | </table> |
| 130 | </xsl:template> |
| 131 | |
| 132 | <xsl:template match="nfd:strategyChoices"> |
| 133 | <h2>Strategy Choices</h2> |
| 134 | <table> |
| 135 | <tr style="background-color: #9acd32;"> |
| 136 | <th>Namespace</th> |
| 137 | <th>Strategy Name</th> |
| 138 | </tr> |
| 139 | <xsl:for-each select="nfd:strategyChoice"> |
| 140 | <tr> |
| 141 | <td><xsl:value-of select="nfd:namespace"/></td> |
| 142 | <td><xsl:value-of select="nfd:strategy/nfd:name"/></td> |
| 143 | </tr> |
| 144 | </xsl:for-each> |
| 145 | </table> |
| 146 | </xsl:template> |
| 147 | |
| 148 | </xsl:stylesheet> |