summaryrefslogtreecommitdiffstats
path: root/modules-available/dnbd3
diff options
context:
space:
mode:
authorSimon Rettberg2020-08-27 15:04:27 +0200
committerSimon Rettberg2020-08-27 15:04:27 +0200
commita7291f2885a87664f6b213c01206a5a9c8acd0de (patch)
treee49894e3b75a382cd95709ab0b8173b2fe9bf713 /modules-available/dnbd3
parent[dnbd3] Fix: idle time won't be displayed if > uptime (diff)
downloadslx-admin-a7291f2885a87664f6b213c01206a5a9c8acd0de.tar.gz
slx-admin-a7291f2885a87664f6b213c01206a5a9c8acd0de.tar.xz
slx-admin-a7291f2885a87664f6b213c01206a5a9c8acd0de.zip
[dnbd3] Make poxy image list sortable (stupidtable)
Diffstat (limited to 'modules-available/dnbd3')
-rw-r--r--modules-available/dnbd3/page.inc.php1
-rw-r--r--modules-available/dnbd3/templates/page-proxy-images.html22
2 files changed, 14 insertions, 9 deletions
diff --git a/modules-available/dnbd3/page.inc.php b/modules-available/dnbd3/page.inc.php
index 5cb1c74b..96f72c3b 100644
--- a/modules-available/dnbd3/page.inc.php
+++ b/modules-available/dnbd3/page.inc.php
@@ -253,6 +253,7 @@ class Page_Dnbd3 extends Page
private function showProxyDetails()
{
User::assertPermission('view.details');
+ Module::isAvailable('js_stupidtable');
$server = $this->getServerById();
Render::addTemplate('page-proxy-header', $server);
$stats = Dnbd3Rpc::query($server['ip'], true, true, true, true, true, true);
diff --git a/modules-available/dnbd3/templates/page-proxy-images.html b/modules-available/dnbd3/templates/page-proxy-images.html
index 54c18497..b97a1820 100644
--- a/modules-available/dnbd3/templates/page-proxy-images.html
+++ b/modules-available/dnbd3/templates/page-proxy-images.html
@@ -1,14 +1,17 @@
<div role="tabpanel" class="tab-pane" id="tab-images">
<h2>{{lang_imageList}}</h2>
- <table class="table table-condensed">
+ <table class="table table-condensed stupidtable">
+ <thead>
<tr>
- <th>{{lang_image}}</th>
- <th class="text-right slx-smallcol">{{lang_clients}}</th>
- <th class="text-right slx-smallcol">{{lang_size}}</th>
- <th class="text-right slx-smallcol">{{lang_complete}}</th>
- <th class="text-right slx-smallcol">{{lang_unusedFor}}</th>
- <th class="slx-smallcol">{{lang_uplink}}</th>
+ <th data-sort="string">{{lang_image}}</th>
+ <th class="text-right slx-smallcol" data-sort="int">{{lang_clients}}</th>
+ <th class="text-right slx-smallcol" data-sort="int">{{lang_size}}</th>
+ <th class="text-right slx-smallcol" data-sort="int">{{lang_complete}}</th>
+ <th class="text-right slx-smallcol" data-sort="int">{{lang_unusedFor}}</th>
+ <th class="slx-smallcol" data-sort="string">{{lang_uplink}}</th>
</tr>
+ </thead>
+ <tbody>
{{#images}}
<tr>
<td class="text-nowrap">
@@ -17,13 +20,13 @@
<td class="text-right text-nowrap">
{{users}}
</td>
- <td class="text-right text-nowrap">
+ <td class="text-right text-nowrap" data-sort-value="{{size}}">
{{size_s}}
</td>
<td class="text-right text-nowrap">
<a data-imgid="{{id}}" class="cache-map" href="#">{{complete}}&thinsp;%</a>
</td>
- <td class="text-right text-nowrap">
+ <td class="text-right text-nowrap" data-sort-value="{{idle}}">
{{idle_s}}
</td>
<td class="text-nowrap">
@@ -31,6 +34,7 @@
</td>
</tr>
{{/images}}
+ </tbody>
</table>
</div>