luci-app-nlbwmon: adjused the display export page
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 17 Jun 2021 10:50:40 +0000 (12:50 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Mon, 21 Jun 2021 10:03:06 +0000 (12:03 +0200)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 04c4499be74152c476ca1edfd6b8048252a55251)

applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw/display.js

index 029e1952424d9f2b3684412e254bac3d6c4a1d33..4909485bbe47d919c34b6a7779725dcf658f53f7 100644 (file)
@@ -945,30 +945,42 @@ return view.extend({
                                ]),
 
                                E('div', { 'class': 'cbi-section', 'data-tab': 'export', 'data-tab-title': _('Export') }, [
-                                       E('ul', [
-                                               E('li', [
-                                                       E('a', {
-                                                               'href': '#',
-                                                               'click': ui.createHandlerFn(this, 'handleDownload', 'csv', 'mac', '-rx,-tx')
-                                                       }, [ _('CSV, grouped by MAC') ])
+                                       E('div', { 'class': 'cbi-section-node cbi-sction-node-tabbed' }, [
+                                               E('div', { 'class': 'cbi-value' }, [
+                                                       E('label', { 'class': 'cbi-value-title' }, _('Grouped by MAC (CSV)')),
+                                                       E('div', { 'class': 'cbi-value-field' }, [
+                                                               E('button', {
+                                                                       'class': 'cbi-button',
+                                                                       'click': ui.createHandlerFn(this, 'handleDownload', 'csv', 'mac', '-rx,-tx')
+                                                               }, [ _('Export') ])
+                                                       ])
                                                ]),
-                                               E('li', [
-                                                       E('a', {
-                                                               'href': '#',
-                                                               'click': ui.createHandlerFn(this, 'handleDownload', 'csv', 'ip', '-rx,-tx')
-                                                       }, [ _('CSV, grouped by IP') ])
+                                               E('div', { 'class': 'cbi-value' }, [
+                                                       E('label', { 'class': 'cbi-value-title' }, _('Grouped by IP (CSV)')),
+                                                       E('div', { 'class': 'cbi-value-field' }, [
+                                                               E('button', {
+                                                                       'class': 'cbi-button',
+                                                                       'click': ui.createHandlerFn(this, 'handleDownload', 'csv', 'ip', '-rx,-tx')
+                                                               }, [ _('Export') ])
+                                                       ])
                                                ]),
-                                               E('li', [
-                                                       E('a', {
-                                                               'href': '#',
-                                                               'click': ui.createHandlerFn(this, 'handleDownload', 'csv', 'layer7', '-rx,-tx')
-                                                       }, [ _('CSV, grouped by protocol') ])
+                                               E('div', { 'class': 'cbi-value' }, [
+                                                       E('label', { 'class': 'cbi-value-title' }, _('Grouped by protocol (CSV)')),
+                                                       E('div', { 'class': 'cbi-value-field' }, [
+                                                               E('button', {
+                                                                       'class': 'cbi-button',
+                                                                       'click': ui.createHandlerFn(this, 'handleDownload', 'csv', 'layer7', '-rx,-tx')
+                                                               }, [ _('Export') ])
+                                                       ])
                                                ]),
-                                               E('li', [
-                                                       E('a', {
-                                                               'href': '#',
-                                                               'click': ui.createHandlerFn(this, 'handleDownload', 'json', null, null)
-                                                       }, [ _('JSON dump') ])
+                                               E('div', { 'class': 'cbi-value' }, [
+                                                       E('label', { 'class': 'cbi-value-title' }, _('Dump (JSON)')),
+                                                       E('div', { 'class': 'cbi-value-field' }, [
+                                                               E('button', {
+                                                                       'class': 'cbi-button',
+                                                                       'click': ui.createHandlerFn(this, 'handleDownload', 'json', null, null)
+                                                               }, [ _('Export') ])
+                                                       ])
                                                ])
                                        ])
                                ])