Browse Source

Fixed dashboard query messages bug.

master
Savorboard 5 years ago
parent
commit
0ffdca7987
3 changed files with 11 additions and 9 deletions
  1. +5
    -3
      src/DotNetCore.CAP.InMemoryStorage/IMonitoringApi.InMemory.cs
  2. +3
    -3
      src/DotNetCore.CAP/Dashboard/Pages/ReceivedPage.cshtml
  3. +3
    -3
      src/DotNetCore.CAP/Dashboard/Pages/ReceivedPage.generated.cs

+ 5
- 3
src/DotNetCore.CAP.InMemoryStorage/IMonitoringApi.InMemory.cs View File

@@ -52,7 +52,7 @@ namespace DotNetCore.CAP.InMemoryStorage

if (!string.IsNullOrEmpty(queryDto.StatusName))
{
expression = expression.Where(x => x.StatusName == queryDto.StatusName);
expression = expression.Where(x => x.StatusName.ToLower() == queryDto.StatusName);
}

if (!string.IsNullOrEmpty(queryDto.Name))
@@ -85,7 +85,7 @@ namespace DotNetCore.CAP.InMemoryStorage

if (!string.IsNullOrEmpty(queryDto.StatusName))
{
expression = expression.Where(x => x.StatusName == queryDto.StatusName);
expression = expression.Where(x => x.StatusName.ToLower() == queryDto.StatusName);
}

if (!string.IsNullOrEmpty(queryDto.Name))
@@ -109,6 +109,8 @@ namespace DotNetCore.CAP.InMemoryStorage
return expression.Skip(offset).Take(size).Select(x => new MessageDto()
{
Added = x.Added,
Group = x.Group,
Version = "N/A",
Content = x.Content,
ExpiresAt = x.ExpiresAt,
Id = x.Id,
@@ -137,7 +139,7 @@ namespace DotNetCore.CAP.InMemoryStorage
public int ReceivedSucceededCount()
{
return GetConnection().ReceivedMessages.Count(x => x.StatusName == StatusName.Succeeded);
}
}

private InMemoryStorageConnection GetConnection()
{


+ 3
- 3
src/DotNetCore.CAP/Dashboard/Pages/ReceivedPage.cshtml View File

@@ -86,7 +86,7 @@
<input type="checkbox" class="js-jobs-list-select-all"/>
</th>
<th>@Strings.Common_Id</th>
<th>@Strings.Common_Version</th>
<th style="width: 30px;">@Strings.Common_Version</th>
<th>@Strings.MessagesPage_Table_Group</th>
<th>@Strings.MessagesPage_Table_Name</th>
<th class="min-width">@Strings.MessagesPage_Table_Retries</th>
@@ -94,7 +94,7 @@
{
<th>@Strings.MessagesPage_Table_State</th>
}
<th class="align-right">@Strings.MessagesPage_Table_ExpiresAt</th>
<th style="width: 75px;" class="align-right">@Strings.MessagesPage_Table_ExpiresAt</th>
</tr>
</thead>
<tbody>
@@ -110,7 +110,7 @@
<td>
@message.Version
</td>
<td>
<td class="word-break">
@message.Group
</td>
<td>


+ 3
- 3
src/DotNetCore.CAP/Dashboard/Pages/ReceivedPage.generated.cs View File

@@ -302,7 +302,7 @@ namespace DotNetCore.CAP.Dashboard.Pages

#line default
#line hidden
WriteLiteral("</th>\r\n <th>");
WriteLiteral("</th>\r\n <th style=\"width:50px;\">");

#line 88 "..\..\ReceivedPage.cshtml"
Write(Strings.Common_Version);
@@ -371,7 +371,7 @@ namespace DotNetCore.CAP.Dashboard.Pages

#line default
#line hidden
WriteLiteral(" <th class=\"align-right\">");
WriteLiteral(" <th style=\"width:75px;\" class=\"align-right\">");



@@ -438,7 +438,7 @@ namespace DotNetCore.CAP.Dashboard.Pages
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n " +
"<td>\r\n ");
"<td class=\"word-break\">\r\n ");


#line 110 "..\..\ReceivedPage.cshtml"


Loading…
Cancel
Save