mirror of
https://github.com/openwrt/luci.git
synced 2026-06-17 14:50:21 +04:00
luci-app-pbr: update to 1.2.1-r87
status.js: * get ubus and gateways info from ubus instead of rpcd calls * updates to warning/error IDs and texts * minor formatting/styling updates rpcd script: * remove obsolete rpcd calls ACL file: * remove obsolete rpcd calls * add permission for ubus access Signed-off-by: Stan Grishin <stangri@melmac.ca>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
# Copyright 2017-2025 MOSSDeF, Stan Grishin (stangri@melmac.ca).
|
||||
# Copyright 2017-2026 MOSSDeF, Stan Grishin (stangri@melmac.ca).
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
@@ -7,7 +7,7 @@ PKG_NAME:=luci-app-pbr
|
||||
PKG_LICENSE:=AGPL-3.0-or-later
|
||||
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
|
||||
PKG_VERSION:=1.2.1
|
||||
PKG_RELEASE:=45
|
||||
PKG_RELEASE:=87
|
||||
|
||||
LUCI_TITLE:=Policy Based Routing Service Web UI
|
||||
LUCI_URL:=https://github.com/stangri/luci-app-pbr/
|
||||
|
||||
@@ -11,7 +11,7 @@ var pkg = {
|
||||
return "pbr";
|
||||
},
|
||||
get LuciCompat() {
|
||||
return 20;
|
||||
return 24;
|
||||
},
|
||||
get ReadmeCompat() {
|
||||
return "1.2.1";
|
||||
@@ -30,7 +30,7 @@ var pkg = {
|
||||
pkg.Name +
|
||||
"/" +
|
||||
(pkg.ReadmeCompat ? pkg.ReadmeCompat + "/" : "") +
|
||||
"#Donate"
|
||||
"#donate"
|
||||
);
|
||||
},
|
||||
isVersionMismatch: function (luci, pkg, rpcd) {
|
||||
@@ -93,10 +93,10 @@ var getPlatformSupport = rpc.declare({
|
||||
params: ["name"],
|
||||
});
|
||||
|
||||
var getUbusInfo = rpc.declare({
|
||||
object: "luci." + pkg.Name,
|
||||
method: "getUbusInfo",
|
||||
params: ["name"],
|
||||
var getServiceInfo = rpc.declare({
|
||||
object: "service",
|
||||
method: "list",
|
||||
params: ["name", "verbose"],
|
||||
});
|
||||
|
||||
var _setInitAction = rpc.declare({
|
||||
@@ -128,7 +128,7 @@ var RPC = {
|
||||
_setInitAction(name, action).then(
|
||||
function (result) {
|
||||
this.emit("setInitAction", result);
|
||||
}.bind(this)
|
||||
}.bind(this),
|
||||
);
|
||||
},
|
||||
};
|
||||
@@ -142,29 +142,32 @@ var pollServiceStatus = function (callback) {
|
||||
attempt++;
|
||||
|
||||
// Use the RPC function directly from the module scope
|
||||
L.resolveDefault(getInitStatus(pkg.Name), {}).then(function (statusData) {
|
||||
var currentStatus = statusData && statusData[pkg.Name] && statusData[pkg.Name].running;
|
||||
L.resolveDefault(getInitStatus(pkg.Name), {})
|
||||
.then(function (statusData) {
|
||||
var currentStatus =
|
||||
statusData && statusData[pkg.Name] && statusData[pkg.Name].running;
|
||||
|
||||
// Check if completed or failed
|
||||
if (currentStatus === true) {
|
||||
callback(true, currentStatus);
|
||||
}
|
||||
// Check if timed out
|
||||
else if (attempt >= maxAttempts) {
|
||||
callback(false, 'timeout');
|
||||
}
|
||||
// Continue polling
|
||||
else {
|
||||
setTimeout(checkStatus, 1000); // Check again in 1 second
|
||||
}
|
||||
}).catch(function (err) {
|
||||
// Retry on error unless timed out
|
||||
if (attempt < maxAttempts) {
|
||||
setTimeout(checkStatus, 1000);
|
||||
} else {
|
||||
callback(false, 'error');
|
||||
}
|
||||
});
|
||||
// Check if completed or failed
|
||||
if (currentStatus === true) {
|
||||
callback(true, currentStatus);
|
||||
}
|
||||
// Check if timed out
|
||||
else if (attempt >= maxAttempts) {
|
||||
callback(false, "timeout");
|
||||
}
|
||||
// Continue polling
|
||||
else {
|
||||
setTimeout(checkStatus, 1000); // Check again in 1 second
|
||||
}
|
||||
})
|
||||
.catch(function (err) {
|
||||
// Retry on error unless timed out
|
||||
if (attempt < maxAttempts) {
|
||||
setTimeout(checkStatus, 1000);
|
||||
} else {
|
||||
callback(false, "error");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Start polling after 2 seconds delay (give backend time to start the task)
|
||||
@@ -175,7 +178,7 @@ var status = baseclass.extend({
|
||||
render: function () {
|
||||
return Promise.all([
|
||||
L.resolveDefault(getInitStatus(pkg.Name), {}),
|
||||
L.resolveDefault(getUbusInfo(pkg.Name), {}),
|
||||
L.resolveDefault(getServiceInfo(pkg.Name, true), {}),
|
||||
]).then(function ([initStatus, ubusInfo]) {
|
||||
var reply = {
|
||||
status: initStatus?.[pkg.Name] || {
|
||||
@@ -200,7 +203,7 @@ var status = baseclass.extend({
|
||||
pkg.isVersionMismatch(
|
||||
pkg.LuciCompat,
|
||||
reply.status.packageCompat,
|
||||
reply.status.rpcdCompat
|
||||
reply.status.rpcdCompat,
|
||||
)
|
||||
) {
|
||||
reply.ubus.warnings.push({
|
||||
@@ -210,8 +213,8 @@ var status = baseclass.extend({
|
||||
pkg.LuciCompat,
|
||||
reply.status.rpcdCompat,
|
||||
'<a href="' +
|
||||
pkg.URL +
|
||||
'#Warning:InternalVersionMismatch" target="_blank">',
|
||||
pkg.URL +
|
||||
'#Warning:InternalVersionMismatch" target="_blank">',
|
||||
"</a>",
|
||||
],
|
||||
});
|
||||
@@ -222,7 +225,7 @@ var status = baseclass.extend({
|
||||
var statusTitle = E(
|
||||
"label",
|
||||
{ class: "cbi-value-title" },
|
||||
_("Service Status")
|
||||
_("Service Status"),
|
||||
);
|
||||
if (reply.status.version) {
|
||||
text = _("Version %s").format(reply.status.version) + " - ";
|
||||
@@ -259,27 +262,28 @@ var status = baseclass.extend({
|
||||
var gatewaysTitle = E(
|
||||
"label",
|
||||
{ class: "cbi-value-title" },
|
||||
_("Service Gateways")
|
||||
_("Service Gateways"),
|
||||
);
|
||||
var description =
|
||||
_(
|
||||
"The %s indicates default gateway. See the %sREADME%s for details."
|
||||
"The %s indicates default gateway. See the %sREADME%s for details.",
|
||||
).format(
|
||||
"<strong>✓</strong>",
|
||||
'<a href="' +
|
||||
pkg.URL +
|
||||
'#AWordAboutDefaultRouting" target="_blank">',
|
||||
"</a>"
|
||||
pkg.URL +
|
||||
'#AWordAboutDefaultRouting" target="_blank">',
|
||||
"</a>",
|
||||
) +
|
||||
"<br />" +
|
||||
"<br />" +
|
||||
_("Please %sdonate%s to support development of this project.").format(
|
||||
"<a href='" + pkg.DonateURL + "' target='_blank'>",
|
||||
"</a>"
|
||||
"</a>",
|
||||
);
|
||||
var gatewaysDescr = E(
|
||||
"div",
|
||||
{ class: "cbi-value-description" },
|
||||
description
|
||||
description,
|
||||
);
|
||||
text = pkg.buildGatewayText(reply.ubus.gateways);
|
||||
var gatewaysText = E("div", {}, text);
|
||||
@@ -297,65 +301,68 @@ var status = baseclass.extend({
|
||||
if (reply.ubus.warnings && reply.ubus.warnings.length) {
|
||||
var warningTable = {
|
||||
warningInternalVersionMismatch: _(
|
||||
"Internal version mismatch (package: %s, luci app: %s, luci rpcd: %s), you may need to update packages or reboot the device, please check the %sREADME%s."
|
||||
"Internal version mismatch (package: %s, luci app: %s, luci rpcd: %s), you may need to update packages or reboot the device, please check the %sREADME%s.",
|
||||
),
|
||||
warningResolverNotSupported: _(
|
||||
"Resolver set (%s) is not supported on this system."
|
||||
"Resolver set (%s) is not supported on this system.",
|
||||
).format(L.uci.get(pkg.Name, "config", "resolver_set")),
|
||||
warningAGHVersionTooLow: _(
|
||||
"Installed AdGuardHome (%s) doesn't support 'ipset_file' option."
|
||||
"Installed AdGuardHome (%s) doesn't support 'ipset_file' option.",
|
||||
),
|
||||
warningPolicyProcessCMD: _("%s"),
|
||||
warningTorUnsetParams: _(
|
||||
"Please unset 'src_addr', 'src_port' and 'dest_port' for policy '%s'"
|
||||
"Please unset 'src_addr', 'src_port' and 'dest_port' for policy '%s'",
|
||||
),
|
||||
warningTorUnsetProto: _(
|
||||
"Please unset 'proto' or set 'proto' to 'all' for policy '%s'"
|
||||
"Please unset 'proto' or set 'proto' to 'all' for policy '%s'",
|
||||
),
|
||||
warningTorUnsetChainIpt: _(
|
||||
"Please unset 'chain' or set 'chain' to 'PREROUTING' for policy '%s'"
|
||||
"Please unset 'chain' or set 'chain' to 'PREROUTING' for policy '%s'",
|
||||
),
|
||||
warningTorUnsetChainNft: _(
|
||||
"Please unset 'chain' or set 'chain' to 'prerouting' for policy '%s'"
|
||||
"Please unset 'chain' or set 'chain' to 'prerouting' for policy '%s'",
|
||||
),
|
||||
warningInvalidOVPNConfig: _(
|
||||
"Invalid OpenVPN config for %s interface"
|
||||
"Invalid OpenVPN config for %s interface",
|
||||
),
|
||||
warningOutdatedLuciPackage: _(
|
||||
"The WebUI application (luci-app-pbr) is outdated, please update it"
|
||||
"The WebUI application (luci-app-pbr) is outdated, please update it",
|
||||
),
|
||||
warningOutdatedPrincipalPackage: _(
|
||||
"The principal package (pbr) is outdated, please update it"
|
||||
"The principal package (pbr) is outdated, please update it",
|
||||
),
|
||||
warningBadNftCallsInUserFile: _(
|
||||
"Incompatible nft calls detected in user include file, disabling fw4 nft file support"
|
||||
"Incompatible nft calls detected in user include file, disabling fw4 nft file support",
|
||||
),
|
||||
warningDnsmasqInstanceNoConfdir: _(
|
||||
"Dnsmasq instance (%s) targeted in settings, but it doesn't have its own confdir"
|
||||
"Dnsmasq instance (%s) targeted in settings, but it doesn't have its own confdir",
|
||||
),
|
||||
warningDhcpLanForce: _(
|
||||
_(
|
||||
"Please set 'dhcp.%%s.force=1' to speed up service start-up %s(more info)%s"
|
||||
"Please set 'dhcp.%%s.force=1' to speed up service start-up %s(more info)%s",
|
||||
).format(
|
||||
"<a href='" +
|
||||
pkg.URL +
|
||||
"#Warning:Pleasesetdhcp.lan.force1" +
|
||||
"' target='_blank'>",
|
||||
"</a>"
|
||||
)
|
||||
pkg.URL +
|
||||
"#Warning:Pleasesetdhcp.lan.force1" +
|
||||
"' target='_blank'>",
|
||||
"</a>",
|
||||
),
|
||||
),
|
||||
warningSummary: _("Warnings encountered, please check %s"),
|
||||
warningIncompatibleDHCPOption6: _(
|
||||
"Incompatible DHCP Option 6 for interface %s"
|
||||
"Incompatible DHCP Option 6 for interface %s",
|
||||
),
|
||||
warningNetifdMissingInterfaceLocal: _(
|
||||
"Netifd setup: option netifd_interface_local is missing, assuming '%s'"
|
||||
"Netifd setup: option netifd_interface_local is missing, assuming '%s'",
|
||||
),
|
||||
warningUplinkDown: _(
|
||||
"Uplink/WAN interface is still down, going back to boot mode",
|
||||
),
|
||||
};
|
||||
var warningsTitle = E(
|
||||
"label",
|
||||
{ class: "cbi-value-title" },
|
||||
_("Service Warnings")
|
||||
_("Service Warnings"),
|
||||
);
|
||||
var text = "";
|
||||
reply.ubus.warnings.forEach((element) => {
|
||||
@@ -367,13 +374,13 @@ var status = baseclass.extend({
|
||||
});
|
||||
text += _("Warnings encountered, please check the %sREADME%s").format(
|
||||
'<a href="' + pkg.URL + '#WarningMessagesDetails" target="_blank">',
|
||||
"</a>!<br />"
|
||||
"</a>!<br />",
|
||||
);
|
||||
var warningsText = E("div", { class: "cbi-value-description" }, text);
|
||||
var warningsField = E(
|
||||
"div",
|
||||
{ class: "cbi-value-field" },
|
||||
warningsText
|
||||
warningsText,
|
||||
);
|
||||
warningsDiv = E("div", { class: "cbi-value" }, [
|
||||
warningsTitle,
|
||||
@@ -385,49 +392,52 @@ var status = baseclass.extend({
|
||||
if (reply.ubus.errors && reply.ubus.errors.length) {
|
||||
var errorTable = {
|
||||
errorConfigValidation: _("Config (%s) validation failure").format(
|
||||
"/etc/config/" + pkg.Name
|
||||
"/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"
|
||||
"Resolver set support (%s) requires ipset, but ipset binary cannot be found",
|
||||
).format(L.uci.get(pkg.Name, "config", "resolver_set")),
|
||||
errorNoNft: _(
|
||||
"Resolver set support (%s) requires nftables, but nft binary cannot be found"
|
||||
"Resolver set support (%s) requires nftables, but nft binary cannot be found",
|
||||
).format(L.uci.get(pkg.Name, "config", "resolver_set")),
|
||||
errorResolverNotSupported: _(
|
||||
"Resolver set (%s) is not supported on this system"
|
||||
"Resolver set (%s) is not supported on this system",
|
||||
).format(L.uci.get(pkg.Name, "config", "resolver_set")),
|
||||
errorServiceDisabled: _(
|
||||
"The %s service is currently disabled"
|
||||
"The %s service is currently disabled",
|
||||
).format(pkg.Name),
|
||||
errorNoWanGateway: _(
|
||||
"The %s service failed to discover WAN gateway"
|
||||
errorNoUplinkGateway: _(
|
||||
"The %s service failed to discover uplink gateway",
|
||||
).format(pkg.Name),
|
||||
errorNoUplinkInterface: _(
|
||||
"The %s interface not found, you need to set the 'pbr.config.uplink_interface' option"
|
||||
"The %s interface not found, you need to set the 'pbr.config.uplink_interface' option",
|
||||
),
|
||||
errorNoUplinkInterfaceHint: _(
|
||||
"Refer to https://docs.openwrt.melmac.ca/pbr/#uplink_interface"
|
||||
"Refer to %sREADME%s for details",
|
||||
).format(
|
||||
'<a href="' + pkg.URL + '#uplink_interface" target="_blank">',
|
||||
"</a>!<br />",
|
||||
),
|
||||
errorIpsetNameTooLong: _(
|
||||
"The ipset name '%s' is longer than allowed 31 characters"
|
||||
"The ipset name '%s' is longer than allowed 31 characters",
|
||||
),
|
||||
errorNftsetNameTooLong: _(
|
||||
"The nft set name '%s' is longer than allowed 255 characters"
|
||||
"The nft set name '%s' is longer than allowed 255 characters",
|
||||
),
|
||||
errorUnexpectedExit: _(
|
||||
"Unexpected exit or service termination: '%s'"
|
||||
"Unexpected exit or service termination: '%s'",
|
||||
),
|
||||
errorPolicyNoSrcDest: _(
|
||||
"Policy '%s' has no source/destination parameters"
|
||||
"Policy '%s' has no source/destination parameters",
|
||||
),
|
||||
errorPolicyNoInterface: _("Policy '%s' has no assigned interface"),
|
||||
errorPolicyNoDns: _("Policy '%s' has no assigned DNS"),
|
||||
errorPolicyProcessNoInterfaceDns: _(
|
||||
"Interface '%s' has no assigned DNS"
|
||||
"Interface '%s' has no assigned DNS",
|
||||
),
|
||||
errorPolicyUnknownInterface: _(
|
||||
"Policy '%s' has an unknown interface"
|
||||
"Policy '%s' has an unknown interface",
|
||||
),
|
||||
errorPolicyProcessCMD: _("%s"),
|
||||
errorFailedSetup: _("Failed to set up '%s'"),
|
||||
@@ -436,81 +446,100 @@ var status = baseclass.extend({
|
||||
errorUserFileSyntax: _("Syntax error in custom user file '%s'"),
|
||||
errorUserFileRunning: _("Error running custom user file '%s'"),
|
||||
errorUserFileNoCurl: _(
|
||||
"Use of 'curl' is detected in custom user file '%s', but 'curl' isn't installed"
|
||||
"Use of 'curl' is detected in custom user file '%s', but 'curl' isn't installed",
|
||||
),
|
||||
errorNoGateways: _("Failed to set up any gateway"),
|
||||
errorResolver: _("Resolver '%s'"),
|
||||
errorPolicyProcessNoIpv6: _(
|
||||
"Skipping IPv6 policy '%s' as IPv6 support is disabled"
|
||||
"Skipping IPv6 policy '%s' as IPv6 support is disabled",
|
||||
),
|
||||
errorPolicyProcessUnknownFwmark: _(
|
||||
"Unknown packet mark for interface '%s'"
|
||||
"Unknown packet mark for interface '%s'",
|
||||
),
|
||||
errorPolicyProcessMismatchFamily: _(
|
||||
"Mismatched IP family between in policy '%s'"
|
||||
"Mismatched IP family between in policy '%s'",
|
||||
),
|
||||
errorPolicyProcessUnknownProtocol: _(
|
||||
"Unknown protocol in policy '%s'"
|
||||
"Unknown protocol in policy '%s'",
|
||||
),
|
||||
errorPolicyProcessInsertionFailed: _(
|
||||
"Insertion failed for both IPv4 and IPv6 for policy '%s'"
|
||||
"Insertion failed for both IPv4 and IPv6 for policy '%s'",
|
||||
),
|
||||
errorPolicyProcessInsertionFailedIpv4: _(
|
||||
"Insertion failed for IPv4 for policy '%s'"
|
||||
"Insertion failed for IPv4 for policy '%s'",
|
||||
),
|
||||
errorPolicyProcessUnknownEntry: _("Unknown entry in policy '%s'"),
|
||||
errorInterfaceRoutingEmptyValues: _(
|
||||
"Received empty tid/mark or interface name when setting up routing"
|
||||
"Received empty tid/mark or interface name when setting up routing",
|
||||
),
|
||||
errorInterfaceMarkOverflow: _(
|
||||
"Interface mark for '%s' exceeds the fwmask value",
|
||||
),
|
||||
errorFailedToResolve: _("Failed to resolve '%s'"),
|
||||
errorInvalidOVPNConfig: _(
|
||||
"Invalid OpenVPN config for '%s' interface"
|
||||
"Invalid OpenVPN config for '%s' interface",
|
||||
),
|
||||
errorNftFileInstall: _("Failed to install fw4 nft file '%s'"),
|
||||
errorNftMainFileInstall: _("Failed to install fw4 nft file '%s'"),
|
||||
errorNoDownloadWithSecureReload: _(
|
||||
"Policy '%s' refers to URL which can't be downloaded in 'secure_reload' mode"
|
||||
"Policy '%s' refers to URL which can't be downloaded in 'secure_reload' mode",
|
||||
),
|
||||
errorDownloadUrlNoHttps: _(
|
||||
"Failed to download '%s', HTTPS is not supported"
|
||||
"Failed to download '%s', HTTPS is not supported",
|
||||
),
|
||||
errorDownloadUrl: _("Failed to download '%s'"),
|
||||
errorFileSchemaRequiresCurl: _(
|
||||
"The file:// schema requires curl, but it's not detected on this system"
|
||||
),
|
||||
"The '%s' schema requires curl, but it's not detected on this system",
|
||||
).format("file://"),
|
||||
errorTryFailed: _("Command failed: '%s'"),
|
||||
errorIncompatibleUserFile: _(
|
||||
"Incompatible custom user file detected '%s'"
|
||||
"Incompatible custom user file detected '%s'",
|
||||
),
|
||||
errorDefaultFw4TableMissing: _("Default fw4 table '%s' is missing"),
|
||||
errorDefaultFw4ChainMissing: _("Default fw4 chain '%s' is missing"),
|
||||
errorRequiredBinaryMissing: _("Required binary '%s' is missing"),
|
||||
errorInterfaceRoutingUnknownDevType: _(
|
||||
"Unknown IPv6 Link type for device '%s'"
|
||||
"Unknown IPv6 Link type for device '%s'",
|
||||
),
|
||||
errorMktempFileCreate: _(
|
||||
"Failed to create temporary file with mktemp mask: '%s'"
|
||||
"Failed to create temporary file with mktemp mask: '%s'",
|
||||
),
|
||||
errorSummary: _("Errors encountered, please check %s"),
|
||||
errorNetifdNftFileInstall: _(
|
||||
"Netifd setup: failed to install fw4 netifd nft file '%s'"
|
||||
errorNftNetifdFileInstall: _(
|
||||
"Netifd setup: failed to install fw4 netifd nft file '%s'",
|
||||
),
|
||||
errorNetifdNftFileRemove: _(
|
||||
"Netifd setup: failed to remove fw4 netifd nft file '%s'"
|
||||
errorNftNetifdFileDelete: _(
|
||||
"Netifd setup: failed to delete fw4 netifd nft file '%s'",
|
||||
),
|
||||
errorNetifdMissingOption: _(
|
||||
"Netifd setup: required option '%s' is missing"
|
||||
"Netifd setup: required option '%s' is missing",
|
||||
),
|
||||
errorNetifdInvalidGateway4: _(
|
||||
"Netifd setup: invalid value of netifd_interface_default option '%s'"
|
||||
"Netifd setup: invalid value of netifd_interface_default option '%s'",
|
||||
),
|
||||
errorNetifdInvalidGateway6: _(
|
||||
"Netifd setup: invalid value of netifd_interface_default6 option '%s'"
|
||||
"Netifd setup: invalid value of netifd_interface_default6 option '%s'",
|
||||
),
|
||||
errorUplinkDown: _(
|
||||
"Uplink/WAN interface is still down, increase value of 'procd_boot_trigger_delay' option",
|
||||
),
|
||||
errorUnexpectedExit: _(
|
||||
"Unexpected exit or service termination: '%s'",
|
||||
),
|
||||
errorNoDownloadWithSecureReload: _(
|
||||
"Policy '%s' refers to URL which can't be downloaded in 'secure_reload' mode",
|
||||
),
|
||||
errorIncompatibleUserFile: _(
|
||||
"Incompatible custom user file detected '%s'",
|
||||
),
|
||||
errorTryFailed: _("Command failed: '%s'"),
|
||||
errorMktempFileCreate: _(
|
||||
"Failed to create temporary file with mktemp mask: '%s'",
|
||||
),
|
||||
};
|
||||
var errorsTitle = E(
|
||||
"label",
|
||||
{ class: "cbi-value-title" },
|
||||
_("Service Errors")
|
||||
_("Service Errors"),
|
||||
);
|
||||
var text = "";
|
||||
reply.ubus.errors.forEach((element) => {
|
||||
@@ -522,7 +551,7 @@ var status = baseclass.extend({
|
||||
});
|
||||
text += _("Errors encountered, please check the %sREADME%s").format(
|
||||
'<a href="' + pkg.URL + '#ErrorMessagesDetails" target="_blank">',
|
||||
"</a>!<br />"
|
||||
"</a>!<br />",
|
||||
);
|
||||
var errorsText = E("div", { class: "cbi-value-description" }, text);
|
||||
var errorsField = E("div", { class: "cbi-value-field" }, errorsText);
|
||||
@@ -536,7 +565,7 @@ var status = baseclass.extend({
|
||||
var btn_gap_long = E(
|
||||
"span",
|
||||
{},
|
||||
"        "
|
||||
"        ",
|
||||
);
|
||||
|
||||
var btn_start = E(
|
||||
@@ -549,13 +578,13 @@ var status = baseclass.extend({
|
||||
E(
|
||||
"p",
|
||||
{ class: "spinning" },
|
||||
_("Starting %s service").format(pkg.Name)
|
||||
_("Starting %s service").format(pkg.Name),
|
||||
),
|
||||
]);
|
||||
return RPC.setInitAction(pkg.Name, "start");
|
||||
},
|
||||
},
|
||||
_("Start")
|
||||
_("Start"),
|
||||
);
|
||||
|
||||
var btn_action = E(
|
||||
@@ -568,13 +597,13 @@ var status = baseclass.extend({
|
||||
E(
|
||||
"p",
|
||||
{ class: "spinning" },
|
||||
_("Restarting %s service").format(pkg.Name)
|
||||
_("Restarting %s service").format(pkg.Name),
|
||||
),
|
||||
]);
|
||||
return RPC.setInitAction(pkg.Name, "restart");
|
||||
},
|
||||
},
|
||||
_("Restart")
|
||||
_("Restart"),
|
||||
);
|
||||
|
||||
var btn_stop = E(
|
||||
@@ -587,13 +616,13 @@ var status = baseclass.extend({
|
||||
E(
|
||||
"p",
|
||||
{ class: "spinning" },
|
||||
_("Stopping %s service").format(pkg.Name)
|
||||
_("Stopping %s service").format(pkg.Name),
|
||||
),
|
||||
]);
|
||||
return RPC.setInitAction(pkg.Name, "stop");
|
||||
},
|
||||
},
|
||||
_("Stop")
|
||||
_("Stop"),
|
||||
);
|
||||
|
||||
var btn_enable = E(
|
||||
@@ -606,13 +635,13 @@ var status = baseclass.extend({
|
||||
E(
|
||||
"p",
|
||||
{ class: "spinning" },
|
||||
_("Enabling %s service").format(pkg.Name)
|
||||
_("Enabling %s service").format(pkg.Name),
|
||||
),
|
||||
]);
|
||||
return RPC.setInitAction(pkg.Name, "enable");
|
||||
},
|
||||
},
|
||||
_("Enable")
|
||||
_("Enable"),
|
||||
);
|
||||
|
||||
var btn_disable = E(
|
||||
@@ -625,13 +654,13 @@ var status = baseclass.extend({
|
||||
E(
|
||||
"p",
|
||||
{ class: "spinning" },
|
||||
_("Disabling %s service").format(pkg.Name)
|
||||
_("Disabling %s service").format(pkg.Name),
|
||||
),
|
||||
]);
|
||||
return RPC.setInitAction(pkg.Name, "disable");
|
||||
},
|
||||
},
|
||||
_("Disable")
|
||||
_("Disable"),
|
||||
);
|
||||
|
||||
if (reply.status.enabled) {
|
||||
@@ -657,7 +686,7 @@ var status = baseclass.extend({
|
||||
var buttonsTitle = E(
|
||||
"label",
|
||||
{ class: "cbi-value-title" },
|
||||
_("Service Control")
|
||||
_("Service Control"),
|
||||
);
|
||||
var buttonsText = E("div", {}, [
|
||||
btn_start,
|
||||
@@ -678,7 +707,7 @@ var status = baseclass.extend({
|
||||
var donateTitle = E(
|
||||
"label",
|
||||
{ class: "cbi-value-title" },
|
||||
_("Donate to the Project")
|
||||
_("Donate to the Project"),
|
||||
);
|
||||
var donateText = E(
|
||||
"div",
|
||||
@@ -688,9 +717,9 @@ var status = baseclass.extend({
|
||||
{ class: "cbi-value-description" },
|
||||
_("Please %sdonate%s to support development of this project.").format(
|
||||
"<a href='" + pkg.DonateURL + "' target='_blank'>",
|
||||
"</a>"
|
||||
)
|
||||
)
|
||||
"</a>",
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
var donateDiv = reply.status.version
|
||||
@@ -725,5 +754,4 @@ return L.Class.extend({
|
||||
getInitStatus: getInitStatus,
|
||||
getInterfaces: getInterfaces,
|
||||
getPlatformSupport: getPlatformSupport,
|
||||
getUbusInfo: getUbusInfo,
|
||||
});
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:308
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:432
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:312
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:442
|
||||
msgid "%s"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:390
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:397
|
||||
msgid "%s binary cannot be found"
|
||||
msgstr ""
|
||||
|
||||
@@ -67,7 +67,8 @@ msgstr ""
|
||||
msgid "Chain"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:480
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:493
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:534
|
||||
msgid "Command failed: '%s'"
|
||||
msgstr ""
|
||||
|
||||
@@ -75,7 +76,7 @@ msgstr ""
|
||||
msgid "Condensed output"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:387
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:394
|
||||
msgid "Config (%s) validation failure"
|
||||
msgstr ""
|
||||
|
||||
@@ -87,7 +88,7 @@ msgstr ""
|
||||
msgid "Custom User File Includes"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:435
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:445
|
||||
msgid "Custom user file '%s' not found or empty"
|
||||
msgstr ""
|
||||
|
||||
@@ -107,15 +108,15 @@ msgstr ""
|
||||
msgid "Default ICMP Interface"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:485
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:498
|
||||
msgid "Default fw4 chain '%s' is missing"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:484
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:497
|
||||
msgid "Default fw4 table '%s' is missing"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:634
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:663
|
||||
msgid "Disable"
|
||||
msgstr ""
|
||||
|
||||
@@ -125,7 +126,7 @@ msgstr ""
|
||||
msgid "Disabled"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:628
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:657
|
||||
msgid "Disabling %s service"
|
||||
msgstr ""
|
||||
|
||||
@@ -133,7 +134,7 @@ msgstr ""
|
||||
msgid "Display these protocols in protocol column in Web UI."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:334
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:338
|
||||
msgid ""
|
||||
"Dnsmasq instance (%s) targeted in settings, but it doesn't have its own "
|
||||
"confdir"
|
||||
@@ -151,11 +152,11 @@ msgstr ""
|
||||
msgid "Do not enforce policies when their gateway is down"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:681
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:710
|
||||
msgid "Donate to the Project"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:615
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:644
|
||||
msgid "Enable"
|
||||
msgstr ""
|
||||
|
||||
@@ -167,19 +168,19 @@ msgstr ""
|
||||
msgid "Enabled"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:609
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:638
|
||||
msgid "Enabling %s service"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:437
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:447
|
||||
msgid "Error running custom user file '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:493
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:506
|
||||
msgid "Errors encountered, please check %s"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:523
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:552
|
||||
msgid "Errors encountered, please check the %sREADME%s"
|
||||
msgstr ""
|
||||
|
||||
@@ -189,35 +190,36 @@ msgid ""
|
||||
"QoS. Change with caution together with"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:491
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:504
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:536
|
||||
msgid "Failed to create temporary file with mktemp mask: '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:476
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:489
|
||||
msgid "Failed to download '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:474
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:487
|
||||
msgid "Failed to download '%s', HTTPS is not supported"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:469
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:482
|
||||
msgid "Failed to install fw4 nft file '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:434
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:444
|
||||
msgid "Failed to reload '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:465
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:478
|
||||
msgid "Failed to resolve '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:433
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:443
|
||||
msgid "Failed to set up '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:441
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:451
|
||||
msgid "Failed to set up any gateway"
|
||||
msgstr ""
|
||||
|
||||
@@ -245,15 +247,16 @@ msgstr ""
|
||||
msgid "Inactive (Disabled)"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:349
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:353
|
||||
msgid "Incompatible DHCP Option 6 for interface %s"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:482
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:495
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:532
|
||||
msgid "Incompatible custom user file detected '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:331
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:335
|
||||
msgid ""
|
||||
"Incompatible nft calls detected in user include file, disabling fw4 nft file "
|
||||
"support"
|
||||
@@ -263,15 +266,15 @@ msgstr ""
|
||||
msgid "Insert"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:459
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:469
|
||||
msgid "Insertion failed for IPv4 for policy '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:456
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:466
|
||||
msgid "Insertion failed for both IPv4 and IPv6 for policy '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:306
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:310
|
||||
msgid "Installed AdGuardHome (%s) doesn't support 'ipset_file' option."
|
||||
msgstr ""
|
||||
|
||||
@@ -279,22 +282,26 @@ msgstr ""
|
||||
msgid "Interface"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:427
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:437
|
||||
msgid "Interface '%s' has no assigned DNS"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:300
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:476
|
||||
msgid "Interface mark for '%s' exceeds the fwmask value"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:304
|
||||
msgid ""
|
||||
"Internal version mismatch (package: %s, luci app: %s, luci rpcd: %s), you "
|
||||
"may need to update packages or reboot the device, please check the "
|
||||
"%sREADME%s."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:322
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:326
|
||||
msgid "Invalid OpenVPN config for %s interface"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:467
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:480
|
||||
msgid "Invalid OpenVPN config for '%s' interface"
|
||||
msgstr ""
|
||||
|
||||
@@ -307,7 +314,7 @@ msgstr ""
|
||||
msgid "Local ports"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:450
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:460
|
||||
msgid "Mismatched IP family between in policy '%s'"
|
||||
msgstr ""
|
||||
|
||||
@@ -335,27 +342,27 @@ msgid ""
|
||||
"check the %sREADME%s."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:495
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:511
|
||||
msgid "Netifd setup: failed to delete fw4 netifd nft file '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:508
|
||||
msgid "Netifd setup: failed to install fw4 netifd nft file '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:498
|
||||
msgid "Netifd setup: failed to remove fw4 netifd nft file '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:504
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:517
|
||||
msgid "Netifd setup: invalid value of netifd_interface_default option '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:507
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:520
|
||||
msgid "Netifd setup: invalid value of netifd_interface_default6 option '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:352
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:356
|
||||
msgid "Netifd setup: option netifd_interface_local is missing, assuming '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:501
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:514
|
||||
msgid "Netifd setup: required option '%s' is missing"
|
||||
msgstr ""
|
||||
|
||||
@@ -363,7 +370,7 @@ msgstr ""
|
||||
msgid "No Change"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:248
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:251
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:58
|
||||
msgid "Not installed or not found"
|
||||
msgstr ""
|
||||
@@ -376,8 +383,8 @@ msgstr ""
|
||||
msgid "Path"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:275
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:689
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:279
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:718
|
||||
msgid "Please %sdonate%s to support development of this project."
|
||||
msgstr ""
|
||||
|
||||
@@ -385,24 +392,24 @@ msgstr ""
|
||||
msgid "Please check the %sREADME%s before changing this option."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:338
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:342
|
||||
msgid ""
|
||||
"Please set 'dhcp.%%s.force=1' to speed up service start-up %s(more info)%s"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:316
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:320
|
||||
msgid "Please unset 'chain' or set 'chain' to 'PREROUTING' for policy '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:319
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:323
|
||||
msgid "Please unset 'chain' or set 'chain' to 'prerouting' for policy '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:313
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:317
|
||||
msgid "Please unset 'proto' or set 'proto' to 'all' for policy '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:310
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:314
|
||||
msgid "Please unset 'src_addr', 'src_port' and 'dest_port' for policy '%s'"
|
||||
msgstr ""
|
||||
|
||||
@@ -410,23 +417,24 @@ msgstr ""
|
||||
msgid "Policies"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:430
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:440
|
||||
msgid "Policy '%s' has an unknown interface"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:425
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:435
|
||||
msgid "Policy '%s' has no assigned DNS"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:424
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:434
|
||||
msgid "Policy '%s' has no assigned interface"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:422
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:432
|
||||
msgid "Policy '%s' has no source/destination parameters"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:471
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:484
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:529
|
||||
msgid ""
|
||||
"Policy '%s' refers to URL which can't be downloaded in 'secure_reload' mode"
|
||||
msgstr ""
|
||||
@@ -439,7 +447,7 @@ msgstr ""
|
||||
msgid "Policy Based Routing - Configuration"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:221
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:224
|
||||
msgid "Policy Based Routing - Status"
|
||||
msgstr ""
|
||||
|
||||
@@ -451,12 +459,12 @@ msgstr ""
|
||||
msgid "Protocol"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:463
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:473
|
||||
msgid "Received empty tid/mark or interface name when setting up routing"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:410
|
||||
msgid "Refer to https://docs.openwrt.melmac.ca/pbr/#uplink_interface"
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:417
|
||||
msgid "Refer to %sREADME%s for details"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:381
|
||||
@@ -475,37 +483,37 @@ msgstr ""
|
||||
msgid "Remote ports"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:486
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:499
|
||||
msgid "Required binary '%s' is missing"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:442
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:452
|
||||
msgid "Resolver '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:398
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:405
|
||||
msgid "Resolver set (%s) is not supported on this system"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:303
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:307
|
||||
msgid "Resolver set (%s) is not supported on this system."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:392
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:399
|
||||
msgid ""
|
||||
"Resolver set support (%s) requires ipset, but ipset binary cannot be found"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:395
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:402
|
||||
msgid ""
|
||||
"Resolver set support (%s) requires nftables, but nft binary cannot be found"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:577
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:606
|
||||
msgid "Restart"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:571
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:600
|
||||
msgid "Restarting %s service"
|
||||
msgstr ""
|
||||
|
||||
@@ -519,7 +527,7 @@ msgid ""
|
||||
"See the %sREADME%s for details."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:230
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:233
|
||||
msgid "Running"
|
||||
msgstr ""
|
||||
|
||||
@@ -531,11 +539,11 @@ msgstr ""
|
||||
msgid "Select Add for -A/add and Insert for -I/Insert."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:660
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:689
|
||||
msgid "Service Control"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:513
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:542
|
||||
msgid "Service Errors"
|
||||
msgstr ""
|
||||
|
||||
@@ -544,15 +552,15 @@ msgstr ""
|
||||
msgid "Service FW Mask"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:262
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:265
|
||||
msgid "Service Gateways"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:225
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:228
|
||||
msgid "Service Status"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:358
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:365
|
||||
msgid "Service Warnings"
|
||||
msgstr ""
|
||||
|
||||
@@ -562,15 +570,15 @@ msgid ""
|
||||
"%sREADME%s for details."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:444
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:454
|
||||
msgid "Skipping IPv6 policy '%s' as IPv6 support is disabled"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:558
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:587
|
||||
msgid "Start"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:552
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:581
|
||||
msgid "Starting %s service"
|
||||
msgstr ""
|
||||
|
||||
@@ -592,19 +600,19 @@ msgstr ""
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:596
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:625
|
||||
msgid "Stop"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:244
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:247
|
||||
msgid "Stopped (Disabled)."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:242
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:245
|
||||
msgid "Stopped."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:590
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:619
|
||||
msgid "Stopping %s service"
|
||||
msgstr ""
|
||||
|
||||
@@ -628,29 +636,29 @@ msgstr ""
|
||||
msgid "Suppress/No output"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:436
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:446
|
||||
msgid "Syntax error in custom user file '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:266
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:269
|
||||
msgid "The %s indicates default gateway. See the %sREADME%s for details."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:407
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:414
|
||||
msgid ""
|
||||
"The %s interface not found, you need to set the "
|
||||
"'pbr.config.uplink_interface' option"
|
||||
"The %s interface not found, you need to set the 'pbr.config."
|
||||
"uplink_interface' option"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/view/pbr/overview.js:96
|
||||
msgid "The %s is not supported on this system."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:404
|
||||
msgid "The %s service failed to discover WAN gateway"
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:411
|
||||
msgid "The %s service failed to discover uplink gateway"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:401
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:408
|
||||
msgid "The %s service is currently disabled"
|
||||
msgstr ""
|
||||
|
||||
@@ -658,39 +666,40 @@ msgstr ""
|
||||
msgid "The %s support is unknown."
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:325
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:491
|
||||
msgid "The '%s' schema requires curl, but it's not detected on this system"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:329
|
||||
msgid "The WebUI application (luci-app-pbr) is outdated, please update it"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:478
|
||||
msgid "The file:// schema requires curl, but it's not detected on this system"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:413
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:423
|
||||
msgid "The ipset name '%s' is longer than allowed 31 characters"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:416
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:426
|
||||
msgid "The nft set name '%s' is longer than allowed 255 characters"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:328
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:332
|
||||
msgid "The principal package (pbr) is outdated, please update it"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:419
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:429
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:526
|
||||
msgid "Unexpected exit or service termination: '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:488
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:501
|
||||
msgid "Unknown IPv6 Link type for device '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:461
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:471
|
||||
msgid "Unknown entry in policy '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:520
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:549
|
||||
msgid "Unknown error"
|
||||
msgstr ""
|
||||
|
||||
@@ -698,15 +707,15 @@ msgstr ""
|
||||
msgid "Unknown message"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:447
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:457
|
||||
msgid "Unknown packet mark for interface '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:453
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:463
|
||||
msgid "Unknown protocol in policy '%s'"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:365
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:372
|
||||
msgid "Unknown warning"
|
||||
msgstr ""
|
||||
|
||||
@@ -718,7 +727,17 @@ msgstr ""
|
||||
msgid "Uplink Interface Table FW Mark"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:439
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:359
|
||||
msgid "Uplink/WAN interface is still down, going back to boot mode"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:523
|
||||
msgid ""
|
||||
"Uplink/WAN interface is still down, increase value of "
|
||||
"'procd_boot_trigger_delay' option"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:449
|
||||
msgid ""
|
||||
"Use of 'curl' is detected in custom user file '%s', but 'curl' isn't "
|
||||
"installed"
|
||||
@@ -736,7 +755,7 @@ msgstr ""
|
||||
msgid "Version"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:228
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:231
|
||||
msgid "Version %s"
|
||||
msgstr ""
|
||||
|
||||
@@ -744,11 +763,11 @@ msgstr ""
|
||||
msgid "WAN Table FW Mark"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:347
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:351
|
||||
msgid "Warnings encountered, please check %s"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:368
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:375
|
||||
msgid "Warnings encountered, please check the %sREADME%s"
|
||||
msgstr ""
|
||||
|
||||
@@ -760,17 +779,17 @@ msgstr ""
|
||||
msgid "all"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:234
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:237
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:44
|
||||
msgid "fw4 nft file mode"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:232
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:235
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:42
|
||||
msgid "iptables mode"
|
||||
msgstr ""
|
||||
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:236
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/pbr/status.js:239
|
||||
#: applications/luci-app-pbr/htdocs/luci-static/resources/view/status/include/72_pbr.js:46
|
||||
msgid "nft mode"
|
||||
msgstr ""
|
||||
|
||||
@@ -8,11 +8,9 @@
|
||||
# ubus -S call luci.pbr getInitList '{"name": "pbr" }'
|
||||
# ubus -S call luci.pbr getInitStatus '{"name": "pbr" }'
|
||||
# ubus -S call luci.pbr getPlatformSupport '{"name": "pbr" }'
|
||||
# ubus -S call luci.pbr getUbusInfo '{"name": "pbr" }'
|
||||
# ubus -S call luci.pbr getGateways '{"name": "pbr" }'
|
||||
# ubus -S call luci.pbr getInterfaces '{"name": "pbr" }'
|
||||
|
||||
readonly rpcdCompat='20'
|
||||
readonly rpcdCompat='24'
|
||||
readonly pbrFunctionsFile="${IPKG_INSTROOT}/etc/init.d/pbr"
|
||||
if [ -s "$pbrFunctionsFile" ]; then
|
||||
# shellcheck source=../../../../../pbr/files/etc/init.d/pbr
|
||||
@@ -57,24 +55,23 @@ get_init_list() {
|
||||
}
|
||||
|
||||
set_init_action() {
|
||||
local name action="$2" cmd
|
||||
name="$(basename "$1")"
|
||||
name="${name:-$packageName}"
|
||||
local action="$2" cmd
|
||||
[ "$(basename "$1")" = "$packageName" ] || { print_json_bool 'result' '0'; return 1; }
|
||||
if [ ! -f "/etc/init.d/$packageName" ]; then
|
||||
print_json_string 'error' 'Init script not found!'
|
||||
return
|
||||
fi
|
||||
case $action in
|
||||
enable)
|
||||
cmd="/etc/init.d/${name} ${action}"
|
||||
cmd="${cmd} && uci_set ${name} config enabled 1 && uci_commit $name"
|
||||
cmd="/etc/init.d/${packageName} ${action}"
|
||||
cmd="${cmd} && uci_set ${packageName} config enabled 1 && uci_commit $packageName"
|
||||
;;
|
||||
disable)
|
||||
cmd="/etc/init.d/${name} ${action}"
|
||||
cmd="${cmd} && uci_set ${name} config enabled 0 && uci_commit $name"
|
||||
cmd="/etc/init.d/${packageName} ${action}"
|
||||
cmd="${cmd} && uci_set ${packageName} config enabled 0 && uci_commit $packageName"
|
||||
;;
|
||||
start|stop|reload|restart)
|
||||
cmd="/etc/init.d/${name} ${action}"
|
||||
cmd="/etc/init.d/${packageName} ${action}"
|
||||
;;
|
||||
esac
|
||||
if [ -n "$cmd" ] && eval "$cmd" 1>/dev/null 2>&1; then
|
||||
@@ -171,35 +168,17 @@ get_platform_support() {
|
||||
json_cleanup
|
||||
}
|
||||
|
||||
# shellcheck disable=SC3037
|
||||
get_gateways() {
|
||||
echo -en "{\"$packageName\":{\"gateways\":"
|
||||
ubus_get_gateways
|
||||
echo -en "}}"
|
||||
}
|
||||
|
||||
get_supported_interfaces() {
|
||||
_build_ifaces_supported() { is_supported_interface "$1" && ! str_contains "$ifacesSupported" "$1" && ifacesSupported="${ifacesSupported}${1} "; }
|
||||
_find_firewall_wan_zone() { [ "$(uci_get 'firewall' "$1" 'name')" = "wan" ] && firewallWanZone="$1"; }
|
||||
_find_firewall_wan_zone() { [ "$(uci_get 'firewall' "$1" 'name')" = 'wan' ] && firewallWanZone="$1"; }
|
||||
local i
|
||||
local firewallWanZone
|
||||
local ifacesSupported
|
||||
local webui_show_ignore_target
|
||||
local ignored_interface supported_interface
|
||||
local wanIface4 wanIface6
|
||||
config_load "$packageName"
|
||||
config_get_bool webui_show_ignore_target 'config' 'webui_show_ignore_target' '0'
|
||||
config_get ignored_interface 'config' 'ignored_interface'
|
||||
config_get supported_interface 'config' 'supported_interface'
|
||||
config_get uplink_interface 'config' 'uplink_interface' 'wan'
|
||||
config_get uplink_interface6 'config' 'uplink_interface6' 'wan6'
|
||||
local i
|
||||
wanIface4="$uplink_interface"
|
||||
wanIface6="$uplink_interface6"
|
||||
load_package_config 'rpcd'
|
||||
config_load 'firewall'
|
||||
config_foreach _find_firewall_wan_zone 'zone'
|
||||
for i in $(uci_get 'firewall' "$firewallWanZone" 'network'); do
|
||||
is_supported_interface "$i" && ! str_contains "$ifacesSupported" "$1" && ifacesSupported="${ifacesSupported}${i} "
|
||||
is_supported_interface "$i" && ! str_contains "$ifacesSupported" "$i" && ifacesSupported="${ifacesSupported}${i} "
|
||||
done
|
||||
config_load 'network'
|
||||
config_foreach _build_ifaces_supported 'interface'
|
||||
@@ -207,7 +186,7 @@ get_supported_interfaces() {
|
||||
for i in $supported_interface; do
|
||||
is_xray "$i" && ifacesSupported="$ifacesSupported $i"
|
||||
done
|
||||
[ "$webui_show_ignore_target" -eq '1' ] && ifacesSupported="$ifacesSupported ignore"
|
||||
[ "${webui_show_ignore_target:-0}" -eq '1' ] && ifacesSupported="$ifacesSupported ignore"
|
||||
json_init
|
||||
json_add_object "$packageName"
|
||||
json_add_array 'interfaces'
|
||||
@@ -220,19 +199,9 @@ get_supported_interfaces() {
|
||||
json_cleanup
|
||||
}
|
||||
|
||||
get_ubus_info() {
|
||||
local name
|
||||
name="$(basename "$1")"
|
||||
name="${name:-$packageName}"
|
||||
ubus call service list '{"name":"'"$name"'"}'
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
list)
|
||||
json_init
|
||||
json_add_object "getGateways"
|
||||
json_add_string 'name' 'name'
|
||||
json_close_object
|
||||
json_add_object "getInitList"
|
||||
json_add_string 'name' 'name'
|
||||
json_close_object
|
||||
@@ -245,9 +214,6 @@ case "$1" in
|
||||
json_add_object "getPlatformSupport"
|
||||
json_add_string 'name' 'name'
|
||||
json_close_object
|
||||
json_add_object "getUbusInfo"
|
||||
json_add_string 'name' 'name'
|
||||
json_close_object
|
||||
json_add_object "setInitAction"
|
||||
json_add_string 'name' 'name'
|
||||
json_add_string 'action' 'action'
|
||||
@@ -257,13 +223,6 @@ case "$1" in
|
||||
;;
|
||||
call)
|
||||
case "$2" in
|
||||
getGateways)
|
||||
read -r input
|
||||
json_load "$input"
|
||||
json_get_var name 'name'
|
||||
json_cleanup
|
||||
get_gateways "$packageName"
|
||||
;;
|
||||
getInitList)
|
||||
read -r input
|
||||
json_load "$input"
|
||||
@@ -292,13 +251,6 @@ case "$1" in
|
||||
json_cleanup
|
||||
get_platform_support "$packageName"
|
||||
;;
|
||||
getUbusInfo)
|
||||
read -r input
|
||||
json_load "$input"
|
||||
json_get_var name 'name'
|
||||
json_cleanup
|
||||
get_ubus_info "$name"
|
||||
;;
|
||||
setInitAction)
|
||||
read -r input
|
||||
json_load "$input"
|
||||
|
||||
@@ -4,12 +4,13 @@
|
||||
"read": {
|
||||
"ubus": {
|
||||
"luci.pbr": [
|
||||
"getGateways",
|
||||
"getInitList",
|
||||
"getInitStatus",
|
||||
"getInterfaces",
|
||||
"getPlatformSupport",
|
||||
"getUbusInfo"
|
||||
"getPlatformSupport"
|
||||
],
|
||||
"service": [
|
||||
"list"
|
||||
]
|
||||
},
|
||||
"file": {
|
||||
|
||||
Reference in New Issue
Block a user