mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 12:30:50 +01:00
Use the ToString() function directly for enum-to-string conversions
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
fc75ceb4ce
commit
2766a18987
@ -83,7 +83,7 @@ namespace XenAdmin.Actions
|
||||
var analysisResult = GetAnalysisResult(diagnosticToken, Pool.HealthCheckSettings.UploadUuid);
|
||||
log.Info("Saving analysis result");
|
||||
Dictionary<string, string> newConfig = Pool.health_check_config;
|
||||
newConfig[HealthCheckSettings.REPORT_ANALYSIS_SEVERITY] = HealthCheckSettings.DiagnosticAlertSeverityToString(GetMaxSeverity(analysisResult));
|
||||
newConfig[HealthCheckSettings.REPORT_ANALYSIS_SEVERITY] = GetMaxSeverity(analysisResult).ToString();
|
||||
newConfig[HealthCheckSettings.REPORT_ANALYSIS_ISSUES_DETECTED] = analysisResult.Count.ToString();
|
||||
newConfig[HealthCheckSettings.REPORT_ANALYSIS_UPLOAD_UUID] = Pool.HealthCheckSettings.UploadUuid;
|
||||
newConfig[HealthCheckSettings.REPORT_ANALYSIS_UPLOAD_TIME] = Pool.HealthCheckSettings.LastSuccessfulUpload;
|
||||
|
@ -382,10 +382,5 @@ namespace XenAdmin.Model
|
||||
return result;
|
||||
return DiagnosticAlertSeverity.Info;
|
||||
}
|
||||
|
||||
internal static string DiagnosticAlertSeverityToString(DiagnosticAlertSeverity severity)
|
||||
{
|
||||
return severity.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user