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' }, [
E('span', { 'class': 'nowrap' }, [
hostSel, hostSel,
E('button', { E('button', {
'class': 'cbi-button cbi-button-apply', 'class': 'cbi-button cbi-button-apply',
'click': ui.createHandlerFn(this, 'updateGraphs', hostSel, spanSel, timeSel, graphDiv, ) 'click': ui.createHandlerFn(this, 'updateGraphs', hostSel, spanSel, timeSel, graphDiv, )
}, [ _('Display Host »') ]), }, [ _('Display Host »') ]),
]),
' ', ' ',
E('span', { 'class': 'nowrap' }, [
spanSel, spanSel,
E('button', { E('button', {
'class': 'cbi-button cbi-button-apply', 'class': 'cbi-button cbi-button-apply',
'click': ui.createHandlerFn(this, 'updateGraphs', hostSel, spanSel, timeSel, graphDiv) 'click': ui.createHandlerFn(this, 'updateGraphs', hostSel, spanSel, timeSel, graphDiv)
}, [ _('Display timespan »') ]), }, [ _('Display timespan »') ]),
]),
' ', ' ',
E('span', { 'class': 'nowrap' }, [
timeSel, timeSel,
E('button', { E('button', {
'class': 'cbi-button cbi-button-apply', 'class': 'cbi-button cbi-button-apply',
'click': ui.createHandlerFn(this, 'togglePolling', hostSel, spanSel, timeSel, graphDiv) 'click': ui.createHandlerFn(this, 'togglePolling', hostSel, spanSel, timeSel, graphDiv)
}, [ _('Apply interval »') ]) }, [ _('Apply interval »') ])
])
]), ]),
E('hr'), E('hr'),
graphDiv graphDiv