feat(burst-detection): update analysis parameters
This commit is contained in:
@@ -115,6 +115,12 @@ const SchemeQuery: React.FC<Props> = ({
|
||||
username: payload?.username ?? scheme.username,
|
||||
create_time: payload?.create_time ?? scheme.create_time,
|
||||
algorithm_params: payload?.algorithm_params ?? detail?.algorithm_params,
|
||||
requested_target_time: payload?.requested_target_time,
|
||||
target_time: payload?.target_time,
|
||||
reference_window: payload?.reference_window,
|
||||
sampling_interval_minutes: payload?.sampling_interval_minutes,
|
||||
daily_scores: payload?.daily_scores,
|
||||
data_quality: payload?.data_quality,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -245,6 +251,9 @@ const SchemeQuery: React.FC<Props> = ({
|
||||
const mostAnomalousDay =
|
||||
payload?.summary?.most_anomalous_day ?? summary?.most_anomalous_day ?? "-";
|
||||
const sensorCount = payload?.sensor_nodes?.length ?? scheme.scheme_detail?.sensor_nodes?.length ?? 0;
|
||||
const targetTime = payload?.target_time ?? payload?.summary?.target_time;
|
||||
const targetScore = payload?.summary?.target_score ?? summary?.target_score;
|
||||
const targetRank = payload?.summary?.target_rank ?? summary?.target_rank;
|
||||
|
||||
return (
|
||||
<Card key={scheme.scheme_id} variant="outlined" className="transition-shadow hover:shadow-md">
|
||||
@@ -293,30 +302,36 @@ const SchemeQuery: React.FC<Props> = ({
|
||||
<Box className="grid grid-cols-3 gap-2">
|
||||
<Box className="rounded bg-gray-50 p-2">
|
||||
<Typography variant="caption" className="text-gray-500">
|
||||
异常天数
|
||||
{targetTime ? "目标时刻" : "异常天数"}
|
||||
</Typography>
|
||||
<Typography variant="body2" className="font-semibold text-gray-900">
|
||||
{anomalyDayCount}
|
||||
{targetTime ? dayjs(targetTime).format("MM-DD HH:mm") : anomalyDayCount}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box className="rounded bg-gray-50 p-2">
|
||||
<Typography variant="caption" className="text-gray-500">
|
||||
最异常日
|
||||
{targetTime ? "目标分数" : "最异常日"}
|
||||
</Typography>
|
||||
<Typography variant="body2" className="font-semibold text-gray-900">
|
||||
{isBurst
|
||||
? typeof mostAnomalousDay === "number"
|
||||
? `第 ${mostAnomalousDay} 天`
|
||||
: mostAnomalousDay
|
||||
: "无"}
|
||||
{targetTime
|
||||
? typeof targetScore === "number"
|
||||
? targetScore.toFixed(4)
|
||||
: "-"
|
||||
: isBurst
|
||||
? typeof mostAnomalousDay === "number"
|
||||
? `第 ${mostAnomalousDay} 天`
|
||||
: mostAnomalousDay
|
||||
: "无"}
|
||||
</Typography>
|
||||
</Box>
|
||||
<Box className="rounded bg-gray-50 p-2">
|
||||
<Typography variant="caption" className="text-gray-500">
|
||||
测点数
|
||||
{targetTime ? "异常排名" : "测点数"}
|
||||
</Typography>
|
||||
<Typography variant="body2" className="font-semibold text-gray-900">
|
||||
{sensorCount}
|
||||
{targetTime && targetRank
|
||||
? `${targetRank} / ${payload?.day_count ?? 15}`
|
||||
: sensorCount}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
@@ -336,6 +351,8 @@ const SchemeQuery: React.FC<Props> = ({
|
||||
if (ds === "monitoring") return "监测数据";
|
||||
if (os === "simulation_scheme_timerange") return "模拟数据";
|
||||
if (os === "backend_timerange") return "监测数据";
|
||||
if (os === "latest_monitoring") return "最新监测数据";
|
||||
if (os === "historical_monitoring") return "历史监测回放";
|
||||
return os || "-";
|
||||
})()}
|
||||
</Typography>
|
||||
@@ -354,14 +371,16 @@ const SchemeQuery: React.FC<Props> = ({
|
||||
</Box>
|
||||
<Box className="grid grid-cols-[78px_1fr] items-center gap-x-2">
|
||||
<Typography variant="caption" className="text-gray-600">
|
||||
算法参数:
|
||||
侦测口径:
|
||||
</Typography>
|
||||
<Typography variant="caption" className="font-medium text-gray-900">
|
||||
频域截断系数:{scheme.scheme_detail?.algorithm_params?.mu ?? payload?.algorithm_params?.mu ?? "-"}
|
||||
,每日采样点数:
|
||||
频域系数:{scheme.scheme_detail?.algorithm_params?.mu ?? payload?.algorithm_params?.mu ?? "-"}
|
||||
,每日采样:
|
||||
{scheme.scheme_detail?.algorithm_params?.points_per_day ??
|
||||
payload?.algorithm_params?.points_per_day ??
|
||||
"-"}
|
||||
点,阈值:
|
||||
{payload?.summary?.score_threshold ?? "-"}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user