From 6366e98ce21cbc4c4c34f188a8a07eb33b6cc07c Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Fri, 22 Apr 2022 16:52:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8D=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../@default/servers/accesslogs/@menu.html | 6 - .../servers/accesslogs/@policy_menu.html | 7 - .../servers/accesslogs/createPopup.html | 217 ----------------- .../servers/accesslogs/createPopup.js | 8 - .../@default/servers/accesslogs/index.html | 44 ---- .../@default/servers/accesslogs/index.js | 20 -- .../@default/servers/accesslogs/policy.html | 173 -------------- .../@default/servers/accesslogs/test.html | 19 -- web/views/@default/servers/accesslogs/test.js | 15 -- .../@default/servers/accesslogs/update.html | 223 ------------------ .../@default/servers/accesslogs/update.js | 24 -- 11 files changed, 756 deletions(-) delete mode 100644 web/views/@default/servers/accesslogs/@menu.html delete mode 100644 web/views/@default/servers/accesslogs/@policy_menu.html delete mode 100644 web/views/@default/servers/accesslogs/createPopup.html delete mode 100644 web/views/@default/servers/accesslogs/createPopup.js delete mode 100644 web/views/@default/servers/accesslogs/index.html delete mode 100644 web/views/@default/servers/accesslogs/index.js delete mode 100644 web/views/@default/servers/accesslogs/policy.html delete mode 100644 web/views/@default/servers/accesslogs/test.html delete mode 100644 web/views/@default/servers/accesslogs/test.js delete mode 100644 web/views/@default/servers/accesslogs/update.html delete mode 100644 web/views/@default/servers/accesslogs/update.js diff --git a/web/views/@default/servers/accesslogs/@menu.html b/web/views/@default/servers/accesslogs/@menu.html deleted file mode 100644 index 53299f35..00000000 --- a/web/views/@default/servers/accesslogs/@menu.html +++ /dev/null @@ -1,6 +0,0 @@ - - 策略列表 - [创建策略] - | - - \ No newline at end of file diff --git a/web/views/@default/servers/accesslogs/@policy_menu.html b/web/views/@default/servers/accesslogs/@policy_menu.html deleted file mode 100644 index e86218fd..00000000 --- a/web/views/@default/servers/accesslogs/@policy_menu.html +++ /dev/null @@ -1,7 +0,0 @@ - - 策略列表 - | - "{{policy.name}}"详情 - 测试 - 修改 - \ No newline at end of file diff --git a/web/views/@default/servers/accesslogs/createPopup.html b/web/views/@default/servers/accesslogs/createPopup.html deleted file mode 100644 index d2f0cb98..00000000 --- a/web/views/@default/servers/accesslogs/createPopup.html +++ /dev/null @@ -1,217 +0,0 @@ -{$layout "layout_popup"} - -

创建策略

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
策略名称 * - -
存储类型 * - -
日志文件路径 * - -

- 存储日志的文件路径,文件名中支持变量: - 年:${year} - 月:${month} - 周:${week} - 日:${day} - 时:${hour} - 分:${minute} - 秒:${second} - 年月日:${date},比如/var/log/web-access-${date}.log,此文件会在API节点上写入。 -

-
是否自动创建目录 -
- - -
-

选中后,如果文件目录不存在时可以自动创建。

-
Endpoint * - -

ES HTTP接口地址,类似于192.168.1.100:9200,需要能够被API节点访问。

-
Index * - -

Index名称,支持变量: - 年:${year} - 月:${month} - 周:${week} - 日:${day} - 时:${hour} - 分:${minute} - 秒:${second} - 年月日:${date}

-
Mapping Type * - -

Mapping名称,支持变量: - 年:${year} - 月:${month} - 周:${week} - 日:${day} - 时:${hour} - 分:${minute} - 秒:${second} - 年月日:${date}

-
认证用户名 - -

配置了认证后才需要填写。

-
认证密码 - -

配置了认证后才需要填写。

-
网络协议 * - -
网络地址 * - -

接收日志的网络地址,需要能够被API节点访问。

-
网络协议 - -
网络地址 * - -

IP地址或主机名,不包括端口,需要能够被API节点访问。

