修改log日志

This commit is contained in:
hanhh 2021-05-28 23:40:25 +08:00
parent 68884b37a2
commit bcdca5084c
3 changed files with 5 additions and 36 deletions

View File

@ -182,7 +182,10 @@ export default class CronService {
this.logger.silly('Original command: ' + command); this.logger.silly('Original command: ' + command);
let logFile = `${config.manualLogPath}${_id}.log`; let logFile = `${config.manualLogPath}${_id}.log`;
fs.writeFileSync(logFile, `开始执行...\n${new Date().toString()}\n`); fs.writeFileSync(
logFile,
`开始执行... ${new Date().toLocaleString()}\n\n`,
);
let cmdStr = command; let cmdStr = command;
if (!cmdStr.includes('task ') && !cmdStr.includes('ql ')) { if (!cmdStr.includes('task ') && !cmdStr.includes('ql ')) {

View File

@ -6,18 +6,6 @@ body {
@import '~codemirror/lib/codemirror.css'; @import '~codemirror/lib/codemirror.css';
.log-modal-code {
.CodeMirror {
height: auto;
}
.CodeMirror-scroll {
height: auto;
overflow-y: hidden;
overflow-x: auto;
}
}
.ql-container-wrapper { .ql-container-wrapper {
.CodeMirror { .CodeMirror {
position: absolute; position: absolute;
@ -78,13 +66,4 @@ body {
height: calc(100vh - var(--vh-offset, 0px) - 176px); height: calc(100vh - var(--vh-offset, 0px) - 176px);
} }
} }
.log-modal-code {
.CodeMirror-sizer {
width: 380px;
transform: scale(0.83);
transform-origin: top left;
min-height: auto;
}
}
} }

View File

@ -99,20 +99,7 @@ const CronLogModal = ({
onOk={() => cancel()} onOk={() => cancel()}
onCancel={() => cancel()} onCancel={() => cancel()}
> >
{!loading && value && ( {!loading && value && <pre>{value}</pre>}
<CodeMirror
value={value}
className="log-modal-code"
options={{
lineWrapping: true,
readOnly: true,
}}
onBeforeChange={(editor, data, value) => {
setValue(value);
}}
onChange={(editor, data, value) => {}}
/>
)}
</Modal> </Modal>
); );
}; };