luci-app-statistics: rework markup and CSS classes for easier styling
authorJo-Philipp Wich <jo@mein.io>
Mon, 23 Mar 2020 21:19:26 +0000 (22:19 +0100)
committerJo-Philipp Wich <jo@mein.io>
Mon, 23 Mar 2020 21:19:26 +0000 (22:19 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
applications/luci-app-statistics/htdocs/luci-static/resources/view/statistics/graphs.js

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