From d96faa4cf024c57124aa8edfdd167b61ae4f2a08 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Tue, 20 Sep 2022 18:22:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=8D=E5=BF=85=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/admins/recipients/@menu.html | 7 - .../admins/recipients/@recipient_menu.html | 7 - .../admins/recipients/createPopup.html | 103 ---- .../@default/admins/recipients/createPopup.js | 30 -- .../admins/recipients/groups/createPopup.html | 18 - .../admins/recipients/groups/index.html | 28 -- .../admins/recipients/groups/index.js | 33 -- .../admins/recipients/groups/selectPopup.html | 15 - .../admins/recipients/groups/selectPopup.js | 10 - .../admins/recipients/groups/updatePopup.html | 24 - .../@default/admins/recipients/index.html | 51 -- web/views/@default/admins/recipients/index.js | 24 - .../recipients/instances/@instance_menu.html | 7 - .../recipients/instances/createPopup.css | 12 - .../recipients/instances/createPopup.css.map | 1 - .../recipients/instances/createPopup.html | 391 --------------- .../recipients/instances/createPopup.js | 334 ------------- .../recipients/instances/createPopup.less | 14 - .../admins/recipients/instances/index.html | 37 -- .../admins/recipients/instances/index.js | 24 - .../admins/recipients/instances/instance.css | 12 - .../recipients/instances/instance.css.map | 1 - .../admins/recipients/instances/instance.html | 252 ---------- .../admins/recipients/instances/instance.js | 48 -- .../admins/recipients/instances/instance.less | 14 - .../admins/recipients/instances/test.html | 44 -- .../admins/recipients/instances/test.js | 71 --- .../admins/recipients/instances/update.css | 12 - .../recipients/instances/update.css.map | 1 - .../admins/recipients/instances/update.html | 391 --------------- .../admins/recipients/instances/update.js | 460 ------------------ .../admins/recipients/instances/update.less | 14 - .../admins/recipients/logs/index.html | 34 -- .../@default/admins/recipients/recipient.html | 57 --- .../admins/recipients/tasks/index.css | 9 - .../admins/recipients/tasks/index.css.map | 1 - .../admins/recipients/tasks/index.html | 39 -- .../@default/admins/recipients/tasks/index.js | 16 - .../admins/recipients/tasks/index.less | 9 - .../@default/admins/recipients/test.html | 46 -- web/views/@default/admins/recipients/test.js | 71 --- .../@default/admins/recipients/update.html | 111 ----- .../@default/admins/recipients/update.js | 29 -- 43 files changed, 2912 deletions(-) delete mode 100644 web/views/@default/admins/recipients/@menu.html delete mode 100644 web/views/@default/admins/recipients/@recipient_menu.html delete mode 100644 web/views/@default/admins/recipients/createPopup.html delete mode 100644 web/views/@default/admins/recipients/createPopup.js delete mode 100644 web/views/@default/admins/recipients/groups/createPopup.html delete mode 100644 web/views/@default/admins/recipients/groups/index.html delete mode 100644 web/views/@default/admins/recipients/groups/index.js delete mode 100644 web/views/@default/admins/recipients/groups/selectPopup.html delete mode 100644 web/views/@default/admins/recipients/groups/selectPopup.js delete mode 100644 web/views/@default/admins/recipients/groups/updatePopup.html delete mode 100644 web/views/@default/admins/recipients/index.html delete mode 100644 web/views/@default/admins/recipients/index.js delete mode 100644 web/views/@default/admins/recipients/instances/@instance_menu.html delete mode 100644 web/views/@default/admins/recipients/instances/createPopup.css delete mode 100644 web/views/@default/admins/recipients/instances/createPopup.css.map delete mode 100644 web/views/@default/admins/recipients/instances/createPopup.html delete mode 100644 web/views/@default/admins/recipients/instances/createPopup.js delete mode 100644 web/views/@default/admins/recipients/instances/createPopup.less delete mode 100644 web/views/@default/admins/recipients/instances/index.html delete mode 100644 web/views/@default/admins/recipients/instances/index.js delete mode 100644 web/views/@default/admins/recipients/instances/instance.css delete mode 100644 web/views/@default/admins/recipients/instances/instance.css.map delete mode 100644 web/views/@default/admins/recipients/instances/instance.html delete mode 100644 web/views/@default/admins/recipients/instances/instance.js delete mode 100644 web/views/@default/admins/recipients/instances/instance.less delete mode 100644 web/views/@default/admins/recipients/instances/test.html delete mode 100644 web/views/@default/admins/recipients/instances/test.js delete mode 100644 web/views/@default/admins/recipients/instances/update.css delete mode 100644 web/views/@default/admins/recipients/instances/update.css.map delete mode 100644 web/views/@default/admins/recipients/instances/update.html delete mode 100644 web/views/@default/admins/recipients/instances/update.js delete mode 100644 web/views/@default/admins/recipients/instances/update.less delete mode 100644 web/views/@default/admins/recipients/logs/index.html delete mode 100644 web/views/@default/admins/recipients/recipient.html delete mode 100644 web/views/@default/admins/recipients/tasks/index.css delete mode 100644 web/views/@default/admins/recipients/tasks/index.css.map delete mode 100644 web/views/@default/admins/recipients/tasks/index.html delete mode 100644 web/views/@default/admins/recipients/tasks/index.js delete mode 100644 web/views/@default/admins/recipients/tasks/index.less delete mode 100644 web/views/@default/admins/recipients/test.html delete mode 100644 web/views/@default/admins/recipients/test.js delete mode 100644 web/views/@default/admins/recipients/update.html delete mode 100644 web/views/@default/admins/recipients/update.js diff --git a/web/views/@default/admins/recipients/@menu.html b/web/views/@default/admins/recipients/@menu.html deleted file mode 100644 index 14368634..00000000 --- a/web/views/@default/admins/recipients/@menu.html +++ /dev/null @@ -1,7 +0,0 @@ - - 接收人 - 接收人分组 - 媒介 - 发送记录 - 任务队列 - diff --git a/web/views/@default/admins/recipients/@recipient_menu.html b/web/views/@default/admins/recipients/@recipient_menu.html deleted file mode 100644 index 2959d8b8..00000000 --- a/web/views/@default/admins/recipients/@recipient_menu.html +++ /dev/null @@ -1,7 +0,0 @@ - - 所有接收人 - | - "{{recipient.admin.fullname}}  ({{recipient.instance.name}})"详情 - 修改 - 测试 - \ No newline at end of file diff --git a/web/views/@default/admins/recipients/createPopup.html b/web/views/@default/admins/recipients/createPopup.html deleted file mode 100644 index 23c3c4e1..00000000 --- a/web/views/@default/admins/recipients/createPopup.html +++ /dev/null @@ -1,103 +0,0 @@ -{$layout "layout_popup"} -{$template "/code_editor"} - -

创建接收人媒介

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
系统用户 * - -

选择关联的系统用户。

-
媒介 * - -
接收人标识 - -

{{userDescription}}

-
分组 - -

选择当前接收人所属分组。

