修复任务详情脚本行数展示

This commit is contained in:
whyour 2023-12-17 17:53:15 +08:00
parent be1d68c0d1
commit ca8790bbec
7 changed files with 20 additions and 13 deletions

View File

@ -183,13 +183,21 @@ export default class SystemService {
...oDoc,
info: { ...oDoc.info, ...info },
});
let targetDomain = 'dl-cdn.alpinelinux.org';
let defaultDomain = 'https://dl-cdn.alpinelinux.org';
let targetDomain = 'https://dl-cdn.alpinelinux.org';
if (oDoc.info?.linuxMirror) {
defaultDomain = oDoc.info.linuxMirror;
}
if (info.linuxMirror) {
targetDomain = info.linuxMirror;
}
const command = `sed -i 's/${
oDoc.info?.linuxMirror || 'dl-cdn.alpinelinux.org'
}/${targetDomain}/g' /etc/apk/repositories && apk update -f`;
const command = `sed -i 's/${defaultDomain.replace(
/\//g,
'\\/',
)}/${targetDomain.replace(
/\//g,
'\\/',
)}/g' /etc/apk/repositories && apk update -f`;
this.scheduleService.runTask(
command,

View File

@ -475,5 +475,5 @@
"代理地址, 支持HTTP(S)/SOCK5": "Proxy Address, supports HTTP(S)/SOCK5",
"NPM 镜像源": "NPM Mirror Source",
"PyPI 镜像源": "PyPI Mirror Source",
"alpine linux 镜像源, 例如 mirrors.aliyun.com": "Alpine Linux Mirror Source, e.g. mirrors.aliyun.com"
"alpine linux 镜像源, 例如 https://mirrors.aliyun.com": "Alpine Linux Mirror Source, e.g. https://mirrors.aliyun.com"
}

View File

@ -475,5 +475,5 @@
"代理地址, 支持HTTP(S)/SOCK5": "代理地址, 支持HTTP(S)/SOCK5",
"NPM 镜像源": "NPM 镜像源",
"PyPI 镜像源": "PyPI 镜像源",
"alpine linux 镜像源, 例如 mirrors.aliyun.com": "alpine linux 镜像源, 例如 mirrors.aliyun.com"
"alpine linux 镜像源, 例如 https://mirrors.aliyun.com": "alpine linux 镜像源, 例如 https://mirrors.aliyun.com"
}

View File

@ -107,10 +107,9 @@ const CronDetailModal = ({
value={value}
options={{
fontSize: 12,
minimap: { enabled: false },
lineNumbersMinChars: 3,
fontFamily: 'Source Code Pro',
glyphMargin: false,
wordWrap: 'on',
}}
onMount={(editor, monaco) => {
editorRef.current = editor;
@ -364,7 +363,7 @@ const CronDetailModal = ({
<div className="crontab-title-wrapper">
<div style={{ minWidth: 0 }}>
<Typography.Text
style={{width: '100%'}}
style={{ width: '100%' }}
ellipsis={{ tooltip: currentCron.name }}
>
{currentCron.name}

View File

@ -23,6 +23,7 @@
padding: 12px;
max-height: calc(80vh - 57px);
max-height: calc(80vh - var(--vh-offset, 57px));
word-wrap: unset;
}
.ant-card-body {
@ -197,4 +198,4 @@ body[data-mode='desktop'] {
.cron.pinned-cron > td {
background: #f2f2f2;
}
}

View File

@ -266,11 +266,10 @@ const Log = () => {
options={{
readOnly: true,
fontSize: 12,
minimap: { enabled: false },
lineNumbersMinChars: 3,
fontFamily: 'Source Code Pro',
folding: false,
glyphMargin: false,
wordWrap: 'on',
}}
/>
</SplitPane>

View File

@ -185,7 +185,7 @@ const Dependence = () => {
<Input
style={{ width: 360 }}
placeholder={intl.get(
'alpine linux 镜像源, 例如 mirrors.aliyun.com',
'alpine linux 镜像源, 例如 https://mirrors.aliyun.com',
)}
value={systemConfig?.linuxMirror}
onChange={(e) => {