listclients.xsl 1.69 KB
Newer Older
1 2 3
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0">
	<xsl:output method="html" doctype-system="about:legacy-compat" encoding="UTF-8" indent="yes" />
	<!-- Import include files -->
4
	<xsl:include href="includes/page.xsl"/>
5 6
	<xsl:include href="includes/mountnav.xsl"/>

7
	<xsl:variable name="title">Listener Stats</xsl:variable>
8

9
	<xsl:template name="content">
10
				<div class="section">
11
					<h2><xsl:value-of select="$title" /></h2>
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

					<xsl:for-each select="source">
						<div class="article">
							<h3>Mountpoint <xsl:value-of select="@mount" /></h3>
							<!-- Mount nav -->
							<xsl:call-template name="mountnav" />
							<xsl:choose>
								<xsl:when test="listener">
									<table class="table-flipscroll">
										<thead>
											<tr>
												<th>IP</th>
												<th>Username</th>
												<th>Role</th>
												<th>Sec. connected</th>
												<th>User Agent</th>
												<th>Action</th>
											</tr>
										</thead>
										<tbody>
											<xsl:for-each select="listener">
												<tr>
													<td><xsl:value-of select="ip" /></td>
													<td><xsl:value-of select="username" /></td>
													<td><xsl:value-of select="role" /></td>
													<td><xsl:value-of select="connected" /></td>
													<td><xsl:value-of select="useragent" /></td>
													<td><a href="killclient.xsl?mount={../@mount}&amp;id={id}">Kick</a></td>
												</tr>
											</xsl:for-each>
										</tbody>
									</table>
								</xsl:when>
								<xsl:otherwise>
									<p>No listeners connected</p>
								</xsl:otherwise>
							</xsl:choose>
49
						</div>
50 51 52 53
					</xsl:for-each>

				</div>
	</xsl:template>
54
</xsl:stylesheet>