From: Fritz D. Ansel Date: Mon, 2 Aug 2021 18:24:40 +0000 (+0200) Subject: vnstat2: allow graphs side by side X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=57f325a757a9d037eb08852cc134ebdc111d321c;p=project%2Fluci.git 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 --- 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'; }); });