Merge pull request #222 from HojouFotytu/develop
Page: Manage Single Market Changes
This commit is contained in:
commit
a225f59c78
|
@ -11,23 +11,43 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="card-box">
|
<div class="card-box">
|
||||||
|
<h4 class="m-t-0 header-title"><b>Applied Single Market Settings</b></h4>
|
||||||
<h4 class="m-t-0 header-title"><b>Applied Single Market Setting Details</b></h4>
|
<tbody>
|
||||||
|
<p style="text-align: center;"><br>
|
||||||
|
<tr>
|
||||||
|
@{
|
||||||
|
Model.CreateSmsList();
|
||||||
|
foreach (string sms in Model.smsList)
|
||||||
|
{
|
||||||
|
int smsCount = 0;
|
||||||
|
foreach (Core.Main.DataObjects.PTMagicData.SingleMarketSettingSummary smsSummary in Model.SingleMarketSettingSummaries)
|
||||||
|
{
|
||||||
|
if (smsSummary.SingleMarketSetting.SettingName == sms)
|
||||||
|
{
|
||||||
|
smsCount = smsCount + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<td><a href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)SettingsAnalyzer#SingleMarketSetting_@sms">@sms</a>: @smsCount    </td>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</tr>
|
||||||
|
</p>
|
||||||
|
</tbody>
|
||||||
|
<br>
|
||||||
<table class="table table-striped table-sm m-b-0" h>
|
<table class="table table-striped table-sm m-b-0" h>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Market Name</th>
|
<th>Market Name</th>
|
||||||
<th class="text-right">Last Price</th>
|
<th>Volume</th>
|
||||||
<th class="text-right">Volume</th>
|
<th>Last Price</th>
|
||||||
<th>Active Setting</th>
|
<th class="text-right">Active Setting </th>
|
||||||
<th> Triggered time</th>
|
<th> Triggered time</th>
|
||||||
<th>Off Triggers</th>
|
<th class="text-center">Off Triggers</th>
|
||||||
<th class="text-right">Current Values</th>
|
<th class="text-center">Current Value</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
</tbody>
|
||||||
@{
|
@{
|
||||||
string lastMarket = "";
|
string lastMarket = "";
|
||||||
}
|
}
|
||||||
|
@ -52,17 +72,17 @@
|
||||||
<a href="@Core.Helper.SystemHelper.GetMarketLink(Model.PTMagicConfiguration.GeneralSettings.Monitor.LinkPlatform, Model.PTMagicConfiguration.GeneralSettings.Application.Exchange, smsSummary.Market, Model.Summary.MainMarket)" target="_blank">@smsSummary.Market</a>
|
<a href="@Core.Helper.SystemHelper.GetMarketLink(Model.PTMagicConfiguration.GeneralSettings.Monitor.LinkPlatform, Model.PTMagicConfiguration.GeneralSettings.Application.Exchange, smsSummary.Market, Model.Summary.MainMarket)" target="_blank">@smsSummary.Market</a>
|
||||||
}
|
}
|
||||||
</th>
|
</th>
|
||||||
<td class="text-right">
|
<td>
|
||||||
@if (!lastMarket.Equals(smsSummary.Market)) {
|
|
||||||
<span>@mps.LatestPrice.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @Model.Summary.MainMarket</span>
|
|
||||||
}
|
|
||||||
</td>
|
|
||||||
<td class="text-right">
|
|
||||||
@if (!lastMarket.Equals(smsSummary.Market)) {
|
@if (!lastMarket.Equals(smsSummary.Market)) {
|
||||||
<span>@Math.Round(mps.Latest24hVolume, 0).ToString("#,#0", new System.Globalization.CultureInfo("en-US")) @Model.Summary.MainMarket</span>
|
<span>@Math.Round(mps.Latest24hVolume, 0).ToString("#,#0", new System.Globalization.CultureInfo("en-US")) @Model.Summary.MainMarket</span>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@if (!lastMarket.Equals(smsSummary.Market)) {
|
||||||
|
<span>@mps.LatestPrice.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US")) @Model.Summary.MainMarket</span>
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
<td class="text-right">
|
||||||
@Core.Helper.SystemHelper.SplitCamelCase(smsSummary.SingleMarketSetting.SettingName)
|
@Core.Helper.SystemHelper.SplitCamelCase(smsSummary.SingleMarketSetting.SettingName)
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -120,7 +140,7 @@
|
||||||
<i class="text-warning">Not specified</i> <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="This setting has no Off Triggers so it will stay active until its triggers are no longer matched."></i>
|
<i class="text-warning">Not specified</i> <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="This setting has no Off Triggers so it will stay active until its triggers are no longer matched."></i>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right">
|
<td class="text-center">
|
||||||
@if (settingHasOffTriggers) {
|
@if (settingHasOffTriggers) {
|
||||||
foreach (Core.Main.DataObjects.PTMagicData.OffTrigger ot in smsSummary.SingleMarketSetting.OffTriggers) {
|
foreach (Core.Main.DataObjects.PTMagicData.OffTrigger ot in smsSummary.SingleMarketSetting.OffTriggers) {
|
||||||
string triggerTextClass = "text-danger";
|
string triggerTextClass = "text-danger";
|
||||||
|
@ -161,7 +181,6 @@
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
@ -20,6 +21,20 @@ namespace Monitor.Pages
|
||||||
BindData();
|
BindData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<string> smsList = new List<string>();
|
||||||
|
|
||||||
|
public void CreateSmsList ()
|
||||||
|
{
|
||||||
|
|
||||||
|
foreach (Core.Main.DataObjects.PTMagicData.SingleMarketSettingSummary smsSummary in SingleMarketSettingSummaries)
|
||||||
|
{
|
||||||
|
if (!smsList.Contains(smsSummary.SingleMarketSetting.SettingName))
|
||||||
|
{
|
||||||
|
smsList.Add(smsSummary.SingleMarketSetting.SettingName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void BindData()
|
private void BindData()
|
||||||
{
|
{
|
||||||
if (System.IO.File.Exists(PTMagicBasePath + Constants.PTMagicPathData + Path.DirectorySeparatorChar + "SingleMarketSettingSummary.json"))
|
if (System.IO.File.Exists(PTMagicBasePath + Constants.PTMagicPathData + Path.DirectorySeparatorChar + "SingleMarketSettingSummary.json"))
|
||||||
|
|
|
@ -139,13 +139,13 @@
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 text-center">
|
<span class="header-title">@Model.PTMagicConfiguration.GeneralSettings.Application.InstanceName</span>
|
||||||
|
   
|
||||||
<a href="https://github.com/PTMagicians/PTMagic" target="_blank">GitHub</a>
|
<a href="https://github.com/PTMagicians/PTMagic" target="_blank">GitHub</a>
|
||||||
|
|
|
|
||||||
<a href="https://github.com/PTMagicians/PTMagic/wiki" target="_blank">Wiki</a>
|
<a href="https://github.com/PTMagicians/PTMagic/wiki" target="_blank">Wiki</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</footer>
|
</footer>
|
||||||
<!-- End Footer -->
|
<!-- End Footer -->
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
if (activeSingleSettings > 0) {
|
if (activeSingleSettings > 0) {
|
||||||
singleSettingInfoIcon = "<i class=\"fa fa-info-circle text-muted\" data-toggle=\"tooltip\" data-placement=\"top\" data-html=\"true\" title=\"<b>Single Market Settings active for:</b><br />-" + Core.Helper.SystemHelper.ConvertListToTokenString(Model.MarketsWithSingleSettings, "<br />-", true) + "\" data-template=\"<div class='tooltip' role='tooltip'><div class='tooltip-arrow'></div><div class='tooltip-inner tooltip-200 text-left'></div></div>\"></i>";
|
singleSettingInfoIcon = "<i class=\"fa fa-info-circle text-muted\" data-toggle=\"tooltip\" data-placement=\"top\" data-html=\"true\" title=\"<b>Single Market Settings active for:</b><br />-" + Core.Helper.SystemHelper.ConvertListToTokenString(Model.MarketsWithSingleSettings, "<br />-", true) + "\" data-template=\"<div class='tooltip' role='tooltip'><div class='tooltip-arrow'></div><div class='tooltip-inner tooltip-200 text-left'></div></div>\"></i>";
|
||||||
}
|
}
|
||||||
|
string globalSettingInfoIcon = "<i class=\"fa fa-info-circle text-muted\" data-toggle=\"tooltip\" data-placement=\"top\" data-html=\"true\" title=\"<b>Instance: </b>" + Model.PTMagicConfiguration.GeneralSettings.Application.InstanceName + "\" data-template=\"<div class='tooltip' role='tooltip'><div class='tooltip-arrow'></div><div class='tooltip-inner tooltip-100 text-left'></div></div>\"></i>";
|
||||||
|
|
||||||
DateTime lastRuntime = Model.Summary.LastRuntime;
|
DateTime lastRuntime = Model.Summary.LastRuntime;
|
||||||
double elapsedSecondsSinceRuntime = DateTime.UtcNow.Subtract(lastRuntime).TotalSeconds;
|
double elapsedSecondsSinceRuntime = DateTime.UtcNow.Subtract(lastRuntime).TotalSeconds;
|
||||||
|
@ -23,12 +24,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="card-box card-box-mini card-box-ptmagic-outlined" data-toggle="tooltip" data-placement="bottom" title="Active global setting">
|
<div class="card-box card-box-mini card-box-ptmagic-outlined">
|
||||||
@Core.Helper.SystemHelper.SplitCamelCase(Model.Summary.CurrentGlobalSetting.SettingName)
|
<span data-toggle="tooltip" data-placement="bottom" title="Active global setting">
|
||||||
|
@Core.Helper.SystemHelper.SplitCamelCase(Model.Summary.CurrentGlobalSetting.SettingName)</span><span class = "header-title"><a href="ManaSettingsAnalyzergeSMS">@Html.Raw(" " + globalSettingInfoIcon)</a></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-box card-box-mini card-box-ptmagic-outlined" data-toggle="tooltip" data-placement="bottom" title="Active single market settings">
|
<div class="card-box card-box-mini card-box-ptmagic-outlined">
|
||||||
<b>SMS:</b> <a href="ManageSMS">@Html.Raw(singleSettingInfoIcon)</a> @activeSingleSettings
|
<span data-toggle="tooltip" data-placement="bottom" title="Active single market settings"><b>SMS: </b></span><span class = "header-title"><a href="ManageSMS">@Html.Raw(activeSingleSettings + " " + singleSettingInfoIcon)</a></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-box card-box-mini card-box-ptmagic-status-outlined @iconColor" data-toggle="tooltip" data-placement="bottom" title="@ptMagicHealthTooltip">
|
<div class="card-box card-box-mini card-box-ptmagic-status-outlined @iconColor" data-toggle="tooltip" data-placement="bottom" title="@ptMagicHealthTooltip">
|
||||||
|
|
|
@ -6,7 +6,7 @@ using Core.Helper;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
|
|
||||||
[assembly: AssemblyVersion("2.4.5")]
|
[assembly: AssemblyVersion("2.4.6")]
|
||||||
[assembly: AssemblyProduct("PT Magic")]
|
[assembly: AssemblyProduct("PT Magic")]
|
||||||
|
|
||||||
namespace PTMagic
|
namespace PTMagic
|
||||||
|
|
Loading…
Reference in New Issue