mirror of
https://github.com/gSpotx2f/ruantiblock_openwrt.git
synced 2026-05-14 22:50:58 +00:00
v1.5. New options: USER_ENTRIES_REMOTE, ENABLE_TMP_DOWNLOADS. Fixes & improvements.
This commit is contained in:
@@ -219,6 +219,7 @@ return view.extend({
|
||||
} catch(e) {};
|
||||
|
||||
let update_status = null,
|
||||
user_entries = null,
|
||||
rules = null,
|
||||
dnsmasq = null,
|
||||
dnsmasqBypass = null;
|
||||
@@ -265,6 +266,21 @@ return view.extend({
|
||||
);
|
||||
};
|
||||
|
||||
if(data.user_entries && data.user_entries.length > 0) {
|
||||
user_entries = E('table', { 'class': 'table' });
|
||||
for(let i of data.user_entries) {
|
||||
user_entries.append(
|
||||
E('tr', { 'class': 'tr' }, [
|
||||
E('td', { 'class': 'td left', 'style': 'min-width:33%' },
|
||||
i.id),
|
||||
E('td', { 'class': 'td left',
|
||||
'id' : 'user_entries_' + i },
|
||||
`CIDR: ${i.cidr}, IP: ${i.ip}, FQDN: ${i.fqdn}`),
|
||||
])
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
let nft_data = this.formatNftJson(data);
|
||||
|
||||
if(nft_data.rules) {
|
||||
@@ -346,8 +362,17 @@ return view.extend({
|
||||
),
|
||||
];
|
||||
|
||||
if(user_entries) {
|
||||
layout.splice(3, 0,
|
||||
E('div', { 'class': 'cbi-section fade-in' }, [
|
||||
E('h3', {}, _('User entries')),
|
||||
E('div', { 'class': 'cbi-section-node' }, user_entries),
|
||||
])
|
||||
);
|
||||
}
|
||||
|
||||
if(dnsmasqBypass) {
|
||||
layout.splice(4, 0,
|
||||
layout.splice(5, 0,
|
||||
E('div', { 'class': 'cbi-section fade-in' },
|
||||
E('div', { 'class': 'cbi-section-node' }, dnsmasqBypass)
|
||||
)
|
||||
@@ -355,7 +380,7 @@ return view.extend({
|
||||
};
|
||||
|
||||
if(dnsmasq) {
|
||||
layout.splice(5, 0,
|
||||
layout.splice(6, 0,
|
||||
E('div', { 'class': 'cbi-section fade-in' },
|
||||
E('div', { 'class': 'cbi-section-node' }, dnsmasq)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user