mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修改任务详情样式
This commit is contained in:
parent
ef32181f36
commit
793d14f04b
|
@ -341,11 +341,11 @@ export default (app: Router) => {
|
||||||
id: Joi.number().required(),
|
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');
|
const logger: Logger = Container.get('logger');
|
||||||
try {
|
try {
|
||||||
const cronService = Container.get(CronService);
|
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 });
|
return res.send({ code: 200, data });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.error('🔥 error: %o', e);
|
logger.error('🔥 error: %o', e);
|
||||||
|
|
|
@ -365,7 +365,6 @@ export default class CronService {
|
||||||
let logDir = `${config.logPath}${logPath}`;
|
let logDir = `${config.logPath}${logPath}`;
|
||||||
if (existsSync(logDir)) {
|
if (existsSync(logDir)) {
|
||||||
let files = await promises.readdir(logDir);
|
let files = await promises.readdir(logDir);
|
||||||
console.log(files);
|
|
||||||
if (isQlCommand) {
|
if (isQlCommand) {
|
||||||
files = files.filter((x) => x.includes(key));
|
files = files.filter((x) => x.includes(key));
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,7 @@ const CronDetailModal = ({
|
||||||
const contentList: any = {
|
const contentList: any = {
|
||||||
log: (
|
log: (
|
||||||
<List
|
<List
|
||||||
|
style={{ height: 'calc(80vh - 236px)', overflowY: 'auto' }}
|
||||||
dataSource={logs}
|
dataSource={logs}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
renderItem={(item) => (
|
renderItem={(item) => (
|
||||||
|
@ -166,7 +167,7 @@ const CronDetailModal = ({
|
||||||
width={'80vw'}
|
width={'80vw'}
|
||||||
bodyStyle={{ background: '#eee', padding: 12 }}
|
bodyStyle={{ background: '#eee', padding: 12 }}
|
||||||
>
|
>
|
||||||
<div style={{ height: '80vh', overflowY: 'auto' }}>
|
<div style={{ height: '80vh' }}>
|
||||||
<Card bodyStyle={{ display: 'flex', justifyContent: 'space-between' }}>
|
<Card bodyStyle={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||||
<div className="cron-detail-info-item">
|
<div className="cron-detail-info-item">
|
||||||
<div className="cron-detail-info-title">状态</div>
|
<div className="cron-detail-info-title">状态</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user