-
发送时间 -
-
- 开始时间: -
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
-
-
- 结束时间: -
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-

24小时制,即小时从0到23。如果填写了发送时间,系统只会在这个时间段内给当前接收人发送消息。 [清除]

-
备注 - -
- - -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/createPopup.js b/web/views/@default/admins/recipients/createPopup.js deleted file mode 100644 index 212f3935..00000000 --- a/web/views/@default/admins/recipients/createPopup.js +++ /dev/null @@ -1,30 +0,0 @@ -Tea.context(function () { - this.userDescription = "" - - this.changeInstance = function (instance) { - if (instance != null) { - this.userDescription = instance.media.userDescription - } else { - this.userDescription = "" - } - } - - /** - * 发送时间 - */ - this.timeFromHour = "" - this.timeFromMinute = "" - this.timeFromSecond = "" - this.timeToHour = "" - this.timeToMinute = "" - this.timeToSecond = "" - - this.clearTime = function () { - this.timeFromHour = "" - this.timeFromMinute = "" - this.timeFromSecond = "" - this.timeToHour = "" - this.timeToMinute = "" - this.timeToSecond = "" - } -}) \ No newline at end of file diff --git a/web/views/@default/admins/recipients/groups/createPopup.html b/web/views/@default/admins/recipients/groups/createPopup.html deleted file mode 100644 index 9581c402..00000000 --- a/web/views/@default/admins/recipients/groups/createPopup.html +++ /dev/null @@ -1,18 +0,0 @@ -{$layout "layout_popup"} - -

创建分组

- -
- - - - - - - -
分组名称 * - -
- - -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/groups/index.html b/web/views/@default/admins/recipients/groups/index.html deleted file mode 100644 index 09f95c22..00000000 --- a/web/views/@default/admins/recipients/groups/index.html +++ /dev/null @@ -1,28 +0,0 @@ -{$layout} -{$template "../menu"} - - - [创建] - - -

暂时还没有分组。

- - - - - - - - - - - - - - -
分组名称状态操作
{{group.name}} - - - 修改   - 删除 -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/groups/index.js b/web/views/@default/admins/recipients/groups/index.js deleted file mode 100644 index dd415e1f..00000000 --- a/web/views/@default/admins/recipients/groups/index.js +++ /dev/null @@ -1,33 +0,0 @@ -Tea.context(function () { - this.createGroup = function () { - teaweb.popup(Tea.url(".createPopup"), { - callback: function () { - teaweb.success("保存成功", function () { - teaweb.reload() - }) - } - }) - } - - this.updateGroup = function (groupId) { - teaweb.popup(Tea.url(".updatePopup", {groupId: groupId}), { - callback: function () { - teaweb.success("保存成功", function () { - teaweb.reload() - }) - } - }) - } - - this.deleteGroup = function (groupId) { - teaweb.confirm("确定要删除此分组吗?", function () { - this.$post(".delete") - .params({groupId: groupId}) - .success(function () { - teaweb.success("删除成功", function () { - teaweb.reload() - }) - }) - }) - } -}) \ No newline at end of file diff --git a/web/views/@default/admins/recipients/groups/selectPopup.html b/web/views/@default/admins/recipients/groups/selectPopup.html deleted file mode 100644 index 3055e05d..00000000 --- a/web/views/@default/admins/recipients/groups/selectPopup.html +++ /dev/null @@ -1,15 +0,0 @@ -{$layout "layout_popup"} - - -

选择分组

- - - - - -
选择分组 -

暂时没有可以选择的分组。

- -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/groups/selectPopup.js b/web/views/@default/admins/recipients/groups/selectPopup.js deleted file mode 100644 index 9af2a535..00000000 --- a/web/views/@default/admins/recipients/groups/selectPopup.js +++ /dev/null @@ -1,10 +0,0 @@ -Tea.context(function () { - this.selectGroup = function (group) { - NotifyPopup({ - code: 200, - data: { - group: group - } - }) - } -}) \ No newline at end of file diff --git a/web/views/@default/admins/recipients/groups/updatePopup.html b/web/views/@default/admins/recipients/groups/updatePopup.html deleted file mode 100644 index 2388d38f..00000000 --- a/web/views/@default/admins/recipients/groups/updatePopup.html +++ /dev/null @@ -1,24 +0,0 @@ -{$layout "layout_popup"} - -

修改分组

- -
- - - - - - - - - - - -
分组名称 * - -
是否启用 - -
- - -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/index.html b/web/views/@default/admins/recipients/index.html deleted file mode 100644 index 89461d8d..00000000 --- a/web/views/@default/admins/recipients/index.html +++ /dev/null @@ -1,51 +0,0 @@ -{$layout} -{$template "menu"} - - - [创建] - - -

暂时还没有媒介接收人。

