mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-06 21:50:05 +00:00
add GRPCHost config
This commit is contained in:
@@ -155,7 +155,7 @@ function addOrEditNotification(notification) {
|
||||
);
|
||||
}
|
||||
|
||||
function addOrEditServer(server) {
|
||||
function addOrEditServer(server, conf) {
|
||||
const modal = $(".server.modal");
|
||||
modal.children(".header").text((server ? "修改" : "添加") + "服务器");
|
||||
modal
|
||||
@@ -172,9 +172,14 @@ function addOrEditServer(server) {
|
||||
modal.find("textarea[name=Note]").val(server ? server.Note : null);
|
||||
if (server) {
|
||||
modal.find(".secret.field").attr("style", "");
|
||||
modal.find(".command.field").attr("style", "");
|
||||
modal.find(".command.hostSecret").text(server.Secret);
|
||||
modal.find(".command.GRPCHost").text(conf.GRPCHost);
|
||||
modal.find(".command.GRPCPort").text(conf.GRPCPort);
|
||||
modal.find("input[name=secret]").val(server.Secret);
|
||||
} else {
|
||||
modal.find(".secret.field").attr("style", "display:none");
|
||||
modal.find(".command.field").attr("style", "display:none");
|
||||
modal.find("input[name=secret]").val("");
|
||||
}
|
||||
showFormModal(".server.modal", "#serverForm", "/api/server");
|
||||
|
||||
2
resource/template/component/server.html
vendored
2
resource/template/component/server.html
vendored
@@ -32,7 +32,7 @@
|
||||
Shell(推荐)
|
||||
</div>
|
||||
<div class="ui segment">
|
||||
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh <code class="command host"></code> 5555 <code class="command hostSecret"></code>
|
||||
curl -L https://raw.githubusercontent.com/cloverzrg/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh <code class="command GRPCHost"></code> <code class="command GRPCPort"></code> <code class="command hostSecret"></code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<td style="word-break: break-word;">{{$server.Note}}</td>
|
||||
<td>
|
||||
<div class="ui mini icon buttons">
|
||||
<button class="ui button" onclick="addOrEditServer({{$server.Marshal}})">
|
||||
<button class="ui button" onclick="addOrEditServer({{$server.Marshal}},{{$.Conf}})">
|
||||
<i class="edit icon"></i>
|
||||
</button>
|
||||
<button class="ui button"
|
||||
|
||||
Reference in New Issue
Block a user