From 57f325a757a9d037eb08852cc134ebdc111d321c Mon Sep 17 00:00:00 2001 From: "Fritz D. Ansel" Date: Mon, 2 Aug 2021 20:24:40 +0200 Subject: [PATCH] vnstat2: allow graphs side by side an a full-hd screen you will have now 2x3 graphs instead scrolling through 1x6 graphs Signed-off-by: Fritz D. Ansel --- .../htdocs/luci-static/resources/view/vnstat2/graphs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js b/applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js index fbe9d59337..7ac3b3f7e7 100644 --- a/applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js +++ b/applications/luci-app-vnstat2/htdocs/luci-static/resources/view/vnstat2/graphs.js @@ -16,11 +16,11 @@ return view.extend({ ]); ifaces.forEach(function(iface) { - tab.appendChild(E('p', {}, E('img', { 'data-iface': iface, 'style': 'display:none' }))); + tab.appendChild(E('span', {}, E('img', { 'data-iface': iface, 'style': 'visibility:hidden; margin:5px 10px' }))); fs.exec_direct('/usr/bin/vnstati', [ '-'+style, '-i', iface, '-o', '-' ], 'blob').then(function(res) { var img = tab.querySelector('img[data-iface="%s"]'.format(iface)); img.src = URL.createObjectURL(res); - img.style.display = ''; + img.style.visibility = 'visible'; tab.firstElementChild.style.display = 'none'; }); });