Merge pull request #2148 from feitianbubu/pr/ops-error-detail-support-custom-time

feat: ops 错误详情弹窗支持自定义时间区间
This commit is contained in:
Wesley Liddick
2026-08-18 13:52:34 +08:00
committed by GitHub
@@ -112,6 +112,17 @@ async function fetchErrorLogs() {
}
Object.assign(params, buildOpsErrorTimeParams(props.timeRange, props.customStartTime, props.customEndTime))
if (props.timeRange === 'custom') {
if (props.customStartTime && props.customEndTime) {
params.start_time = props.customStartTime
params.end_time = props.customEndTime
delete params.time_range
} else {
// Safety fallback: avoid sending time_range=custom (backend doesn't support it)
params.time_range = '1h'
}
}
const platform = String(props.platform || '').trim()
if (platform) params.platform = platform
if (typeof props.groupId === 'number' && props.groupId > 0) params.group_id = props.groupId