feat:给日志追加当前时间
This commit is contained in:
parent
176aa823b1
commit
8efc3f9b31
16
.env
16
.env
@ -1,10 +1,10 @@
|
||||
IS_DEBUG="true"
|
||||
GRPC_ENDPOINT="47.82.97.10:9090"
|
||||
COSMOS_ENDPOINT="http://47.82.97.10:26657"
|
||||
ACCOUNT_NAME="bchrmll0jvrr"
|
||||
TRAFFIC_OBFUSCATE="47.82.97.10:8180"
|
||||
NODE_SECRET= "shell useless annual satisfy comfort bulk beyond own fly puzzle key shock grief depart capable purpose peasant model stamp city gain parent bright auto"
|
||||
VIET_EVENTS_URL="ws://47.82.97.10:8080/events"
|
||||
VITE_BASE_URL="http://47.82.97.10:8080"
|
||||
VITE_BLOCK_URL="http://47.82.97.10:1317"
|
||||
GRPC_ENDPOINT="10.66.66.230:9090"
|
||||
COSMOS_ENDPOINT="http://10.66.66.230:26657"
|
||||
ACCOUNT_NAME="bltrj0xs"
|
||||
TRAFFIC_OBFUSCATE="10.66.66.230:8180"
|
||||
NODE_SECRET= "protect curtain print mixed void mammal husband bamboo dinner butter beach off leader frost medal pig deputy orphan indoor wolf buyer emerge pause dog"
|
||||
VIET_EVENTS_URL="ws://10.66.66.230:8080/events"
|
||||
VITE_BASE_URL="http://10.66.66.230:8080"
|
||||
VITE_BLOCK_URL="http://10.66.66.230:1317"
|
||||
NODE_OPTIONS=--max-old-space-size=8192
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -6,6 +6,7 @@ import type { EChartsType } from "echarts";
|
||||
import worldGeoJson from "@/assets/echarts-map/json/world.json";
|
||||
import { geoCoordMap, countryNameMap, countryCodeMap } from "@/data";
|
||||
import { getUrl } from "@/lib/utils";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
interface LinesItemType {
|
||||
name: string;
|
||||
@ -45,7 +46,9 @@ const CustomTooltipLeft = ({
|
||||
setIsComplete(false);
|
||||
|
||||
// 先显示第一条日志
|
||||
setVisibleLogs([filteredLogs[0]]);
|
||||
setVisibleLogs([
|
||||
`[${dayjs().format("YYYY-MM-DD HH:mm:ss")}] ${filteredLogs[0]}`,
|
||||
]);
|
||||
|
||||
// 如果只有一条日志,直接设置完成
|
||||
if (filteredLogs.length === 1) {
|
||||
@ -58,7 +61,10 @@ const CustomTooltipLeft = ({
|
||||
|
||||
const timer = setInterval(() => {
|
||||
if (currentIndex < filteredLogs.length) {
|
||||
setVisibleLogs((prev) => [...prev, filteredLogs[currentIndex]]);
|
||||
const curLog = `[${dayjs().format("YYYY-MM-DD HH:mm:ss")}] ${
|
||||
filteredLogs[currentIndex]
|
||||
}`;
|
||||
setVisibleLogs((prev) => [...prev, curLog]);
|
||||
currentIndex++;
|
||||
|
||||
// 如果已经是最后一条,设置完成状态
|
||||
@ -70,7 +76,7 @@ const CustomTooltipLeft = ({
|
||||
clearInterval(timer);
|
||||
setIsComplete(true);
|
||||
}
|
||||
}, 500);
|
||||
}, 1000);
|
||||
|
||||
// 清理函数
|
||||
return () => {
|
||||
|
||||
@ -4,6 +4,7 @@ import type { EChartsType } from "echarts";
|
||||
import worldGeoJson from "@/assets/echarts-map/json/world.json";
|
||||
import { geoCoordMap, countryNameMap, countryCodeMap } from "@/data";
|
||||
import { getUrl } from "@/lib/utils";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
// 连线动画的间隔时间(毫秒)
|
||||
const LINE_ANIMATION_INTERVAL = 500;
|
||||
@ -44,13 +45,14 @@ const CustomTooltip = ({
|
||||
// 创建一个定时器,每500毫秒显示一条新日志
|
||||
const timer = setInterval(() => {
|
||||
if (currentIndex < logs.length) {
|
||||
setVisibleLogs((prev) => [...prev, logs[currentIndex]]);
|
||||
const curLog = `[${dayjs().format("YYYY-MM-DD HH:mm:ss")}] ${logs[currentIndex]}`;
|
||||
setVisibleLogs((prev) => [...prev, curLog]);
|
||||
currentIndex++;
|
||||
} else {
|
||||
clearInterval(timer);
|
||||
setIsComplete(true);
|
||||
}
|
||||
}, 500);
|
||||
}, 1000);
|
||||
|
||||
// 清理函数
|
||||
return () => {
|
||||
|
||||
@ -7,6 +7,7 @@ import worldGeoJson from "@/assets/echarts-map/json/world.json";
|
||||
import { geoCoordMap, countryNameMap, countryCodeMap } from "@/data";
|
||||
import { getUrl } from "@/lib/utils";
|
||||
import { CONST_TOOLTIP_TYPE } from "@/pages/anti-forensics-forwarding";
|
||||
import dayjs from "dayjs";
|
||||
|
||||
interface LinesItemType {
|
||||
name: string;
|
||||
@ -45,9 +46,10 @@ const CustomTooltip = ({
|
||||
// 重置状态
|
||||
setVisibleLogs([]);
|
||||
setIsComplete(false);
|
||||
|
||||
// 先显示第一条日志
|
||||
setVisibleLogs([filteredLogs[0]]);
|
||||
setVisibleLogs([
|
||||
`[${dayjs().format("YYYY-MM-DD HH:mm:ss")}] ${filteredLogs[0]}`,
|
||||
]);
|
||||
|
||||
// 如果只有一条日志,直接设置完成
|
||||
if (filteredLogs.length === 1) {
|
||||
@ -60,7 +62,10 @@ const CustomTooltip = ({
|
||||
|
||||
const timer = setInterval(() => {
|
||||
if (currentIndex < filteredLogs.length) {
|
||||
setVisibleLogs((prev) => [...prev, filteredLogs[currentIndex]]);
|
||||
const curLog = `[${dayjs().format("YYYY-MM-DD HH:mm:ss")}] ${
|
||||
filteredLogs[currentIndex]
|
||||
}`;
|
||||
setVisibleLogs((prev: any) => [...prev, curLog]);
|
||||
currentIndex++;
|
||||
|
||||
// 如果已经是最后一条,设置完成状态
|
||||
@ -72,7 +77,8 @@ const CustomTooltip = ({
|
||||
clearInterval(timer);
|
||||
setIsComplete(true);
|
||||
}
|
||||
}, 500);
|
||||
console.log("visibleLogs", visibleLogs);
|
||||
}, 1000);
|
||||
|
||||
// 清理函数
|
||||
return () => {
|
||||
@ -204,7 +210,9 @@ const CustomTooltipLeft = ({
|
||||
setIsComplete(false);
|
||||
|
||||
// 先显示第一条日志
|
||||
setVisibleLogs([filteredLogs[0]]);
|
||||
setVisibleLogs([
|
||||
`[${dayjs().format("YYYY-MM-DD HH:mm:ss")}] ${filteredLogs[0]}`,
|
||||
]);
|
||||
|
||||
// 如果只有一条日志,直接设置完成
|
||||
if (filteredLogs.length === 1) {
|
||||
@ -217,7 +225,10 @@ const CustomTooltipLeft = ({
|
||||
|
||||
const timer = setInterval(() => {
|
||||
if (currentIndex < filteredLogs.length) {
|
||||
setVisibleLogs((prev) => [...prev, filteredLogs[currentIndex]]);
|
||||
const curLog = `[${dayjs().format("YYYY-MM-DD HH:mm:ss")}] ${
|
||||
filteredLogs[currentIndex]
|
||||
}`;
|
||||
setVisibleLogs((prev) => [...prev, curLog]);
|
||||
currentIndex++;
|
||||
|
||||
// 如果已经是最后一条,设置完成状态
|
||||
@ -229,7 +240,7 @@ const CustomTooltipLeft = ({
|
||||
clearInterval(timer);
|
||||
setIsComplete(true);
|
||||
}
|
||||
}, 500);
|
||||
}, 1000);
|
||||
|
||||
// 清理函数
|
||||
return () => {
|
||||
@ -400,14 +411,13 @@ export const WorldGeo = memo(
|
||||
dataInfo.passAuthentication,
|
||||
...dataInfo.trafficObfuscation,
|
||||
...dataInfo.nestedEncryption,
|
||||
...dataInfo.dynamicRouteGeneration,
|
||||
...(dataInfo?.dynamicRouteGeneration || []),
|
||||
];
|
||||
// 使用新的数据结构
|
||||
const proxiesList =
|
||||
selectedApp && selectedApp ? [...newList, selectedApp] : newList ?? [];
|
||||
// 初始化数据数组 - 不再包含 startCountry
|
||||
const data: any = [];
|
||||
console.log(proxiesList, "proxiesList");
|
||||
// 遍历代理列表
|
||||
proxiesList.forEach((proxyItem: any) => {
|
||||
// 检查是否有数据数组
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user