mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-05 00:04:32 +08:00
chore: prune incidental formatting changes
This commit is contained in:
committed by
GitHub
parent
2e33cbae3a
commit
c37f00283b
+11
-19
@@ -49,7 +49,7 @@ export default class SystemService {
|
|||||||
@Inject('logger') private logger: winston.Logger,
|
@Inject('logger') private logger: winston.Logger,
|
||||||
private scheduleService: ScheduleService,
|
private scheduleService: ScheduleService,
|
||||||
private sockService: SockService,
|
private sockService: SockService,
|
||||||
) {}
|
) { }
|
||||||
|
|
||||||
public async getSystemConfig() {
|
public async getSystemConfig() {
|
||||||
const doc = await this.getDb({ type: AuthDataType.systemConfig });
|
const doc = await this.getDb({ type: AuthDataType.systemConfig });
|
||||||
@@ -276,7 +276,7 @@ export default class SystemService {
|
|||||||
);
|
);
|
||||||
const text = await body.text();
|
const text = await body.text();
|
||||||
lastVersionContent = parseContentVersion(text);
|
lastVersionContent = parseContentVersion(text);
|
||||||
} catch (error) {}
|
} catch (error) { }
|
||||||
|
|
||||||
if (!lastVersionContent) {
|
if (!lastVersionContent) {
|
||||||
lastVersionContent = currentVersionContent;
|
lastVersionContent = currentVersionContent;
|
||||||
@@ -399,23 +399,16 @@ export default class SystemService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async run(
|
public async run({ command, logPath }: { command: string; logPath?: string }, callback: TaskCallbacks) {
|
||||||
{ command, logPath }: { command: string; logPath?: string },
|
|
||||||
callback: TaskCallbacks,
|
|
||||||
) {
|
|
||||||
if (!command.startsWith(TASK_COMMAND)) {
|
if (!command.startsWith(TASK_COMMAND)) {
|
||||||
command = `${TASK_COMMAND} ${command}`;
|
command = `${TASK_COMMAND} ${command}`;
|
||||||
}
|
}
|
||||||
const logPathPrefix = logPath ? `real_log_path=${logPath}` : '';
|
const logPathPrefix = logPath ? `real_log_path=${logPath}` : ''
|
||||||
this.scheduleService.runTask(
|
this.scheduleService.runTask(`${logPathPrefix} real_time=true ${command}`, callback, {
|
||||||
`${logPathPrefix} real_time=true ${command}`,
|
command,
|
||||||
callback,
|
id: command.replace(/ /g, '-'),
|
||||||
{
|
runOrigin: 'system',
|
||||||
command,
|
});
|
||||||
id: command.replace(/ /g, '-'),
|
|
||||||
runOrigin: 'system',
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async stop({ command, pid }: { command: string; pid: number }) {
|
public async stop({ command, pid }: { command: string; pid: number }) {
|
||||||
@@ -448,8 +441,7 @@ export default class SystemService {
|
|||||||
}
|
}
|
||||||
const dataPaths = dataDirs.map((dir) => `data/${dir}`);
|
const dataPaths = dataDirs.map((dir) => `data/${dir}`);
|
||||||
await promiseExec(
|
await promiseExec(
|
||||||
`cd ${config.dataPath} && cd ../ && tar -zcvf ${
|
`cd ${config.dataPath} && cd ../ && tar -zcvf ${config.dataTgzFile
|
||||||
config.dataTgzFile
|
|
||||||
} ${dataPaths.join(' ')}`,
|
} ${dataPaths.join(' ')}`,
|
||||||
);
|
);
|
||||||
res.download(config.dataTgzFile);
|
res.download(config.dataTgzFile);
|
||||||
@@ -594,7 +586,7 @@ export default class SystemService {
|
|||||||
try {
|
try {
|
||||||
const finalPath = path.join(config.dependenceCachePath, type);
|
const finalPath = path.join(config.dependenceCachePath, type);
|
||||||
await fs.promises.rm(finalPath, { recursive: true });
|
await fs.promises.rm(finalPath, { recursive: true });
|
||||||
} catch (error) {}
|
} catch (error) { }
|
||||||
return { code: 200 };
|
return { code: 200 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ const Setting = () => {
|
|||||||
reloadTheme,
|
reloadTheme,
|
||||||
systemInfo,
|
systemInfo,
|
||||||
} = useOutletContext<SharedContext>();
|
} = useOutletContext<SharedContext>();
|
||||||
console.log('user', user);
|
console.log('user',user)
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: intl.get('名称'),
|
title: intl.get('名称'),
|
||||||
|
|||||||
@@ -352,8 +352,8 @@ const Other = ({
|
|||||||
</Button>
|
</Button>
|
||||||
</Input.Group>
|
</Input.Group>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={intl.get('全局SSH私钥')}
|
label={intl.get('全局SSH私钥')}
|
||||||
name="globalSshKey"
|
name="globalSshKey"
|
||||||
tooltip={intl.get('用于访问所有私有仓库的全局SSH私钥')}
|
tooltip={intl.get('用于访问所有私有仓库的全局SSH私钥')}
|
||||||
>
|
>
|
||||||
@@ -364,10 +364,7 @@ const Other = ({
|
|||||||
autoSize={{ minRows: 3, maxRows: 8 }}
|
autoSize={{ minRows: 3, maxRows: 8 }}
|
||||||
placeholder={intl.get('请输入完整的SSH私钥内容')}
|
placeholder={intl.get('请输入完整的SSH私钥内容')}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setSystemConfig({
|
setSystemConfig({ ...systemConfig, globalSshKey: e.target.value });
|
||||||
...systemConfig,
|
|
||||||
globalSshKey: e.target.value,
|
|
||||||
});
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Input.Group>
|
</Input.Group>
|
||||||
|
|||||||
+3
-1
@@ -404,7 +404,9 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'larkSecret',
|
label: 'larkSecret',
|
||||||
tip: intl.get('飞书群组机器人加签密钥,安全设置中开启签名校验后获得'),
|
tip: intl.get(
|
||||||
|
'飞书群组机器人加签密钥,安全设置中开启签名校验后获得',
|
||||||
|
),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
email: [
|
email: [
|
||||||
|
|||||||
Reference in New Issue
Block a user