告警规则表单优化:数字输入框使用本地状态管理,解决清空后回退到默认值问题

This commit is contained in:
dengqichen 2025-12-10 15:04:11 +08:00
parent 1e93fffecc
commit b9b684b778
2 changed files with 14 additions and 33 deletions

View File

@ -220,11 +220,17 @@ public class SystemReleaseServiceImpl
messageBuilder.append(String.format("预计维护时长:%d 分钟\n", messageBuilder.append(String.format("预计维护时长:%d 分钟\n",
release.getEstimatedDuration() != null ? release.getEstimatedDuration() : 10)); release.getEstimatedDuration() != null ? release.getEstimatedDuration() : 10));
// 如果启用自动停止增加提示 // 根据模块类型显示不同的提示信息
if (Boolean.TRUE.equals(release.getEnableAutoShutdown())) { if ("FRONTEND".equals(release.getModule())) {
messageBuilder.append("本次升级程序将自动停止\n"); // 前端更新无感升级无需停止服务
messageBuilder.append("本次为前端更新,无感升级,无需停止服务\n");
} else { } else {
messageBuilder.append("请在维护时间前做好准备\n"); // 后端或全栈更新根据是否自动停止显示不同提示
if (Boolean.TRUE.equals(release.getEnableAutoShutdown())) {
messageBuilder.append("本次升级程序将自动停止\n");
} else {
messageBuilder.append("请在维护时间前做好准备\n");
}
} }
messageBuilder.append("\n望周知。"); messageBuilder.append("\n望周知。");

View File

@ -13,35 +13,10 @@ INSERT INTO system_release (
VALUES ( VALUES (
'system', NOW(), 'system', NOW(), 1, 0, 'system', NOW(), 'system', NOW(), 1, 0,
1.15, 'ALL', NOW(), 1.15, 'ALL', NOW(),
'【后端】 '【前端】
线 - 使退
- deploy_server_monitor status SUCCESS/FAILURE - Popover组件/IP搜索
- StatusEnum MonitorMetricEnum SERVER_STATUS - SSH终端连接状态修复 ''connecting''
- ServerMonitor status
- RepositoryIServerMonitorRepository findRecentMonitorRecords N条监控记录
- ServiceIServerMonitorService saveMonitorRecord countConsecutiveFailures
- IServerAlertService checkServerStatusAlert resolveServerStatusAlert
- ServerAlertServiceImpl WARNINGCRITICAL
- ServerMonitorScheduler SUCCESS记录并解除告警FAILURE记录并触发告警检测
- 35线
- ServerMonitorNotificationConfig serverOfflineTemplateId CPU////使 resourceAlertTemplateId
- ServerMonitorScheduler.collectServerMetrics serverOfflineTemplateId
- ServerAlertServiceImpl.sendServerStatusNotification
使
- CollectionStatusEnum.java StatusEnum
- ServerMonitorScheduler.sendServerOfflineNotification ServerAlertService
- 使 FreeMarker alertType "连续失败X次""使用率X%"
- "请立即处理""请注意观察"
Popover组件/IP搜索
', ',
0, NULL, NULL, 0 0, NULL, NULL, 0
); );