summaryrefslogtreecommitdiffstats
path: root/modules-available/dnbd3/templates/page-proxy-clients.html
diff options
context:
space:
mode:
authorSimon Rettberg2020-10-30 14:32:39 +0100
committerSimon Rettberg2020-10-30 14:32:39 +0100
commitdea102b864b97ef5ed944298ca0879ccd117ee07 (patch)
tree38c539955437e3a5e53d6407aba621ea0bac2957 /modules-available/dnbd3/templates/page-proxy-clients.html
parent[minilinux] Remove unused local var (diff)
downloadslx-admin-dea102b864b97ef5ed944298ca0879ccd117ee07.tar.gz
slx-admin-dea102b864b97ef5ed944298ca0879ccd117ee07.tar.xz
slx-admin-dea102b864b97ef5ed944298ca0879ccd117ee07.zip
[dnbd3] Link from image list to client list
Diffstat (limited to 'modules-available/dnbd3/templates/page-proxy-clients.html')
-rw-r--r--modules-available/dnbd3/templates/page-proxy-clients.html19
1 files changed, 15 insertions, 4 deletions
diff --git a/modules-available/dnbd3/templates/page-proxy-clients.html b/modules-available/dnbd3/templates/page-proxy-clients.html
index 660b52eb..6e2cece7 100644
--- a/modules-available/dnbd3/templates/page-proxy-clients.html
+++ b/modules-available/dnbd3/templates/page-proxy-clients.html
@@ -32,7 +32,7 @@
<div class="col-md-6">
<h2>{{lang_clientList}}</h2>
- <table class="table table-condensed">
+ <table id="client-table" class="table table-condensed">
<tr>
<th>{{lang_client}}</th>
<th></th>
@@ -44,10 +44,10 @@
{{#isServer}}
<span class="glyphicon glyphicon-hdd" title="{{lang_isProxy}}"></span>
{{/isServer}}
- {{address}}
+ <a href="?do=statistics&amp;show=list&amp;filter[clientip]=1&amp;op[clientip]=%3D&amp;arg[clientip]={{ip}}">{{address}}</a>
</td>
<td class="slx-smallcol">
- <a href="#tab-images" onclick="$('#img-table tr').removeClass('warning');$('#img-{{imageId}}').addClass('warning')[0].scrollIntoView()">
+ <a href="#tab-images" class="show-image" data-image-id="{{imageId}}">
<span class="glyphicon glyphicon-folder-open"></span>
</a>
</td>
@@ -59,4 +59,15 @@
</table>
</div>
</div>
-</div> \ No newline at end of file
+</div>
+
+<script>
+ document.addEventListener('DOMContentLoaded', function() {
+ $('.show-image').click(function () {
+ $('#client-table tr').removeClass('warning');
+ $('#img-table tr').removeClass('warning');
+ var x = $('#img-table a[data-image-id=' + $(this).data('image-id') + ']').closest('tr').addClass('warning')[0];
+ setTimeout(function() { if (x.scrollIntoViewIfNeeded) x.scrollIntoViewIfNeeded(true); else x.scrollIntoView({block: "center"}) }, 10);
+ });
+ });
+</script> \ No newline at end of file