Database Type: @Model.DatabaseType
+Total Queues: @Model.Queues.Count
+| Queue ID | +Queue Name | +Actions | +
|---|---|---|
| @queue.Id | +@queue.Name | ++ View Messages + | +
| Message ID | +Queue ID | +State | +Added | +Priority | +Metadata | +Actions | +
|---|---|---|---|---|---|---|
| @message.Id | +@message.QueueId | ++ @{ + var badgeClass = message.MessageState switch + { + Procession.Common.MessageState.Active => "badge bg-primary", + Procession.Common.MessageState.Processed => "badge bg-success", + Procession.Common.MessageState.InTransaction => "badge bg-warning", + Procession.Common.MessageState.Expired => "badge bg-danger", + Procession.Common.MessageState.AttemptsExceeded => "badge bg-danger", + _ => "badge bg-secondary" + }; + } + @message.MessageState + | +@DateTimeOffset.FromUnixTimeSeconds(message.AddDateTime).ToString("yyyy-MM-dd HH:mm:ss") | +@message.Priority | ++ @if (!string.IsNullOrEmpty(message.Metadata)) + { + @(message.Metadata.Length > 50 ? message.Metadata.Substring(0, 50) + "..." : message.Metadata) + } + | ++ Details + | +
There are no messages in the system yet. Messages will appear here when they are added to queues.
+Learn about building Web apps with ASP.NET Core.
+Use this page to detail your site's privacy policy.
diff --git a/Procession.AdminWeb/Views/Messages/Details.cshtml b/Procession.AdminWeb/Views/Messages/Details.cshtml new file mode 100644 index 0000000..8a5b93b --- /dev/null +++ b/Procession.AdminWeb/Views/Messages/Details.cshtml @@ -0,0 +1,269 @@ +@model MessageDetailViewModel +@{ + ViewData["Title"] = $"Message {Model.Message?.Id}"; +} + +The requested message could not be found.
+| Message ID: | +@Model.Message.Id | +
|---|---|
| Queue ID: | +@Model.Message.QueueId | +
| Queue Name: | +@Model.Queue.Name | +
| State: | ++ @{ + var badgeClass = Model.Message.MessageState switch + { + Procession.Common.MessageState.Active => "badge bg-primary", + Procession.Common.MessageState.Processed => "badge bg-success", + Procession.Common.MessageState.InTransaction => "badge bg-warning text-dark", + Procession.Common.MessageState.Expired => "badge bg-danger", + Procession.Common.MessageState.AttemptsExceeded => "badge bg-danger", + _ => "badge bg-secondary" + }; + } + @Model.Message.MessageState + | +
| Priority: | +@Model.Message.Priority | +
| Attempts: | +@Model.Message.Attempts / @Model.Message.MaxAttempts | +
| Correlation ID: | +@Model.Message.CorrelationId | +
| Added: | +@Model.AddDateTime.ToString("yyyy-MM-dd HH:mm:ss") | +
|---|---|
| Closed: | ++ @if (Model.CloseDateTime.HasValue) + { + @Model.CloseDateTime.Value.ToString("yyyy-MM-dd HH:mm:ss") + } + else + { + Not closed + } + | +
| Expires: | ++ @if (Model.ExpiryDateTime.HasValue) + { + @Model.ExpiryDateTime.Value.ToString("yyyy-MM-dd HH:mm:ss") + } + else + { + No expiration + } + | +
| Transaction ID: | ++ @if (Model.Message.TransactionId != 0) + { + @Model.Message.TransactionId + } + else + { + None + } + | +
| Transaction Action: | +@Model.Message.TransactionAction | +
| Group Name: | ++ @if (!string.IsNullOrEmpty(Model.Message.GroupName)) + { + @Model.Message.GroupName + } + else + { + None + } + | +
@Model.Message.Metadata+
This message has no payload data.
+ } + else if (!Model.ShowPayload) + { +Payload is hidden. Click "Show Payload" to view the content.
+ } + else + { +@Model.PayloadString+
+ Showing @((Model.CurrentPage - 1) * Model.PageSize + 1) to @Math.Min(Model.CurrentPage * Model.PageSize, Model.TotalCount) of @Model.TotalCount messages + @if (Model.SelectedQueueId.HasValue) + { + @:for queue @Model.SelectedQueueId + } + @if (Model.ProcessedOnly.HasValue) + { + @:(showing @(Model.ProcessedOnly.Value ? "processed" : "unprocessed") only) + } +
+| Message ID | +Queue ID | +State | +Added | +Closed | +Priority | +Attempts | +Correlation ID | +Metadata | +Actions | +
|---|---|---|---|---|---|---|---|---|---|
| + + @message.Id + + | +@message.QueueId | ++ @{ + var badgeClass = message.MessageState switch + { + Procession.Common.MessageState.Active => "badge bg-primary", + Procession.Common.MessageState.Processed => "badge bg-success", + Procession.Common.MessageState.InTransaction => "badge bg-warning text-dark", + Procession.Common.MessageState.Expired => "badge bg-danger", + Procession.Common.MessageState.AttemptsExceeded => "badge bg-danger", + _ => "badge bg-secondary" + }; + } + @message.MessageState + | +@DateTimeOffset.FromUnixTimeSeconds(message.AddDateTime).ToString("yyyy-MM-dd HH:mm:ss") | ++ @if (message.CloseDateTime.HasValue) + { + @DateTimeOffset.FromUnixTimeSeconds(message.CloseDateTime.Value).ToString("yyyy-MM-dd HH:mm:ss") + } + else + { + - + } + | +@message.Priority | +@message.Attempts / @message.MaxAttempts | +@message.CorrelationId | ++ @if (!string.IsNullOrEmpty(message.Metadata)) + { + + @(message.Metadata.Length > 30 ? message.Metadata.Substring(0, 30) + "..." : message.Metadata) + + } + else + { + - + } + | ++ Details + | +
No messages match the selected filters.
+
+ Request ID: @Model.RequestId
+
+ Swapping to Development environment will display more detailed information about the error that occurred. +
++ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +
diff --git a/Procession.AdminWeb/Views/Shared/_Layout.cshtml b/Procession.AdminWeb/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..a292a53 --- /dev/null +++ b/Procession.AdminWeb/Views/Shared/_Layout.cshtml @@ -0,0 +1,50 @@ + + + + + +`s get reset. However, we also reset the\n// bottom margin to use `rem` units instead of `em`.\n\np {\n margin-top: 0;\n margin-bottom: $paragraph-margin-bottom;\n}\n\n\n// Abbreviations\n//\n// 1. Add the correct text decoration in Chrome, Edge, Opera, and Safari.\n// 2. Add explicit cursor to indicate changed behavior.\n// 3. Prevent the text-decoration to be skipped.\n\nabbr[title] {\n text-decoration: underline dotted; // 1\n cursor: help; // 2\n text-decoration-skip-ink: none; // 3\n}\n\n\n// Address\n\naddress {\n margin-bottom: 1rem;\n font-style: normal;\n line-height: inherit;\n}\n\n\n// Lists\n\nol,\nul {\n padding-left: 2rem;\n}\n\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\n\ndt {\n font-weight: $dt-font-weight;\n}\n\n// 1. Undo browser default\n\ndd {\n margin-bottom: .5rem;\n margin-left: 0; // 1\n}\n\n\n// Blockquote\n\nblockquote {\n margin: 0 0 1rem;\n}\n\n\n// Strong\n//\n// Add the correct font weight in Chrome, Edge, and Safari\n\nb,\nstrong {\n font-weight: $font-weight-bolder;\n}\n\n\n// Small\n//\n// Add the correct font size in all browsers\n\nsmall {\n @include font-size($small-font-size);\n}\n\n\n// Mark\n\nmark {\n padding: $mark-padding;\n color: var(--#{$prefix}highlight-color);\n background-color: var(--#{$prefix}highlight-bg);\n}\n\n\n// Sub and Sup\n//\n// Prevent `sub` and `sup` elements from affecting the line height in\n// all browsers.\n\nsub,\nsup {\n position: relative;\n @include font-size($sub-sup-font-size);\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub { bottom: -.25em; }\nsup { top: -.5em; }\n\n\n// Links\n\na {\n color: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-opacity, 1));\n text-decoration: $link-decoration;\n\n &:hover {\n --#{$prefix}link-color-rgb: var(--#{$prefix}link-hover-color-rgb);\n text-decoration: $link-hover-decoration;\n }\n}\n\n// And undo these styles for placeholder links/named anchors (without href).\n// It would be more straightforward to just use a[href] in previous block, but that\n// causes specificity issues in many other styles that are too complex to fix.\n// See https://github.com/twbs/bootstrap/issues/19402\n\na:not([href]):not([class]) {\n &,\n &:hover {\n color: inherit;\n text-decoration: none;\n }\n}\n\n\n// Code\n\npre,\ncode,\nkbd,\nsamp {\n font-family: $font-family-code;\n @include font-size(1em); // Correct the odd `em` font sizing in all browsers.\n}\n\n// 1. Remove browser default top margin\n// 2. Reset browser default of `1em` to use `rem`s\n// 3. Don't allow content to break outside\n\npre {\n display: block;\n margin-top: 0; // 1\n margin-bottom: 1rem; // 2\n overflow: auto; // 3\n @include font-size($code-font-size);\n color: $pre-color;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n @include font-size(inherit);\n color: inherit;\n word-break: normal;\n }\n}\n\ncode {\n @include font-size($code-font-size);\n color: var(--#{$prefix}code-color);\n word-wrap: break-word;\n\n // Streamline the style when inside anchors to avoid broken underline and more\n a > & {\n color: inherit;\n }\n}\n\nkbd {\n padding: $kbd-padding-y $kbd-padding-x;\n @include font-size($kbd-font-size);\n color: $kbd-color;\n background-color: $kbd-bg;\n @include border-radius($border-radius-sm);\n\n kbd {\n padding: 0;\n @include font-size(1em);\n font-weight: $nested-kbd-font-weight;\n }\n}\n\n\n// Figures\n//\n// Apply a consistent margin strategy (matches our type styles).\n\nfigure {\n margin: 0 0 1rem;\n}\n\n\n// Images and content\n\nimg,\nsvg {\n vertical-align: middle;\n}\n\n\n// Tables\n//\n// Prevent double borders\n\ntable {\n caption-side: bottom;\n border-collapse: collapse;\n}\n\ncaption {\n padding-top: $table-cell-padding-y;\n padding-bottom: $table-cell-padding-y;\n color: $table-caption-color;\n text-align: left;\n}\n\n// 1. Removes font-weight bold by inheriting\n// 2. Matches default `