@rank
- @coin
+ @coin
@profit
@sales
@avg
@@ -394,20 +394,7 @@
.transition().duration(0)
.call(salesChart);
- // Add mouseleave, and mousemove event listeners to hide tooltip
- d3.select('.sales-chart').on('mouseleave', function() {
- d3.select('.nvtooltip').style('opacity', 0);
- });
-
- d3.select('body').on('mousemove', function() {
- var chartBounds = d3.select('.sales-chart')[0][0].getBoundingClientRect();
- var mouseX = d3.event.clientX;
- var mouseY = d3.event.clientY;
-
- if (mouseX < chartBounds.left || mouseX > chartBounds.right || mouseY < chartBounds.top || mouseY > chartBounds.bottom) {
- d3.select('.nvtooltip').style('opacity', 0);
- }
- });
+
nv.utils.windowResize(salesChart.update);
return salesChart;
});
@@ -442,20 +429,7 @@
.transition().duration(0)
.call(cumulativeProfitChart);
- // Add mouseleave, and mousemove event listeners to hide tooltip
- d3.select('.cumulative-profit-chart').on('mouseleave', function() {
- d3.select('.nvtooltip').style('opacity', 0);
- });
-
- d3.select('body').on('mousemove', function() {
- var chartBounds = d3.select('.cumulative-profit-chart')[0][0].getBoundingClientRect();
- var mouseX = d3.event.clientX;
- var mouseY = d3.event.clientY;
-
- if (mouseX < chartBounds.left || mouseX > chartBounds.right || mouseY < chartBounds.top || mouseY > chartBounds.bottom) {
- d3.select('.nvtooltip').style('opacity', 0);
- }
- });
+
nv.utils.windowResize(cumulativeProfitChart.update);
return cumulativeProfitChart;
});
@@ -490,20 +464,6 @@
.transition().duration(0)
.call(TCVChart);
- // Add mouseleave, and mousemove event listeners to hide tooltip
- d3.select('.TCV-chart').on('mouseleave', function() {
- d3.select('.nvtooltip').style('opacity', 0);
- });
-
- d3.select('body').on('mousemove', function() {
- var chartBounds = d3.select('.TCV-chart')[0][0].getBoundingClientRect();
- var mouseX = d3.event.clientX;
- var mouseY = d3.event.clientY;
-
- if (mouseX < chartBounds.left || mouseX > chartBounds.right || mouseY < chartBounds.top || mouseY > chartBounds.bottom) {
- d3.select('.nvtooltip').style('opacity', 0);
- }
- });
nv.utils.windowResize(TCVChart.update);
return TCVChart;
});
@@ -538,20 +498,33 @@
.transition().duration(0)
.call(profitChart);
- // Add mouseleave, and mousemove event listeners to hide tooltip
- d3.select('.profit-chart').on('mouseleave', function() {
- d3.select('.nvtooltip').style('opacity', 0);
+
+ profitChart.dispatch.on('renderEnd', function() {
+ // Get the chart's container
+ var container = d3.select('.profit-chart .nv-wrap.nv-lineChart .nv-linesWrap');
+
+ // Remove any existing y=0 line
+ container.selectAll('.zero-line').remove();
+
+ // Check if profitData[0].values is not empty
+ if (profitData[0].values.length > 0) {
+ // Get the x-values of the first and last data points
+ var xMin = profitChart.xAxis.scale()(profitData[0].values[0].x);
+ var xMax = profitChart.xAxis.scale()(profitData[0].values[profitData[0].values.length - 1].x);
+
+ // Add a line at y=0
+ container.insert('line', ':first-child')
+ .attr('class', 'zero-line') // Add a class to the line for easy selection
+ .attr('x1', xMin) // x position of the first end of the line
+ .attr('y1', profitChart.yAxis.scale()(0)) // y position of the first end of the line
+ .attr('x2', xMax) // x position of the second end of the line
+ .attr('y2', profitChart.yAxis.scale()(0)) // y position of the second end of the line
+ .attr('stroke', 'gray') // color of the line
+ .attr('stroke-width', 2); // width of the line
+ }
});
- d3.select('body').on('mousemove', function() {
- var chartBounds = d3.select('.profit-chart')[0][0].getBoundingClientRect();
- var mouseX = d3.event.clientX;
- var mouseY = d3.event.clientY;
- if (mouseX < chartBounds.left || mouseX > chartBounds.right || mouseY < chartBounds.top || mouseY > chartBounds.bottom) {
- d3.select('.nvtooltip').style('opacity', 0);
- }
- });
nv.utils.windowResize(profitChart.update);
return profitChart;
});
@@ -559,4 +532,34 @@
}
})(jQuery);
+
+
+
}
diff --git a/Monitor/Pages/SalesAnalyzer.cshtml.cs b/Monitor/Pages/SalesAnalyzer.cshtml.cs
index dbe7c92..a37d9bd 100644
--- a/Monitor/Pages/SalesAnalyzer.cshtml.cs
+++ b/Monitor/Pages/SalesAnalyzer.cshtml.cs
@@ -54,7 +54,7 @@ namespace Monitor.Pages
DailyStats = this.PTData.DailyStats;
// Convert local offset time to UTC
- TimeSpan offsetTimeSpan = TimeSpan.Parse(PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.Replace("+", ""));
+ TimeSpan offsetTimeSpan = TimeSpan.Parse(MiscData.TimeZoneOffset.Replace("+", ""));
DateTimeNow = DateTimeOffset.UtcNow.ToOffset(offsetTimeSpan);
BuildSalesChartData();
@@ -71,8 +71,8 @@ namespace Monitor.Pages
{
// Get timezone offset
TimeSpan offset;
- bool isNegative = PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.StartsWith("-");
- string offsetWithoutSign = PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.TrimStart('+', '-');
+ bool isNegative = MiscData.TimeZoneOffset.StartsWith("-");
+ string offsetWithoutSign = MiscData.TimeZoneOffset.TrimStart('+', '-');
if (!TimeSpan.TryParse(offsetWithoutSign, out offset))
{
@@ -129,8 +129,8 @@ namespace Monitor.Pages
{
// Get timezone offset
TimeSpan offset;
- bool isNegative = PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.StartsWith("-");
- string offsetWithoutSign = PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.TrimStart('+', '-');
+ bool isNegative = MiscData.TimeZoneOffset.StartsWith("-");
+ string offsetWithoutSign = MiscData.TimeZoneOffset.TrimStart('+', '-');
if (!TimeSpan.TryParse(offsetWithoutSign, out offset))
{
@@ -190,8 +190,8 @@ namespace Monitor.Pages
{
// Get timezone offset
TimeSpan offset;
- bool isNegative = PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.StartsWith("-");
- string offsetWithoutSign = PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.TrimStart('+', '-');
+ bool isNegative = MiscData.TimeZoneOffset.StartsWith("-");
+ string offsetWithoutSign = MiscData.TimeZoneOffset.TrimStart('+', '-');
if (!TimeSpan.TryParse(offsetWithoutSign, out offset))
{
@@ -301,8 +301,8 @@ namespace Monitor.Pages
{
// Get timezone offset
TimeSpan offset;
- bool isNegative = PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.StartsWith("-");
- string offsetWithoutSign = PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.TrimStart('+', '-');
+ bool isNegative = MiscData.TimeZoneOffset.StartsWith("-");
+ string offsetWithoutSign = MiscData.TimeZoneOffset.TrimStart('+', '-');
if (!TimeSpan.TryParse(offsetWithoutSign, out offset))
{
diff --git a/Monitor/Pages/SettingsAnalyzer.cshtml.cs b/Monitor/Pages/SettingsAnalyzer.cshtml.cs
index dcca15d..e627651 100644
--- a/Monitor/Pages/SettingsAnalyzer.cshtml.cs
+++ b/Monitor/Pages/SettingsAnalyzer.cshtml.cs
@@ -6,7 +6,6 @@ using Microsoft.AspNetCore.Mvc;
using Core.Main;
using Core.Helper;
using Core.Main.DataObjects.PTMagicData;
-using Microsoft.Extensions.Primitives;
namespace Monitor.Pages
{
diff --git a/Monitor/Pages/SettingsGeneral.cshtml b/Monitor/Pages/SettingsGeneral.cshtml
index 3b01e47..f01ef9b 100644
--- a/Monitor/Pages/SettingsGeneral.cshtml
+++ b/Monitor/Pages/SettingsGeneral.cshtml
@@ -117,12 +117,12 @@
- *@
@*
Main Fiat Currency
@@ -196,42 +196,48 @@
+
- @*
Max Top Markets
diff --git a/Monitor/Pages/SettingsGeneral.cshtml.cs b/Monitor/Pages/SettingsGeneral.cshtml.cs
index 85a10d4..83f297f 100644
--- a/Monitor/Pages/SettingsGeneral.cshtml.cs
+++ b/Monitor/Pages/SettingsGeneral.cshtml.cs
@@ -27,30 +27,6 @@ namespace Monitor.Pages
return result;
}
- public string GetTimezoneSelection()
- {
- string result = "";
-
- List tzOffsetList = new List();
- foreach (TimeZoneInfo tzi in TimeZoneInfo.GetSystemTimeZones())
- {
- string offsetString = this.GetTimezoneOffsetString(tzi);
- if (!tzOffsetList.Contains(offsetString))
- {
- string selected = "";
- if (PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.Equals(offsetString, StringComparison.InvariantCultureIgnoreCase))
- {
- selected = " selected=\"selected\"";
- }
-
- result += "" + offsetString + " \n";
- tzOffsetList.Add(offsetString);
- }
- }
-
- return result;
- }
-
public void OnGet()
{
base.Init();
@@ -72,30 +48,25 @@ namespace Monitor.Pages
// Read the new settings
PTMagicConfiguration.GeneralSettings.Application.IsEnabled = HttpContext.Request.Form["Application_IsEnabled"].Equals("on");
- PTMagicConfiguration.GeneralSettings.Application.TestMode = HttpContext.Request.Form["Application_TestMode"].Equals("on");
- //PTMagicConfiguration.GeneralSettings.Application.StartBalance = SystemHelper.TextToDouble(HttpContext.Request.Form["Application_StartBalance"], PTMagicConfiguration.GeneralSettings.Application.StartBalance, "en-US");
PTMagicConfiguration.GeneralSettings.Application.ProfitTrailerDefaultSettingName = HttpContext.Request.Form["Application_ProfitTrailerDefaultSettingName"];
PTMagicConfiguration.GeneralSettings.Application.Exchange = HttpContext.Request.Form["Application_Exchange"];
PTMagicConfiguration.GeneralSettings.Application.ProfitTrailerMonitorURL = HttpContext.Request.Form["Application_ProfitTrailerMonitorURL"];
- PTMagicConfiguration.GeneralSettings.Application.ProfitTrailerServerAPIToken = HttpContext.Request.Form["Application_ProfitTrailerServerAPIToken"];
- PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset = HttpContext.Request.Form["Application_TimezoneOffset"];
- //PTMagicConfiguration.GeneralSettings.Application.MainFiatCurrency = HttpContext.Request.Form["Application_MainFiatCurrency"];
PTMagicConfiguration.GeneralSettings.Application.FloodProtectionMinutes = SystemHelper.TextToInteger(HttpContext.Request.Form["Application_FloodProtectionMinutes"], PTMagicConfiguration.GeneralSettings.Application.FloodProtectionMinutes);
PTMagicConfiguration.GeneralSettings.Application.InstanceName = HttpContext.Request.Form["Application_InstanceName"];
PTMagicConfiguration.GeneralSettings.Application.CoinMarketCapAPIKey = HttpContext.Request.Form["Application_CoinMarketCapAPIKey"];
- //PTMagicConfiguration.GeneralSettings.Application.FreeCurrencyConverterAPIKey = HttpContext.Request.Form["Application_FreeCurrencyConverterAPIKey"];
PTMagicConfiguration.GeneralSettings.Monitor.IsPasswordProtected = HttpContext.Request.Form["Monitor_IsPasswordProtected"].Equals("on");
PTMagicConfiguration.GeneralSettings.Monitor.OpenBrowserOnStart = HttpContext.Request.Form["Monitor_OpenBrowserOnStart"].Equals("on");
PTMagicConfiguration.GeneralSettings.Monitor.AnalyzerChart = HttpContext.Request.Form["Monitor_AnalyzerChart"];
PTMagicConfiguration.GeneralSettings.Monitor.Port = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_Port"], PTMagicConfiguration.GeneralSettings.Monitor.Port);
+ PTMagicConfiguration.GeneralSettings.Monitor.LiveTCVTimeframeMinutes = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_LiveTCVTimeframeMinutes"], PTMagicConfiguration.GeneralSettings.Monitor.LiveTCVTimeframeMinutes);
PTMagicConfiguration.GeneralSettings.Monitor.GraphIntervalMinutes = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_GraphIntervalMinutes"], PTMagicConfiguration.GeneralSettings.Monitor.GraphIntervalMinutes);
PTMagicConfiguration.GeneralSettings.Monitor.GraphMaxTimeframeHours = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_GraphMaxTimeframeHours"], PTMagicConfiguration.GeneralSettings.Monitor.GraphMaxTimeframeHours);
PTMagicConfiguration.GeneralSettings.Monitor.ProfitsMaxTimeframeDays = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_ProfitsMaxTimeframeDays"], PTMagicConfiguration.GeneralSettings.Monitor.ProfitsMaxTimeframeDays);
- PTMagicConfiguration.GeneralSettings.Monitor.RefreshSeconds = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_RefreshSeconds"], PTMagicConfiguration.GeneralSettings.Monitor.RefreshSeconds);
+ PTMagicConfiguration.GeneralSettings.Monitor.DashboardChartsRefreshSeconds = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_RefreshSeconds"], PTMagicConfiguration.GeneralSettings.Monitor.DashboardChartsRefreshSeconds);
PTMagicConfiguration.GeneralSettings.Monitor.BagAnalyzerRefreshSeconds = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_BagAnalyzerRefreshSeconds"], PTMagicConfiguration.GeneralSettings.Monitor.BagAnalyzerRefreshSeconds);
PTMagicConfiguration.GeneralSettings.Monitor.BuyAnalyzerRefreshSeconds = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_BuyAnalyzerRefreshSeconds"], PTMagicConfiguration.GeneralSettings.Monitor.BuyAnalyzerRefreshSeconds);
PTMagicConfiguration.GeneralSettings.Monitor.LinkPlatform = HttpContext.Request.Form["Monitor_LinkPlatform"];
- //PTMagicConfiguration.GeneralSettings.Monitor.MaxSalesRecords = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_MaxSalesRecords"], PTMagicConfiguration.GeneralSettings.Monitor.MaxSalesRecords);
+ PTMagicConfiguration.GeneralSettings.Monitor.TVCustomLayout = HttpContext.Request.Form["Monitor_TVCustomLayout"];
PTMagicConfiguration.GeneralSettings.Monitor.MaxTopMarkets = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_MaxTopMarkets"], PTMagicConfiguration.GeneralSettings.Monitor.MaxTopMarkets);
PTMagicConfiguration.GeneralSettings.Monitor.MaxDailySummaries = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_MaxDailySummaries"], PTMagicConfiguration.GeneralSettings.Monitor.MaxDailySummaries);
PTMagicConfiguration.GeneralSettings.Monitor.MaxMonthlySummaries = SystemHelper.TextToInteger(HttpContext.Request.Form["Monitor_MaxMonthlySummaries"], PTMagicConfiguration.GeneralSettings.Monitor.MaxMonthlySummaries);
diff --git a/Monitor/Pages/StatusSummary.cshtml b/Monitor/Pages/StatusSummary.cshtml
index 7bab1c6..cb07c84 100644
--- a/Monitor/Pages/StatusSummary.cshtml
+++ b/Monitor/Pages/StatusSummary.cshtml
@@ -116,13 +116,8 @@
-
-
-
-
-
@@ -136,7 +131,7 @@
@foreach (Core.Main.DataObjects.PTMagicData.GlobalSettingSummary gss in Model.Summary.GlobalSettingSummary.OrderByDescending(g => g.SwitchDateTime).Take(Model.PTMagicConfiguration.GeneralSettings.Monitor.MaxSettingsLogEntries)) {
- TimeSpan offsetTimeSpan = TimeSpan.Parse(Model.PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.Replace("+", ""));
+ TimeSpan offsetTimeSpan = TimeSpan.Parse(Model.MiscData.TimeZoneOffset.Replace("+", ""));
DateTimeOffset settingActivationTime = gss.SwitchDateTime;
settingActivationTime = settingActivationTime.ToOffset(offsetTimeSpan);
diff --git a/Monitor/Pages/StatusSummary.cshtml.cs b/Monitor/Pages/StatusSummary.cshtml.cs
index 8532f09..6f78877 100644
--- a/Monitor/Pages/StatusSummary.cshtml.cs
+++ b/Monitor/Pages/StatusSummary.cshtml.cs
@@ -4,6 +4,7 @@ using System.Linq;
using Microsoft.AspNetCore.Http;
using Core.Main;
using Core.Helper;
+using Core.Main.DataObjects;
using Core.Main.DataObjects.PTMagicData;
namespace Monitor.Pages
@@ -14,6 +15,8 @@ namespace Monitor.Pages
public string SettingsDistribution24hChartDataJSON = "";
public string SettingsDistribution3dChartDataJSON = "";
private Dictionary settingsChartColors = new Dictionary();
+ public ProfitTrailerData PTData = null;
+ public MiscData MiscData { get; set; }
public void OnGet()
{
@@ -24,6 +27,8 @@ namespace Monitor.Pages
private void BindData()
{
+ PTData = this.PtDataObject;
+ MiscData = this.PTData.Misc;
BuildMarketsWithSingleSettings();
BuildChartColors();
Build24hChartData();
diff --git a/Monitor/Pages/Transactions.cshtml b/Monitor/Pages/Transactions.cshtml
deleted file mode 100644
index b41eb9a..0000000
--- a/Monitor/Pages/Transactions.cshtml
+++ /dev/null
@@ -1,174 +0,0 @@
-@page
-@model TransactionsModel
-@{
- ViewData["Title"] = "";
-}
-
-@section Styles {
-
-
-
-}
-
-
-
-
-
-
-
- In this area you may add manual transactions (like deposits and withdrawals) to your PT Magic data. Adding this kind of information will help PT Magic calculating your percentage gains and your balance more accurately.
-
-
-
-
-
-
-
-
-
-
-
-
-
- @if (Model.TransactionData.Transactions.Count > 0) {
-
-
-
-
- Time
- Amount
- Type
-
-
-
- @foreach (Core.Main.DataObjects.PTMagicData.Transaction transaction in Model.TransactionData.Transactions) {
-
-
- @transaction.GetLocalDateTime(Model.PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset).ToShortDateString() @transaction.GetLocalDateTime(Model.PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset).ToShortTimeString()
- @transaction.Amount.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"))
- @if (transaction.Amount > 0) {
- Deposit
- } else {
- Withdrawal
- }
-
- }
-
-
- } else {
-
No transactions found.
- }
-
-
-
-
-
-
-@section Scripts {
-
-
-
-
-
-
-
-}
diff --git a/Monitor/Pages/Transactions.cshtml.cs b/Monitor/Pages/Transactions.cshtml.cs
deleted file mode 100644
index 8312f30..0000000
--- a/Monitor/Pages/Transactions.cshtml.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using Microsoft.AspNetCore.Http;
-using Core.Main;
-using Core.Helper;
-using Core.Main.DataObjects;
-using Core.Main.DataObjects.PTMagicData;
-using System.Globalization;
-
-namespace Monitor.Pages
-{
- public class TransactionsModel : _Internal.BasePageModelSecure
- {
- public TransactionData TransactionData = null;
- public string ValidationMessage = "";
-
- public void OnGet()
- {
- base.Init();
-
- BindData();
- }
-
- private void BindData()
- {
- TransactionData = new TransactionData(PTMagicBasePath);
- }
-
- public void OnPost()
- {
- base.Init();
-
- BindData();
-
- SaveTransaction();
- }
-
- private void SaveTransaction()
- {
- double transactionAmount = 0;
- DateTimeOffset transactionDateTime = Constants.confMinDate;
-
- try
- {
- transactionAmount = SystemHelper.TextToDouble(HttpContext.Request.Form["Transaction_Amount"], transactionAmount, "en-US");
- //transactionDateTime = DateTimeOffset.Parse(HttpContext.Request.Form["Transaction_Date"] + " " + HttpContext.Request.Form["Transaction_Time"], CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal);
- DateTime tmp = DateTime.Parse(HttpContext.Request.Form["Transaction_Date"] + " " + HttpContext.Request.Form["Transaction_Time"], CultureInfo.InvariantCulture, DateTimeStyles.None);
-
- // Convert local offset time to UTC
- TimeSpan offsetTimeSpan = TimeSpan.Parse(PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.Replace("+", ""));
- transactionDateTime = new DateTimeOffset(tmp, offsetTimeSpan);
- }
- catch { }
-
- if (transactionAmount == 0)
- {
- ValidationMessage = "Please enter a valid amount in the format 123.45!";
- }
- else
- {
- if (transactionDateTime == Constants.confMinDate)
- {
- ValidationMessage = "Please select a valid date and time!";
- }
- else
- {
- TransactionData.Transactions.Add(new Transaction() { GUID = Guid.NewGuid().ToString(), Amount = transactionAmount, UTCDateTime = transactionDateTime.UtcDateTime });
- TransactionData.SaveTransactions(PTMagicBasePath);
-
- NotifyHeadline = "Transaction saved!";
- NotifyMessage = "Transaction saved successfully to _data/Transactions.json.";
- NotifyType = "success";
- }
- }
- }
- }
-}
diff --git a/Monitor/Pages/_Layout.cshtml b/Monitor/Pages/_Layout.cshtml
index 337bab8..a4b16ba 100644
--- a/Monitor/Pages/_Layout.cshtml
+++ b/Monitor/Pages/_Layout.cshtml
@@ -192,7 +192,7 @@
}
// Reinstate the interval.
- interval = setInterval(function () { loadWidgets(); }, 5000);
+ interval = setInterval(function () { loadWidgets(); }, 3000);
});
};
diff --git a/Monitor/Pages/_get/BagDetails.cshtml b/Monitor/Pages/_get/BagDetails.cshtml
index aba6d69..30bb6a4 100644
--- a/Monitor/Pages/_get/BagDetails.cshtml
+++ b/Monitor/Pages/_get/BagDetails.cshtml
@@ -103,7 +103,7 @@
diff --git a/Monitor/Pages/_get/BagDetails.cshtml.cs b/Monitor/Pages/_get/BagDetails.cshtml.cs
index b6e651b..e1463b6 100644
--- a/Monitor/Pages/_get/BagDetails.cshtml.cs
+++ b/Monitor/Pages/_get/BagDetails.cshtml.cs
@@ -10,6 +10,7 @@ using Core.MarketAnalyzer;
namespace Monitor.Pages {
public class BagDetailsModel : _Internal.BasePageModelSecure {
public ProfitTrailerData PTData = null;
+ public MiscData MiscData = null;
public string DCAMarket = "";
public DCALogData DCALogData = null;
public DateTimeOffset DateTimeNow = Constants.confMinDate;
@@ -23,13 +24,12 @@ namespace Monitor.Pages {
private void BindData() {
DCAMarket = GetStringParameter("m", "");
-
PTData = this.PtDataObject;
-
+ MiscData = this.PTData.Misc;
DCALogData = PTData.DCALog.Find(d => d.Market == DCAMarket);
// Convert local offset time to UTC
- TimeSpan offsetTimeSpan = TimeSpan.Parse(PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.Replace("+", ""));
+ TimeSpan offsetTimeSpan = TimeSpan.Parse(MiscData.TimeZoneOffset.Replace("+", ""));
DateTimeNow = DateTimeOffset.UtcNow.ToOffset(offsetTimeSpan);
}
}
diff --git a/Monitor/Pages/_get/BagList.cshtml b/Monitor/Pages/_get/BagList.cshtml
index 2323bc1..2c072db 100644
--- a/Monitor/Pages/_get/BagList.cshtml
+++ b/Monitor/Pages/_get/BagList.cshtml
@@ -84,9 +84,9 @@
// Market
@if (mps != null && (mps.ActiveSingleSettings == null || mps.ActiveSingleSettings.Count == 0)) {
- @dcaLogEntry.Market
+ @dcaLogEntry.Market
} else {
- @dcaLogEntry.Market
+ @dcaLogEntry.Market
diff --git a/Monitor/Pages/_get/BuyList.cshtml b/Monitor/Pages/_get/BuyList.cshtml
index 373d1d0..01b29c9 100644
--- a/Monitor/Pages/_get/BuyList.cshtml
+++ b/Monitor/Pages/_get/BuyList.cshtml
@@ -37,9 +37,9 @@
string triggerValueText = Core.ProfitTrailer.StrategyHelper.GetTriggerValueText(Model.Summary, buyLogEntry.BuyStrategies, buyLogEntry.BuyStrategy, buyLogEntry.BBTrigger, buyLogEntry.TriggerValue, 0, true);
@if (mps != null && (mps.ActiveSingleSettings == null || mps.ActiveSingleSettings.Count == 0)) {
- @buyLogEntry.Market
+ @buyLogEntry.Market
} else {
- @buyLogEntry.Market
+ @buyLogEntry.Market
}
@buyLogEntry.PercChange.ToString("#,#0.00")%
@if (buyDisabled) {
diff --git a/Monitor/Pages/_get/DashboardBottom.cshtml b/Monitor/Pages/_get/DashboardBottom.cshtml
index 2e09d17..b95bd52 100644
--- a/Monitor/Pages/_get/DashboardBottom.cshtml
+++ b/Monitor/Pages/_get/DashboardBottom.cshtml
@@ -10,7 +10,48 @@
}
-
+
+
+
+
+ @{
+ string totalCurrentValueString = Model.totalCurrentValue.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"));
+ if (Model.totalCurrentValue > 100) {
+ totalCurrentValueString = Math.Round(Model.totalCurrentValue, 2).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"));
+ }
+ }
+
+
+ TCV: @totalCurrentValueString @Model.Summary.MainMarket
+
+
+
+ Start: @Model.MiscData.StartBalance
+ Gain: @Math.Round(((Model.totalCurrentValue - Model.MiscData.StartBalance) / Model.MiscData.StartBalance) * 100, 2)%
+
+
+
+
+
+
+
+
+
+
Unable to load graph, no sales data found.
+ }
+
+
+
+
+
+
@if (!Model.TrendChartDataJSON.Equals("")) {
@@ -23,37 +64,12 @@
-
-
-
- @{
- string totalCurrentValueString = Model.totalCurrentValue.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"));
- if (Model.totalCurrentValue > 100) {
- totalCurrentValueString = Math.Round(Model.totalCurrentValue, 2).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"));
- }
- }
-
-
-
- Start: @Model.MiscData.StartBalance @Model.Summary.MainMarket
- Gain: @Math.Round(((Model.totalCurrentValue - Model.MiscData.StartBalance) / Model.MiscData.StartBalance) * 100, 2)%
-
-
-
- TCV: @totalCurrentValueString @Model.Summary.MainMarket
-
-
-
-
-
-
-
+
-