Skip to content

Commit c30b67c

Browse files
committed
Fix Controller info not display by default.
1 parent 8de3f27 commit c30b67c

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

cmd/monitor/application.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,19 +223,20 @@ func (app *Application) generateOutput(diskData *model.DiskData, ctrlData *model
223223
return fmt.Errorf("controller formatting failed: %w", err)
224224
}
225225
} else {
226+
// Format disk data if available
227+
if diskData != nil {
228+
if err := formatter.FormatDiskInfo(diskData); err != nil {
229+
app.Logger.Error("Failed to format disk information: %v", err)
230+
}
231+
}
232+
226233
// Format controller data if available
227234
if ctrlData != nil && !app.Config.NoController {
228235
if err := formatter.FormatControllerInfo(ctrlData); err != nil {
229236
app.Logger.Error("Failed to format controller information: %v", err)
230237
}
231238
}
232239

233-
// Format disk data if available
234-
if diskData != nil {
235-
if err := formatter.FormatDiskInfo(diskData); err != nil {
236-
app.Logger.Error("Failed to format disk information: %v", err)
237-
}
238-
}
239240
}
240241

241242
// Verify buffer has content

disk-health-monitor

0 Bytes
Binary file not shown.

internal/model/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func NewDefaultConfig() *Config {
7070
LogDir: defaultLogDir,
7171
NoGroup: false,
7272
NoController: false,
73-
ControllerOnly: false,
73+
ControllerOnly: true,
7474
OutputFile: "",
7575
OutputFormat: OutputFormatText,
7676
DataFile: defaultDataFile,

0 commit comments

Comments
 (0)