Savorboard преди 7 години
родител
ревизия
5cdc19800b
променени са 5 файла, в които са добавени 45 реда и са изтрити 353 реда
  1. +18
    -191
      src/DotNetCore.CAP/Dashboard/Content/resx/Strings.Designer.cs
  2. +9
    -74
      src/DotNetCore.CAP/Dashboard/Content/resx/Strings.resx
  3. +9
    -74
      src/DotNetCore.CAP/Dashboard/Content/resx/Strings.zh.resx
  4. +5
    -11
      src/DotNetCore.CAP/Dashboard/DashboardMetrics.cs
  5. +4
    -3
      src/DotNetCore.CAP/Dashboard/Pages/SubscriberPage.cshtml

+ 18
- 191
src/DotNetCore.CAP/Dashboard/Content/resx/Strings.Designer.cs Целия файл

@@ -169,56 +169,56 @@ namespace DotNetCore.CAP.Dashboard.Resources {
}
/// <summary>
/// Looks up a localized string similar to Id.
/// Looks up a localized string similar to Group.
/// </summary>
public static string Common_Id {
public static string Common_Group {
get {
return ResourceManager.GetString("Common_Id", resourceCulture);
return ResourceManager.GetString("Common_Group", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Job.
/// Looks up a localized string similar to Id.
/// </summary>
public static string Common_Job {
public static string Common_Id {
get {
return ResourceManager.GetString("Common_Job", resourceCulture);
return ResourceManager.GetString("Common_Id", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Job expired..
/// Looks up a localized string similar to Less details....
/// </summary>
public static string Common_JobExpired {
public static string Common_LessDetails {
get {
return ResourceManager.GetString("Common_JobExpired", resourceCulture);
return ResourceManager.GetString("Common_LessDetails", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Job&apos;s state has been changed while fetching data..
/// Looks up a localized string similar to Method.
/// </summary>
public static string Common_JobStateChanged_Text {
public static string Common_Method {
get {
return ResourceManager.GetString("Common_JobStateChanged_Text", resourceCulture);
return ResourceManager.GetString("Common_Method", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Less details....
/// Looks up a localized string similar to More details....
/// </summary>
public static string Common_LessDetails {
public static string Common_MoreDetails {
get {
return ResourceManager.GetString("Common_LessDetails", resourceCulture);
return ResourceManager.GetString("Common_MoreDetails", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to More details....
/// Looks up a localized string similar to Name.
/// </summary>
public static string Common_MoreDetails {
public static string Common_Name {
get {
return ResourceManager.GetString("Common_MoreDetails", resourceCulture);
return ResourceManager.GetString("Common_Name", resourceCulture);
}
}
@@ -330,62 +330,6 @@ namespace DotNetCore.CAP.Dashboard.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to &lt;strong&gt;Failed jobs do not become expired&lt;/strong&gt; to allow you to re-queue them without any
/// time pressure. You should re-queue or delete them manually, or apply &lt;code&gt;AutomaticRetry(OnAttemptsExceeded = AttemptsExceededAction.Delete)&lt;/code&gt;
/// attribute to delete them automatically..
/// </summary>
public static string FailedJobsPage_FailedJobsNotExpire_Warning_Html {
get {
return ResourceManager.GetString("FailedJobsPage_FailedJobsNotExpire_Warning_Html", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You have no failed jobs at the moment..
/// </summary>
public static string FailedJobsPage_NoJobs {
get {
return ResourceManager.GetString("FailedJobsPage_NoJobs", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Failed.
/// </summary>
public static string FailedJobsPage_Table_Failed {
get {
return ResourceManager.GetString("FailedJobsPage_Table_Failed", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Failed Jobs.
/// </summary>
public static string FailedJobsPage_Title {
get {
return ResourceManager.GetString("FailedJobsPage_Title", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The queue is empty..
/// </summary>
public static string FetchedJobsPage_NoJobs {
get {
return ResourceManager.GetString("FetchedJobsPage_NoJobs", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Fetched jobs.
/// </summary>
public static string FetchedJobsPage_Title {
get {
return ResourceManager.GetString("FetchedJobsPage_Title", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Failed.
/// </summary>
@@ -638,33 +582,6 @@ namespace DotNetCore.CAP.Dashboard.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Failed Jobs.
/// </summary>
public static string Metrics_FailedJobs {
get {
return ResourceManager.GetString("Metrics_FailedJobs", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Processing Jobs.
/// </summary>
public static string Metrics_ProcessingJobs {
get {
return ResourceManager.GetString("Metrics_ProcessingJobs", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Recurring Jobs.
/// </summary>
public static string Metrics_RecurringJobs {
get {
return ResourceManager.GetString("Metrics_RecurringJobs", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Retries.
/// </summary>
@@ -674,15 +591,6 @@ namespace DotNetCore.CAP.Dashboard.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Scheduled Jobs.
/// </summary>
public static string Metrics_ScheduledJobs {
get {
return ResourceManager.GetString("Metrics_ScheduledJobs", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Servers.
/// </summary>
@@ -692,15 +600,6 @@ namespace DotNetCore.CAP.Dashboard.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Succeeded Jobs.
/// </summary>
public static string Metrics_SucceededJobs {
get {
return ResourceManager.GetString("Metrics_SucceededJobs", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Total Connections.
/// </summary>
@@ -782,42 +681,6 @@ namespace DotNetCore.CAP.Dashboard.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Looks like the job was aborted.
/// </summary>
public static string ProcessingJobsPage_Aborted {
get {
return ResourceManager.GetString("ProcessingJobsPage_Aborted", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to No jobs are being processed right now..
/// </summary>
public static string ProcessingJobsPage_NoJobs {
get {
return ResourceManager.GetString("ProcessingJobsPage_NoJobs", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Started.
/// </summary>
public static string ProcessingJobsPage_Table_Started {
get {
return ResourceManager.GetString("ProcessingJobsPage_Table_Started", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Processing Jobs.
/// </summary>
public static string ProcessingJobsPage_Title {
get {
return ResourceManager.GetString("ProcessingJobsPage_Title", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Published Messages.
/// </summary>
@@ -854,42 +717,6 @@ namespace DotNetCore.CAP.Dashboard.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to All is OK – you have no retries..
/// </summary>
public static string RetriesPage_NoJobs {
get {
return ResourceManager.GetString("RetriesPage_NoJobs", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Retries.
/// </summary>
public static string RetriesPage_Title {
get {
return ResourceManager.GetString("RetriesPage_Title", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;h4&gt;Retries are working, but this page can&apos;t be displayed&lt;/h4&gt;
/// &lt;p&gt;
/// Don&apos;t worry, retries are working as expected. Your current job storage does not support
/// some queries required to show this page. Please try to update your storage or wait until
/// the full command set is implemented.
/// &lt;/p&gt;
/// &lt;p&gt;
/// Please go to the &lt;a href=&quot;{0}&quot;&gt;Scheduled jobs&lt;/a&gt; page to see all the
/// scheduled jobs including retries.
/// &lt;/p&gt;.
/// </summary>
public static string RetriesPage_Warning_Html {
get {
return ResourceManager.GetString("RetriesPage_Warning_Html", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to There are no active servers. Background tasks will not be processed..
/// </summary>


+ 9
- 74
src/DotNetCore.CAP/Dashboard/Content/resx/Strings.resx Целия файл

@@ -144,15 +144,6 @@
<data name="Common_Id" xml:space="preserve">
<value>Id</value>
</data>
<data name="Common_Job" xml:space="preserve">
<value>Job</value>
</data>
<data name="Common_JobExpired" xml:space="preserve">
<value>Job expired.</value>
</data>
<data name="Common_JobStateChanged_Text" xml:space="preserve">
<value>Job's state has been changed while fetching data.</value>
</data>
<data name="Common_LessDetails" xml:space="preserve">
<value>Less details...</value>
</data>
@@ -192,26 +183,6 @@
<data name="EnqueuedJobsPage_Title" xml:space="preserve">
<value>Enqueued jobs</value>
</data>
<data name="FailedJobsPage_FailedJobsNotExpire_Warning_Html" xml:space="preserve">
<value>&lt;strong&gt;Failed jobs do not become expired&lt;/strong&gt; to allow you to re-queue them without any
time pressure. You should re-queue or delete them manually, or apply &lt;code&gt;AutomaticRetry(OnAttemptsExceeded = AttemptsExceededAction.Delete)&lt;/code&gt;
attribute to delete them automatically.</value>
</data>
<data name="FailedJobsPage_NoJobs" xml:space="preserve">
<value>You have no failed jobs at the moment.</value>
</data>
<data name="FailedJobsPage_Table_Failed" xml:space="preserve">
<value>Failed</value>
</data>
<data name="FailedJobsPage_Title" xml:space="preserve">
<value>Failed Jobs</value>
</data>
<data name="FetchedJobsPage_NoJobs" xml:space="preserve">
<value>The queue is empty.</value>
</data>
<data name="FetchedJobsPage_Title" xml:space="preserve">
<value>Fetched jobs</value>
</data>
<data name="HomePage_HistoryGraph" xml:space="preserve">
<value>History graph</value>
</data>
@@ -242,36 +213,6 @@
<data name="PerPageSelector_ItemsPerPage" xml:space="preserve">
<value>Items per page</value>
</data>
<data name="ProcessingJobsPage_Aborted" xml:space="preserve">
<value>Looks like the job was aborted</value>
</data>
<data name="ProcessingJobsPage_NoJobs" xml:space="preserve">
<value>No jobs are being processed right now.</value>
</data>
<data name="ProcessingJobsPage_Table_Started" xml:space="preserve">
<value>Started</value>
</data>
<data name="ProcessingJobsPage_Title" xml:space="preserve">
<value>Processing Jobs</value>
</data>
<data name="RetriesPage_NoJobs" xml:space="preserve">
<value>All is OK – you have no retries.</value>
</data>
<data name="RetriesPage_Title" xml:space="preserve">
<value>Retries</value>
</data>
<data name="RetriesPage_Warning_Html" xml:space="preserve">
<value>&lt;h4&gt;Retries are working, but this page can't be displayed&lt;/h4&gt;
&lt;p&gt;
Don't worry, retries are working as expected. Your current job storage does not support
some queries required to show this page. Please try to update your storage or wait until
the full command set is implemented.
&lt;/p&gt;
&lt;p&gt;
Please go to the &lt;a href="{0}"&gt;Scheduled jobs&lt;/a&gt; page to see all the
scheduled jobs including retries.
&lt;/p&gt;</value>
</data>
<data name="ServersPage_NoServers" xml:space="preserve">
<value>There are no active servers. Background tasks will not be processed.</value>
</data>
@@ -332,27 +273,12 @@
<data name="Metrics_DeletedJobs" xml:space="preserve">
<value>Deleted Jobs</value>
</data>
<data name="Metrics_FailedJobs" xml:space="preserve">
<value>Failed Jobs</value>
</data>
<data name="Metrics_ProcessingJobs" xml:space="preserve">
<value>Processing Jobs</value>
</data>
<data name="Metrics_RecurringJobs" xml:space="preserve">
<value>Recurring Jobs</value>
</data>
<data name="Metrics_Retries" xml:space="preserve">
<value>Retries</value>
</data>
<data name="Metrics_ScheduledJobs" xml:space="preserve">
<value>Scheduled Jobs</value>
</data>
<data name="Metrics_Servers" xml:space="preserve">
<value>Servers</value>
</data>
<data name="Metrics_SucceededJobs" xml:space="preserve">
<value>Succeeded Jobs</value>
</data>
<data name="Metrics_TotalConnections" xml:space="preserve">
<value>Total Connections</value>
</data>
@@ -434,4 +360,13 @@
<data name="SubscribersPage_Title" xml:space="preserve">
<value>Subscribers</value>
</data>
<data name="Common_Group" xml:space="preserve">
<value>Group</value>
</data>
<data name="Common_Method" xml:space="preserve">
<value>Method</value>
</data>
<data name="Common_Name" xml:space="preserve">
<value>Name</value>
</data>
</root>

+ 9
- 74
src/DotNetCore.CAP/Dashboard/Content/resx/Strings.zh.resx Целия файл

@@ -144,15 +144,6 @@
<data name="Common_Id" xml:space="preserve">
<value>编号</value>
</data>
<data name="Common_Job" xml:space="preserve">
<value>作业</value>
</data>
<data name="Common_JobExpired" xml:space="preserve">
<value>作业过期.</value>
</data>
<data name="Common_JobStateChanged_Text" xml:space="preserve">
<value>作业状态已经发生变化</value>
</data>
<data name="Common_LessDetails" xml:space="preserve">
<value>收起...</value>
</data>
@@ -192,26 +183,6 @@
<data name="EnqueuedJobsPage_Title" xml:space="preserve">
<value>队列作业</value>
</data>
<data name="FailedJobsPage_FailedJobsNotExpire_Warning_Html" xml:space="preserve">
<value>&lt;strong&gt;Failed jobs do not become expired&lt;/strong&gt; to allow you to re-queue them without any
time pressure. You should re-queue or delete them manually, or apply &lt;code&gt;AutomaticRetry(OnAttemptsExceeded = AttemptsExceededAction.Delete)&lt;/code&gt;
attribute to delete them automatically.</value>
</data>
<data name="FailedJobsPage_NoJobs" xml:space="preserve">
<value>没有失败的作业</value>
</data>
<data name="FailedJobsPage_Table_Failed" xml:space="preserve">
<value>失败</value>
</data>
<data name="FailedJobsPage_Title" xml:space="preserve">
<value>失败的作业</value>
</data>
<data name="FetchedJobsPage_NoJobs" xml:space="preserve">
<value>没有任何作业</value>
</data>
<data name="FetchedJobsPage_Title" xml:space="preserve">
<value>Fetched jobs</value>
</data>
<data name="HomePage_HistoryGraph" xml:space="preserve">
<value>历史图表走势</value>
</data>
@@ -242,18 +213,6 @@
<data name="PerPageSelector_ItemsPerPage" xml:space="preserve">
<value>每页条数</value>
</data>
<data name="ProcessingJobsPage_Aborted" xml:space="preserve">
<value>作业疑似终止</value>
</data>
<data name="ProcessingJobsPage_NoJobs" xml:space="preserve">
<value>没有立即执行的作业</value>
</data>
<data name="ProcessingJobsPage_Table_Started" xml:space="preserve">
<value>执行</value>
</data>
<data name="ProcessingJobsPage_Title" xml:space="preserve">
<value>执行中作业</value>
</data>
<data name="QueuesPage_NoJobs" xml:space="preserve">
<value>没有作业</value>
</data>
@@ -272,24 +231,6 @@
<data name="QueuesPage_Title" xml:space="preserve">
<value>队列</value>
</data>
<data name="RetriesPage_NoJobs" xml:space="preserve">
<value>没有重试的作业</value>
</data>
<data name="RetriesPage_Title" xml:space="preserve">
<value>重试</value>
</data>
<data name="RetriesPage_Warning_Html" xml:space="preserve">
<value>&lt;h4&gt;Retries are working, but this page can't be displayed&lt;/h4&gt;
&lt;p&gt;
Don't worry, retries are working as expected. Your current job storage does not support
some queries required to show this page. Please try to update your storage or wait until
the full command set is implemented.
&lt;/p&gt;
&lt;p&gt;
Please go to the &lt;a href="{0}"&gt;Scheduled jobs&lt;/a&gt; page to see all the
scheduled jobs including retries.
&lt;/p&gt;</value>
</data>
<data name="ServersPage_NoServers" xml:space="preserve">
<value>没有活动服务器。后台作业将不会被执行。</value>
</data>
@@ -350,27 +291,12 @@
<data name="Metrics_DeletedJobs" xml:space="preserve">
<value>删除</value>
</data>
<data name="Metrics_FailedJobs" xml:space="preserve">
<value>失败</value>
</data>
<data name="Metrics_ProcessingJobs" xml:space="preserve">
<value>执行中</value>
</data>
<data name="Metrics_RecurringJobs" xml:space="preserve">
<value>定时</value>
</data>
<data name="Metrics_Retries" xml:space="preserve">
<value>重试</value>
</data>
<data name="Metrics_ScheduledJobs" xml:space="preserve">
<value>计划</value>
</data>
<data name="Metrics_Servers" xml:space="preserve">
<value>服务器</value>
</data>
<data name="Metrics_SucceededJobs" xml:space="preserve">
<value>成功的作业</value>
</data>
<data name="Metrics_TotalConnections" xml:space="preserve">
<value>总连接数</value>
</data>
@@ -452,4 +378,13 @@
<data name="SubscribersPage_Title" xml:space="preserve">
<value>订阅的消息</value>
</data>
<data name="Common_Group" xml:space="preserve">
<value>分组</value>
</data>
<data name="Common_Method" xml:space="preserve">
<value>方法</value>
</data>
<data name="Common_Name" xml:space="preserve">
<value>名称</value>
</data>
</root>

+ 5
- 11
src/DotNetCore.CAP/Dashboard/DashboardMetrics.cs Целия файл

@@ -2,6 +2,8 @@
using System.Collections.Generic;
using System.Linq;
using DotNetCore.CAP.Dashboard.Resources;
using DotNetCore.CAP.Internal;
using Microsoft.Extensions.DependencyInjection;

namespace DotNetCore.CAP.Dashboard
{
@@ -63,20 +65,12 @@ namespace DotNetCore.CAP.Dashboard
page =>
{
long retryCount;
using (var connection = page.Storage.GetConnection())
{
var storageConnection = connection as IStorageConnection;
if (storageConnection == null)
{
return null;
}

retryCount =1111;
}
var methodCache = page.RequestServices.GetService<MethodMatcherCache>();
retryCount = methodCache.GetCandidatesMethodsOfGroupNameGrouped().Sum(x => x.Value.Count);

return new Metric(retryCount.ToString("N0"))
{
Style = retryCount > 0 ? MetricStyle.Warning : MetricStyle.Default
Style = retryCount > 0 ? MetricStyle.Default : MetricStyle.Warning
};
});



+ 4
- 3
src/DotNetCore.CAP/Dashboard/Pages/SubscriberPage.cshtml Целия файл

@@ -13,11 +13,12 @@

<div class="row">
<div class="col-md-12">
<h1 class="page-header">订阅列表</h1>
<h1 class="page-header">@Strings.SubscribersPage_Title</h1>

@if (subscribers.Count == 0)
{
<div class="alert alert-warning">

@Strings.ServersPage_NoServers
</div>
}
@@ -27,9 +28,9 @@
<table class="table">
<thead>
<tr>
<th width="20%">分组</th>
<th width="20%">@Strings.Common_Group</th>
<th>
<table class="table subscribe-table margin-bottom-zero"><tr><td width="40%">名称</td><td>方法</td></tr></table>
<table class="table subscribe-table margin-bottom-zero"><tr><td width="40%">@Strings.Common_Name</td><td>@Strings.Common_Method</td></tr></table>
</th>
</tr>
</thead>


Зареждане…
Отказ
Запис