luci-mod-network: convert diagnostic page to LuCI look and feel
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
parent
d62238aec2
commit
5f2d305476
1 changed files with 21 additions and 7 deletions
|
@ -14,8 +14,7 @@ return view.extend({
|
||||||
buttons[i].setAttribute('disabled', 'true');
|
buttons[i].setAttribute('disabled', 'true');
|
||||||
|
|
||||||
return fs.exec(exec, args).then(function(res) {
|
return fs.exec(exec, args).then(function(res) {
|
||||||
var out = document.querySelector('.command-output');
|
var out = document.querySelector('textarea');
|
||||||
out.style.display = '';
|
|
||||||
|
|
||||||
dom.content(out, [ res.stdout || '', res.stderr || '' ]);
|
dom.content(out, [ res.stdout || '', res.stderr || '' ]);
|
||||||
}).catch(function(err) {
|
}).catch(function(err) {
|
||||||
|
@ -75,9 +74,7 @@ return view.extend({
|
||||||
ping_host = uci.get('luci', 'diag', 'ping') || 'openwrt.org',
|
ping_host = uci.get('luci', 'diag', 'ping') || 'openwrt.org',
|
||||||
route_host = uci.get('luci', 'diag', 'route') || 'openwrt.org';
|
route_host = uci.get('luci', 'diag', 'route') || 'openwrt.org';
|
||||||
|
|
||||||
return E([], [
|
var table = E('table', { 'class': 'table' }, [
|
||||||
E('h2', {}, [ _('Network Utilities') ]),
|
|
||||||
E('table', { 'class': 'table' }, [
|
|
||||||
E('tr', { 'class': 'tr' }, [
|
E('tr', { 'class': 'tr' }, [
|
||||||
E('td', { 'class': 'td left' }, [
|
E('td', { 'class': 'td left' }, [
|
||||||
E('input', {
|
E('input', {
|
||||||
|
@ -156,9 +153,26 @@ return view.extend({
|
||||||
])
|
])
|
||||||
]) : E([]),
|
]) : E([]),
|
||||||
])
|
])
|
||||||
]),
|
]);
|
||||||
E('pre', { 'class': 'command-output', 'style': 'display:none' })
|
|
||||||
|
var view = E('div', { 'class': 'cbi-map'}, [
|
||||||
|
E('h2', {}, [ _('Diagnostics') ]),
|
||||||
|
E('div', { 'class': 'cbi-map-descr'}, _('Execution of various network commands to check the connection and name resolution to other systems.')),
|
||||||
|
table,
|
||||||
|
E('div', {'class': 'cbi-section'}, [
|
||||||
|
E('div', { 'id' : 'command-output'},
|
||||||
|
E('textarea', {
|
||||||
|
'id': 'widget.command-output',
|
||||||
|
'style': 'width: 100%',
|
||||||
|
'readonly': true,
|
||||||
|
'wrap': 'off',
|
||||||
|
'rows': '20'
|
||||||
|
})
|
||||||
|
)
|
||||||
|
])
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
return view;
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSaveApply: null,
|
handleSaveApply: null,
|
||||||
|
|
Loading…
Reference in a new issue