-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b364b03
commit 673c53f
Showing
3 changed files
with
90 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,28 @@ | |
<div class="d-flex justify-content-between align-items-center"> | ||
<h1 class="display-4 p-3">✉️ Messaging</h1> | ||
</div> | ||
@if (!string.IsNullOrWhiteSpace(Model?.Message)) | ||
{ | ||
if (string.IsNullOrWhiteSpace(Model?.AlertType)) | ||
{ | ||
<div class="alert alert-danger col-12" role="alert"> | ||
@Model?.Message | ||
</div> | ||
} | ||
else | ||
{ | ||
var alertType = Model?.AlertType ?? "alert-danger"; | ||
<div class="alert @alertType col-12" role="alert"> | ||
@Model?.Message | ||
</div> | ||
} | ||
} | ||
<h3>Failed Messages in the Last 3 Days</h3> | ||
<div class="table-responsive"> | ||
<table class="table table-striped table-borderless table-hover" id="table"> | ||
<thead> | ||
<tr> | ||
@* <th>Succeeded?</th> *@ | ||
@* <th>Succeeded?</th> *@ | ||
<th>Date Received PST</th> | ||
<th>Message Source</th> | ||
<th>Message Type</th> | ||
|
@@ -36,10 +52,10 @@ | |
checkParse = PhoneNumbersNA.PhoneNumber.TryParse(result.To, out var toPhoneNumber); | ||
ownedPhoneNumber = Model.Owned.FirstOrDefault(x => x.DialedNumber == toPhoneNumber.DialedNumber); | ||
string ToLink = checkParse && ownedPhoneNumber is not null ? $"<a href='/Home/OwnedNumbers/{ownedPhoneNumber.DialedNumber}' target='_blank'>{result.To}</a>" : result.To; | ||
|
||
<tr> | ||
@*<td>@result.Succeeded</td>*@ | ||
<td>@result.DateReceivedUTC.ToLocalTime().ToShortDateString() @result.DateReceivedUTC.ToLocalTime().ToShortTimeString()</td> | ||
@*<td>@result.Succeeded</td>*@ | ||
<td data-order="@result.DateReceivedUTC.Ticks">@result.DateReceivedUTC.ToLocalTime().ToShortDateString() @result.DateReceivedUTC.ToLocalTime().ToShortTimeString()</td> | ||
<td>@result.MessageSource</td> | ||
<td>@result.MessageType</td> | ||
<td>@Html.Raw(FromLink)</td> | ||
|
@@ -48,7 +64,7 @@ | |
<td>@result.Content</td> | ||
@* <td>@result.MediaURLs</td> *@ | ||
@*<td>@result.RawRequest</td> | ||
<td>@result.ToForward</td> *@ | ||
<td>@result.ToForward</td> *@ | ||
</tr> | ||
} | ||
</tbody> | ||
|
@@ -82,9 +98,21 @@ | |
<td>@result.OutboundSMSCount</td> | ||
<td>@result.InboundSMSCount</td> | ||
<td>@result.InboundMMSCount</td> | ||
<td>@result.RegisteredUpstream</td> | ||
<td>@result.UpstreamStatusDescription</td> | ||
<td><a class="btn btn-primary" href="./[email protected]">Refresh Upstream</a></td> | ||
@if (result.AsDialed is not "Total") | ||
{ | ||
<td>@result.RegisteredUpstream</td> | ||
<td>@result.UpstreamStatusDescription</td> | ||
<td> | ||
<a class="btn btn-primary" href="./[email protected]">Refresh Upstream</a> | ||
<a class="btn btn-primary" href="./[email protected]">Reregister</a> | ||
</td> | ||
} | ||
else | ||
{ | ||
<td></td> | ||
<td></td> | ||
<td>As of @DateTime.Now.ToShortDateString() @DateTime.Now.ToShortTimeString()</td> | ||
} | ||
</tr> | ||
} | ||
</tbody> | ||
|