Fixed Settings.General
This commit is contained in:
parent
f8747bfe20
commit
66daaa4b2a
|
@ -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;
|
||||
|
|
|
@ -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...");
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace Monitor.Pages
|
|||
|
||||
private void BindData()
|
||||
{
|
||||
PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration);
|
||||
PTData = new ProfitTrailerData(PTMagicConfiguration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace Monitor.Pages
|
|||
|
||||
private void BindData()
|
||||
{
|
||||
PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration);
|
||||
PTData = new ProfitTrailerData(PTMagicConfiguration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Monitor.Pages
|
|||
|
||||
private void BindData()
|
||||
{
|
||||
PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration);
|
||||
PTData = new ProfitTrailerData(PTMagicConfiguration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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("+", ""));
|
||||
|
|
|
@ -89,33 +89,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 col-form-label">Exchange <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="The exchange your are running Profit Trailer on."></i></label>
|
||||
<div class="col-md-8">
|
||||
<select name="Application_Exchange" class="form-control">
|
||||
<option selected="@(Model.PTMagicConfiguration.GeneralSettings.Application.Exchange.Equals("Binance", StringComparison.InvariantCultureIgnoreCase))">Binance</option>
|
||||
<option selected="@(Model.PTMagicConfiguration.GeneralSettings.Application.Exchange.Equals("Bittrex", StringComparison.InvariantCultureIgnoreCase))">Bittrex</option>
|
||||
<option selected="@(Model.PTMagicConfiguration.GeneralSettings.Application.Exchange.Equals("Poloniex", StringComparison.InvariantCultureIgnoreCase))">Poloniex</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 col-form-label">Start Balance <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="The balance you had in your wallet when you started working with Profit Trailer."></i></label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" class="form-control" name="Application_StartBalance" value="@Model.PTMagicConfiguration.GeneralSettings.Application.StartBalance.ToString(new System.Globalization.CultureInfo("en-US"))">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 col-form-label">Timezone Offset <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="Your timezone offset from GMT."></i></label>
|
||||
<div class="col-md-8">
|
||||
<select name="Application_TimezoneOffset" class="form-control">
|
||||
@Html.Raw(Model.GetTimezoneSelection())
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4 col-form-label">Always Load Default Before Switch <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="If this is enabled, PTMagic will always load default settings before switching to another setting."></i></label>
|
||||
<div class="col-md-8">
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace Monitor.Pages {
|
|||
SortFieldId = GetStringParameter("s", "ProfitPercent");
|
||||
SortDirection = GetStringParameter("d", "DESC");
|
||||
|
||||
PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration);
|
||||
PTData = new ProfitTrailerData(PTMagicConfiguration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace Monitor.Pages {
|
|||
SortFieldId = GetStringParameter("s", "ProfitPercent");
|
||||
SortDirection = GetStringParameter("d", "DESC");
|
||||
|
||||
PTData = new ProfitTrailerData(PTMagicBasePath, PTMagicConfiguration);
|
||||
PTData = new ProfitTrailerData(PTMagicConfiguration);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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("+", ""));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue