From 7362cd2e92c62f40bc91606f38575282f343895c Mon Sep 17 00:00:00 2001 From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com> Date: Mon, 30 Aug 2021 13:02:50 +0900 Subject: [PATCH] Shorting Indicator --- Monitor/Pages/_get/TickerWidgets.cshtml | 17 +++++++++++------ Monitor/Pages/_get/TickerWidgets.cshtml.cs | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Monitor/Pages/_get/TickerWidgets.cshtml b/Monitor/Pages/_get/TickerWidgets.cshtml index 7f2fb03..89d2529 100644 --- a/Monitor/Pages/_get/TickerWidgets.cshtml +++ b/Monitor/Pages/_get/TickerWidgets.cshtml @@ -11,24 +11,29 @@ } // Global setting tool tip - string globalSettingInfoIcon = "Instance: " + Model.PTMagicConfiguration.GeneralSettings.Application.InstanceName + "\" data-template=\"\">"; + string globalIconColor = "text-success"; + string globalSettingInfoIcon = "Instance: " + Model.PTMagicConfiguration.GeneralSettings.Application.InstanceName + "\" data-template=\"\">"; + if (Model.PTData.Properties.Shorting) + { + globalIconColor = "text-danger"; + } // Health indicator DateTime lastRuntime = Model.Summary.LastRuntime; double elapsedSecondsSinceRuntime = DateTime.UtcNow.Subtract(lastRuntime).TotalSeconds; double intervalSeconds = Model.PTMagicConfiguration.AnalyzerSettings.MarketAnalyzer.IntervalMinutes * 60.0; - string iconColor = "text-success"; + string healthIconColor = "text-success"; string ptMagicHealthIcon = "fa-heartbeat"; string ptMagicHealthTooltip = "PT Magic is alive and healthy! Time elapsed since last run: " + Math.Round(elapsedSecondsSinceRuntime / 60, 1) + " mins."; if (elapsedSecondsSinceRuntime > (intervalSeconds * 2)) { ptMagicHealthIcon = "fa-exclamation-triangle"; ptMagicHealthTooltip = "PT Magic seems to have problems, check the logs! Time elapsed since last run: " + Math.Round(elapsedSecondsSinceRuntime / 60, 1) + " mins."; - iconColor = "text-danger"; + healthIconColor = "text-danger"; } } -
+
@Core.Helper.SystemHelper.SplitCamelCase(Model.Summary.CurrentGlobalSetting.SettingName)@Html.Raw(" " + globalSettingInfoIcon)
@@ -37,8 +42,8 @@ SMS: @Html.Raw(activeSingleSettings + " " + singleSettingInfoIcon)
-
- +
+