-
端口 - -
Socket路径 * - -

需要能够被API节点访问。

-
标签(Tag) - -

选填项。

-
优先级(Priority) - -

选填项。

-
可执行文件 * - -

不带参数的可执行文件地址,此命令可执行文件需要部署在API节点上。

-
参数 - -

执行命令需要的参数

-
工作目录 - -

命令执行所在的工作目录

-
是否公用 - -

选中后表示自动将此策略应用于所有集群,同时只会有一个公用策略。

-
- -
\ No newline at end of file diff --git a/web/views/@default/servers/accesslogs/createPopup.js b/web/views/@default/servers/accesslogs/createPopup.js deleted file mode 100644 index 737c356b..00000000 --- a/web/views/@default/servers/accesslogs/createPopup.js +++ /dev/null @@ -1,8 +0,0 @@ -Tea.context(function () { - this.type = "" - - /** - * syslog - */ - this.syslogProtocol = "none" -}) \ No newline at end of file diff --git a/web/views/@default/servers/accesslogs/index.html b/web/views/@default/servers/accesslogs/index.html deleted file mode 100644 index 4c2dfcbb..00000000 --- a/web/views/@default/servers/accesslogs/index.html +++ /dev/null @@ -1,44 +0,0 @@ -{$layout} -{$template "menu"} - -

暂时还没有访问日志策略。

