pull/361/head
xiaojunnuo 2025-03-17 18:27:52 +08:00
parent e09f92f9ee
commit 0a7d2d6264
2 changed files with 7 additions and 5 deletions

View File

@ -36,7 +36,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
const checkStatusDict = dict({ const checkStatusDict = dict({
data: [ data: [
{ label: "正常", value: "ok", color: "green" }, { label: "成功", value: "ok", color: "green" },
{ label: "检查中", value: "checking", color: "blue" }, { label: "检查中", value: "checking", color: "blue" },
{ label: "异常", value: "error", color: "red" } { label: "异常", value: "error", color: "red" }
] ]
@ -184,7 +184,8 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
}, },
column: { column: {
align: "center", align: "center",
width: 110 width: 110,
show: false
} }
}, },
certDomains: { certDomains: {
@ -210,7 +211,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
} }
}, },
certProvider: { certProvider: {
title: "证书颁发者", title: "颁发机构",
search: { search: {
show: false show: false
}, },
@ -368,7 +369,8 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
}, },
column: { column: {
width: 110, width: 110,
sorter: true sorter: true,
align: "center"
} }
} }
} }

View File

@ -186,7 +186,7 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
const expires = site.certExpiresTime; const expires = site.certExpiresTime;
const validDays = dayjs(expires).diff(dayjs(), 'day'); const validDays = dayjs(expires).diff(dayjs(), 'day');
const url = await this.notificationService.getBindUrl('#/monitor/site'); const url = await this.notificationService.getBindUrl('#/monitor/site');
const content = `站点名称: ${site.name} \n站点域名 ${site.domain} \n证书域名 ${site.certDomains} \n证书颁发者 ${site.certProvider} \n过期时间 ${dayjs(site.certExpiresTime).format('YYYY-MM-DD')} \n`; const content = `站点名称: ${site.name} \n站点域名 ${site.domain} \n证书域名 ${site.certDomains} \n颁发机构 ${site.certProvider} \n过期时间 ${dayjs(site.certExpiresTime).format('YYYY-MM-DD')} \n`;
if (validDays >= 0 && validDays < tipDays) { if (validDays >= 0 && validDays < tipDays) {
// 发通知 // 发通知
await this.notificationService.send( await this.notificationService.send(