修复群晖通知参数,任务视图不属于筛选

This commit is contained in:
whyour 2025-02-16 12:15:45 +08:00
parent 5d64aae452
commit 496918131f
6 changed files with 38 additions and 38 deletions

View File

@ -49,9 +49,8 @@ export class PushDeerNotification extends NotificationBaseInfo {
public pushDeerUrl = ''; public pushDeerUrl = '';
} }
export class ChatNotification extends NotificationBaseInfo { export class synologyChatNotification extends NotificationBaseInfo {
public chatUrl = ''; public synologyChatUrl = '';
public chatToken = '';
} }
export class BarkNotification extends NotificationBaseInfo { export class BarkNotification extends NotificationBaseInfo {
@ -61,7 +60,7 @@ export class BarkNotification extends NotificationBaseInfo {
public barkGroup = 'qinglong'; public barkGroup = 'qinglong';
public barkLevel = 'active'; public barkLevel = 'active';
public barkUrl = ''; public barkUrl = '';
public barkArchive="" public barkArchive = '';
} }
export class TelegramBotNotification extends NotificationBaseInfo { export class TelegramBotNotification extends NotificationBaseInfo {
@ -163,7 +162,7 @@ export interface NotificationInfo
GotifyNotification, GotifyNotification,
ServerChanNotification, ServerChanNotification,
PushDeerNotification, PushDeerNotification,
ChatNotification, synologyChatNotification,
BarkNotification, BarkNotification,
TelegramBotNotification, TelegramBotNotification,
DingtalkBotNotification, DingtalkBotNotification,

View File

@ -179,8 +179,8 @@ export default class CronService {
for (const col of viewQuery.filters) { for (const col of viewQuery.filters) {
const { property, value, operation } = col; const { property, value, operation } = col;
let q: any = {}; let q: any = {};
let operate2 = null; let operate2: any = null;
let operate = null; let operate: any = null;
switch (operation) { switch (operation) {
case 'Reg': case 'Reg':
operate = Op.like; operate = Op.like;
@ -203,9 +203,16 @@ export default class CronService {
case 'Nin': case 'Nin':
q[Op.and] = [ q[Op.and] = [
{ {
[property]: { [Op.or]: [
[Op.notIn]: Array.isArray(value) ? value : [value], {
}, [property]: {
[Op.notIn]: Array.isArray(value) ? value : [value],
},
},
{
[property]: { [Op.is]: null },
},
],
}, },
property === 'status' && value.includes(2) property === 'status' && value.includes(2)
? { isDisabled: { [Op.ne]: 1 } } ? { isDisabled: { [Op.ne]: 1 } }

View File

@ -182,11 +182,10 @@ export default class NotificationService {
} }
private async chat() { private async chat() {
const { chatUrl, chatToken } = this.params; const { synologyChatUrl } = this.params;
const url = `${chatUrl}${chatToken}`;
try { try {
const res: any = await got const res: any = await got
.post(url, { .post(synologyChatUrl, {
...this.gotOption, ...this.gotOption,
body: `payload={"text":"${this.title}\n${this.content}"}`, body: `payload={"text":"${this.title}\n${this.content}"}`,
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, headers: { 'Content-Type': 'application/x-www-form-urlencoded' },

View File

@ -344,7 +344,7 @@
"gotify的url地址例如 https://push.example.de:8080": "gotify URL address, e.g., https://push.example.de:8080", "gotify的url地址例如 https://push.example.de:8080": "gotify URL address, e.g., https://push.example.de:8080",
"gotify的消息应用token码": "gotify message application token code", "gotify的消息应用token码": "gotify message application token code",
"推送消息的优先级": "Priority of Push Messages", "推送消息的优先级": "Priority of Push Messages",
"chat的url地址": "Chat URL address", "synologyChat的url地址": "Synology Chat Webhook URL address",
"chat的token码": "Chat token code", "chat的token码": "Chat token code",
"推送到个人QQ: http://127.0.0.1/send_private_msghttp://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", "推送到个人QQ: http://127.0.0.1/send_private_msghttp://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", "访问密钥": "Access Key",

View File

@ -344,7 +344,7 @@
"gotify的url地址例如 https://push.example.de:8080": "gotify的url地址例如 https://push.example.de:8080", "gotify的url地址例如 https://push.example.de:8080": "gotify的url地址例如 https://push.example.de:8080",
"gotify的消息应用token码": "gotify的消息应用token码", "gotify的消息应用token码": "gotify的消息应用token码",
"推送消息的优先级": "推送消息的优先级", "推送消息的优先级": "推送消息的优先级",
"chat的url地址": "chat的url地址", "synologyChat的url地址": "synologyChat的webhook url地址",
"chat的token码": "chat的token码", "chat的token码": "chat的token码",
"推送到个人QQ: http://127.0.0.1/send_private_msghttp://127.0.0.1/send_group_msg": "推送到个人QQ: http://127.0.0.1/send_private_msghttp://127.0.0.1/send_group_msg", "推送到个人QQ: http://127.0.0.1/send_private_msghttp://127.0.0.1/send_group_msg": "推送到个人QQ: http://127.0.0.1/send_private_msghttp://127.0.0.1/send_group_msg",
"访问密钥": "访问密钥", "访问密钥": "访问密钥",

View File

@ -135,11 +135,10 @@ export default {
], ],
chat: [ chat: [
{ {
label: 'chatUrl', label: 'synologyChatUrl',
tip: intl.get('chat的url地址'), tip: intl.get('synologyChat的url地址'),
required: true, required: true,
}, },
{ label: 'chatToken', tip: intl.get('chat的token码'), required: true },
], ],
goCqHttpBot: [ goCqHttpBot: [
{ {
@ -329,33 +328,23 @@ export default {
}, },
{ {
label: 'pushplusTemplate', label: 'pushplusTemplate',
tip: intl.get( tip: intl.get('发送模板'),
'发送模板',
),
}, },
{ {
label: 'pushplusChannel', label: 'pushplusChannel',
tip: intl.get( tip: intl.get('发送渠道'),
'发送渠道',
),
}, },
{ {
label: 'pushplusWebhook', label: 'pushplusWebhook',
tip: intl.get( tip: intl.get('webhook编码'),
'webhook编码',
),
}, },
{ {
label: 'pushplusCallbackUrl', label: 'pushplusCallbackUrl',
tip: intl.get( tip: intl.get('发送结果回调地址'),
'发送结果回调地址',
),
}, },
{ {
label: 'pushplusTo', label: 'pushplusTo',
tip: intl.get( tip: intl.get('好友令牌'),
'好友令牌',
),
}, },
], ],
wePlusBot: [ wePlusBot: [
@ -368,9 +357,7 @@ export default {
}, },
{ {
label: 'wePlusBotReceiver', label: 'wePlusBotReceiver',
tip: intl.get( tip: intl.get('消息接收人'),
'消息接收人',
),
}, },
{ {
label: 'wePlusBotVersion', label: 'wePlusBotVersion',
@ -414,7 +401,13 @@ export default {
required: true, required: true,
}, },
{ label: 'emailUser', tip: intl.get('邮箱地址'), 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: [ pushMe: [
{ {
@ -424,7 +417,9 @@ export default {
}, },
{ {
label: 'pushMeUrl', label: 'pushMeUrl',
tip: intl.get('自建的PushMeServer消息接口地址例如http://127.0.0.1:3010不填则使用官方消息接口'), tip: intl.get(
'自建的PushMeServer消息接口地址例如http://127.0.0.1:3010不填则使用官方消息接口',
),
required: false, required: false,
}, },
], ],