luci-app-statistics: rework markup and CSS classes for easier styling

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
Jo-Philipp Wich 2020-03-23 22:19:26 +01:00
parent 3a32eb26ef
commit 6d17667524

View file

@ -200,24 +200,30 @@ return L.view.extend({
var view = E([], [ var view = E([], [
E('h2', {}, [ _('Statistics') ]), E('h2', {}, [ _('Statistics') ]),
E('div', {}, [ E('div', {}, [
E('div', {}, [ E('p', { 'class': 'controls' }, [
hostSel, E('span', { 'class': 'nowrap' }, [
E('button', { hostSel,
'class': 'cbi-button cbi-button-apply', E('button', {
'click': ui.createHandlerFn(this, 'updateGraphs', hostSel, spanSel, timeSel, graphDiv, ) 'class': 'cbi-button cbi-button-apply',
}, [ _('Display Host »') ]), 'click': ui.createHandlerFn(this, 'updateGraphs', hostSel, spanSel, timeSel, graphDiv, )
}, [ _('Display Host »') ]),
]),
' ', ' ',
spanSel, E('span', { 'class': 'nowrap' }, [
E('button', { spanSel,
'class': 'cbi-button cbi-button-apply', E('button', {
'click': ui.createHandlerFn(this, 'updateGraphs', hostSel, spanSel, timeSel, graphDiv) 'class': 'cbi-button cbi-button-apply',
}, [ _('Display timespan »') ]), 'click': ui.createHandlerFn(this, 'updateGraphs', hostSel, spanSel, timeSel, graphDiv)
}, [ _('Display timespan »') ]),
]),
' ', ' ',
timeSel, E('span', { 'class': 'nowrap' }, [
E('button', { timeSel,
'class': 'cbi-button cbi-button-apply', E('button', {
'click': ui.createHandlerFn(this, 'togglePolling', hostSel, spanSel, timeSel, graphDiv) 'class': 'cbi-button cbi-button-apply',
}, [ _('Apply interval »') ]) 'click': ui.createHandlerFn(this, 'togglePolling', hostSel, spanSel, timeSel, graphDiv)
}, [ _('Apply interval »') ])
])
]), ]),
E('hr'), E('hr'),
graphDiv graphDiv