mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-18 02:14:32 +08:00
修改日志结束符判定
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
CheckCircleOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { PageLoading } from '@ant-design/pro-layout';
|
||||
import { logEnded } from '@/utils';
|
||||
|
||||
enum CrontabStatus {
|
||||
'running',
|
||||
@@ -49,9 +50,9 @@ const CronLogModal = ({
|
||||
const log = data as string;
|
||||
setValue(log || '暂无日志');
|
||||
setExecuting(
|
||||
log && !log.includes('执行结束') && !log.includes('重启面板'),
|
||||
log && !logEnded(log) && !log.includes('重启面板'),
|
||||
);
|
||||
if (log && !log.includes('执行结束') && !log.includes('重启面板')) {
|
||||
if (log && !logEnded(log) && !log.includes('重启面板')) {
|
||||
setTimeout(() => {
|
||||
getCronLog();
|
||||
}, 2000);
|
||||
|
||||
@@ -7,6 +7,7 @@ import Editor from '@monaco-editor/react';
|
||||
import SaveModal from './saveModal';
|
||||
import SettingModal from './setting';
|
||||
import { useTheme } from '@/utils/hooks';
|
||||
import { logEnded } from '@/utils';
|
||||
|
||||
const { Option } = Select;
|
||||
const LangMap: any = {
|
||||
@@ -128,7 +129,7 @@ const EditModal = ({
|
||||
return;
|
||||
}
|
||||
|
||||
if (_message.includes('执行结束')) {
|
||||
if (logEnded(_message)) {
|
||||
setTimeout(() => {
|
||||
setIsRunning(false);
|
||||
}, 300);
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
CheckCircleOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { PageLoading } from '@ant-design/pro-layout';
|
||||
import { logEnded } from '@/utils';
|
||||
|
||||
const SubscriptionLogModal = ({
|
||||
subscription,
|
||||
@@ -43,8 +44,8 @@ const SubscriptionLogModal = ({
|
||||
) {
|
||||
const log = data as string;
|
||||
setValue(log || '暂无日志');
|
||||
setExecuting(log && !log.includes('执行结束'));
|
||||
if (log && !log.includes('执行结束')) {
|
||||
setExecuting(log && !logEnded(log));
|
||||
if (log && !logEnded(log)) {
|
||||
setTimeout(() => {
|
||||
getCronLog();
|
||||
}, 2000);
|
||||
|
||||
Reference in New Issue
Block a user