luci-mod-status: add source/gateway display for ipv4/ipv6

*add source display for ipv4
*add gateway display for ipv6

Signed-off-by: Andy Chiang <AndyChiang_git@outlook.com>
This commit is contained in:
Andy Chiang
2025-10-10 16:58:19 +07:00
committed by Paul Donald
parent be482f5097
commit dc0bdc9ff7

View File

@ -163,7 +163,8 @@ return view.extend({
res.push([
E('span', { 'class': 'ifacebadge' }, [ net ? net : '(%s)'.format(flags.dev) ]),
dest,
(v6 ? flags.from : flags.via) || '-',
flags.via || '-',
flags.src || flags.from || '-',
String(flags.metric || 0),
flags.table || 'main',
flags.proto,
@ -222,6 +223,7 @@ return view.extend({
E('th', { 'class': 'th', 'title': device_title }, [ _('Device') ]),
E('th', { 'class': 'th', 'title': target_title }, [ _('Target') ]),
E('th', { 'class': 'th', 'title': gateway_title }, [ _('Gateway') ]),
E('th', { 'class': 'th', 'title': source_title }, [ _('Source') ]),
E('th', { 'class': 'th', 'title': metric_title }, [ _('Metric') ]),
E('th', { 'class': 'th', 'title': table_title }, [ _('Table') ]),
E('th', { 'class': 'th', 'title': proto_title }, [ _('Protocol') ])
@ -247,6 +249,7 @@ return view.extend({
E('tr', { 'class': 'tr table-titles' }, [
E('th', { 'class': 'th', 'title': device_title }, [ _('Device') ]),
E('th', { 'class': 'th', 'title': target_title }, [ _('Target') ]),
E('th', { 'class': 'th', 'title': gateway_title }, [ _('Gateway') ]),
E('th', { 'class': 'th', 'title': source_title }, [ _('Source') ]),
E('th', { 'class': 'th', 'title': metric_title }, [ _('Metric') ]),
E('th', { 'class': 'th', 'title': table_title }, [ _('Table') ]),