- - - - - - - - - - - - - - - - - - -
策略名称类型主要参数状态操作
{{policy.name}} -
- 公用 -
-
{{policy.typeName}} - - - Endpoint: {{policy.options.endpoint}} - 文件路径:{{policy.options.path}} - 网络地址:{{policy.options.addr}} - 可执行命令:{{policy.options.command}} - - TCP {{policy.options.serverAddr}} - UDP {{policy.options.serverAddr}} - SOCK {{policy.options.socket}} - - - - - 详情   删除 -
- -
\ No newline at end of file diff --git a/web/views/@default/servers/accesslogs/index.js b/web/views/@default/servers/accesslogs/index.js deleted file mode 100644 index 2964c1e0..00000000 --- a/web/views/@default/servers/accesslogs/index.js +++ /dev/null @@ -1,20 +0,0 @@ -Tea.context(function () { - this.createPolicy = function () { - teaweb.popup(Tea.url(".createPopup", {}), { - height: "24em", - callback: NotifyReloadSuccess("保存成功") - }) - } - - this.deletePolicy = function (policyId) { - teaweb.confirm("确定要删除这个日志策略吗?", function () { - this.$post(".delete") - .params({ - policyId: policyId - }) - .success(function () { - teaweb.successRefresh("保存成功") - }) - }) - } -}) \ No newline at end of file diff --git a/web/views/@default/servers/accesslogs/policy.html b/web/views/@default/servers/accesslogs/policy.html deleted file mode 100644 index 01ad8b2a..00000000 --- a/web/views/@default/servers/accesslogs/policy.html +++ /dev/null @@ -1,173 +0,0 @@ -{$layout} -{$template "policy_menu"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
策略名称 - {{policy.name}} -
状态 - -
存储类型 - {{policy.typeName}} -
日志文件路径 - {{policy.options.path}} -
是否自动创建目录 - Y - N -
Endpoint - {{policy.options.endpoint}} -
Index - {{policy.options.index}} -
Mapping Type - {{policy.options.mappingType}} -
认证用户名 - {{policy.options.username}} - 没有填写。 -
认证密码 - {{policy.options.password}} - 没有填写。 -
网络协议 - {{policy.options.network.toUpperCase()}} -
网络地址 - {{policy.options.addr}} -
网络协议 - [无] - TCP - UDP - Unix Socket -
网络地址 - {{policy.options.serverAddr}} -
端口 - {{policy.options.serverPort}} -
Socket路径 - {{policy.options.socket}} -
标签(Tag) - {{policy.options.tag}} - 没有设置 -
优先级(Priority) - {{syslogPriorityName}} -
可执行命令 - {{policy.options.command}} -
参数 -
- {{arg}} -
- 没有设置参数。 -
工作目录 - {{policy.options.dir}} - 没有设置工作目录。 -
是否公用 - Y - N -
\ No newline at end of file diff --git a/web/views/@default/servers/accesslogs/test.html b/web/views/@default/servers/accesslogs/test.html deleted file mode 100644 index 42d5a272..00000000 --- a/web/views/@default/servers/accesslogs/test.html +++ /dev/null @@ -1,19 +0,0 @@ -{$layout "layout"} -{$template "/code_editor"} -{$template "policy_menu"} - -
- - - - - - -
发送内容 - { - "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36" -} -
- - -
\ No newline at end of file diff --git a/web/views/@default/servers/accesslogs/test.js b/web/views/@default/servers/accesslogs/test.js deleted file mode 100644 index 20a5f642..00000000 --- a/web/views/@default/servers/accesslogs/test.js +++ /dev/null @@ -1,15 +0,0 @@ -Tea.context(function () { - this.isRequesting = false - - this.success = function () { - teaweb.success("发送成功") - } - - this.before = function () { - this.isRequesting = true - } - - this.done = function () { - this.isRequesting = false - } -}) \ No newline at end of file diff --git a/web/views/@default/servers/accesslogs/update.html b/web/views/@default/servers/accesslogs/update.html deleted file mode 100644 index 53dc1394..00000000 --- a/web/views/@default/servers/accesslogs/update.html +++ /dev/null @@ -1,223 +0,0 @@ -{$layout} -{$template "policy_menu"} - -

修改策略

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
策略名称 * - -
存储类型 * - {{policy.typeName}} -
日志文件路径 * - -

- 存储日志的文件路径,文件名中支持变量: - 年:${year} - 月:${month} - 周:${week} - 日:${day} - 时:${hour} - 分:${minute} - 秒:${second} - 年月日:${date},比如/var/log/web-access-${date}.log,此文件会在API节点上写入。 -

-
是否自动创建目录 -
- - -
-

选中后,如果文件目录不存在时可以自动创建。

-
Endpoint * - -

ES HTTP接口地址,类似于192.168.1.100:9200,需要能够被API节点访问。

-
Index * - -

Index名称,支持变量: - 年:${year} - 月:${month} - 周:${week} - 日:${day} - 时:${hour} - 分:${minute} - 秒:${second} - 年月日:${date}

-
Mapping Type * - -

Mapping名称,支持变量: - 年:${year} - 月:${month} - 周:${week} - 日:${day} - 时:${hour} - 分:${minute} - 秒:${second} - 年月日:${date}

-
认证用户名 - -

配置了认证后才需要填写。

-
认证密码 - -

配置了认证后才需要填写。

-
网络协议 * - -
网络地址 * - -

接收日志的网络地址,需要能够被API节点访问。

-
网络协议 - -
网络地址 * - -

IP地址或主机名,不包括端口,需要能够被API节点访问。

-
端口 - -
Socket路径 * - -

需要能够被API节点访问。

-
标签(Tag) - -

选填项。

-
优先级(Priority) - -

选填项。

-
可执行文件 * - -

不带参数的可执行文件地址,此命令可执行文件需要部署在API节点上。

-
参数 - -

执行命令需要的参数

-
工作目录 - -

命令执行所在的工作目录

-
是否公用 - -

选中后表示自动将此策略应用于所有集群,同时只会有一个公用策略。

-
是否启用 - -
- -
\ No newline at end of file diff --git a/web/views/@default/servers/accesslogs/update.js b/web/views/@default/servers/accesslogs/update.js deleted file mode 100644 index ba3b4a69..00000000 --- a/web/views/@default/servers/accesslogs/update.js +++ /dev/null @@ -1,24 +0,0 @@ -Tea.context(function () { - this.success = NotifySuccess("html:保存成功
新的配置将会在1分钟之内生效", ".policy", {policyId: this.policy.id}) - - this.type = this.policy.type - - - /** - * syslog - */ - this.syslogProtocol = this.policy.options.protocol - - /** - * command - */ - if (this.policy.type == "command") { - let args = this.policy.options.args - if (args == null) { - args = "" - } else { - args = args.join(" ") - } - this.policy.options.args = args - } -}) \ No newline at end of file