mirror of
https://github.com/gSpotx2f/ruantiblock_openwrt.git
synced 2026-05-14 14:40:58 +00:00
luci-app-ruantiblock: minor fixes for OpenWrt 24.10, updated log.
This commit is contained in:
@@ -12,7 +12,7 @@ HTTPS_DNS_PROXY=1
|
|||||||
OWRT_VERSION="current"
|
OWRT_VERSION="current"
|
||||||
RUAB_VERSION="2.1.3-r1"
|
RUAB_VERSION="2.1.3-r1"
|
||||||
RUAB_MOD_LUA_VERSION="2.1.3-r1"
|
RUAB_MOD_LUA_VERSION="2.1.3-r1"
|
||||||
RUAB_LUCI_APP_VERSION="2.1.3-r1"
|
RUAB_LUCI_APP_VERSION="2.1.3-r2"
|
||||||
BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master"
|
BASE_URL="https://raw.githubusercontent.com/gSpotx2f/packages-openwrt/master"
|
||||||
PKG_DIR="/tmp"
|
PKG_DIR="/tmp"
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=luci-app-ruantiblock
|
PKG_NAME:=luci-app-ruantiblock
|
||||||
PKG_VERSION:=2.1.3
|
PKG_VERSION:=2.1.3
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
LUCI_TITLE:=LuCI support for ruantiblock
|
LUCI_TITLE:=LuCI support for ruantiblock
|
||||||
LUCI_DEPENDS:=+ruantiblock
|
LUCI_DEPENDS:=+ruantiblock
|
||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ document.head.append(E('style', {'type': 'text/css'},
|
|||||||
--app-log-dark-font-color: #fff;
|
--app-log-dark-font-color: #fff;
|
||||||
--app-log-light-font-color: #fff;
|
--app-log-light-font-color: #fff;
|
||||||
--app-log-debug-font-color: #e7e7e7;
|
--app-log-debug-font-color: #e7e7e7;
|
||||||
--app-log-emerg-color: #a93734;
|
--app-log-emerg-color: #960909;
|
||||||
--app-log-alert: #eb5050;
|
--app-log-alert: #eb5050;
|
||||||
--app-log-crit: #dc7f79;
|
--app-log-crit: #dc7f79;
|
||||||
--app-log-err: #c89593;
|
--app-log-err: #9a5954;
|
||||||
--app-log-warn: #8d7000;
|
--app-log-warn: #8d7000;
|
||||||
--app-log-notice: #007627;
|
--app-log-notice: #007627;
|
||||||
--app-log-info: rgba(0,0,0,0);
|
--app-log-info: rgba(0,0,0,0);
|
||||||
@@ -103,7 +103,6 @@ log-emerg td {
|
|||||||
}
|
}
|
||||||
.log-info {
|
.log-info {
|
||||||
background-color: var(--app-log-info) !important;
|
background-color: var(--app-log-info) !important;
|
||||||
/*color: var(--app-log-dark-font-color) !important;*/
|
|
||||||
}
|
}
|
||||||
.log-debug {
|
.log-debug {
|
||||||
background-color: var(--app-log-debug) !important;
|
background-color: var(--app-log-debug) !important;
|
||||||
@@ -138,6 +137,13 @@ log-emerg td {
|
|||||||
}
|
}
|
||||||
.log-facility-dropdown-item {
|
.log-facility-dropdown-item {
|
||||||
}
|
}
|
||||||
|
#moreEntriesBar {
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
#moreEntriesBar > button {
|
||||||
|
margin: 1em 0 1em 0 !important;
|
||||||
|
min-width: 100%;
|
||||||
|
}
|
||||||
.log-side-block {
|
.log-side-block {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 200 !important;
|
z-index: 200 !important;
|
||||||
@@ -701,7 +707,7 @@ return baseclass.extend({
|
|||||||
|
|
||||||
filterSettingsModal() {
|
filterSettingsModal() {
|
||||||
return ui.showModal(_('Filter settings'), [
|
return ui.showModal(_('Filter settings'), [
|
||||||
E('div', { 'class': 'cbi-map' }, [
|
E('div', { 'class': 'cbi-map' },
|
||||||
E('div', { 'class': 'cbi-section' }, [
|
E('div', { 'class': 'cbi-section' }, [
|
||||||
E('div', { 'class': 'cbi-section-node' }, [
|
E('div', { 'class': 'cbi-section-node' }, [
|
||||||
E('div', { 'class': 'cbi-value' }, [
|
E('div', { 'class': 'cbi-value' }, [
|
||||||
@@ -709,7 +715,8 @@ return baseclass.extend({
|
|||||||
'class': 'cbi-value-title',
|
'class': 'cbi-value-title',
|
||||||
'for' : 'tailInput',
|
'for' : 'tailInput',
|
||||||
}, _('Last entries')),
|
}, _('Last entries')),
|
||||||
E('div', { 'class': 'cbi-value-field' }, [
|
E('div', { 'class': 'cbi-value-field' },
|
||||||
|
E('span', { 'class': 'control-group' }, [
|
||||||
this.tailInput,
|
this.tailInput,
|
||||||
E('button', {
|
E('button', {
|
||||||
'class': 'cbi-button btn',
|
'class': 'cbi-button btn',
|
||||||
@@ -720,14 +727,16 @@ return baseclass.extend({
|
|||||||
this.tailInput.focus();
|
this.tailInput.focus();
|
||||||
}, this),
|
}, this),
|
||||||
}, '⌫'),
|
}, '⌫'),
|
||||||
]),
|
])
|
||||||
|
),
|
||||||
]),
|
]),
|
||||||
E('div', { 'class': 'cbi-value' }, [
|
E('div', { 'class': 'cbi-value' }, [
|
||||||
E('label', {
|
E('label', {
|
||||||
'class': 'cbi-value-title',
|
'class': 'cbi-value-title',
|
||||||
'for' : 'timeFilter',
|
'for' : 'timeFilter',
|
||||||
}, _('Timestamp filter')),
|
}, _('Timestamp filter')),
|
||||||
E('div', { 'class': 'cbi-value-field' }, [
|
E('div', { 'class': 'cbi-value-field' },
|
||||||
|
E('span', { 'class': 'control-group' }, [
|
||||||
this.timeFilter,
|
this.timeFilter,
|
||||||
E('button', {
|
E('button', {
|
||||||
'class': 'cbi-button btn',
|
'class': 'cbi-button btn',
|
||||||
@@ -738,7 +747,8 @@ return baseclass.extend({
|
|||||||
this.timeFilter.focus();
|
this.timeFilter.focus();
|
||||||
}, this),
|
}, this),
|
||||||
}, '⌫'),
|
}, '⌫'),
|
||||||
]),
|
])
|
||||||
|
),
|
||||||
]),
|
]),
|
||||||
E('div', { 'class': 'cbi-value' }, [
|
E('div', { 'class': 'cbi-value' }, [
|
||||||
E('label', {
|
E('label', {
|
||||||
@@ -763,7 +773,8 @@ return baseclass.extend({
|
|||||||
'class': 'cbi-value-title',
|
'class': 'cbi-value-title',
|
||||||
'for' : 'msgFilter',
|
'for' : 'msgFilter',
|
||||||
}, _('Message filter')),
|
}, _('Message filter')),
|
||||||
E('div', { 'class': 'cbi-value-field' }, [
|
E('div', { 'class': 'cbi-value-field' },
|
||||||
|
E('span', { 'class': 'control-group' }, [
|
||||||
this.msgFilter,
|
this.msgFilter,
|
||||||
E('button', {
|
E('button', {
|
||||||
'class': 'cbi-button btn',
|
'class': 'cbi-button btn',
|
||||||
@@ -774,7 +785,8 @@ return baseclass.extend({
|
|||||||
this.msgFilter.focus();
|
this.msgFilter.focus();
|
||||||
}, this),
|
}, this),
|
||||||
}, '⌫'),
|
}, '⌫'),
|
||||||
]),
|
])
|
||||||
|
)
|
||||||
]),
|
]),
|
||||||
E('div', { 'class': 'cbi-value' }, [
|
E('div', { 'class': 'cbi-value' }, [
|
||||||
E('label', {
|
E('label', {
|
||||||
@@ -813,9 +825,9 @@ return baseclass.extend({
|
|||||||
]) : ''),
|
]) : ''),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
]),
|
),
|
||||||
E('div', { 'class': 'right' }, [
|
|
||||||
this.logFilterForm,
|
this.logFilterForm,
|
||||||
|
E('div', { 'class': 'right button-row' }, [
|
||||||
E('button', {
|
E('button', {
|
||||||
'class': 'btn',
|
'class': 'btn',
|
||||||
'click': ev => {
|
'click': ev => {
|
||||||
@@ -875,6 +887,13 @@ return baseclass.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
onSubmitFilter() {
|
onSubmitFilter() {
|
||||||
|
if(this.logSorting.value != this.logSortingValue) {
|
||||||
|
if(this.logSorting.value == 'desc') {
|
||||||
|
this.logWrapper.after(this.moreEntriesBar);
|
||||||
|
} else {
|
||||||
|
this.logWrapper.before(this.moreEntriesBar);
|
||||||
|
};
|
||||||
|
};
|
||||||
this.saveSettingsToLocalStorage(
|
this.saveSettingsToLocalStorage(
|
||||||
this.tailInput.value, this.logSorting.value, this.autoRefresh.checked);
|
this.tailInput.value, this.logSorting.value, this.autoRefresh.checked);
|
||||||
this.setFilterSettings();
|
this.setFilterSettings();
|
||||||
@@ -998,6 +1017,7 @@ return baseclass.extend({
|
|||||||
this.logFilterForm = E('form', {
|
this.logFilterForm = E('form', {
|
||||||
'id' : 'logFilterForm',
|
'id' : 'logFilterForm',
|
||||||
'name' : 'logFilterForm',
|
'name' : 'logFilterForm',
|
||||||
|
'style' : 'display:none',
|
||||||
'submit': ev => {
|
'submit': ev => {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
return this.onSubmitFilter();
|
return this.onSubmitFilter();
|
||||||
@@ -1021,24 +1041,36 @@ return baseclass.extend({
|
|||||||
}),
|
}),
|
||||||
}, '⟳');
|
}, '⟳');
|
||||||
|
|
||||||
this.moreEntriesBtn = E('button', {
|
function getMoreEntries(ev) {
|
||||||
'title': _('Get more entries'),
|
|
||||||
'class': 'cbi-button btn log-side-btn',
|
|
||||||
'style': 'margin-top:1px !important',
|
|
||||||
'click': ui.createHandlerFn(this, function(ev) {
|
|
||||||
ev.target.blur();
|
ev.target.blur();
|
||||||
if(this.fastTailValue === null) {
|
if(this.fastTailValue === null) {
|
||||||
this.fastTailValue = Number(this.tailValue);
|
this.fastTailValue = Number(this.tailValue);
|
||||||
}
|
};
|
||||||
if(this.fastTailValue > 0) {
|
if(this.fastTailValue > 0) {
|
||||||
this.fastTailValue += this.fastTailIncrement;
|
this.fastTailValue += this.fastTailIncrement;
|
||||||
};
|
};
|
||||||
return this.reloadLog(this.fastTailValue);
|
return this.reloadLog(this.fastTailValue);
|
||||||
}),
|
}
|
||||||
|
|
||||||
|
this.moreEntriesBtn = E('button', {
|
||||||
|
'title': _('More entries'),
|
||||||
|
'class': 'cbi-button btn log-side-btn',
|
||||||
|
'style': 'margin-top:1px !important',
|
||||||
|
'click': ui.createHandlerFn(this, getMoreEntries),
|
||||||
}, `+${this.fastTailIncrement}`);
|
}, `+${this.fastTailIncrement}`);
|
||||||
|
|
||||||
|
this.moreEntriesRowBtn = E('button', {
|
||||||
|
'class': 'cbi-button btn',
|
||||||
|
'click': ui.createHandlerFn(this, getMoreEntries),
|
||||||
|
}, _('More entries'));
|
||||||
|
|
||||||
|
this.moreEntriesBar = E('div', {
|
||||||
|
'id' : 'moreEntriesBar',
|
||||||
|
'class': 'center',
|
||||||
|
}, this.moreEntriesRowBtn);
|
||||||
|
|
||||||
this.allEntriesBtn = E('button', {
|
this.allEntriesBtn = E('button', {
|
||||||
'title': _('Get all entries'),
|
'title': _('All entries'),
|
||||||
'class': 'cbi-button btn log-side-btn',
|
'class': 'cbi-button btn log-side-btn',
|
||||||
'style': 'margin-top:1px !important',
|
'style': 'margin-top:1px !important',
|
||||||
'click': ui.createHandlerFn(this, function(ev) {
|
'click': ui.createHandlerFn(this, function(ev) {
|
||||||
@@ -1060,6 +1092,7 @@ return baseclass.extend({
|
|||||||
|
|
||||||
this.actionButtons.push(this.filterEditsBtn, this.logDownloadBtn,
|
this.actionButtons.push(this.filterEditsBtn, this.logDownloadBtn,
|
||||||
this.refreshBtn, this.moreEntriesBtn,
|
this.refreshBtn, this.moreEntriesBtn,
|
||||||
|
this.moreEntriesRowBtn,
|
||||||
this.allEntriesBtn, this.filterModalBtn);
|
this.allEntriesBtn, this.filterModalBtn);
|
||||||
|
|
||||||
document.body.append(
|
document.body.append(
|
||||||
@@ -1094,6 +1127,11 @@ return baseclass.extend({
|
|||||||
poll.add(this.pollFuncWrapper, this.pollInterval);
|
poll.add(this.pollFuncWrapper, this.pollInterval);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let logArea = [ this.moreEntriesBar, this.logWrapper ];
|
||||||
|
if(this.logSortingValue == 'desc') {
|
||||||
|
logArea.reverse();
|
||||||
|
};
|
||||||
|
|
||||||
return E([
|
return E([
|
||||||
E('h2', { 'id': 'logTitle', 'class': 'fade-in' }, this.title),
|
E('h2', { 'id': 'logTitle', 'class': 'fade-in' }, this.title),
|
||||||
E('div', { 'class': 'cbi-section-descr fade-in' }),
|
E('div', { 'class': 'cbi-section-descr fade-in' }),
|
||||||
@@ -1115,9 +1153,7 @@ return baseclass.extend({
|
|||||||
])
|
])
|
||||||
),
|
),
|
||||||
E('div', { 'class': 'cbi-section fade-in' },
|
E('div', { 'class': 'cbi-section fade-in' },
|
||||||
E('div', { 'class': 'cbi-section-node' },
|
E('div', { 'class': 'cbi-section-node' }, logArea)
|
||||||
this.logWrapper
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
E('div', { 'class': 'cbi-section fade-in' },
|
E('div', { 'class': 'cbi-section fade-in' },
|
||||||
E('div', { 'class': 'cbi-section-node' },
|
E('div', { 'class': 'cbi-section-node' },
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ return view.extend({
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
this.dnsmasqCfgDirsSelect = E('select', {
|
this.dnsmasqCfgDirsSelect = E('select', {
|
||||||
'id' : 'dnsmasq_confdirs_list',
|
'id' : 'dnsmasq_confdirs_list',
|
||||||
'class': "cbi-input-select",
|
'class': "cbi-input-select",
|
||||||
@@ -87,7 +88,7 @@ return view.extend({
|
|||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
E('div', { 'class': 'right' }, [
|
E('div', { 'class': 'right button-row' }, [
|
||||||
this.cancelButton,
|
this.cancelButton,
|
||||||
' ',
|
' ',
|
||||||
E('button', {
|
E('button', {
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ return baseclass.extend({
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
E('div', { 'class': 'right' }, [
|
E('div', { 'class': 'right button-row' }, [
|
||||||
E('button', {
|
E('button', {
|
||||||
'class': 'btn',
|
'class': 'btn',
|
||||||
'click': ui.hideModal,
|
'click': ui.hideModal,
|
||||||
|
|||||||
Reference in New Issue
Block a user