Skip to content

Commit ababd1c

Browse files
committed
Merge branch 'update-listen-sockets' into devel
2 parents e9ad7c5 + 389c41c commit ababd1c

File tree

12 files changed

+389
-61
lines changed

12 files changed

+389
-61
lines changed

admin/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ nobase_dist_admin_DATA = \
1717
dashboard.xsl \
1818
fallbacks.xsl \
1919
showlog.xsl \
20+
listensocketlist.xsl \
2021
includes/confirm.xsl \
2122
includes/footer.xsl \
2223
includes/head.xsl \
@@ -25,6 +26,7 @@ nobase_dist_admin_DATA = \
2526
includes/mountnav.xsl \
2627
includes/player.xsl \
2728
includes/playlist.xsl \
29+
includes/authlist.xsl \
2830
includes/web-page.xsl \
2931
ui/confirmdeleteuser.xsl \
3032
ui/confirmkillclient.xsl \

admin/includes/authlist.xsl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
2+
<xsl:template name="authlist">
3+
<ul>
4+
<xsl:for-each select="authentication/role">
5+
<li>Role
6+
<xsl:if test="@name">
7+
<xsl:value-of select="@name" />
8+
</xsl:if>
9+
of type <xsl:value-of select="@type" />
10+
<xsl:if test="@management-url">
11+
<xsl:choose>
12+
<xsl:when test="@can-adduser='true' or @can-deleteuser='true'">
13+
(<a href="{@management-url}">Manage</a>)
14+
</xsl:when>
15+
<xsl:when test="@can-listuser='true'">
16+
(<a href="{@management-url}">List</a>)
17+
</xsl:when>
18+
</xsl:choose>
19+
</xsl:if>
20+
</li>
21+
</xsl:for-each>
22+
</ul>
23+
</xsl:template>
24+
</xsl:stylesheet>

admin/includes/header.xsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<li class="adminlink"><a href="/admin/dashboard.xsl">Dashboard</a></li>
1212
<li class="adminlink"><a href="/admin/stats.xsl">Server status</a></li>
1313
<li class="adminlink"><a href="/admin/listmounts.xsl">Mountpoint list</a></li>
14+
<li class="adminlink"><a href="/admin/listensocketlist.xsl">Listen Socket list</a></li>
1415
<li class="adminlink"><a href="/admin/showlog.xsl">Logfiles</a></li>
1516
<xsl:for-each select="(/report/extension/icestats | /icestats | /iceresponse)/modules/module">
1617
<xsl:if test="@management-url and @management-title">

admin/listensocketlist.xsl

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
2+
<xsl:include href="includes/page.xsl"/>
3+
<xsl:include href="includes/authlist.xsl"/>
4+
<xsl:variable name="title">Listen Sockets</xsl:variable>
5+
6+
<xsl:template name="content">
7+
<h2><xsl:value-of select="$title" /></h2>
8+
<xsl:for-each select="/report/incident">
9+
<section class="box">
10+
<h3 class="box_title">Listen Socket <code><xsl:value-of select="resource/value[@member='id']/@value" /></code></h3>
11+
<h4>Overview</h4>
12+
<table class="table-block">
13+
<thead>
14+
<tr>
15+
<th>Key</th>
16+
<th>Value</th>
17+
</tr>
18+
</thead>
19+
<tbody>
20+
<xsl:if test="resource/value[@member='id']/@state = 'set'">
21+
<tr>
22+
<td>ID</td>
23+
<td><xsl:value-of select="resource/value[@member='id']/@value" /></td>
24+
</tr>
25+
</xsl:if>
26+
<xsl:if test="resource/value[@member='on_behalf_of']/@state = 'set'">
27+
<tr>
28+
<td>On behalf of</td>
29+
<td><xsl:value-of select="resource/value[@member='on_behalf_of']/@value" /></td>
30+
</tr>
31+
</xsl:if>
32+
<tr>
33+
<td>Type</td>
34+
<td><xsl:value-of select="resource/value[@member='type']/@value" /></td>
35+
</tr>
36+
<tr>
37+
<td>Family</td>
38+
<td><xsl:value-of select="resource/value[@member='family']/@value" /></td>
39+
</tr>
40+
</tbody>
41+
</table>
42+
43+
<h4>Config</h4>
44+
<table class="table-block">
45+
<thead>
46+
<tr>
47+
<th>Key</th>
48+
<th>Value</th>
49+
</tr>
50+
</thead>
51+
<tbody>
52+
<xsl:for-each select="resource/value[@member='config']/value">
53+
<xsl:if test="@state != 'unset'">
54+
<tr>
55+
<td><xsl:value-of select="@member" /></td>
56+
<td><xsl:value-of select="@value" /></td>
57+
</tr>
58+
</xsl:if>
59+
</xsl:for-each>
60+
</tbody>
61+
</table>
62+
63+
<xsl:if test="resource/value[@member='headers']/value">
64+
<h4>Header</h4>
65+
<table class="table-block">
66+
<thead>
67+
<tr>
68+
<th>Type</th>
69+
<th>Name</th>
70+
<th>Value</th>
71+
<th>Status</th>
72+
</tr>
73+
</thead>
74+
<tbody>
75+
<xsl:for-each select="resource/value[@member='headers']/value">
76+
<tr>
77+
<td><xsl:value-of select="value[@member='type']/@value" /></td>
78+
<td><xsl:value-of select="value[@member='name']/@value" /></td>
79+
<td><xsl:value-of select="value[@member='value']/@value" /></td>
80+
<td><xsl:value-of select="value[@member='status']/@value" /></td>
81+
</tr>
82+
</xsl:for-each>
83+
</tbody>
84+
</table>
85+
</xsl:if>
86+
87+
<xsl:for-each select="resource/extension/icestats">
88+
<h4>Authentication</h4>
89+
<xsl:call-template name="authlist" />
90+
</xsl:for-each>
91+
</section>
92+
</xsl:for-each>
93+
</xsl:template>
94+
</xsl:stylesheet>

