@{
DateTime lastRuntime = Model.Summary.LastRuntime;
double elapsedSecondsSinceRuntime = DateTime.UtcNow.Subtract(lastRuntime).TotalSeconds;
double intervalSeconds = Model.PTMagicConfiguration.AnalyzerSettings.MarketAnalyzer.IntervalMinutes * 60.0;
string ptMagicHealthIcon = "
";
if (elapsedSecondsSinceRuntime > (intervalSeconds + intervalSeconds)) {
ptMagicHealthIcon = "
";
}
string floodProtectionIcon = "";
if (Model.Summary.FloodProtectedSetting != null) {
floodProtectionIcon = "
";
}
string lastGlobalSettingSwitch = Core.Helper.SystemHelper.GetProperDurationTime((int)Math.Ceiling(DateTime.UtcNow.Subtract(Model.Summary.LastGlobalSettingSwitch).TotalSeconds)) + " ago";
if (Model.Summary.LastGlobalSettingSwitch == Core.Main.Constants.confMinDate) {
lastGlobalSettingSwitch = "-";
}
int activeSingleSettings = Model.MarketsWithSingleSettings.Count;
string singleSettingInfoIcon = "";
if (activeSingleSettings > 0) {
singleSettingInfoIcon = "
Single Market Settings active for:
-" + Core.Helper.SystemHelper.ConvertListToTokenString(Model.MarketsWithSingleSettings, "
-", true) + "\" data-template=\"\">";
}
}
Active Global Setting |
@Html.Raw(floodProtectionIcon) @Core.Helper.SystemHelper.SplitCamelCase(Model.Summary.CurrentGlobalSetting.SettingName) |
Last Runtime |
@Html.Raw(ptMagicHealthIcon) @Core.Helper.SystemHelper.GetProperDurationTime((int)Math.Ceiling(elapsedSecondsSinceRuntime)) ago |
Last Runtime Length |
@Core.Helper.SystemHelper.GetProperDurationTime(Model.Summary.LastRuntimeSeconds) |
Last Setting Switch |
@lastGlobalSettingSwitch |
Active Single Settings |
@Html.Raw(singleSettingInfoIcon) @activeSingleSettings |