merge: 合并远程 A2 告警引擎分布式安全更新,保留本地日志中心等最新改动
This commit is contained in:
commit
23e9e3da62
137 files changed
+947
-611
No files matched your search
@@ -6,10 +6,11 @@ import { AlertTriangle, Loader2, Minus, Plus, Trash2 } from 'lucide-react';
|
||||
import { ModalShell } from './ModalShell';
|
||||
import { UpdateImageModal } from './UpdateImageModal';
|
||||
import type { ActionModal } from './types';
|
||||
import type { JsonData } from '@/types/common';
|
||||
|
||||
export interface ActionModalsProps {
|
||||
modal: ActionModal;
|
||||
deployment: any;
|
||||
deployment?: JsonData;
|
||||
namespace: string;
|
||||
deploymentName: string;
|
||||
newImage: string;
|
||||
|
||||
@@ -8,6 +8,7 @@ import { FileText, RefreshCw, Loader2, X } from 'lucide-react';
|
||||
import { kubernetesApi } from '@/api';
|
||||
import { useToast } from '@/hooks/use-toast';
|
||||
import { useUserStore } from '@/store';
|
||||
import type { JsonData } from '@/types/common';
|
||||
|
||||
export interface PodLogsModalProps {
|
||||
clusterCode: string;
|
||||
@@ -28,7 +29,7 @@ export function PodLogsModal({ clusterCode, namespace, podName, containers, onCl
|
||||
const loadLogs = async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const res: Record<string, any> = await kubernetesApi.getPodLogs(clusterCode, namespace, podName, tail, container || undefined);
|
||||
const res: JsonData = await kubernetesApi.getPodLogs(clusterCode, namespace, podName, tail, container || undefined);
|
||||
setLogs(res?.data?.logs || res?.logs || res || '无日志');
|
||||
} catch {
|
||||
setLogs('获取日志失败');
|
||||
|
||||
Reference in new issue
Block a user