forked from DevOps/deploy.stack
Merge branch 'main' of 6t7.net:cnphpbb/deploy.stack
This commit is contained in:
@@ -267,7 +267,7 @@ class DiskInspection:
|
||||
f.write("| 控制器ID | 硬盘类型 | 厂商 | 设备型号 | 序列号 | 健康状态 | 温度(°C) | 通电时间 |\n")
|
||||
f.write("|----------|----------|------|----------|--------|----------|----------|----------|\n")
|
||||
|
||||
for controller_id in range(self.controller_count):
|
||||
for controller_id in range(self.controller_count, self.megaraid_count):
|
||||
info = self.results.get(controller_id, {})
|
||||
if "health_status" in info: # 只显示有数据的控制器
|
||||
f.write(f"| {controller_id} ")
|
||||
@@ -283,7 +283,7 @@ class DiskInspection:
|
||||
f.write("\n## 控制器详细信息\n\n")
|
||||
|
||||
has_issues = False
|
||||
for controller_id in range(self.controller_count):
|
||||
for controller_id in range(self.controller_count, self.megaraid_count):
|
||||
info = self.results.get(controller_id, {})
|
||||
if "health_status" in info: # 只显示有数据的控制器
|
||||
f.write(f"### 控制器 {controller_id}\n")
|
||||
@@ -330,7 +330,7 @@ class DiskInspection:
|
||||
f.write("\n## 异常汇总\n\n")
|
||||
if has_issues:
|
||||
f.write("**发现异常控制器,请关注以下问题:**\n\n")
|
||||
for controller_id in range(self.controller_count):
|
||||
for controller_id in range(self.controller_count, self.megaraid_count):
|
||||
info = self.results.get(controller_id, {})
|
||||
if info.get("health_status", "") not in ["OK", "PASSED"]:
|
||||
f.write(f"- **控制器 {controller_id}**: 状态为 {info.get('health_status', '未知')}\n")
|
||||
|
||||
Reference in New Issue
Block a user