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 }} > -
+
ηŠΆζ€