- - - - - - - - - - - - - - - - - - - - - - -
系统用户媒介类型接收人标识所属分组备注状态操作
{{recipient.admin.fullname}} ({{recipient.admin.username}}) {{recipient.instance.name}} - {{recipient.user}} - - - -
-
{{group.name}}
-
-
- - -
-
- {{recipient.description}} - - - - - - 详情   - 删除 -
- -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/index.js b/web/views/@default/admins/recipients/index.js deleted file mode 100644 index 2bb90b9a..00000000 --- a/web/views/@default/admins/recipients/index.js +++ /dev/null @@ -1,24 +0,0 @@ -Tea.context(function () { - this.createRecipient = function () { - teaweb.popup(Tea.url(".createPopup"), { - height: "27em", - callback: function () { - teaweb.success("保存成功", function () { - teaweb.reload() - }) - } - }) - } - - this.deleteRecipient = function (recipientId) { - teaweb.confirm("确定要删除此接收媒介吗?", function () { - this.$post(".delete") - .params({recipientId: recipientId}) - .success(function () { - teaweb.success("删除成功", function () { - teaweb.reload() - }) - }) - }) - } -}) \ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/@instance_menu.html b/web/views/@default/admins/recipients/instances/@instance_menu.html deleted file mode 100644 index 5c5a689f..00000000 --- a/web/views/@default/admins/recipients/instances/@instance_menu.html +++ /dev/null @@ -1,7 +0,0 @@ - - 所有媒介 - | - "{{instance.media.name}}"详情 - 修改 - 测试 - \ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/createPopup.css b/web/views/@default/admins/recipients/instances/createPopup.css deleted file mode 100644 index 3dfba7b1..00000000 --- a/web/views/@default/admins/recipients/instances/createPopup.css +++ /dev/null @@ -1,12 +0,0 @@ -.CodeMirror { - border: 1px solid #eee; - height: auto !important; -} -.CodeMirror-vscrollbar { - width: 6px; - border-radius: 3px !important; -} -.CodeMirror-vscrollbar::-webkit-scrollbar-thumb { - border-radius: 2px; -} -/*# sourceMappingURL=createPopup.css.map */ \ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/createPopup.css.map b/web/views/@default/admins/recipients/instances/createPopup.css.map deleted file mode 100644 index 908e7a5b..00000000 --- a/web/views/@default/admins/recipients/instances/createPopup.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["createPopup.less"],"names":[],"mappings":"AACA;EACC,sBAAA;EACA,uBAAA;;AAGD;EACC,UAAA;EACA,6BAAA;;AAGD,sBAAsB;EACrB,kBAAA","file":"createPopup.css"} \ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/createPopup.html b/web/views/@default/admins/recipients/instances/createPopup.html deleted file mode 100644 index 4e1b3138..00000000 --- a/web/views/@default/admins/recipients/instances/createPopup.html +++ /dev/null @@ -1,391 +0,0 @@ -{$layout "layout_popup"} -{$template "/code_editor"} - -

创建媒介

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
媒介名称 * - -
媒介类型 * - -
SMTP * - -

只支持SSL(或TLS)连接,端口通常为:465或587。

-
账号 * - -

邮箱账号,比如 123456@qq.com

-
密码 * - -

账号对应的密码或者授权码(比如QQ邮箱就需要授权码)。

-
发送者Email - -

默认和账号一致

-
URL * - -

可以在URL中使用${MessageUser}${MessageSubject}${MessageBody}来代表接收人标识、标题和内容。

-
请求方法 * - -

将以POST方式发送MessageUserMessageSubjectMessageBody参数,分别代表接收人标识、标题和内容

-
自定义Header -
- {{header.name}}:{{header.value}} - - - - -
- -
-
-
- -
-
:
-
- -
-
- -   取消 -
-
自定义内容 - -
- -
- {{param.name}}:{{param.value}} - - - - -
- -
- -
-
- -
-
:
-
- -
-
- -   取消 -
-
-
- - -

- 内容中可以使用三个变量:${MessageUser}${MessageSubject}${MessageBody}参数,分别代表接收人标识、标题和内容 -

-
-
脚本 * - - - -
- -

如果是Shell脚本,请不要忘记在头部添加 #!脚本解释工具,比如 #!/bin/bash
- 执行此脚本时,在脚本中可以使用${MessageUser}${MessageSubject}${MessageBody}三个环境变量分别代表通知的接收人标识、标题和内容。 -

-
-
- - -

如果是Shell脚本,请不要忘记在头部添加 #!脚本解释工具,比如 #!/bin/bash
- 执行此脚本时,在脚本中可以使用${MessageUser}${MessageSubject}${MessageBody}三个环境变量分别代表通知的接收人标识、标题和内容。 -

-
-
当前工作目录(CWD) - -
环境变量(ENV) -
- - - - {{var1.name}}: {{var1.value}} - - -
-
-
- -
-
- -
-
- -
-
- -
-
-
- -
-
Hook地址 * - -

填入自定义群机器人的Hook地址,获取方法»

-
企业ID * - -
应用AgentId * - -
应用Secret * - -
内容文本格式 - -

企业微信目前只支持少数的Markdown语法,点击这里了解»

-
WebHook地址 * - -

填入自定义群机器人的WebHook地址

-
内容文本格式 - -

企业微信目前只支持少数的Markdown语法,点击这里了解»

-
签名名称 * - -

已经审核通过的短信签名名称

-
模板CODE * - -

已经审核通过的模板CODE

-
模板变量 * -
- - - - {{var1.name}}: {{var1.value}} - - -
-
-
- -
-
- -
-
- -
-
- -
-
-
- -
-

模板中使用的变量,在变量中可以使用${MessageUser}${MessageSubject}${MessageBody}来代表接收人标识、标题和内容。

-
AccessKey ID * - -

在阿里云控制台中的访问控制中某个用户的AccessKey ID

-
AccessKey Secret * - -

在阿里云控制台中的访问控制中某个用户的AccessKey Secret,和上面的AccessKey ID匹配

-
机器人Token - -

在创建机器人的时候可以获得,类似于 123456:AAAA-AAAAAAAAAAAAAAAAAAAA

-
发送频率(次/分钟) -
-
-
- - -
-
-
/
-
-
- - 分钟 -
-
-
-

用来限制此媒介的发送频率,防止短时间内消息数量过载。

-
忽略相似消息周期 -
- - -
-

可以在这个时间内忽略相似消息,防止短时间内消息数量过载。默认60秒。

-
备注 - -
- - -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/createPopup.js b/web/views/@default/admins/recipients/instances/createPopup.js deleted file mode 100644 index a3933228..00000000 --- a/web/views/@default/admins/recipients/instances/createPopup.js +++ /dev/null @@ -1,334 +0,0 @@ -Tea.context(function () { - this.mediaType = "" - this.advancedOptionsVisible = true - - let that = this - this.changeMediaType = function (media) { - that.mediaType = media.type - } - - /** - * 邮箱 - */ - this.emailUsername = ""; - this.emailUsernameHelp = ""; - - this.changeEmailUsername = function () { - this.emailUsernameHelp = ""; - if (this.emailUsername.indexOf("qq.com") > 0) { - this.emailUsernameHelp = ",QQ邮箱相关设置帮助"; - } else if (this.emailUsername.indexOf("163.com") > 0) { - this.emailUsernameHelp = ",网易邮箱相关设置帮助"; - } - }; - - /** - * webHook - */ - this.methods = ["GET", "POST"] - this.webHookMethod = "GET"; - - this.webHookHeadersAdding = false; - this.webHookHeaders = []; - this.webHookHeadersAddingName = ""; - this.webHookHeadersAddingValue = ""; - - this.addWebHookHeader = function () { - this.webHookHeadersAdding = true; - this.$delay(function () { - this.$find("form input[name='webHookHeaderName']").focus(); - }); - }; - - this.cancelWebHookHeadersAdding = function () { - this.webHookHeadersAdding = false; - }; - - this.confirmWebHookHeadersAdding = function () { - this.webHookHeaders.push({ - "name": this.webHookHeadersAddingName, - "value": this.webHookHeadersAddingValue - }); - this.webHookHeadersAddingName = ""; - this.webHookHeadersAddingValue = ""; - this.webHookHeadersAdding = false; - }; - - this.removeWebHookHeader = function (index) { - if (!window.confirm("确定要删除此Header吗?")) { - return; - } - this.webHookHeaders.$remove(index); - }; - - this.webHookContentType = "params"; - - this.selectWebHookContentType = function (contentType) { - this.webHookContentType = contentType; - this.$delay(function () { - if (contentType == "params") { - - } else if (contentType == "body") { - this.$find("form textarea[name='webHookBody']").focus(); - } - }); - }; - - this.webHookParamsAdding = false; - this.webHookParams = []; - this.webHookParamsAddingName = ""; - this.webHookParamsAddingValue = ""; - - this.addWebHookParam = function () { - this.webHookParamsAdding = true; - this.$delay(function () { - this.$find("form input[name='webHookParamName']").focus(); - }); - }; - - this.cancelWebHookParamsAdding = function () { - this.webHookParamsAdding = false; - }; - - this.confirmWebHookParamsAdding = function () { - this.webHookParams.push({ - "name": this.webHookParamsAddingName, - "value": this.webHookParamsAddingValue - }); - this.webHookParamsAddingName = ""; - this.webHookParamsAddingValue = ""; - this.webHookParamsAdding = false; - }; - - this.removeWebHookParam = function (index) { - if (!window.confirm("确定要删除此参数吗?")) { - return; - } - this.webHookParams.$remove(index); - }; - - this.webHookBody = ""; - - /** - * 企业微信 - */ - this.qyWeixinTextFormat = "text"; - - /** - * 企业微信群机器人 - */ - this.qyWeixinRobotTextFormat = "text"; - - /** - * 脚本 - */ - let scriptEditor = null - this.scriptTab = "path"; - this.scriptLang = "shell"; - this.scriptLangs = [ - { - "name": "Shell", - "code": "shell" - }, - { - "name": "批处理(bat)", - "code": "bat" - }, - { - "name": "PHP", - "code": "php" - }, - { - "name": "Python", - "code": "python" - }, - { - "name": "Ruby", - "code": "ruby" - }, - { - "name": "NodeJS", - "code": "nodejs" - } - ]; - - this.selectScriptTab = function (tab) { - this.scriptTab = tab; - - if (tab == "path") { - this.$delay(function () { - this.$find("form input[name='scriptPath']").focus(); - }); - } else if (tab == "code") { - this.$delay(function () { - this.loadEditor(); - }); - } - }; - - this.selectScriptLang = function (lang) { - this.scriptLang = lang; - switch (lang) { - case "shell": - scriptEditor.setValue("#!/usr/bin/env bash\n\n# your commands here\n"); - var info = CodeMirror.findModeByMIME("text/x-sh"); - if (info != null) { - scriptEditor.setOption("mode", info.mode); - CodeMirror.modeURL = "/codemirror/mode/%N/%N.js"; - CodeMirror.autoLoadMode(scriptEditor, info.mode); - } - break; - case "bat": - scriptEditor.setValue(""); - break; - case "php": - scriptEditor.setValue("#!/usr/bin/env php\n\n - [创建] - - -

暂时还没有媒介接收人。

- - - - - - - - - - - - - - - - - - -
媒介名称媒介类型备注状态操作
{{instance.name}}{{instance.media.name}} - {{instance.description}} - - - - - - 详情   - 删除 -
- -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/index.js b/web/views/@default/admins/recipients/instances/index.js deleted file mode 100644 index 8068dcfb..00000000 --- a/web/views/@default/admins/recipients/instances/index.js +++ /dev/null @@ -1,24 +0,0 @@ -Tea.context(function () { - this.createInstance = function () { - teaweb.popup(Tea.url(".createPopup"), { - height: "30em", - callback: function () { - teaweb.success("保存成功", function () { - teaweb.reload() - }) - } - }) - } - - this.deleteInstance = function (instanceId) { - teaweb.confirm("确定要删除此接收媒介吗?", function () { - this.$post(".delete") - .params({instanceId: instanceId}) - .success(function () { - teaweb.success("删除成功", function () { - teaweb.reload() - }) - }) - }) - } -}) \ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/instance.css b/web/views/@default/admins/recipients/instances/instance.css deleted file mode 100644 index 2503f673..00000000 --- a/web/views/@default/admins/recipients/instances/instance.css +++ /dev/null @@ -1,12 +0,0 @@ -.CodeMirror { - border: 1px solid #eee; - height: auto!important; -} -.CodeMirror-vscrollbar { - width: 6px; - border-radius: 3px!important; -} -.CodeMirror-vscrollbar::-webkit-scrollbar-thumb { - border-radius: 2px; -} -/*# sourceMappingURL=instance.css.map */ \ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/instance.css.map b/web/views/@default/admins/recipients/instances/instance.css.map deleted file mode 100644 index f0f5b145..00000000 --- a/web/views/@default/admins/recipients/instances/instance.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["instance.less"],"names":[],"mappings":"AACA;EACC,sBAAA;EACA,sBAAA;;AAGD;EACC,UAAA;EACA,4BAAA;;AAGD,sBAAsB;EACrB,kBAAA","file":"instance.css"} \ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/instance.html b/web/views/@default/admins/recipients/instances/instance.html deleted file mode 100644 index 72116c6c..00000000 --- a/web/views/@default/admins/recipients/instances/instance.html +++ /dev/null @@ -1,252 +0,0 @@ -{$layout} -{$template "instance_menu"} -{$template "/code_editor"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
媒介名称{{instance.name}}
状态 - -
媒介类型 - {{instance.media.name}} -
SMTP - {{instance.params.smtp}} -
账号 - {{instance.params.username}} -
密码 - {{instance.params.password}} -
发送者Email - {{instance.params.from}} - 没有设置 -
URL - {{instance.params.url}} -
请求方法 - {{instance.params.method}} -
自定义Header - 还没有自定义Header -
- {{header.name}}:{{header.value}} -
-
- 自定义参数 - 自定义内容 - -
- 还没有自定义参数 -
- {{param.name}}:{{param.value}} -
-
-
- {{instance.params.body}} -
-
脚本 - {{instance.params.path}} -
-
当前工作目录(CWD) - {{instance.params.cwd}} - 没有设置 -
环境变量(ENV) - 没有设置 -
- - {{var1.name}}: {{var1.value}} - -
-
Hook地址{{instance.params.webHookURL}}
企业ID - {{instance.params.corporateId}} -
应用AgentId - {{instance.params.agentId}} -
应用Secret - {{instance.params.appSecret}} -
内容文本格式 - text - {{instance.params.textFormat}} -
WebHook地址{{instance.params.webHookURL}}
内容文本格式 - text - {{instance.params.textFormat}} -
签名名称 - {{instance.params.sign}} -
模板CODE - {{instance.params.templateCode}} -
模板变量 -
- - {{var1.name}}: {{var1.value}} - -
-
AccessKey ID - {{instance.params.accessKeyId}} -
AccessKey Secret - {{instance.params.accessKeySecret}} -
机器人Token{{instance.params.token}}
AccessId{{instance.params.accessId}}
AccessSecret{{instance.params.accessSecret}}
发送频率(次/分钟) - 没有限制 - {{instance.rate.count}}次/{{instance.rate.minutes}}分钟 -
忽略相似消息周期 - {{instance.hashLife}}秒 - 使用默认 - 没有设置 -
备注 - {{instance.description}} - 没有设置 -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/instance.js b/web/views/@default/admins/recipients/instances/instance.js deleted file mode 100644 index 985e1e3e..00000000 --- a/web/views/@default/admins/recipients/instances/instance.js +++ /dev/null @@ -1,48 +0,0 @@ -Tea.context(function () { - let scriptEditor = null - - this.from = encodeURIComponent(window.location.toString()) - - if (this.instance.media.type == "script" && this.instance.params.scriptType == "code") { - this.$delay(function () { - this.loadEditor() - }) - } - - this.loadEditor = function () { - if (scriptEditor == null) { - scriptEditor = CodeMirror(document.getElementById("script-code-editor"), { - theme: "idea", - lineNumbers: false, - value: "", - readOnly: true, - showCursorWhenSelecting: true, - height: "auto", - //scrollbarStyle: null, - viewportMargin: Infinity, - lineWrapping: true, - highlightFormatting: false, - indentUnit: 4, - indentWithTabs: true - }) - } - scriptEditor.setValue(this.instance.params.script) - - let lang = "shell" - if (this.instance.params.scriptLang != null && this.instance.params.scriptLang.length > 0) { - lang = this.instance.params.scriptLang - } - let mimeType = "text/x-" + lang - if (lang == "nodejs") { - mimeType = "text/javascript" - } else if (lang == "shell") { - mimeType = "text/x-sh" - } - let info = CodeMirror.findModeByMIME(mimeType) - if (info != null) { - scriptEditor.setOption("mode", info.mode) - CodeMirror.modeURL = "/codemirror/mode/%N/%N.js" - CodeMirror.autoLoadMode(scriptEditor, info.mode) - } - } -}) \ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/instance.less b/web/views/@default/admins/recipients/instances/instance.less deleted file mode 100644 index 5163796e..00000000 --- a/web/views/@default/admins/recipients/instances/instance.less +++ /dev/null @@ -1,14 +0,0 @@ -// codemirror -.CodeMirror { - border: 1px solid #eee; - height: auto!important; -} - -.CodeMirror-vscrollbar { - width: 6px; - border-radius: 3px!important; -} - -.CodeMirror-vscrollbar::-webkit-scrollbar-thumb { - border-radius: 2px; -} diff --git a/web/views/@default/admins/recipients/instances/test.html b/web/views/@default/admins/recipients/instances/test.html deleted file mode 100644 index 7774cde3..00000000 --- a/web/views/@default/admins/recipients/instances/test.html +++ /dev/null @@ -1,44 +0,0 @@ -{$layout} -{$template "instance_menu"} - -
- - - - - - - - - - - - - - - - - - - -
媒介名称{{instance.media.name}}
通知标题 - -
通知内容 - -
接收人标识 - -

-
-
-
成功返回结果: -
{{line}}
-
-
错误信息: -
{{line}}
-
- 成功执行,没有返回结果 -
- - - 提交测试中,请耐心等待... -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/test.js b/web/views/@default/admins/recipients/instances/test.js deleted file mode 100644 index 0f5474ed..00000000 --- a/web/views/@default/admins/recipients/instances/test.js +++ /dev/null @@ -1,71 +0,0 @@ -Tea.context(function () { - this.isRunning = false - this.isFinished = false - this.response = "" - this.error = "" - - this.submitBefore = function () { - this.isRunning = true - this.isFinished = false - this.response = "" - this.error = "" - } - - this.submitSuccess = function (resp) { - this.reloadStatus(resp.data.taskId) - } - - this.submitFail = function (resp) { - this.isRunning = false - this.isFinished = true - this.response = "" - this.error = resp.errors[0].messages[0] - this.errorLines = [] - } - - this.submitError = function () { - this.isRunning = false - this.isFinished = true - this.response = "" - this.errorLines = [] - this.error = "请求超时" - } - - // 更新状态 - this.reloadStatus = function (taskId) { - let isDone = false - this.$post("/admins/recipients/tasks/taskInfo") - .params({ - taskId: taskId - }) - .success(function (resp) { - if (resp.data.status == 2 || resp.data.status == 3) { - isDone = true - this.updateStatus(resp.data.result) - } - }) - .done(function () { - this.$delay(function () { - if (isDone) { - return - } - this.reloadStatus(taskId) - }, 3000) - }) - } - - this.updateStatus = function (result) { - this.isRunning = false - this.isFinished = true - this.response = result.response - this.responseLines = [] - if (this.response != null) { - this.responseLines = this.response.split("\n") - } - this.error = result.error - this.errorLines = [] - if (this.error.length > 0) { - this.errorLines = this.error.split("\n") - } - } -}) \ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/update.css b/web/views/@default/admins/recipients/instances/update.css deleted file mode 100644 index 22854e72..00000000 --- a/web/views/@default/admins/recipients/instances/update.css +++ /dev/null @@ -1,12 +0,0 @@ -.CodeMirror { - border: 1px solid #eee; - height: auto !important; -} -.CodeMirror-vscrollbar { - width: 6px; - border-radius: 3px !important; -} -.CodeMirror-vscrollbar::-webkit-scrollbar-thumb { - border-radius: 2px; -} -/*# sourceMappingURL=update.css.map */ \ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/update.css.map b/web/views/@default/admins/recipients/instances/update.css.map deleted file mode 100644 index 7627bd36..00000000 --- a/web/views/@default/admins/recipients/instances/update.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["update.less"],"names":[],"mappings":"AACA;EACC,sBAAA;EACA,uBAAA;;AAGD;EACC,UAAA;EACA,6BAAA;;AAGD,sBAAsB;EACrB,kBAAA","file":"update.css"} \ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/update.html b/web/views/@default/admins/recipients/instances/update.html deleted file mode 100644 index 625a5b76..00000000 --- a/web/views/@default/admins/recipients/instances/update.html +++ /dev/null @@ -1,391 +0,0 @@ -{$layout} -{$template "instance_menu"} -{$template "/code_editor"} - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
媒介名称 * - -
媒介类型 * - -
SMTP * - -

只支持SSL(或TLS)连接,端口通常为:465或587。

-
账号 * - -

邮箱账号,比如 123456@qq.com

-
密码 * - -

账号对应的密码或者授权码(比如QQ邮箱就需要授权码)。

-
发送者Email - -

默认和账号一致

-
URL * - -

可以在URL中使用${NoticeUser}${NoticeSubject}${NoticeBody}来代表接收人标识、标题和内容。

-
请求方法 * - -

将以POST方式发送NoticeUserNoticeSubjectNoticeBody参数,分别代表接收人标识、标题和内容

-
自定义Header -
- {{header.name}}:{{header.value}} - - - - -
- -
-
-
- -
-
:
-
- -
-
- -   取消 -
-
自定义内容 - -
- -
- {{param.name}}:{{param.value}} - - - - -
- -
- -
-
- -
-
:
-
- -
-
- -   取消 -
-
-
- - -

- 内容中可以使用三个变量:${NoticeUser}${NoticeSubject}${NoticeBody}参数,分别代表接收人标识、标题和内容 -

-
-
脚本 * - - - -
- -

如果是Shell脚本,请不要忘记在头部添加 #!脚本解释工具,比如 #!/bin/bash
- 执行此脚本时,在脚本中可以使用${NoticeUser}${NoticeSubject}${NoticeBody}三个环境变量分别代表通知的接收人标识、标题和内容。 -

-
-
- - -

如果是Shell脚本,请不要忘记在头部添加 #!脚本解释工具,比如 #!/bin/bash
- 执行此脚本时,在脚本中可以使用${NoticeUser}${NoticeSubject}${NoticeBody}三个环境变量分别代表通知的接收人标识、标题和内容。 -

-
-
当前工作目录(CWD) - -
环境变量(ENV) -
- - - - {{var1.name}}: {{var1.value}} - - -
-
-
- -
-
- -
-
- -
-
- -
-
-
- -
-
Hook地址 * - -

填入自定义群机器人的Hook地址,获取方法»

-
企业ID * - -
应用AgentId * - -
应用Secret * - -
内容文本格式 - -

企业微信目前只支持少数的Markdown语法,点击这里了解»

-
WebHook地址 * - -

填入自定义群机器人的WebHook地址

-
内容文本格式 - -

企业微信目前只支持少数的Markdown语法,点击这里了解»

-
签名名称 * - -

已经审核通过的短信签名名称

-
模板CODE * - -

已经审核通过的模板CODE

-
模板变量 * -
- - - - {{var1.name}}: {{var1.value}} - - -
-
-
- -
-
- -
-
- -
-
- -
-
-
- -
-

模板中使用的变量,在变量中可以使用${NoticeUser}${NoticeSubject}${NoticeBody}来代表接收人标识、标题和内容。

-
AccessKey ID * - -

在阿里云控制台中的访问控制中某个用户的AccessKey ID

-
AccessKey Secret * - -

在阿里云控制台中的访问控制中某个用户的AccessKey Secret,和上面的AccessKey ID匹配

-
机器人Token - -

在创建机器人的时候可以获得,类似于 123456:AAAA-AAAAAAAAAAAAAAAAAAAA

-
发送频率(次/分钟) -
-
-
- - -
-
-
/
-
-
- - 分钟 -
-
-
-

用来限制此媒介的发送频率。

-
忽略相似消息周期 -
- - -
-

可以在这个时间内忽略相似消息,防止短时间内消息数量过载。不填或者为0,表示默认为60秒。

-
备注 - -
是否启用 - -
- - -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/update.js b/web/views/@default/admins/recipients/instances/update.js deleted file mode 100644 index 99de582c..00000000 --- a/web/views/@default/admins/recipients/instances/update.js +++ /dev/null @@ -1,460 +0,0 @@ -Tea.context(function () { - let scriptEditor = null - let isLoaded = false; - - this.$delay(function () { - isLoaded = true; - - if (this.instance.media.type == "email") { - this.changeEmailUsername() - } - }) - - this.success = function () { - let that = this - teaweb.success("保存成功", function () { - window.location = "/admins/recipients/instances/instance?instanceId=" + that.instance.id - }) - }; - - /** - * 名称 - */ - this.rateNoticeVisible = false - - this.changeName = function (name) { - if (name.indexOf("短信") > -1 || name.indexOf("钉钉") > -1 || name.indexOf("微信") > -1) { - this.rateNoticeVisible = true - } else { - this.rateNoticeVisible = false - } - }; - this.changeName(this.instance.media.name) - - /** - * 类型 - */ - this.mediaType = this.instance.media.type; - - this.changeMediaType = function (media) { - this.mediaType = media.type - if (!isLoaded) { - return; - } - if (this.mediaType == "email") { - this.$delay(function () { - this.$find("form input[name='emailSmtp']").focus(); - }); - } else if (this.mediaType == "webHook") { - this.$delay(function () { - this.$find("form input[name='webHookURL']").focus(); - }); - } else if (this.mediaType == "script") { - this.$delay(function () { - this.$find("form input[name='scriptPath']").focus(); - }); - } else if (this.mediaType == "dingTalk") { - this.$delay(function () { - this.$find("form textarea[name='dingTalkWebHookURL']").focus(); - }); - } else if (this.mediaType == "qyWeixin") { - this.$delay(function () { - this.$find("form input[name='qyWeixinCorporateId']").focus(); - }); - } else if (this.mediaType == "qyWeixinRobot") { - this.$delay(function () { - this.$find("form textarea[name='qyWeixinRobotWebHookURL']").focus(); - }); - } - }; - this.changeMediaType(this.instance.media); - - /** - * 邮箱 - */ - this.emailUsernameHelp = ""; - - this.changeEmailUsername = function () { - this.emailUsernameHelp = ""; - if (this.instance.params.username.indexOf("qq.com") > 0) { - this.emailUsernameHelp = ",QQ邮箱相关设置帮助"; - } else if (this.instance.params.username.indexOf("163.com") > 0) { - this.emailUsernameHelp = ",网易邮箱相关设置帮助"; - } - }; - - /** - * webHook - */ - this.methods = ["GET", "POST"] - this.webHookMethod = "GET"; - this.webHookHeadersAdding = false; - this.webHookHeaders = []; - this.webHookHeadersAddingName = ""; - this.webHookHeadersAddingValue = ""; - - this.addWebHookHeader = function () { - this.webHookHeadersAdding = true; - this.$delay(function () { - this.$find("form input[name='webHookHeaderName']").focus(); - }); - }; - - this.cancelWebHookHeadersAdding = function () { - this.webHookHeadersAdding = false; - }; - - this.confirmWebHookHeadersAdding = function () { - this.webHookHeaders.push({ - "name": this.webHookHeadersAddingName, - "value": this.webHookHeadersAddingValue - }); - this.webHookHeadersAddingName = ""; - this.webHookHeadersAddingValue = ""; - this.webHookHeadersAdding = false; - }; - - this.removeWebHookHeader = function (index) { - if (!window.confirm("确定要删除此Header吗?")) { - return; - } - this.webHookHeaders.$remove(index); - }; - - this.webHookContentType = "params"; - - this.selectWebHookContentType = function (contentType) { - this.webHookContentType = contentType; - this.$delay(function () { - if (contentType == "params") { - - } else if (contentType == "body") { - this.$find("form textarea[name='webHookBody']").focus(); - } - }); - }; - - this.webHookParamsAdding = false; - this.webHookParams = []; - this.webHookParamsAddingName = ""; - this.webHookParamsAddingValue = ""; - - this.addWebHookParam = function () { - this.webHookParamsAdding = true; - this.$delay(function () { - this.$find("form input[name='webHookParamName']").focus(); - }); - }; - - this.cancelWebHookParamsAdding = function () { - this.webHookParamsAdding = false; - }; - - this.confirmWebHookParamsAdding = function () { - this.webHookParams.push({ - "name": this.webHookParamsAddingName, - "value": this.webHookParamsAddingValue - }); - this.webHookParamsAddingName = ""; - this.webHookParamsAddingValue = ""; - this.webHookParamsAdding = false; - }; - - this.removeWebHookParam = function (index) { - if (!window.confirm("确定要删除此参数吗?")) { - return; - } - this.webHookParams.$remove(index); - }; - - this.webHookBody = ""; - - if (this.instance.media.type == "webHook") { - this.webHookMethod = this.instance.params.method; - if (this.instance.params.headers != null) { - this.webHookHeaders = this.instance.params.headers; - } - - if (this.instance.params.contentType == "params") { - this.webHookContentType = "params"; - if (this.instance.params.params != null) { - this.webHookParams = this.instance.params.params; - } - } - - if (this.instance.params.contentType == "body") { - this.webHookContentType = "body"; - this.webHookBody = this.instance.params.body; - } - } - - /** - * 脚本 - */ - this.scriptTab = "path"; - this.scriptLang = "shell"; - - if (this.instance.media.type == "script") { - if (this.instance.params.scriptType == "path") { - this.scriptTab = "path"; - } else { - this.scriptTab = "code"; - this.scriptLang = this.instance.params.scriptLang; - this.$delay(function () { - this.loadEditor(); - }); - } - } - - this.scriptLangs = [ - { - "name": "Shell", - "code": "shell" - }, - { - "name": "批处理(bat)", - "code": "bat" - }, - { - "name": "PHP", - "code": "php" - }, - { - "name": "Python", - "code": "python" - }, - { - "name": "Ruby", - "code": "ruby" - }, - { - "name": "NodeJS", - "code": "nodejs" - } - ] - - this.selectScriptTab = function (tab) { - this.scriptTab = tab - - if (tab == "path") { - this.$delay(function () { - this.$find("form input[name='scriptPath']").focus() - }) - } else if (tab == "code") { - this.$delay(function () { - this.loadEditor() - }) - } - }; - - this.selectScriptLang = function (lang) { - this.scriptLang = lang; - switch (lang) { - case "shell": - if (this.instance.media.type == "script" && this.instance.params.scriptType == "code" && this.instance.params.scriptLang == "shell") { - scriptEditor.setValue(this.instance.params.script); - } else { - scriptEditor.setValue("#!/usr/bin/env bash\n\n# your commands here\n"); - } - var info = CodeMirror.findModeByMIME("text/x-sh"); - if (info != null) { - scriptEditor.setOption("mode", info.mode); - CodeMirror.modeURL = "/codemirror/mode/%N/%N.js"; - CodeMirror.autoLoadMode(scriptEditor, info.mode); - } - break; - case "bat": - if (this.instance.media.type == "script" && this.instance.params.scriptType == "code" && this.instance.params.scriptLang == "bat") { - scriptEditor.setValue(this.instance.params.script); - } else { - scriptEditor.setValue(""); - } - break; - case "php": - if (this.instance.media.type == "script" && this.instance.params.scriptType == "code" && this.instance.params.scriptLang == "php") { - scriptEditor.setValue(this.instance.params.script); - } else { - scriptEditor.setValue("#!/usr/bin/env php\n\n 0) { - scriptEditor.setValue(this.instance.params.script); - } else { - scriptEditor.setValue("#!/usr/bin/env bash\n\n# your commands here\n"); - } - scriptEditor.save(); - scriptEditor.focus(); - - var info = CodeMirror.findModeByMIME("text/x-sh"); - if (info != null) { - scriptEditor.setOption("mode", info.mode); - CodeMirror.modeURL = "/codemirror/mode/%N/%N.js"; - CodeMirror.autoLoadMode(scriptEditor, info.mode); - } - - scriptEditor.on("change", function () { - scriptEditor.save(); - }); - }; - - /** - * 环境变量 - */ - this.env = []; - if (this.instance.media.type == "script" && this.instance.params.env != null) { - this.env = this.instance.params.env; - } - - this.envAdding = false; - this.envAddingName = ""; - this.envAddingValue = ""; - - this.addEnv = function () { - this.envAdding = !this.envAdding; - this.$delay(function () { - this.$find("form input[name='envAddingName']").focus(); - }); - }; - - this.confirmAddEnv = function () { - if (this.envAddingName.length == 0) { - alert("请输入变量名"); - this.$find("form input[name='envAddingName']").focus(); - return; - } - this.env.push({ - "name": this.envAddingName, - "value": this.envAddingValue - }); - this.envAdding = false; - this.envAddingName = ""; - this.envAddingValue = ""; - }; - - this.removeEnv = function (index) { - this.env.$remove(index); - }; - - this.cancelEnv = function () { - this.envAdding = false; - }; - - /** - * 阿里云短信模板 - */ - this.aliyunSmsTemplateVars = []; - if (this.instance.params.variables != null) { - this.aliyunSmsTemplateVars = this.instance.params.variables; - } - this.aliyunSmsTemplateVarAdding = false; - this.aliyunSmsTemplateVarAddingName = ""; - this.aliyunSmsTemplateVarAddingValue = ""; - - this.addAliyunSmsTemplateVar = function () { - this.aliyunSmsTemplateVarAdding = !this.aliyunSmsTemplateVarAdding; - this.$delay(function () { - this.$find("form input[name='aliyunSmsTemplateVarAddingName']").focus(); - }); - }; - - this.confirmAddAliyunSmsTemplateVar = function () { - if (this.aliyunSmsTemplateVarAddingName.length == 0) { - alert("请输入变量名"); - this.$find("form input[name='aliyunSmsTemplateVarAddingName']").focus(); - return; - } - this.aliyunSmsTemplateVars.push({ - "name": this.aliyunSmsTemplateVarAddingName, - "value": this.aliyunSmsTemplateVarAddingValue - }); - this.aliyunSmsTemplateVarAdding = false; - this.aliyunSmsTemplateVarAddingName = ""; - this.aliyunSmsTemplateVarAddingValue = ""; - }; - - this.removeAliyunSmsTemplateVar = function (index) { - this.aliyunSmsTemplateVars.$remove(index); - }; - - this.cancelAliyunSmsTemplateVar = function () { - this.aliyunSmsTemplateVarAdding = false; - }; - - /** - * 更多选项 - */ - this.advancedOptionsVisible = true; - - this.showAdvancedOptions = function () { - this.advancedOptionsVisible = !this.advancedOptionsVisible; - }; -}); \ No newline at end of file diff --git a/web/views/@default/admins/recipients/instances/update.less b/web/views/@default/admins/recipients/instances/update.less deleted file mode 100644 index 2af56ce3..00000000 --- a/web/views/@default/admins/recipients/instances/update.less +++ /dev/null @@ -1,14 +0,0 @@ -// code mirror -.CodeMirror { - border: 1px solid #eee; - height: auto !important; -} - -.CodeMirror-vscrollbar { - width: 6px; - border-radius: 3px !important; -} - -.CodeMirror-vscrollbar::-webkit-scrollbar-thumb { - border-radius: 2px; -} diff --git a/web/views/@default/admins/recipients/logs/index.html b/web/views/@default/admins/recipients/logs/index.html deleted file mode 100644 index f2f86be9..00000000 --- a/web/views/@default/admins/recipients/logs/index.html +++ /dev/null @@ -1,34 +0,0 @@ -{$layout} -{$template "../menu"} - -

暂时还没有发送记录。

- -
-
- - - - - - - - - - - - - - - - - - - - - -
简介接收人:{{log.task.user}}   |   媒介:{{log.task.instance.name}} -   |   时间:{{log.createdTime}}  |  成功失败 -
标题{{log.task.subject}}
内容{{log.task.body}}
错误信息{{log.error}}
响应信息{{log.response}}
-
- -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/recipient.html b/web/views/@default/admins/recipients/recipient.html deleted file mode 100644 index a6e58e20..00000000 --- a/web/views/@default/admins/recipients/recipient.html +++ /dev/null @@ -1,57 +0,0 @@ -{$layout} -{$template "recipient_menu"} -{$template "/code_editor"} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
状态 - -
系统用户 - {{recipient.admin.fullname}} ({{recipient.admin.username}}) -
媒介 - {{recipient.instance.name}} -

{{recipient.instance.description}}

-
接收人标识 - {{recipient.user}} - - -
所属分组 -
-
{{group.name}}
-
-
- - -
-
发送时间 - {{recipient.timeFrom}} - {{recipient.timeTo}} - - -
备注 - {{recipient.description}} - - -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/tasks/index.css b/web/views/@default/admins/recipients/tasks/index.css deleted file mode 100644 index 38e2fff3..00000000 --- a/web/views/@default/admins/recipients/tasks/index.css +++ /dev/null @@ -1,9 +0,0 @@ -td { - position: relative; -} -td a.op { - position: absolute; - right: 1em; - top: 0.5em; -} -/*# sourceMappingURL=index.css.map */ \ No newline at end of file diff --git a/web/views/@default/admins/recipients/tasks/index.css.map b/web/views/@default/admins/recipients/tasks/index.css.map deleted file mode 100644 index fe294f96..00000000 --- a/web/views/@default/admins/recipients/tasks/index.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["index.less"],"names":[],"mappings":"AAAA;EACC,kBAAA;;AAGD,EAAG,EAAC;EACH,kBAAA;EACA,UAAA;EACA,UAAA","file":"index.css"} \ No newline at end of file diff --git a/web/views/@default/admins/recipients/tasks/index.html b/web/views/@default/admins/recipients/tasks/index.html deleted file mode 100644 index 35a6c01b..00000000 --- a/web/views/@default/admins/recipients/tasks/index.html +++ /dev/null @@ -1,39 +0,0 @@ -{$layout} -{$template "../menu"} - - - 等待发送({{countWaiting}}) - 发送错误({{countFailed}}) - - - -

暂时还没有发送任务。

- -
-
- - - - - - - - - - - - - - - - - -
简介 - {{task.user}}   |   媒介:{{task.instance.name}} -   |   时间:{{task.createdTime}} - - -
标题{{task.subject}}
内容{{task.body}}
错误信息{{task.result.error}}
-
- -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/tasks/index.js b/web/views/@default/admins/recipients/tasks/index.js deleted file mode 100644 index e0ae639a..00000000 --- a/web/views/@default/admins/recipients/tasks/index.js +++ /dev/null @@ -1,16 +0,0 @@ -Tea.context(function () { - this.deleteTask = function (taskId) { - let that = this - teaweb.confirm("确定要删除这个发送任务吗?", function () { - that.$post(".delete") - .params({ - taskId: taskId - }) - .success(function () { - teaweb.successToast("删除成功", null, function () { - teaweb.reload() - }) - }) - }) - } -}) \ No newline at end of file diff --git a/web/views/@default/admins/recipients/tasks/index.less b/web/views/@default/admins/recipients/tasks/index.less deleted file mode 100644 index dea18e03..00000000 --- a/web/views/@default/admins/recipients/tasks/index.less +++ /dev/null @@ -1,9 +0,0 @@ -td { - position: relative; -} - -td a.op { - position: absolute; - right: 1em; - top: 0.5em; -} \ No newline at end of file diff --git a/web/views/@default/admins/recipients/test.html b/web/views/@default/admins/recipients/test.html deleted file mode 100644 index ca3c0adf..00000000 --- a/web/views/@default/admins/recipients/test.html +++ /dev/null @@ -1,46 +0,0 @@ -{$layout} -{$template "recipient_menu"} -{$template "/code_editor"} - - -
- - - - - - - - - - - - - - - - - - - -
媒介名称{{instance.media.name}}
通知标题 - -
通知内容 - -
接收人标识 - -

-
-
-
成功返回结果: -
{{line}}
-
-
错误信息: -
{{line}}
-
- 成功执行,没有返回结果 -
- - - 提交测试中,请耐心等待... -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/test.js b/web/views/@default/admins/recipients/test.js deleted file mode 100644 index 0f5474ed..00000000 --- a/web/views/@default/admins/recipients/test.js +++ /dev/null @@ -1,71 +0,0 @@ -Tea.context(function () { - this.isRunning = false - this.isFinished = false - this.response = "" - this.error = "" - - this.submitBefore = function () { - this.isRunning = true - this.isFinished = false - this.response = "" - this.error = "" - } - - this.submitSuccess = function (resp) { - this.reloadStatus(resp.data.taskId) - } - - this.submitFail = function (resp) { - this.isRunning = false - this.isFinished = true - this.response = "" - this.error = resp.errors[0].messages[0] - this.errorLines = [] - } - - this.submitError = function () { - this.isRunning = false - this.isFinished = true - this.response = "" - this.errorLines = [] - this.error = "请求超时" - } - - // 更新状态 - this.reloadStatus = function (taskId) { - let isDone = false - this.$post("/admins/recipients/tasks/taskInfo") - .params({ - taskId: taskId - }) - .success(function (resp) { - if (resp.data.status == 2 || resp.data.status == 3) { - isDone = true - this.updateStatus(resp.data.result) - } - }) - .done(function () { - this.$delay(function () { - if (isDone) { - return - } - this.reloadStatus(taskId) - }, 3000) - }) - } - - this.updateStatus = function (result) { - this.isRunning = false - this.isFinished = true - this.response = result.response - this.responseLines = [] - if (this.response != null) { - this.responseLines = this.response.split("\n") - } - this.error = result.error - this.errorLines = [] - if (this.error.length > 0) { - this.errorLines = this.error.split("\n") - } - } -}) \ No newline at end of file diff --git a/web/views/@default/admins/recipients/update.html b/web/views/@default/admins/recipients/update.html deleted file mode 100644 index f6f98ddd..00000000 --- a/web/views/@default/admins/recipients/update.html +++ /dev/null @@ -1,111 +0,0 @@ -{$layout} -{$template "recipient_menu"} -{$template "/code_editor"} - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
系统用户 * - -

选择关联的系统用户。

-
媒介 * - -
接收人标识 - -

{{userDescription}}

-
分组 - -

选择当前接收人所属分组。

-
发送时间 -
-
- 开始时间: -
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
-
-
- 结束时间: -
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-

24小时制,即小时从0到23。如果填写了发送时间,系统只会在这个时间段内给当前接收人发送消息。 - [清除]

-
备注 - -
是否启用 - -
- - -
\ No newline at end of file diff --git a/web/views/@default/admins/recipients/update.js b/web/views/@default/admins/recipients/update.js deleted file mode 100644 index d0d5431d..00000000 --- a/web/views/@default/admins/recipients/update.js +++ /dev/null @@ -1,29 +0,0 @@ -Tea.context(function () { - this.userDescription = "" - - this.changeInstance = function (instance) { - if (instance != null) { - this.userDescription = instance.media.userDescription - } else { - this.userDescription = "" - } - } - - this.success = function () { - let that = this - teaweb.success("保存成功", function () { - window.location = Tea.url(".recipient", { - recipientId: that.recipient.id - }) - }) - } - - this.clearTime = function () { - this.recipient.timeFromHour = "" - this.recipient.timeFromMinute = "" - this.recipient.timeFromSecond = "" - this.recipient.timeToHour = "" - this.recipient.timeToMinute = "" - this.recipient.timeToSecond = "" - } -}) \ No newline at end of file