feat: 新增设备巡检模块实现完整的巡检告警功能
新增设备巡检模块核心功能,包括: - 巡检数据存储与调度系统 - 华为/H3C交换机及Linux服务器采集器 - 设备扩展配置与告警规则管理 - 主机详情页巡检配置入口 - 产品名称自定义设置功能 - 网络设备SSH exec通道兼容处理
This commit is contained in:
@@ -1092,6 +1092,7 @@ function createPreloadApi(ctx) {
|
||||
windowClose: () => ipcRenderer.invoke("netcatty:window:close"),
|
||||
windowIsMaximized: () => ipcRenderer.invoke("netcatty:window:isMaximized"),
|
||||
windowIsFullscreen: () => ipcRenderer.invoke("netcatty:window:isFullscreen"),
|
||||
windowFullscreen: (shouldFullscreen) => ipcRenderer.invoke("netcatty:window:fullscreen", shouldFullscreen),
|
||||
windowFocus: () => ipcRenderer.invoke("netcatty:window:focus"),
|
||||
setTerminalKeyboardFocus: (focused) => ipcRenderer.send(
|
||||
"netcatty:window:set-terminal-keyboard-focus",
|
||||
@@ -2068,6 +2069,44 @@ function createPreloadApi(ctx) {
|
||||
ipcRenderer.on("netcatty:script:session-input", handler);
|
||||
return () => ipcRenderer.removeListener("netcatty:script:session-input", handler);
|
||||
},
|
||||
|
||||
// ===== Inspection (设备巡检) =====
|
||||
inspection: {
|
||||
getLabels: () => ipcRenderer.invoke("inspection:getLabels"),
|
||||
getSysConfig: () => ipcRenderer.invoke("inspection:getSysConfig"),
|
||||
updateSysConfig: (updates) => ipcRenderer.invoke("inspection:updateSysConfig", updates),
|
||||
getCatalog: () => ipcRenderer.invoke("inspection:getCatalog"),
|
||||
getTiers: () => ipcRenderer.invoke("inspection:getTiers"),
|
||||
getAdapters: () => ipcRenderer.invoke("inspection:getAdapters"),
|
||||
getAllExtensions: () => ipcRenderer.invoke("inspection:getAllExtensions"),
|
||||
getExtension: (hostId) => ipcRenderer.invoke("inspection:getExtension", hostId),
|
||||
upsertExtension: (hostId, data) => ipcRenderer.invoke("inspection:upsertExtension", hostId, data),
|
||||
deleteExtension: (hostId) => ipcRenderer.invoke("inspection:deleteExtension", hostId),
|
||||
getEffectiveInterval: (hostId) => ipcRenderer.invoke("inspection:getEffectiveInterval", hostId),
|
||||
getEnabledDevices: () => ipcRenderer.invoke("inspection:getEnabledDevices"),
|
||||
listRules: () => ipcRenderer.invoke("inspection:listRules"),
|
||||
getRule: (ruleId) => ipcRenderer.invoke("inspection:getRule", ruleId),
|
||||
createRule: (data) => ipcRenderer.invoke("inspection:createRule", data),
|
||||
updateRule: (ruleId, updates) => ipcRenderer.invoke("inspection:updateRule", ruleId, updates),
|
||||
deleteRule: (ruleId) => ipcRenderer.invoke("inspection:deleteRule", ruleId),
|
||||
toggleRule: (ruleId, enabled) => ipcRenderer.invoke("inspection:toggleRule", ruleId, enabled),
|
||||
getLatestAll: () => ipcRenderer.invoke("inspection:getLatestAll"),
|
||||
getLatestByDevice: (hostId, limit) => ipcRenderer.invoke("inspection:getLatestByDevice", hostId, limit),
|
||||
getRecentResults: (limit) => ipcRenderer.invoke("inspection:getRecentResults", limit),
|
||||
listAlerts: (options) => ipcRenderer.invoke("inspection:listAlerts", options),
|
||||
getActiveAlerts: () => ipcRenderer.invoke("inspection:getActiveAlerts"),
|
||||
getAlertStats: () => ipcRenderer.invoke("inspection:getAlertStats"),
|
||||
acknowledgeAlert: (alertId, operator) => ipcRenderer.invoke("inspection:acknowledgeAlert", alertId, operator),
|
||||
resolveAlert: (alertId, reason, operator) => ipcRenderer.invoke("inspection:resolveAlert", alertId, reason, operator),
|
||||
closeAlert: (alertId, note) => ipcRenderer.invoke("inspection:closeAlert", alertId, note),
|
||||
updateAlertNote: (alertId, note) => ipcRenderer.invoke("inspection:updateAlertNote", alertId, note),
|
||||
schedulerStart: () => ipcRenderer.invoke("inspection:scheduler:start"),
|
||||
schedulerStop: () => ipcRenderer.invoke("inspection:scheduler:stop"),
|
||||
schedulerStatus: () => ipcRenderer.invoke("inspection:scheduler:status"),
|
||||
scanNow: (hostId) => ipcRenderer.invoke("inspection:scheduler:scanNow", hostId),
|
||||
scanAllNow: () => ipcRenderer.invoke("inspection:scheduler:scanAllNow"),
|
||||
runInspection: (payload) => ipcRenderer.invoke("inspection:runInspection", payload),
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user