admin/listmounts.xsl

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,10 @@
33
<xsl:include href="includes/page.xsl"/>
44
<xsl:include href="includes/mountnav.xsl"/>
55
<xsl:include href="includes/player.xsl"/>
6+
<xsl:include href="includes/authlist.xsl"/>
67

78
<xsl:variable name="title">Active Mountpoints</xsl:variable>
89

9-
<!-- Auth template -->
10-
<xsl:template name="authlist">
11-
<ul>
12-
<xsl:for-each select="authentication/role">
13-
<li>Role
14-
<xsl:if test="@name">
15-
<xsl:value-of select="@name" />
16-
</xsl:if>
17-
of type <xsl:value-of select="@type" />
18-
<xsl:if test="@management-url">
19-
<xsl:choose>
20-
<xsl:when test="@can-adduser='true' or @can-deleteuser='true'">
21-
(<a href="{@management-url}">Manage</a>)
22-
</xsl:when>
23-
<xsl:when test="@can-listuser='true'">
24-
(<a href="{@management-url}">List</a>)
25-
</xsl:when>
26-
</xsl:choose>
27-
</xsl:if>
28-
</li>
29-
</xsl:for-each>
30-
</ul>
31-
</xsl:template>
32-
33-
3410
<xsl:template name="content">
3511
<div class="section">
3612
<h2><xsl:value-of select="$title" /></h2>

admin/stats.xsl

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,12 @@
44
<xsl:include href="includes/mountnav.xsl"/>
55
<xsl:include href="includes/player.xsl"/>
66
<xsl:include href="includes/playlist.xsl"/>
7+
<xsl:include href="includes/authlist.xsl"/>
78

89
<xsl:param name="param-showall" />
910
<xsl:param name="param-has-mount" />
1011
<xsl:variable name="title">Server status</xsl:variable>
1112

12-
<!-- Auth template -->
13-
<xsl:template name="authlist">
14-
<ul>
15-
<xsl:for-each select="authentication/role">
16-
<li>Role
17-
<xsl:if test="@name">
18-
<xsl:value-of select="@name" />
19-
</xsl:if>
20-
of type <xsl:value-of select="@type" />
21-
<xsl:if test="@management-url">
22-
<xsl:choose>
23-
<xsl:when test="@can-adduser='true' or @can-deleteuser='true'">
24-
(<a href="{@management-url}">Manage</a>)
25-
</xsl:when>
26-
<xsl:when test="@can-listuser='true'">
27-
(<a href="{@management-url}">List</a>)
28-
</xsl:when>
29-
</xsl:choose>
30-
</xsl:if>
31-
</li>
32-
</xsl:for-each>
33-
</ul>
34-
</xsl:template>
35-
36-
3713
<xsl:template name="content">
3814
<h2>Server status</h2>
3915

0 commit comments

Comments
 (0)