mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 16:44:23 +08:00
🌴 Sync 2026-03-05 23:51:42
This commit is contained in:
1 parent
97c049ed0a
commit
0acff03804
14253 files changed
+3893239
No files matched your search
@@ -0,0 +1,13 @@
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
as the name is changed.
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-nginx
|
||||
PKG_VERSION:=20230323
|
||||
PKG_RELEASE:=1
|
||||
PKG_ARCH:=all
|
||||
PKG_MAINTAINER:=Zhang Hua <zhanghuadedn@gmail.com>
|
||||
PKG_LICENSE:=WTFPL
|
||||
|
||||
LUCI_TITLE:=LuCI app for Nginx
|
||||
LUCI_DEPENDS:=+nginx
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
@@ -0,0 +1,22 @@
|
||||
# LuCI interface for Nginx
|
||||
|
||||
Highlights:
|
||||
|
||||
- Compatible with OpenWRT master and latest LuCI
|
||||
- No Lua code, completely written in LuCI's JavaScript API
|
||||
|
||||
Useage:
|
||||
|
||||
Clone the repo:
|
||||
|
||||
Run `git clone https://github.com/zhanghua000/luci-app-nginx /path/to/openwrt/package/openwrt-packages`
|
||||
|
||||
Edit config
|
||||
|
||||
Run `make menuconfig` at `/path/to/openwrt` and go to `LuCI -> Applications -> luci-app-nginx`, set it to `y` or `m`
|
||||
|
||||
Start Building
|
||||
|
||||
Run `make /path/to/openwrt/package/openwrt-packages/luci-app-nginx/compile` and you will find .ipk file(s) at `/path/to/openwrt/bin/packages/$TARGET_ARCH/base` folder
|
||||
|
||||
Tested on [OpenWRT master](https://github.com/openwrt/openwrt) source code.
|
||||
@@ -0,0 +1,90 @@
|
||||
'use strict';
|
||||
'require view';
|
||||
'require fs';
|
||||
'require form';
|
||||
'require dom';
|
||||
|
||||
var enableLog = true;
|
||||
var context = {"locations": []};
|
||||
var confdPath = "/etc/nginx/conf.d/";
|
||||
|
||||
function log(content){
|
||||
if (enableLog){
|
||||
return console.log("luci-app-nginx.location: " + content);
|
||||
};
|
||||
};
|
||||
|
||||
return view.extend({
|
||||
load: async function (){
|
||||
var fileList = await fs.list(confdPath);
|
||||
log("load: fileList is " + JSON.stringify(fileList));
|
||||
for (var i in fileList){
|
||||
if ((fileList[i].type == "file") && fileList[i].name.endsWith(".locations")){
|
||||
var fullPath = confdPath + fileList[i].name;
|
||||
var fileNameWithoutSuffix = fileList[i].name.replace(/.locations$/, "");
|
||||
var content = await fs.read_direct(fullPath);
|
||||
var obj = {
|
||||
".name": fileNameWithoutSuffix,
|
||||
"content": content
|
||||
};
|
||||
context["locations"].push(obj);
|
||||
};
|
||||
};
|
||||
},
|
||||
render: function (loadResult){
|
||||
log("render: context is " + JSON.stringify(context));
|
||||
var formMap = new form.JSONMap(
|
||||
context,
|
||||
_("Location files"),
|
||||
_("All <code>.locations</code> files under <code>/etc/nginx/conf.d</code>")
|
||||
);
|
||||
var filesSection = formMap.section(
|
||||
form.TypedSection, "locations",
|
||||
_("Known location files"),
|
||||
_("We found those <code>.locations</code> files under <code>/etc/nginx/conf.d</code>")
|
||||
);
|
||||
filesSection.addremove = true;
|
||||
|
||||
var filesOption = filesSection.option(
|
||||
form.TextValue, "content"
|
||||
);
|
||||
filesOption.monospace = true;
|
||||
filesOption.rows = 20;
|
||||
filesOption.cols = 70;
|
||||
return formMap.render();
|
||||
},
|
||||
handleSave: async function (ev){
|
||||
var mapNode = document.querySelector(".cbi-map");
|
||||
await dom.callClassMethod(mapNode, "save");
|
||||
log("handleSaveApply: context is " + JSON.stringify(context));
|
||||
var valueNodes = document.querySelectorAll(".cbi-value");
|
||||
var fileNamesWithoutSuffix = [];
|
||||
valueNodes.forEach(
|
||||
async function (valueNode, index, valueNodesList){
|
||||
if (valueNode.parentElement && valueNode.parentElement.getAttribute("data-section-id")){
|
||||
var fileNameWithoutSuffix = valueNode.parentElement.getAttribute("data-section-id");
|
||||
var fileName = confdPath + fileNameWithoutSuffix + ".locations";
|
||||
var content = valueNode.querySelector("textarea").textContent;
|
||||
fileNamesWithoutSuffix.push(fileNameWithoutSuffix);
|
||||
var writeResult = await fs.write(fileName, content);
|
||||
if (writeResult != 0){
|
||||
log("handleSave: failed to write file %s".format(fileName));
|
||||
};
|
||||
}
|
||||
}
|
||||
);
|
||||
context["locations"].forEach(
|
||||
async function (fileNameWithoutSuffix, index, fileNamesWithoutSuffixList){
|
||||
if (!fileNamesWithoutSuffix.includes(fileNameWithoutSuffix[".name"])){
|
||||
var fileName = confdPath + fileNameWithoutSuffix[".name"] + ".locations";
|
||||
var removeResult = await fs.remove(fileName);
|
||||
if (removeResult != 0){
|
||||
log("handleSave: failed to remove file %s".format(fileName));
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
location.reload();
|
||||
},
|
||||
handleSaveApply: null
|
||||
});
|
||||
@@ -0,0 +1,81 @@
|
||||
'use strict';
|
||||
'require view';
|
||||
'require form';
|
||||
|
||||
var enableLog = true;
|
||||
function log(content){
|
||||
if (enableLog){
|
||||
return console.log("luci-app-nginx.servers: " + content);
|
||||
};
|
||||
};
|
||||
function isSSLEnabledInListenList(listenList){
|
||||
for (var i in listenList){
|
||||
if (listenList[i].includes("ssl")){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
return view.extend({
|
||||
render: function (load_result){
|
||||
var formMap = new form.Map(
|
||||
"nginx",
|
||||
_("Nginx Servers"),
|
||||
_("Servers Configuration for Nginx")
|
||||
);
|
||||
var configSection = formMap.section(
|
||||
form.TypedSection, "server",
|
||||
_("All Servers"),
|
||||
_("All of the known Nginx servers.")
|
||||
);
|
||||
configSection.addremove = true;
|
||||
|
||||
var listenOption = configSection.option(
|
||||
form.DynamicList, "listen",
|
||||
_("Listening on:")
|
||||
);
|
||||
var serverNameOption = configSection.option(
|
||||
form.Value, "server_name",
|
||||
_("Server Name:")
|
||||
);
|
||||
serverNameOption.optional = true;
|
||||
|
||||
var uciManageSSLOption = configSection.option(
|
||||
form.Value, "uci_manage_ssl",
|
||||
_("SSL Managed By UCI:"),
|
||||
_("Set to any value other than self-signed to manage it yourself.")
|
||||
);
|
||||
var sslCertificatePathOption = configSection.option(
|
||||
form.Value, "ssl_certificate",
|
||||
_("SSL Certificate:")
|
||||
);
|
||||
var sslCertificateKeyPathOption = configSection.option(
|
||||
form.Value, "ssl_certificate_key",
|
||||
_("SSL Certificate Key:")
|
||||
);
|
||||
var sslSessionCacheOption = configSection.option(
|
||||
form.Value, "ssl_session_cache",
|
||||
_("SSL Session Cache Option:")
|
||||
);
|
||||
sslSessionCacheOption.optional = true;
|
||||
var sslSessionTimeoutOption = configSection.option(
|
||||
form.Value, "ssl_session_timeout",
|
||||
_("SSL Session Timeout:")
|
||||
);
|
||||
sslSessionTimeoutOption.optional = true;
|
||||
|
||||
var returnOption = configSection.option(
|
||||
form.Value, "return",
|
||||
_("Return:")
|
||||
);
|
||||
returnOption.optional = true;
|
||||
var accessLogOption = configSection.option(
|
||||
form.Value, "access_log",
|
||||
_("Access Log:")
|
||||
);
|
||||
accessLogOption.optional = true;
|
||||
|
||||
return formMap.render();
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,205 @@
|
||||
'use strict';
|
||||
'require view';
|
||||
'require poll';
|
||||
'require rpc';
|
||||
'require fs';
|
||||
'require uci';
|
||||
|
||||
var enableLog = true;
|
||||
var pollIntervalSecs = 5;
|
||||
var context = {
|
||||
server: "unknown",
|
||||
httpsRedirectEnabled: false,
|
||||
serversCount: 0,
|
||||
curlInstalled: false
|
||||
};
|
||||
var expectServiceObject = {
|
||||
"nginx": {
|
||||
"instances": {
|
||||
"instance1": {}
|
||||
}
|
||||
}
|
||||
};
|
||||
function log(content){
|
||||
if (enableLog){
|
||||
return console.log("luci-app-nginx.main: " + content);
|
||||
};
|
||||
};
|
||||
function toDict(string, kvSpliter){
|
||||
var dict = {};
|
||||
string.split(/\r?\n|\r/g).forEach(
|
||||
function (line, index, array){
|
||||
if (line.includes(kvSpliter)){
|
||||
var kv = line.split(kvSpliter, 2);
|
||||
dict[kv[0].toLowerCase()] = kv[1];
|
||||
};
|
||||
}
|
||||
);
|
||||
return dict;
|
||||
};
|
||||
function filterServiceFunction(data, args, extraArgs){
|
||||
log("filterFunction: data is " + JSON.stringify(data));
|
||||
log("filterFunction: args is " + JSON.stringify(args));
|
||||
log("filterFunction: extraArgs is " + extraArgs);
|
||||
if (
|
||||
(args.name == "nginx") &&
|
||||
(typeof data?.instances?.instance1?.running == "boolean")
|
||||
){
|
||||
if (data.instances.instance1.running){
|
||||
return "running";
|
||||
}
|
||||
else {
|
||||
return "stopped";
|
||||
};
|
||||
};
|
||||
return "unknown";
|
||||
};
|
||||
var getServiceStatus = rpc.declare({
|
||||
object: "service",
|
||||
method: "list",
|
||||
params: ["name"],
|
||||
expect: expectServiceObject,
|
||||
filter: filterServiceFunction
|
||||
});
|
||||
async function updateStatusContent(){
|
||||
var result = await getServiceStatus("nginx");
|
||||
log("updateStatusContent: trying to update nginx status to " + result);
|
||||
var statusContent = document.getElementById("nginx-status-content");
|
||||
log("updateStatusContent: found div#nginx-status-content: " + statusContent);
|
||||
if (statusContent){
|
||||
switch (result){
|
||||
case "running":
|
||||
statusContent.textContent = _("Running");
|
||||
statusContent.style.color = "green";
|
||||
break;
|
||||
case "stopped":
|
||||
statusContent.textContent = _("Stopped");
|
||||
statusContent.style.color = "red";
|
||||
break;
|
||||
default:
|
||||
statusContent.textContent = _("Unknown");
|
||||
statusContent.style.color = "orange";
|
||||
break;
|
||||
};
|
||||
};
|
||||
};
|
||||
return view.extend({
|
||||
handleSaveApply: null,
|
||||
handleSave: null,
|
||||
handleReset: null,
|
||||
load: async function (){
|
||||
var curlExec = "/usr/bin/curl";
|
||||
var curlStatus = await fs.stat(curlExec);
|
||||
log("curlStatus is " + JSON.stringify(curlStatus));
|
||||
context.curlInstalled = ((curlStatus.type == "file") && (curlStatus.mode == 33261));
|
||||
log("load: context.curlInstalled is " + context.curlInstalled);
|
||||
if (context.curlInstalled){
|
||||
var curlResult = await fs.exec_direct(curlExec, ["-I", "-s", "http://" + location.host]);
|
||||
log("load: curlResult is " + curlResult);
|
||||
var headers = toDict(curlResult, ": ");
|
||||
log("load: headers is " + JSON.stringify(headers));
|
||||
var locationInHeaders = headers["location"];
|
||||
if (locationInHeaders){
|
||||
if (locationInHeaders.startsWith("https://" + location.host)){
|
||||
context.httpsRedirectEnabled = true;
|
||||
};
|
||||
};
|
||||
var serverInHeaders = headers["server"];
|
||||
if (serverInHeaders){
|
||||
context.server = serverInHeaders;
|
||||
};
|
||||
};
|
||||
await uci.load("nginx");
|
||||
context.serversCount = uci.sections("nginx", "server").length;
|
||||
uci.unload();
|
||||
},
|
||||
render: function (loadResults){
|
||||
log("render: loadResults is " + loadResults);
|
||||
|
||||
var statusTitle = E("div", {"id":"nginx-status-title"}, _("Nginx status:"));
|
||||
statusTitle.style.display = "inline-block";
|
||||
var statusContent = E("div", {"id": "nginx-status-content"}, _("Unknown"));
|
||||
statusContent.style.color = "orange";
|
||||
statusContent.style.display = "inline-block";
|
||||
statusContent.style.marginLeft = "10px";
|
||||
var serviceControlLinkTitle = E(
|
||||
"div",
|
||||
{"id": "nginx-service-control"},
|
||||
"%s -> %s".format(_("System"), _("Startup"))
|
||||
);
|
||||
serviceControlLinkTitle.style.display = "inline-block";
|
||||
var serviceControlLink = E(
|
||||
"a",
|
||||
{"href": location.href.replace(location.pathname, "/cgi-bin/luci/admin/system/startup")}
|
||||
);
|
||||
serviceControlLink.appendChild(serviceControlLinkTitle);;
|
||||
serviceControlLink.style.marginLeft = "25px";
|
||||
var statusElement = E("div",{"id": "nginx-status"});
|
||||
statusElement.appendChild(statusTitle);
|
||||
statusElement.appendChild(statusContent);
|
||||
statusElement.appendChild(serviceControlLink);
|
||||
statusElement.style.marginTop = "25px";
|
||||
|
||||
var luciServerTitle = E("div", _("LuCI on Nginx:"));
|
||||
luciServerTitle.style.display = "inline-block";
|
||||
var luciServerStatus;
|
||||
if (context.curlInstalled){
|
||||
luciServerStatus = E("div", _(context.server.startsWith("nginx")?"Yes":"No"));
|
||||
luciServerStatus.style.color = context.server.startsWith("nginx")?"green":"red";
|
||||
} else {
|
||||
luciServerStatus = E("div", _("Install <code>curl</code> for this info."));
|
||||
luciServerStatus.style.color = "orange";
|
||||
};
|
||||
luciServerStatus.style.display = "inline-block";
|
||||
luciServerStatus.style.marginLeft = "10px";
|
||||
var luciServerLinkTitle = E(
|
||||
"div",
|
||||
{"id": "nginx-luci-link"},
|
||||
"%s -> %s -> %s".format(_("Services"), _("Nginx"), _("Servers"))
|
||||
);
|
||||
luciServerLinkTitle.style.display = "inline-block";
|
||||
var luciServerLink = E(
|
||||
"a",
|
||||
{"href": location.href.replace(location.pathname, "/cgi-bin/luci/admin/services/nginx/servers")}
|
||||
)
|
||||
luciServerLink.appendChild(luciServerLinkTitle);
|
||||
luciServerLink.style.marginLeft = "25px";
|
||||
var luciServerElement = E("div", {"id": "nginx-luci-status"});
|
||||
luciServerElement.appendChild(luciServerTitle);
|
||||
luciServerElement.appendChild(luciServerStatus);
|
||||
luciServerElement.appendChild(luciServerLink);
|
||||
luciServerElement.style.marginTop = "25px";
|
||||
|
||||
var httpsRedirectTitle = E("div", _("Https Redirect Enabled:"));
|
||||
httpsRedirectTitle.style.display = "inline-block";
|
||||
var httpsRedirectStatus;
|
||||
if (context.curlInstalled){
|
||||
httpsRedirectStatus = E("div", _(context.httpsRedirectEnabled?"Yes":"No"));
|
||||
httpsRedirectStatus.style.color = context.httpsRedirectEnabled?"green":"red";
|
||||
} else {
|
||||
httpsRedirectStatus = E("div", _("Install <code>curl</code> for this info."));
|
||||
httpsRedirectStatus.style.color = "orange";
|
||||
};
|
||||
httpsRedirectStatus.style.display = "inline-block";
|
||||
httpsRedirectStatus.style.marginLeft = "10px";
|
||||
var httpsRedirectElement = E("div", {"id": "nginx-https-redirect"});
|
||||
httpsRedirectElement.appendChild(httpsRedirectTitle);
|
||||
httpsRedirectElement.appendChild(httpsRedirectStatus);
|
||||
httpsRedirectElement.style.marginTop = "25px";
|
||||
|
||||
var serversCountTitle = E("div", _("Running Servers Count:"));
|
||||
serversCountTitle.style.display = "inline-block";
|
||||
var serversCountStatus = E("div", "%d".format(context.serversCount));
|
||||
serversCountStatus.style.display = "inline-block";
|
||||
serversCountStatus.style.marginLeft = "10px";
|
||||
var serversCountElement = E("div", {"id": "nginx-servers-count"});
|
||||
serversCountElement.appendChild(serversCountTitle);
|
||||
serversCountElement.appendChild(serversCountStatus);
|
||||
serversCountElement.style.marginTop = "25px";
|
||||
|
||||
poll.add(updateStatusContent, pollIntervalSecs);
|
||||
return E([
|
||||
statusElement, luciServerElement, httpsRedirectElement, serversCountElement
|
||||
]);
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,152 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
""
|
||||
|
||||
#: luci-app-nginx/root/usr/share/luci/menu.d/luci-app-nginx.json:16
|
||||
# msgid "Status"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/root/usr/share/luci/menu.d/luci-app-nginx.json:34
|
||||
msgid "Locations"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/locations.js:38
|
||||
msgid "Location files"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/locations.js:39
|
||||
msgid "All <code>.locations</code> files under <code>/etc/nginx/conf.d</code>"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/locations.js:43
|
||||
msgid "Known location files"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/locations.js:44
|
||||
msgid "We found those <code>.locations</code> files under <code>/etc/nginx/conf.d</code>"
|
||||
msgstr ""
|
||||
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:24
|
||||
msgid "Nginx Servers"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:25
|
||||
msgid "Servers Configuration for Nginx"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:29
|
||||
msgid "All Servers"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:30
|
||||
msgid "All of the known Nginx servers."
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:36
|
||||
msgid "Listening on:"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:40
|
||||
msgid "Server Name:"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:46
|
||||
msgid "SSL Managed By UCI:"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:47
|
||||
msgid "Set to any value other than self-signed to manage it yourself."
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:51
|
||||
msgid "SSL Certificate:"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:55
|
||||
msgid "SSL Certificate Key:"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:59
|
||||
msgid "SSL Session Cache Option:"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:64
|
||||
msgid "SSL Session Timeout:"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:70
|
||||
msgid "Return:"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:75
|
||||
msgid "Access Log:"
|
||||
msgstr ""
|
||||
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:72
|
||||
# msgid "Running"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:76
|
||||
# msgid "Stopped"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:80
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:121
|
||||
# msgid "Unknown"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:119
|
||||
msgid "Nginx status:"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:128
|
||||
# msgid "System"
|
||||
# msgid ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:128
|
||||
# msgid "Startup"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:143
|
||||
msgid "LuCI on Nginx:"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:147
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:177
|
||||
# msgid "Yes"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:147
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:177
|
||||
# msgid "No"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:150
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:180
|
||||
msgid "Install <code>curl</code> for this info."
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:158
|
||||
# msgid "Services"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/root/usr/share/luci/menu.d/luci-app-nginx.json:3
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:158
|
||||
msgid "Nginx"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/root/usr/share/luci/menu.d/luci-app-nginx.json:25
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:158
|
||||
msgid "Servers"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:173
|
||||
msgid "Https Redirect Enabled:"
|
||||
msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:190
|
||||
msgid "Running Servers Count:"
|
||||
msgstr ""
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
zh_Hans
|
||||
@@ -0,0 +1,152 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
""
|
||||
|
||||
#: luci-app-nginx/root/usr/share/luci/menu.d/luci-app-nginx.json:16
|
||||
# msgid "Status"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/root/usr/share/luci/menu.d/luci-app-nginx.json:34
|
||||
msgid "Locations"
|
||||
msgstr "路径"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/locations.js:38
|
||||
msgid "Location files"
|
||||
msgstr "路径文件"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/locations.js:39
|
||||
msgid "All <code>.locations</code> files under <code>/etc/nginx/conf.d</code>"
|
||||
msgstr "所有位于 <code>/etc/nginx/conf.d</code> 的 <code>.locations</code> 文件"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/locations.js:43
|
||||
msgid "Known location files"
|
||||
msgstr "已知的路径文件"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/locations.js:44
|
||||
msgid "We found those <code>.locations</code> files under <code>/etc/nginx/conf.d</code>"
|
||||
msgstr "我们在 <code>/etc/nginx/conf.d</code> 下找到了这些 <code>.locations</code> 文件"
|
||||
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:24
|
||||
msgid "Nginx Servers"
|
||||
msgstr "Nginx 服务器"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:25
|
||||
msgid "Servers Configuration for Nginx"
|
||||
msgstr "Nginx 的服务器配置"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:29
|
||||
msgid "All Servers"
|
||||
msgstr "所有服务器"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:30
|
||||
msgid "All of the known Nginx servers."
|
||||
msgstr "所有已知的 Nginx 服务器"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:36
|
||||
msgid "Listening on:"
|
||||
msgstr "监听:"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:40
|
||||
msgid "Server Name:"
|
||||
msgstr "服务器名称:"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:46
|
||||
msgid "SSL Managed By UCI:"
|
||||
msgstr "让 UCI 管理 SSL 证书:"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:47
|
||||
msgid "Set to any value other than self-signed to manage it yourself."
|
||||
msgstr "设置为 self-signed 以外的任意值以自行管理。"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:51
|
||||
msgid "SSL Certificate:"
|
||||
msgstr "SSL 证书:"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:55
|
||||
msgid "SSL Certificate Key:"
|
||||
msgstr "SSL 证书私钥:"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:59
|
||||
msgid "SSL Session Cache Option:"
|
||||
msgstr "SSL 会话缓存选项:"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:64
|
||||
msgid "SSL Session Timeout:"
|
||||
msgstr "SSL 会话超时:"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:70
|
||||
msgid "Return:"
|
||||
msgstr "返回响应:"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/servers.js:75
|
||||
msgid "Access Log:"
|
||||
msgstr "访问日志:"
|
||||
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:72
|
||||
# msgid "Running"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:76
|
||||
# msgid "Stopped"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:80
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:121
|
||||
# msgid "Unknown"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:119
|
||||
msgid "Nginx status:"
|
||||
msgstr "Nginx 状态:"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:128
|
||||
# msgid "System"
|
||||
# msgid ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:128
|
||||
# msgid "Startup"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:143
|
||||
msgid "LuCI on Nginx:"
|
||||
msgstr "LuCI 运行在 Nginx 上:"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:147
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:177
|
||||
# msgid "Yes"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:147
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:177
|
||||
# msgid "No"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:150
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:180
|
||||
msgid "Install <code>curl</code> for this info."
|
||||
msgstr "安装 <code>curl</code> 以获取这个信息。"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:158
|
||||
# msgid "Services"
|
||||
# msgstr ""
|
||||
|
||||
#: luci-app-nginx/root/usr/share/luci/menu.d/luci-app-nginx.json:3
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:158
|
||||
msgid "Nginx"
|
||||
msgstr "Nginx"
|
||||
|
||||
#: luci-app-nginx/root/usr/share/luci/menu.d/luci-app-nginx.json:25
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:158
|
||||
msgid "Servers"
|
||||
msgstr "服务器"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:173
|
||||
msgid "Https Redirect Enabled:"
|
||||
msgstr "已启用 Https 重定向:"
|
||||
|
||||
#: luci-app-nginx/htdocs/luci-static/resources/view/nginx/status.js:190
|
||||
msgid "Running Servers Count:"
|
||||
msgstr "正在运行的服务器数量:"
|
||||
@@ -0,0 +1,170 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: luci-app-nginx\n"
|
||||
"POT-Creation-Date: 2026-01-20 13:56+0800\n"
|
||||
"PO-Revision-Date: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: Victor Tseng <palatis@palatis.pro>\n"
|
||||
"Language: zh_TW\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 3.7\n"
|
||||
"X-Poedit-Basepath: ../..\n"
|
||||
"X-Poedit-SearchPath-0: htdocs\n"
|
||||
"X-Poedit-SearchPath-1: root\n"
|
||||
|
||||
msgid "Locationss"
|
||||
msgstr "位置"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/locations.js:38
|
||||
msgid "Location files"
|
||||
msgstr "位置檔案"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/locations.js:39
|
||||
msgid "All <code>.locations</code> files under <code>/etc/nginx/conf.d</code>"
|
||||
msgstr ""
|
||||
"目錄 <code>/etc/nginx/conf.d</code> 下的所有 <code>.locations</code> 檔案"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/locations.js:43
|
||||
msgid "Known location files"
|
||||
msgstr "已知的位置檔案"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/locations.js:44
|
||||
msgid ""
|
||||
"We found those <code>.locations</code> files under <code>/etc/nginx/conf.d</"
|
||||
"code>"
|
||||
msgstr ""
|
||||
"在 <code>/etc/nginx/conf.d</code> 目錄下找到這些 <code>.locations</code> 檔"
|
||||
"案"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/servers.js:24
|
||||
msgid "Nginx Servers"
|
||||
msgstr "Nginx 伺服器"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/servers.js:25
|
||||
msgid "Servers Configuration for Nginx"
|
||||
msgstr "Nginx 伺服器設定"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/servers.js:29
|
||||
msgid "All Servers"
|
||||
msgstr "所有伺服器"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/servers.js:30
|
||||
msgid "All of the known Nginx servers."
|
||||
msgstr "所有已知的 Nginx 伺服器"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/servers.js:36
|
||||
msgid "Listening on:"
|
||||
msgstr "監聽:"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/servers.js:40
|
||||
msgid "Server Name:"
|
||||
msgstr "伺服器名稱:"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/servers.js:46
|
||||
msgid "SSL Managed By UCI:"
|
||||
msgstr "SSL 由 UCI 管理:"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/servers.js:47
|
||||
msgid "Set to any value other than self-signed to manage it yourself."
|
||||
msgstr "設定成 self-signed 以外的任何選項表示由您自己管理。"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/servers.js:51
|
||||
msgid "SSL Certificate:"
|
||||
msgstr "SSL 憑證:"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/servers.js:55
|
||||
msgid "SSL Certificate Key:"
|
||||
msgstr "SSL 憑證金鑰:"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/servers.js:59
|
||||
msgid "SSL Session Cache Option:"
|
||||
msgstr "SSL 工作階段快取選項:"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/servers.js:64
|
||||
msgid "SSL Session Timeout:"
|
||||
msgstr "SSL 工作階段逾時:"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/servers.js:70
|
||||
msgid "Return:"
|
||||
msgstr "回應:"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/servers.js:75
|
||||
msgid "Access Log:"
|
||||
msgstr "操作日誌:"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:72
|
||||
msgid "Running"
|
||||
msgstr "執行中"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:76
|
||||
msgid "Stopped"
|
||||
msgstr "已停止"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:80
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:121
|
||||
msgid "Unknown"
|
||||
msgstr "未知"
|
||||
|
||||
# msgid "Running"
|
||||
# msgstr ""
|
||||
# msgid "Stopped"
|
||||
# msgstr ""
|
||||
# msgid "Unknown"
|
||||
# msgstr ""
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:119
|
||||
msgid "Nginx status:"
|
||||
msgstr "Nginx 狀態:"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:128
|
||||
msgid "System"
|
||||
msgstr "系統"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:128
|
||||
msgid "Startup"
|
||||
msgstr "正在啟動"
|
||||
|
||||
# msgid "System"
|
||||
# msgid ""
|
||||
# msgid "Startup"
|
||||
# msgstr ""
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:143
|
||||
msgid "LuCI on Nginx:"
|
||||
msgstr "LuCI 上的 Nginx:"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:147
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:177
|
||||
msgid "Yes"
|
||||
msgstr "是"
|
||||
|
||||
# msgid "Yes"
|
||||
# msgstr ""
|
||||
# msgid "No"
|
||||
# msgstr ""
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:150
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:180
|
||||
msgid "Install <code>curl</code> for this info."
|
||||
msgstr "安裝 <code>curl</curl> 取得這項資訊。"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:158
|
||||
msgid "Services"
|
||||
msgstr "服務"
|
||||
|
||||
# msgid "Services"
|
||||
# msgstr ""
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:158
|
||||
msgid "Nginx"
|
||||
msgstr "Nginx"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:158
|
||||
msgid "Servers"
|
||||
msgstr "伺服器"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:173
|
||||
msgid "Https Redirect Enabled:"
|
||||
msgstr "啟用 Https 重新導向:"
|
||||
|
||||
#: htdocs/luci-static/resources/view/nginx/status.js:190
|
||||
msgid "Running Servers Count:"
|
||||
msgstr "執行中伺服器數量:"
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"admin/services/nginx": {
|
||||
"title": "Nginx",
|
||||
"order": 60,
|
||||
"action": {
|
||||
"type": "firstchild",
|
||||
"preferred": "status",
|
||||
"recurse": true
|
||||
},
|
||||
"depends": {
|
||||
"acl": ["luci-app-nginx"]
|
||||
}
|
||||
},
|
||||
|
||||
"admin/services/nginx/status": {
|
||||
"title": "Status",
|
||||
"order": 10,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "nginx/status"
|
||||
}
|
||||
},
|
||||
|
||||
"admin/services/nginx/servers": {
|
||||
"title": "Servers",
|
||||
"order": 20,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "nginx/servers"
|
||||
}
|
||||
},
|
||||
|
||||
"admin/services/nginx/locations": {
|
||||
"title": "Locations",
|
||||
"order": 30,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "nginx/locations"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"luci-app-nginx": {
|
||||
"description": "Grant UCI/init/file access of nginx to luci-app-nginx",
|
||||
"read": {
|
||||
"ubus": {
|
||||
"service": ["list"]
|
||||
},
|
||||
"uci": ["nginx"],
|
||||
"file": {
|
||||
"/etc/nginx/conf.d/*.locations": ["read"],
|
||||
"/usr/bin/curl": ["exec"]
|
||||
}
|
||||
},
|
||||
"write": {
|
||||
"uci": ["nginx"],
|
||||
"file": {
|
||||
"/etc/nginx/conf.d/*.locations": ["write"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user