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 <fdansel@yandex.ru>
This commit is contained in:
Fritz D. Ansel 2021-08-02 20:24:40 +02:00
parent b5af813318
commit 57f325a757
1 changed files with 2 additions and 2 deletions

View File

@ -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';
});
});