From 793d14f04b5f18bdb849f7cbb2be67d8121a3890 Mon Sep 17 00:00:00 2001 From: whyour Date: Sat, 5 Mar 2022 20:52:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=BB=E5=8A=A1=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/api/cron.ts | 4 ++-- back/services/cron.ts | 1 - src/pages/crontab/detail.tsx | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/back/api/cron.ts b/back/api/cron.ts index da3c7a2f..a5d11f19 100644 --- a/back/api/cron.ts +++ b/back/api/cron.ts @@ -341,11 +341,11 @@ export default (app: Router) => { id: Joi.number().required(), }), }), - async (req: Request, res: Response, next: NextFunction) => { + async (req: Request<{ id: number }>, res: Response, next: NextFunction) => { const logger: Logger = Container.get('logger'); try { const cronService = Container.get(CronService); - const data = await cronService.logs(parseInt(req.params.id)); + const data = await cronService.logs(req.params.id); return res.send({ code: 200, data }); } catch (e) { logger.error('πŸ”₯ error: %o', e); diff --git a/back/services/cron.ts b/back/services/cron.ts index c78c349c..4e180843 100644 --- a/back/services/cron.ts +++ b/back/services/cron.ts @@ -365,7 +365,6 @@ export default class CronService { let logDir = `${config.logPath}${logPath}`; if (existsSync(logDir)) { let files = await promises.readdir(logDir); - console.log(files); if (isQlCommand) { files = files.filter((x) => x.includes(key)); } diff --git a/src/pages/crontab/detail.tsx b/src/pages/crontab/detail.tsx index 151280b9..37d9026c 100644 --- a/src/pages/crontab/detail.tsx +++ b/src/pages/crontab/detail.tsx @@ -63,6 +63,7 @@ const CronDetailModal = ({ const contentList: any = { log: ( ( @@ -166,7 +167,7 @@ const CronDetailModal = ({ width={'80vw'} bodyStyle={{ background: '#eee', padding: 12 }} > -
+
ηŠΆζ€