Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions htdocs/luci-static/resources/pbr/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ var pkg = {
get Name() {
return "pbr";
},
// Must equal pbr's pkg.compat and rpcdCompat in luci.pbr. Any change to
// pbr's error/warning catalog bumps all five in lockstep: pbr pkg.uc,
// pbr files/etc/init.d/pbr, pbr tests/04_policies/01_start_dynamic_routing,
// this getter, and rpcdCompat. A mismatch trips isVersionMismatch() below
// and tells the user their WebUI is outdated, so the two packages have to
// be released together.
get LuciCompat() {
return 35;
return 36;
},
get ReadmeCompat() {
return "1.2.3";
Expand Down Expand Up @@ -180,7 +186,6 @@ var status = baseclass.extend({
reply = {
enabled: reply.enabled || false,
running: reply.running || false,
running_iptables: reply.running_iptables || false,
running_nft: reply.running_nft || false,
running_nft_file: reply.running_nft_file || false,
version: reply.version || null,
Expand Down Expand Up @@ -227,9 +232,7 @@ var status = baseclass.extend({
text = _("Version %s").format(reply.version) + " - ";
if (reply.running) {
text += _("Running");
if (reply.running_iptables) {
text += " (" + _("iptables mode") + ").";
} else if (reply.running_nft_file) {
if (reply.running_nft_file) {
text += " (" + _("fw4 nft file mode") + ").";
} else if (reply.running_nft) {
text += " (" + _("nft mode") + ").";
Expand Down Expand Up @@ -302,15 +305,15 @@ var status = baseclass.extend({
"Installed AdGuardHome (%s) doesn't support 'ipset_file' option.",
),
warningPolicyProcessCMD: _("%s"),
warningTorUnsetParams: _(
"Please unset 'src_addr', 'src_port' and 'dest_port' for policy '%s'",
warningTorUnsetSrcPort: _(
"Please unset 'src_port' for policy '%s': it produces an invalid rule",
),
warningTorUnsetDestPort: _(
"Please unset 'dest_port' for policy '%s': it is ignored",
),
warningTorUnsetProto: _(
"Please unset 'proto' or set 'proto' to 'all' for policy '%s'",
),
warningTorUnsetChainIpt: _(
"Please unset 'chain' or set 'chain' to 'PREROUTING' for policy '%s'",
),
warningTorUnsetChainNft: _(
"Please unset 'chain' or set 'chain' to 'prerouting' for policy '%s'",
),
Expand Down Expand Up @@ -398,10 +401,6 @@ var status = baseclass.extend({
errorConfigValidation: _("Config (%s) validation failure").format(
"/etc/config/" + pkg.Name,
),
errorNoIptables: _("%s binary cannot be found").format("iptables"),
errorNoIpset: _(
"Resolver set support (%s) requires ipset, but ipset binary cannot be found",
).format(pkg.escapeInfo(L.uci.get(pkg.Name, "config", "resolver_set"))),
errorNoNft: _(
"Resolver set support (%s) requires nftables, but nft binary cannot be found",
).format(pkg.escapeInfo(L.uci.get(pkg.Name, "config", "resolver_set"))),
Expand All @@ -423,9 +422,6 @@ var status = baseclass.extend({
'<a href="' + pkg.URL + '#uplink_interface" target="_blank">',
"</a>!<br />",
),
errorIpsetNameTooLong: _(
"The ipset name '%s' is longer than allowed 31 characters",
),
errorNftsetNameTooLong: _(
"The nft set name '%s' is longer than allowed 255 characters",
),
Expand Down
4 changes: 1 addition & 3 deletions htdocs/luci-static/resources/view/status/include/72_pbr.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ return baseclass.extend({
versionText = reply.version;
if (reply.running) {
statusText = _("Active");
if (reply.running_iptables) {
modeText = _("iptables mode");
} else if (reply.running_nft_file) {
if (reply.running_nft_file) {
modeText = _("fw4 nft file mode");
} else if (reply.running_nft) {
modeText = _("nft mode");
Expand Down
5 changes: 4 additions & 1 deletion root/usr/share/rpcd/ucode/luci.pbr
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ import { access } from 'fs';
import { cursor } from 'uci';

const packageName = 'pbr'; // ucode-lsp disable
const rpcdCompat = 35; // ucode-lsp disable
// Must equal LuciCompat in pbr/status.js and pkg.compat in the pbr backend;
// a mismatch trips isVersionMismatch() and warns the user to update. Bump all
// five locations together whenever pbr's message catalog changes.
const rpcdCompat = 36; // ucode-lsp disable

// ── rpcd Method Handlers ────────────────────────────────────────────

Expand Down
Loading