mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
修复群晖通知参数,任务视图不属于筛选
This commit is contained in:
parent
5d64aae452
commit
496918131f
|
@ -49,9 +49,8 @@ export class PushDeerNotification extends NotificationBaseInfo {
|
|||
public pushDeerUrl = '';
|
||||
}
|
||||
|
||||
export class ChatNotification extends NotificationBaseInfo {
|
||||
public chatUrl = '';
|
||||
public chatToken = '';
|
||||
export class synologyChatNotification extends NotificationBaseInfo {
|
||||
public synologyChatUrl = '';
|
||||
}
|
||||
|
||||
export class BarkNotification extends NotificationBaseInfo {
|
||||
|
@ -61,7 +60,7 @@ export class BarkNotification extends NotificationBaseInfo {
|
|||
public barkGroup = 'qinglong';
|
||||
public barkLevel = 'active';
|
||||
public barkUrl = '';
|
||||
public barkArchive=""
|
||||
public barkArchive = '';
|
||||
}
|
||||
|
||||
export class TelegramBotNotification extends NotificationBaseInfo {
|
||||
|
@ -163,7 +162,7 @@ export interface NotificationInfo
|
|||
GotifyNotification,
|
||||
ServerChanNotification,
|
||||
PushDeerNotification,
|
||||
ChatNotification,
|
||||
synologyChatNotification,
|
||||
BarkNotification,
|
||||
TelegramBotNotification,
|
||||
DingtalkBotNotification,
|
||||
|
|
|
@ -179,8 +179,8 @@ export default class CronService {
|
|||
for (const col of viewQuery.filters) {
|
||||
const { property, value, operation } = col;
|
||||
let q: any = {};
|
||||
let operate2 = null;
|
||||
let operate = null;
|
||||
let operate2: any = null;
|
||||
let operate: any = null;
|
||||
switch (operation) {
|
||||
case 'Reg':
|
||||
operate = Op.like;
|
||||
|
@ -202,11 +202,18 @@ export default class CronService {
|
|||
break;
|
||||
case 'Nin':
|
||||
q[Op.and] = [
|
||||
{
|
||||
[Op.or]: [
|
||||
{
|
||||
[property]: {
|
||||
[Op.notIn]: Array.isArray(value) ? value : [value],
|
||||
},
|
||||
},
|
||||
{
|
||||
[property]: { [Op.is]: null },
|
||||
},
|
||||
],
|
||||
},
|
||||
property === 'status' && value.includes(2)
|
||||
? { isDisabled: { [Op.ne]: 1 } }
|
||||
: {},
|
||||
|
|
|
@ -182,11 +182,10 @@ export default class NotificationService {
|
|||
}
|
||||
|
||||
private async chat() {
|
||||
const { chatUrl, chatToken } = this.params;
|
||||
const url = `${chatUrl}${chatToken}`;
|
||||
const { synologyChatUrl } = this.params;
|
||||
try {
|
||||
const res: any = await got
|
||||
.post(url, {
|
||||
.post(synologyChatUrl, {
|
||||
...this.gotOption,
|
||||
body: `payload={"text":"${this.title}\n${this.content}"}`,
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
|
|
|
@ -344,7 +344,7 @@
|
|||
"gotify的url地址,例如 https://push.example.de:8080": "gotify URL address, e.g., https://push.example.de:8080",
|
||||
"gotify的消息应用token码": "gotify message application token code",
|
||||
"推送消息的优先级": "Priority of Push Messages",
|
||||
"chat的url地址": "Chat URL address",
|
||||
"synologyChat的url地址": "Synology Chat Webhook URL address",
|
||||
"chat的token码": "Chat token code",
|
||||
"推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg": "Push to personal QQ: http://127.0.0.1/send_private_msg, group: http://127.0.0.1/send_group_msg",
|
||||
"访问密钥": "Access Key",
|
||||
|
|
|
@ -344,7 +344,7 @@
|
|||
"gotify的url地址,例如 https://push.example.de:8080": "gotify的url地址,例如 https://push.example.de:8080",
|
||||
"gotify的消息应用token码": "gotify的消息应用token码",
|
||||
"推送消息的优先级": "推送消息的优先级",
|
||||
"chat的url地址": "chat的url地址",
|
||||
"synologyChat的url地址": "synologyChat的webhook url地址",
|
||||
"chat的token码": "chat的token码",
|
||||
"推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg": "推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg",
|
||||
"访问密钥": "访问密钥",
|
||||
|
|
|
@ -135,11 +135,10 @@ export default {
|
|||
],
|
||||
chat: [
|
||||
{
|
||||
label: 'chatUrl',
|
||||
tip: intl.get('chat的url地址'),
|
||||
label: 'synologyChatUrl',
|
||||
tip: intl.get('synologyChat的url地址'),
|
||||
required: true,
|
||||
},
|
||||
{ label: 'chatToken', tip: intl.get('chat的token码'), required: true },
|
||||
],
|
||||
goCqHttpBot: [
|
||||
{
|
||||
|
@ -329,33 +328,23 @@ export default {
|
|||
},
|
||||
{
|
||||
label: 'pushplusTemplate',
|
||||
tip: intl.get(
|
||||
'发送模板',
|
||||
),
|
||||
tip: intl.get('发送模板'),
|
||||
},
|
||||
{
|
||||
label: 'pushplusChannel',
|
||||
tip: intl.get(
|
||||
'发送渠道',
|
||||
),
|
||||
tip: intl.get('发送渠道'),
|
||||
},
|
||||
{
|
||||
label: 'pushplusWebhook',
|
||||
tip: intl.get(
|
||||
'webhook编码',
|
||||
),
|
||||
tip: intl.get('webhook编码'),
|
||||
},
|
||||
{
|
||||
label: 'pushplusCallbackUrl',
|
||||
tip: intl.get(
|
||||
'发送结果回调地址',
|
||||
),
|
||||
tip: intl.get('发送结果回调地址'),
|
||||
},
|
||||
{
|
||||
label: 'pushplusTo',
|
||||
tip: intl.get(
|
||||
'好友令牌',
|
||||
),
|
||||
tip: intl.get('好友令牌'),
|
||||
},
|
||||
],
|
||||
wePlusBot: [
|
||||
|
@ -368,9 +357,7 @@ export default {
|
|||
},
|
||||
{
|
||||
label: 'wePlusBotReceiver',
|
||||
tip: intl.get(
|
||||
'消息接收人',
|
||||
),
|
||||
tip: intl.get('消息接收人'),
|
||||
},
|
||||
{
|
||||
label: 'wePlusBotVersion',
|
||||
|
@ -414,7 +401,13 @@ export default {
|
|||
required: true,
|
||||
},
|
||||
{ label: 'emailUser', tip: intl.get('邮箱地址'), required: true },
|
||||
{ label: 'emailPass', tip: intl.get('SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定'), required: true },
|
||||
{
|
||||
label: 'emailPass',
|
||||
tip: intl.get(
|
||||
'SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定',
|
||||
),
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
pushMe: [
|
||||
{
|
||||
|
@ -424,7 +417,9 @@ export default {
|
|||
},
|
||||
{
|
||||
label: 'pushMeUrl',
|
||||
tip: intl.get('自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口'),
|
||||
tip: intl.get(
|
||||
'自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口',
|
||||
),
|
||||
required: false,
|
||||
},
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue
Block a user