From ff7ddb84353c6862184cb48abd13334a90fcbda9 Mon Sep 17 00:00:00 2001 From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com> Date: Sat, 6 Feb 2021 00:22:01 +0900 Subject: [PATCH 1/2] rename variable for clarity --- Core/MarketAnalyzer/BaseAnalyzer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/MarketAnalyzer/BaseAnalyzer.cs b/Core/MarketAnalyzer/BaseAnalyzer.cs index b60d0f0..51b2628 100644 --- a/Core/MarketAnalyzer/BaseAnalyzer.cs +++ b/Core/MarketAnalyzer/BaseAnalyzer.cs @@ -391,7 +391,7 @@ namespace Core.MarketAnalyzer if (marketTrendChanges != null && marketTrendChanges.Count > 0) { double totalTrendChange = 0; - int trendChangeCount = marketTrendChanges.Count; + int trendsCount = marketTrendChanges.Count; foreach (MarketTrendChange marketTrendChange in marketTrendChanges) { if (marketTrend.TrendThreshold != 0) @@ -399,7 +399,7 @@ namespace Core.MarketAnalyzer if ((marketTrendChange.TrendChange > marketTrend.TrendThreshold) || (marketTrendChange.TrendChange < (marketTrend.TrendThreshold * -1))) { log.DoLogInfo("Market trend '" + marketTrend.Name + "' is ignoring " + marketTrendChange.Market + " for exceeding TrendThreshold."); - trendChangeCount += -1; + trendsCount += -1; } else { @@ -411,7 +411,7 @@ namespace Core.MarketAnalyzer totalTrendChange += marketTrendChange.TrendChange; } } - double averageTrendChange = totalTrendChange / trendChangeCount; + double averageTrendChange = totalTrendChange / trendsCount; result.Add(marketTrend.Name, averageTrendChange); log.DoLogInfo("Built average market trend change '" + marketTrend.Name + "' (" + averageTrendChange.ToString("#,#0.00") + "% in " + marketTrend.TrendMinutes.ToString() + " minutes) for " + marketTrendChanges.Count.ToString() + " markets."); } From 2ee2a2907d8917f57c8bcd6e4b17c2b31dcc69a0 Mon Sep 17 00:00:00 2001 From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com> Date: Sat, 6 Feb 2021 00:23:32 +0900 Subject: [PATCH 2/2] Health icon tootip fix --- Monitor/Pages/_get/TickerWidgets.cshtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Monitor/Pages/_get/TickerWidgets.cshtml b/Monitor/Pages/_get/TickerWidgets.cshtml index fa948f6..19920ca 100644 --- a/Monitor/Pages/_get/TickerWidgets.cshtml +++ b/Monitor/Pages/_get/TickerWidgets.cshtml @@ -16,10 +16,10 @@ string iconColor = "text-success"; string ptMagicHealthIcon = "fa-heartbeat"; - string ptMagicHealthTooltip = "PT Magic is alive and healthy!
Time elapsed since last run:"+ lastRuntime; + 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."; + ptMagicHealthTooltip = "PT Magic seems to have problems, check the logs! Time elapsed since last run: " + Math.Round(elapsedSecondsSinceRuntime / 60, 1) + " mins."; iconColor = "text-danger"; } }