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"}
-
-
创建接收人媒介
-
\ 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}}
- -
- |
-
-
-
- -
-
- |
-
- {{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"}
-
-创建媒介
-
\ 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"}
-
-
\ 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"}
-
-
\ 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.user}}
- -
- |
-
-
- | 所属分组 |
-
-
-
- -
-
- |
-
-
- | 发送时间 |
-
- {{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"}
-
-
-
\ 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"}
-
-
\ 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