Ticker Changes

This commit is contained in:
HojouFotytu 2019-03-18 16:37:14 +09:00
parent 643aba1547
commit 44ab622c59
4 changed files with 26 additions and 30 deletions

View File

@ -12,6 +12,24 @@
<link href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)assets/plugins/datatables/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" /> <link href="@Html.Raw(Model.PTMagicConfiguration.GeneralSettings.Monitor.RootUrl)assets/plugins/datatables/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" />
} }
<div class="row">
<div class="col-md-12">
<div class="card-box">
@{
double currentBalance = Model.PTData.GetCurrentBalance();
string currentBalanceString = currentBalance.ToString("#,#0.00000000", new System.Globalization.CultureInfo("en-US"));
if (currentBalance > 100) {
currentBalanceString = Math.Round(currentBalance, 2).ToString("#,#0.00", new System.Globalization.CultureInfo("en-US"));
}
}
<h4 class="m-t-0 header-title text-autocolor">@Model.Summary.MainMarket &nbsp; Balance: &nbsp; &nbsp; @currentBalanceString &nbsp; &nbsp; <small> <i class="fa fa-info-circle text-muted" data-toggle="tooltip" data-placement="top" title="This value is estimated based on your sales history and any entries on the Transactions page"></i></small></h4>
</div>
</div>
</div>
@if (Model.PTData.SellLog.Count == 0) { @if (Model.PTData.SellLog.Count == 0) {
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
@ -26,7 +44,9 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="card-box"> <div class="card-box">
<h4 class="m-t-0 header-title">Sales Analysis</h4> <h4 class="m-t-0 header-title">Sales Analysis</h4>
@{ @{
double totalProfit = Model.PTData.SellLog.Sum(s => s.Profit); double totalProfit = Model.PTData.SellLog.Sum(s => s.Profit);
double totalProfitFiat = Math.Round(totalProfit * Model.Summary.MainMarketPrice, 2); double totalProfitFiat = Math.Round(totalProfit * Model.Summary.MainMarketPrice, 2);

View File

@ -42,15 +42,7 @@
<div class="menu-extras topbar-custom"> <div class="menu-extras topbar-custom">
<ul class="list-inline float-left mb-0"> <ul class="list-inline float-left mb-0">
<br>&nbsp;&nbsp;&nbsp;&nbsp; <li id="ticker-widgets" class="list-inline-item ticker-widgets"></li>
<span class="card-box card-box-mini card-box-ptmagic-outlined" data-toggle="tooltip" data-placement="bottom" title="Active global setting">
<b>GS:</b> @Core.Helper.SystemHelper.SplitCamelCase(Model.Summary.CurrentGlobalSetting.SettingName)
</span>
</ul>
</div>
<div class="menu-extras topbar-custom">
<ul class="list-inline float-right mb-0">
<li class="menu-item list-inline-item"> <li class="menu-item list-inline-item">
<!-- Mobile menu toggle--> <!-- Mobile menu toggle-->
<a class="navbar-toggle nav-link"> <a class="navbar-toggle nav-link">
@ -62,7 +54,7 @@
</a> </a>
<!-- End mobile menu toggle--> <!-- End mobile menu toggle-->
</li> </li>
<li id="ticker-widgets" class="list-inline-item ticker-widgets"></li>
</ul> </ul>
</div> </div>
<!-- end menu-extras --> <!-- end menu-extras -->

View File

@ -22,25 +22,15 @@
string iconColor = "text-success"; string iconColor = "text-success";
string ptMagicHealthIcon = "fa-heartbeat"; string ptMagicHealthIcon = "fa-heartbeat";
string ptMagicHealthTooltip = "PT Magic is alive and healthy!"; string ptMagicHealthTooltip = "PT Magic is alive and healthy!";
if (elapsedSecondsSinceRuntime > (intervalSeconds + intervalSeconds * 0.2)) { if (elapsedSecondsSinceRuntime > (intervalSeconds + intervalSeconds * 0.5)) {
ptMagicHealthIcon = "fa-exclamation-triangle"; ptMagicHealthIcon = "fa-exclamation-triangle";
ptMagicHealthTooltip = "PT Magic seems to have problems, check the logs!"; ptMagicHealthTooltip = "PT Magic seems to have problems, check the logs!";
iconColor = "text-danger"; iconColor = "text-danger";
} }
} }
@if (!Model.Summary.MainMarket.Equals("USDT", StringComparison.InvariantCultureIgnoreCase)) { <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-warning-outlined" data-toggle="tooltip" data-placement="bottom" title="Value of a single @Model.Summary.MainMarket"> <b>GS:</b> @Core.Helper.SystemHelper.SplitCamelCase(Model.Summary.CurrentGlobalSetting.SettingName)
<b>@Model.Summary.MainMarket: </b>@Html.Raw(Model.MainFiatCurrencySymbol + Model.Summary.MainMarketPrice.ToString("#,#0.00", new System.Globalization.CultureInfo("en-US")))
</div>
}
<div class="card-box card-box-mini card-box-success-outlined" data-toggle="tooltip" data-placement="bottom" title="Approximate total value in @Model.Summary.MainMarket">
<b>TV:</b> @currentBalanceString @Model.Summary.MainMarket
</div>
<div class="card-box card-box-mini card-box-ptmagic-outlined" data-toggle="tooltip" data-placement="bottom" title="Active single market settings">
<b>SMS:</b> <a href="ManageSMS">@Html.Raw(singleSettingInfoIcon)</a> @activeSingleSettings
</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">

View File

@ -71,12 +71,6 @@
font-size: 0.78571rem; font-size: 0.78571rem;
} }
@media only screen and (max-width: 991px) {
.ticker-widgets {
display:none;
}
}
.ticker-widgets div { .ticker-widgets div {
display: inline-block; display: inline-block;
margin-top: 12px; margin-top: 12px;