diff options
author | Simon Rettberg | 2022-07-05 17:34:32 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-07-05 17:34:32 +0200 |
commit | 1197c0b678e45222e41183a538340ae1806b839c (patch) | |
tree | 1c11fb8d687e6160735725f4fe00d7fd88a8295e /modules-available/vmstore/templates | |
parent | [js_chart] Update to Chart.js 3.0.8 (diff) | |
download | slx-admin-1197c0b678e45222e41183a538340ae1806b839c.tar.gz slx-admin-1197c0b678e45222e41183a538340ae1806b839c.tar.xz slx-admin-1197c0b678e45222e41183a538340ae1806b839c.zip |
[dnbd3/vmstore] Add selection for DNBD3 server, or NFS mode, show any errors
Diffstat (limited to 'modules-available/vmstore/templates')
-rw-r--r-- | modules-available/vmstore/templates/benchmark-imgselect.html | 58 | ||||
-rw-r--r-- | modules-available/vmstore/templates/benchmark-result.html | 24 |
2 files changed, 58 insertions, 24 deletions
diff --git a/modules-available/vmstore/templates/benchmark-imgselect.html b/modules-available/vmstore/templates/benchmark-imgselect.html index 26ac898e..2ef61644 100644 --- a/modules-available/vmstore/templates/benchmark-imgselect.html +++ b/modules-available/vmstore/templates/benchmark-imgselect.html @@ -7,29 +7,45 @@ <input type="hidden" name="show" value="benchmark"> <input type="hidden" name="id" value="{{id}}"> - <table class="table"> - <thead> - <tr> - <th>{{lang_image}}</th> - <th class="slx-smallcol">{{lang_users}}</th> - <th class="slx-smallcol">{{lang_size}}</th> - </tr> - </thead> - <tbody> - {{#list}} + <div style="max-height:1000px;max-height:80vh;overflow:auto"> + <table class="table table-condensed stupidtable"> + <thead> <tr> - <td> - <div class="radio radio-inline"> - <input type="radio" id="r-{{id}}" name="image" value="{{name}}"> - <label for="r-{{id}}">{{name}}</label> - </div> - </td> - <td class="text-right">{{users}}</td> - <td class="text-right">{{size}}</td> + <th data-sort="string">{{lang_image}}</th> + <th class="slx-smallcol" data-sort="int" data-sort-default="desc">{{lang_users}}</th> + <th class="slx-smallcol" data-sort="int" data-sort-default="desc">{{lang_size}}</th> </tr> - {{/list}} - </tbody> - </table> + </thead> + <tbody> + {{#list}} + <tr> + <td> + <div class="radio radio-inline"> + <input type="radio" id="r-{{id}}" name="image" value="{{name}}"> + <label for="r-{{id}}">{{name}}</label> + </div> + </td> + <td class="text-right">{{users}}</td> + <td class="text-right" data-sort-value="{{size}}">{{size_s}}</td> + </tr> + {{/list}} + </tbody> + </table> + </div> + + <div class="slx-space"></div> + + <div class="slx-bold"> + {{lang_selectServerOrNfs}} + </div> + {{#servers}} + <div class="radio"> + <input type="radio" id="s-{{idx}}" name="server" value="{{idx}}" {{checked}}> + <label for="s-{{idx}}">{{server}}</label> + </div> + {{/servers}} + + <div class="slx-space"></div> <div class="buttonbar text-right"> <button type="submit" name="action" value="start" class="btn btn-primary"> diff --git a/modules-available/vmstore/templates/benchmark-result.html b/modules-available/vmstore/templates/benchmark-result.html index edf4a4f5..28f31f12 100644 --- a/modules-available/vmstore/templates/benchmark-result.html +++ b/modules-available/vmstore/templates/benchmark-result.html @@ -10,16 +10,18 @@ <div id="graphs"></div> +<div id="errors"></div> + <script> document.addEventListener('DOMContentLoaded', function() { var result = {{{result}}}; var clients = {{{wanted}}}; var graphs = {}; function formatBytes(val) { - return Math.floor(val / 1024 / 1024) + "MB/s"; + return Math.floor(val / 1024 / 1024) + "\u2009MiB/s"; } function renderX(val, index) { - return Math.floor(val / 1000) + 's'; + return Math.floor(val / 1000) + '\u2009s'; } function makeGraph(typeKey, resourceKey, caption) { var uuid; @@ -95,7 +97,23 @@ graphs[typeKey].data.datasets = ds; graphs[typeKey].update(); } - console.log(graphs[typeKey].data); + } + + var $err = $('#errors'); + for (var uuid in result) { + if (result[uuid].stdout || result[uuid].stderr) { + var $frame = $('<div class="panel panel-body">'); + $frame.append($('<h5>').text(result[uuid].name)); + if (result[uuid].stdout) { + $frame.append($('<label>').text('stdout')); + $frame.append($('<pre>').text(result[uuid].stdout)); + } + if (result[uuid].stderr) { + $frame.append($('<label>').text('stderr')); + $frame.append($('<pre>').text(result[uuid].stderr)); + } + $err.append($frame); + } } makeGraph('SEQ', 'net', 'Sequential Reads'); |