From 66daaa4b2a17ddb4536f8466eb9a9d5cfb1ffd3b Mon Sep 17 00:00:00 2001 From: JackTerok Date: Sat, 29 Dec 2018 04:58:40 +0100 Subject: [PATCH] Fixed Settings.General --- Core/DataObjects/PTMagicData.cs | 2 +- Core/DataObjects/ProfitTrailerData.cs | 2 +- Core/MarketAnalyzer/CoinMarketCap.cs | 2 +- Monitor/Pages/BagAnalyzer.cshtml.cs | 2 +- Monitor/Pages/BuyAnalyzer.cshtml.cs | 2 +- Monitor/Pages/DCACalculator.cshtml.cs | 2 +- Monitor/Pages/SalesAnalyzer.cshtml.cs | 2 +- Monitor/Pages/SettingsGeneral.cshtml | 27 -------------------- Monitor/Pages/_get/BagDetails.cshtml.cs | 2 +- Monitor/Pages/_get/BagList.cshtml.cs | 2 +- Monitor/Pages/_get/BuyList.cshtml.cs | 2 +- Monitor/Pages/_get/DashboardBottom.cshtml.cs | 2 +- Monitor/Pages/_get/DashboardTop.cshtml.cs | 2 +- Monitor/Pages/_get/SalesList.cshtml.cs | 2 +- Monitor/Pages/_get/TickerWidgets.cshtml.cs | 2 +- 15 files changed, 14 insertions(+), 41 deletions(-) diff --git a/Core/DataObjects/PTMagicData.cs b/Core/DataObjects/PTMagicData.cs index a44e37d..7fe2249 100644 --- a/Core/DataObjects/PTMagicData.cs +++ b/Core/DataObjects/PTMagicData.cs @@ -45,7 +45,7 @@ namespace Core.Main.DataObjects.PTMagicData public string Exchange { get; set; } public double StartBalance { get; set; } = 0; public string InstanceName { get; set; } = "PT Magic"; - public string TimezoneOffset { get; set; } = "+0:00"; + public string TimezoneOffset { get; set; } = "+0:00"; public string MainFiatCurrency { get; set; } = "USD"; public string CoinMarketCapAPIKey { get; set; } } diff --git a/Core/DataObjects/ProfitTrailerData.cs b/Core/DataObjects/ProfitTrailerData.cs index e167142..ea1be13 100644 --- a/Core/DataObjects/ProfitTrailerData.cs +++ b/Core/DataObjects/ProfitTrailerData.cs @@ -23,7 +23,7 @@ namespace Core.Main.DataObjects private TransactionData _transactionData = null; private DateTimeOffset _dateTimeNow = Constants.confMinDate; - public ProfitTrailerData(string ptmBasePath, PTMagicConfiguration systemConfiguration) + public ProfitTrailerData(PTMagicConfiguration systemConfiguration) { string html = ""; string url = systemConfiguration.GeneralSettings.Application.ProfitTrailerMonitorURL + "api/data?token=" + systemConfiguration.GeneralSettings.Application.ProfitTrailerServerAPIToken; diff --git a/Core/MarketAnalyzer/CoinMarketCap.cs b/Core/MarketAnalyzer/CoinMarketCap.cs index 93ce88a..49a66a4 100644 --- a/Core/MarketAnalyzer/CoinMarketCap.cs +++ b/Core/MarketAnalyzer/CoinMarketCap.cs @@ -17,7 +17,7 @@ namespace Core.MarketAnalyzer string result = ""; try { - string baseUrl = "https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest?limit=200"; + string baseUrl = "https://sandbox-api.coinmarketcap.com/v1/cryptocurrency/listings/latest?limit=200"; string cmcAPI = systemConfiguration.GeneralSettings.Application.CoinMarketCapAPIKey; log.DoLogInfo("CoinMarketCap - Getting market data..."); diff --git a/Monitor/Pages/BagAnalyzer.cshtml.cs b/Monitor/Pages/BagAnalyzer.cshtml.cs index 0408e0c..d45df15 100644 --- a/Monitor/Pages/BagAnalyzer.cshtml.cs +++ b/Monitor/Pages/BagAnalyzer.cshtml.cs @@ -21,7 +21,7 @@ namespace Monitor.Pages private void BindData() { - PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration); + PTData = new ProfitTrailerData(PTMagicConfiguration); } } } diff --git a/Monitor/Pages/BuyAnalyzer.cshtml.cs b/Monitor/Pages/BuyAnalyzer.cshtml.cs index 929de0b..6b3eda4 100644 --- a/Monitor/Pages/BuyAnalyzer.cshtml.cs +++ b/Monitor/Pages/BuyAnalyzer.cshtml.cs @@ -21,7 +21,7 @@ namespace Monitor.Pages private void BindData() { - PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration); + PTData = new ProfitTrailerData(PTMagicConfiguration); } } } diff --git a/Monitor/Pages/DCACalculator.cshtml.cs b/Monitor/Pages/DCACalculator.cshtml.cs index f4133c9..9292df4 100644 --- a/Monitor/Pages/DCACalculator.cshtml.cs +++ b/Monitor/Pages/DCACalculator.cshtml.cs @@ -19,7 +19,7 @@ namespace Monitor.Pages private void BindData() { - PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration); + PTData = new ProfitTrailerData(PTMagicConfiguration); } } } diff --git a/Monitor/Pages/SalesAnalyzer.cshtml.cs b/Monitor/Pages/SalesAnalyzer.cshtml.cs index 02e9e78..7aa02b8 100644 --- a/Monitor/Pages/SalesAnalyzer.cshtml.cs +++ b/Monitor/Pages/SalesAnalyzer.cshtml.cs @@ -29,7 +29,7 @@ namespace Monitor.Pages private void BindData() { - PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration); + PTData = new ProfitTrailerData(PTMagicConfiguration); // Convert local offset time to UTC TimeSpan offsetTimeSpan = TimeSpan.Parse(PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.Replace("+", "")); diff --git a/Monitor/Pages/SettingsGeneral.cshtml b/Monitor/Pages/SettingsGeneral.cshtml index 3a148c3..33d1c56 100644 --- a/Monitor/Pages/SettingsGeneral.cshtml +++ b/Monitor/Pages/SettingsGeneral.cshtml @@ -89,33 +89,6 @@ -
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
-
diff --git a/Monitor/Pages/_get/BagDetails.cshtml.cs b/Monitor/Pages/_get/BagDetails.cshtml.cs index 77c7daf..cad873d 100644 --- a/Monitor/Pages/_get/BagDetails.cshtml.cs +++ b/Monitor/Pages/_get/BagDetails.cshtml.cs @@ -24,7 +24,7 @@ namespace Monitor.Pages { private void BindData() { DCAMarket = GetStringParameter("m", ""); - PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration); + PTData = new ProfitTrailerData(PTMagicConfiguration); DCALogData = PTData.DCALog.Find(d => d.Market == DCAMarket); diff --git a/Monitor/Pages/_get/BagList.cshtml.cs b/Monitor/Pages/_get/BagList.cshtml.cs index 35ebd89..d4f7e2b 100644 --- a/Monitor/Pages/_get/BagList.cshtml.cs +++ b/Monitor/Pages/_get/BagList.cshtml.cs @@ -23,7 +23,7 @@ namespace Monitor.Pages { SortFieldId = GetStringParameter("s", "ProfitPercent"); SortDirection = GetStringParameter("d", "DESC"); - PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration); + PTData = new ProfitTrailerData(PTMagicConfiguration); } } } diff --git a/Monitor/Pages/_get/BuyList.cshtml.cs b/Monitor/Pages/_get/BuyList.cshtml.cs index 67cf211..431b28d 100644 --- a/Monitor/Pages/_get/BuyList.cshtml.cs +++ b/Monitor/Pages/_get/BuyList.cshtml.cs @@ -23,7 +23,7 @@ namespace Monitor.Pages { SortFieldId = GetStringParameter("s", "ProfitPercent"); SortDirection = GetStringParameter("d", "DESC"); - PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration); + PTData = new ProfitTrailerData(PTMagicConfiguration); } } } diff --git a/Monitor/Pages/_get/DashboardBottom.cshtml.cs b/Monitor/Pages/_get/DashboardBottom.cshtml.cs index ed71361..f60ae71 100644 --- a/Monitor/Pages/_get/DashboardBottom.cshtml.cs +++ b/Monitor/Pages/_get/DashboardBottom.cshtml.cs @@ -25,7 +25,7 @@ namespace Monitor.Pages { } private void BindData() { - PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration); + PTData = new ProfitTrailerData(PTMagicConfiguration); // Cleanup temp files FileHelper.CleanupFilesMinutes(PTMagicMonitorBasePath + "wwwroot" + System.IO.Path.DirectorySeparatorChar + "assets" + System.IO.Path.DirectorySeparatorChar + "tmp" + System.IO.Path.DirectorySeparatorChar, 5); diff --git a/Monitor/Pages/_get/DashboardTop.cshtml.cs b/Monitor/Pages/_get/DashboardTop.cshtml.cs index 98d549e..d13dfe8 100644 --- a/Monitor/Pages/_get/DashboardTop.cshtml.cs +++ b/Monitor/Pages/_get/DashboardTop.cshtml.cs @@ -20,7 +20,7 @@ namespace Monitor.Pages { } private void BindData() { - PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration); + PTData = new ProfitTrailerData(PTMagicConfiguration); // Convert local offset time to UTC TimeSpan offsetTimeSpan = TimeSpan.Parse(PTMagicConfiguration.GeneralSettings.Application.TimezoneOffset.Replace("+", "")); diff --git a/Monitor/Pages/_get/SalesList.cshtml.cs b/Monitor/Pages/_get/SalesList.cshtml.cs index 2ae5dfe..e8333cf 100644 --- a/Monitor/Pages/_get/SalesList.cshtml.cs +++ b/Monitor/Pages/_get/SalesList.cshtml.cs @@ -29,7 +29,7 @@ namespace Monitor.Pages { salesDateString = GetStringParameter("d", ""); salesMonthString = GetStringParameter("m", ""); - PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration); + PTData = new ProfitTrailerData(PTMagicConfiguration); if (!salesDateString.Equals("")) { SalesDate = SystemHelper.TextToDateTime(salesDateString, Constants.confMinDate); diff --git a/Monitor/Pages/_get/TickerWidgets.cshtml.cs b/Monitor/Pages/_get/TickerWidgets.cshtml.cs index 6d7d7cc..3c65fb2 100644 --- a/Monitor/Pages/_get/TickerWidgets.cshtml.cs +++ b/Monitor/Pages/_get/TickerWidgets.cshtml.cs @@ -20,7 +20,7 @@ namespace Monitor.Pages { } private void BindData() { - PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration); + PTData = new ProfitTrailerData(PTMagicConfiguration); // Get markets with active single settings foreach (string key in Summary.MarketSummary.Keys) {