Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
CAP
Commits
6a1b5441
Commit
6a1b5441
authored
Aug 25, 2017
by
yangxiaodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add dashboard
parent
fc50d995
Changes
94
Show whitespace changes
Inline
Side-by-side
Showing
94 changed files
with
1513 additions
and
9649 deletions
+1513
-9649
CombinedResourceDispatcher.cs
src/DotNetCore.CAP/Dashboard/CombinedResourceDispatcher.cs
+33
-0
CommandDispatcher.cs
src/DotNetCore.CAP/Dashboard/CommandDispatcher.cs
+39
-0
Strings.Designer.cs
...DotNetCore.CAP/Dashboard/Content/resx/Strings.Designer.cs
+3
-2
DashboardContext.cs
src/DotNetCore.CAP/Dashboard/DashboardContext.cs
+18
-1
DashboardMetric.cs
src/DotNetCore.CAP/Dashboard/DashboardMetric.cs
+24
-0
DashboardMetrics.cs
src/DotNetCore.CAP/Dashboard/DashboardMetrics.cs
+179
-0
DashboardRequest.cs
src/DotNetCore.CAP/Dashboard/DashboardRequest.cs
+18
-0
DashboardResponse.cs
src/DotNetCore.CAP/Dashboard/DashboardResponse.cs
+17
-0
EmbeddedResourceDispatcher.cs
src/DotNetCore.CAP/Dashboard/EmbeddedResourceDispatcher.cs
+54
-0
HtmlHelper.cs
src/DotNetCore.CAP/Dashboard/HtmlHelper.cs
+244
-0
IDashboardAuthorizationFilter.cs
...DotNetCore.CAP/Dashboard/IDashboardAuthorizationFilter.cs
+7
-0
IDashboardDispatcher.cs
src/DotNetCore.CAP/Dashboard/IDashboardDispatcher.cs
+12
-0
IMonitoringApi.cs
src/DotNetCore.CAP/Dashboard/IMonitoringApi.cs
+2
-18
JobHistoryRenderer.cs
src/DotNetCore.CAP/Dashboard/JobHistoryRenderer.cs
+258
-0
JobsSidebarMenu.cs
src/DotNetCore.CAP/Dashboard/JobsSidebarMenu.cs
+57
-0
JsonStats.cs
src/DotNetCore.CAP/Dashboard/JsonStats.cs
+45
-0
LocalRequestsOnlyAuthorizationFilter.cs
...ore.CAP/Dashboard/LocalRequestsOnlyAuthorizationFilter.cs
+26
-0
MenuItem.cs
src/DotNetCore.CAP/Dashboard/MenuItem.cs
+33
-0
Metric.cs
src/DotNetCore.CAP/Dashboard/Metric.cs
+42
-0
DeletedJobDto.cs
src/DotNetCore.CAP/Dashboard/Monitoring/DeletedJobDto.cs
+3
-3
EnqueuedJobDto.cs
src/DotNetCore.CAP/Dashboard/Monitoring/EnqueuedJobDto.cs
+4
-20
FailedJobDto.cs
src/DotNetCore.CAP/Dashboard/Monitoring/FailedJobDto.cs
+4
-20
FetchedJobDto.cs
src/DotNetCore.CAP/Dashboard/Monitoring/FetchedJobDto.cs
+4
-20
JobDetailsDto.cs
src/DotNetCore.CAP/Dashboard/Monitoring/JobDetailsDto.cs
+4
-20
JobList.cs
src/DotNetCore.CAP/Dashboard/Monitoring/JobList.cs
+1
-17
ProcessingJobDto.cs
src/DotNetCore.CAP/Dashboard/Monitoring/ProcessingJobDto.cs
+4
-20
QueueWithTopEnqueuedJobsDto.cs
...e.CAP/Dashboard/Monitoring/QueueWithTopEnqueuedJobsDto.cs
+1
-17
ScheduledJobDto.cs
src/DotNetCore.CAP/Dashboard/Monitoring/ScheduledJobDto.cs
+4
-20
ServerDto.cs
src/DotNetCore.CAP/Dashboard/Monitoring/ServerDto.cs
+2
-18
StateHistoryDto.cs
src/DotNetCore.CAP/Dashboard/Monitoring/StateHistoryDto.cs
+2
-18
StatisticsDto.cs
src/DotNetCore.CAP/Dashboard/Monitoring/StatisticsDto.cs
+1
-17
SucceededJobDto.cs
src/DotNetCore.CAP/Dashboard/Monitoring/SucceededJobDto.cs
+3
-3
NavigationMenu.cs
src/DotNetCore.CAP/Dashboard/NavigationMenu.cs
+42
-0
NonEscapedString.cs
src/DotNetCore.CAP/Dashboard/NonEscapedString.cs
+17
-0
Pager.cs
src/DotNetCore.CAP/Dashboard/Pager.cs
+156
-0
AwaitingJobsPage.cshtml
src/DotNetCore.CAP/Dashboard/Pages/AwaitingJobsPage.cshtml
+11
-12
BlockMetric.cs
src/DotNetCore.CAP/Dashboard/Pages/BlockMetric.cs
+1
-1
Breadcrumbs.cs
src/DotNetCore.CAP/Dashboard/Pages/Breadcrumbs.cs
+1
-1
HomePage.cs
src/DotNetCore.CAP/Dashboard/Pages/HomePage.cs
+3
-3
HomePage.cshtml
src/DotNetCore.CAP/Dashboard/Pages/HomePage.cshtml
+3
-3
HomePage.generated.cs
src/DotNetCore.CAP/Dashboard/Pages/HomePage.generated.cs
+4
-4
InlineMetric.cs
src/DotNetCore.CAP/Dashboard/Pages/InlineMetric.cs
+2
-2
LayoutPage.cs
src/DotNetCore.CAP/Dashboard/Pages/LayoutPage.cs
+1
-1
LayoutPage.cshtml
src/DotNetCore.CAP/Dashboard/Pages/LayoutPage.cshtml
+3
-3
LayoutPage.generated.cs
src/DotNetCore.CAP/Dashboard/Pages/LayoutPage.generated.cs
+4
-4
ProcessingJobsPage.cshtml
src/DotNetCore.CAP/Dashboard/Pages/ProcessingJobsPage.cshtml
+3
-3
SidebarMenu.cs
src/DotNetCore.CAP/Dashboard/Pages/SidebarMenu.cs
+16
-0
SucceededJobs.cshtml
src/DotNetCore.CAP/Dashboard/Pages/SucceededJobs.cshtml
+3
-3
_BlockMetric.cshtml
src/DotNetCore.CAP/Dashboard/Pages/_BlockMetric.cshtml
+3
-3
_BlockMetric.generated.cs
src/DotNetCore.CAP/Dashboard/Pages/_BlockMetric.generated.cs
+3
-3
_Breadcrumbs.cshtml
src/DotNetCore.CAP/Dashboard/Pages/_Breadcrumbs.cshtml
+1
-1
_InlineMetric.cshtml
src/DotNetCore.CAP/Dashboard/Pages/_InlineMetric.cshtml
+1
-1
_InlineMetric.generated.cs
...DotNetCore.CAP/Dashboard/Pages/_InlineMetric.generated.cs
+2
-2
_Navigation.cshtml
src/DotNetCore.CAP/Dashboard/Pages/_Navigation.cshtml
+1
-1
_Navigation.generated.cs
src/DotNetCore.CAP/Dashboard/Pages/_Navigation.generated.cs
+2
-2
_Paginator.cs
src/DotNetCore.CAP/Dashboard/Pages/_Paginator.cs
+1
-1
_Paginator.cshtml
src/DotNetCore.CAP/Dashboard/Pages/_Paginator.cshtml
+2
-2
_PerPageSelector.cs
src/DotNetCore.CAP/Dashboard/Pages/_PerPageSelector.cs
+1
-1
_PerPageSelector.cshtml
src/DotNetCore.CAP/Dashboard/Pages/_PerPageSelector.cshtml
+2
-2
_SidebarMenu.cshtml
src/DotNetCore.CAP/Dashboard/Pages/_SidebarMenu.cshtml
+1
-1
RazorPage.cs
src/DotNetCore.CAP/Dashboard/RazorPage.cs
+5
-20
RazorPageDispatcher.cs
src/DotNetCore.CAP/Dashboard/RazorPageDispatcher.cs
+26
-0
UrlHelper.cs
src/DotNetCore.CAP/Dashboard/UrlHelper.cs
+44
-0
AwaitingJobsPage.generated.cs
...NetCore.CAP/Dashboard/Views/AwaitingJobsPage.generated.cs
+0
-638
DeletedJobsPage.cshtml
src/DotNetCore.CAP/Dashboard/Views/DeletedJobsPage.cshtml
+0
-102
DeletedJobsPage.generated.cs
...tNetCore.CAP/Dashboard/Views/DeletedJobsPage.generated.cs
+0
-433
EnqueuedJobsPage.cs
src/DotNetCore.CAP/Dashboard/Views/EnqueuedJobsPage.cs
+0
-12
EnqueuedJobsPage.cshtml
src/DotNetCore.CAP/Dashboard/Views/EnqueuedJobsPage.cshtml
+0
-118
EnqueuedJobsPage.generated.cs
...NetCore.CAP/Dashboard/Views/EnqueuedJobsPage.generated.cs
+0
-517
FailedJobsPage.cshtml
src/DotNetCore.CAP/Dashboard/Views/FailedJobsPage.cshtml
+0
-135
FailedJobsPage.generated.cs
...otNetCore.CAP/Dashboard/Views/FailedJobsPage.generated.cs
+0
-606
FetchedJobsPage.cs
src/DotNetCore.CAP/Dashboard/Views/FetchedJobsPage.cs
+0
-12
FetchedJobsPage.cshtml
src/DotNetCore.CAP/Dashboard/Views/FetchedJobsPage.cshtml
+0
-121
FetchedJobsPage.generated.cs
...tNetCore.CAP/Dashboard/Views/FetchedJobsPage.generated.cs
+0
-497
JobDetailsPage.cs
src/DotNetCore.CAP/Dashboard/Views/JobDetailsPage.cs
+0
-15
JobDetailsPage.cshtml
src/DotNetCore.CAP/Dashboard/Views/JobDetailsPage.cshtml
+0
-211
JobDetailsPage1.generated.cs
...tNetCore.CAP/Dashboard/Views/JobDetailsPage1.generated.cs
+0
-932
ProcessingJobsPage.generated.cs
...tCore.CAP/Dashboard/Views/ProcessingJobsPage.generated.cs
+0
-544
QueuesPage.cshtml
src/DotNetCore.CAP/Dashboard/Views/QueuesPage.cshtml
+0
-122
QueuesPage.generated.cs
src/DotNetCore.CAP/Dashboard/Views/QueuesPage.generated.cs
+0
-574
RecurringJobsPage.cshtml
src/DotNetCore.CAP/Dashboard/Views/RecurringJobsPage.cshtml
+0
-196
RecurringJobsPage.generated.cs
...etCore.CAP/Dashboard/Views/RecurringJobsPage.generated.cs
+0
-831
RetriesPage.cshtml
src/DotNetCore.CAP/Dashboard/Views/RetriesPage.cshtml
+0
-143
RetriesPage.generated.cs
src/DotNetCore.CAP/Dashboard/Views/RetriesPage.generated.cs
+0
-555
ScheduledJobsPage.cshtml
src/DotNetCore.CAP/Dashboard/Views/ScheduledJobsPage.cshtml
+0
-106
ScheduledJobsPage.generated.cs
...etCore.CAP/Dashboard/Views/ScheduledJobsPage.generated.cs
+0
-449
ServersPage.cshtml
src/DotNetCore.CAP/Dashboard/Views/ServersPage.cshtml
+0
-60
ServersPage.generated.cs
src/DotNetCore.CAP/Dashboard/Views/ServersPage.generated.cs
+0
-294
SidebarMenu.cs
src/DotNetCore.CAP/Dashboard/Views/SidebarMenu.cs
+0
-33
SucceededJobs1.generated.cs
...otNetCore.CAP/Dashboard/Views/SucceededJobs1.generated.cs
+0
-481
_Breadcrumbs.generated.cs
src/DotNetCore.CAP/Dashboard/Views/_Breadcrumbs.generated.cs
+0
-105
_Paginator.generated.cs
src/DotNetCore.CAP/Dashboard/Views/_Paginator.generated.cs
+0
-248
_PerPageSelector.generated.cs
...NetCore.CAP/Dashboard/Views/_PerPageSelector.generated.cs
+0
-106
_SidebarMenu.generated.cs
src/DotNetCore.CAP/Dashboard/Views/_SidebarMenu.generated.cs
+0
-139
No files found.
src/DotNetCore.CAP/Dashboard/CombinedResourceDispatcher.cs
0 → 100644
View file @
6a1b5441
using
System.Reflection
;
namespace
DotNetCore.CAP.Dashboard
{
internal
class
CombinedResourceDispatcher
:
EmbeddedResourceDispatcher
{
private
readonly
Assembly
_assembly
;
private
readonly
string
_baseNamespace
;
private
readonly
string
[]
_resourceNames
;
public
CombinedResourceDispatcher
(
string
contentType
,
Assembly
assembly
,
string
baseNamespace
,
params
string
[]
resourceNames
)
:
base
(
contentType
,
assembly
,
null
)
{
_assembly
=
assembly
;
_baseNamespace
=
baseNamespace
;
_resourceNames
=
resourceNames
;
}
protected
override
void
WriteResponse
(
DashboardResponse
response
)
{
foreach
(
var
resourceName
in
_resourceNames
)
{
WriteResource
(
response
,
_assembly
,
$"
{
_baseNamespace
}
.
{
resourceName
}
"
);
}
}
}
}
src/DotNetCore.CAP/Dashboard/CommandDispatcher.cs
0 → 100644
View file @
6a1b5441
using
System
;
using
System.Net
;
using
System.Threading.Tasks
;
namespace
DotNetCore.CAP.Dashboard
{
internal
class
CommandDispatcher
:
IDashboardDispatcher
{
private
readonly
Func
<
DashboardContext
,
bool
>
_command
;
public
CommandDispatcher
(
Func
<
DashboardContext
,
bool
>
command
)
{
_command
=
command
;
}
public
Task
Dispatch
(
DashboardContext
context
)
{
var
request
=
context
.
Request
;
var
response
=
context
.
Response
;
if
(!
"POST"
.
Equals
(
request
.
Method
,
StringComparison
.
OrdinalIgnoreCase
))
{
response
.
StatusCode
=
(
int
)
HttpStatusCode
.
MethodNotAllowed
;
return
Task
.
FromResult
(
false
);
}
if
(
_command
(
context
))
{
response
.
StatusCode
=
(
int
)
HttpStatusCode
.
NoContent
;
}
else
{
response
.
StatusCode
=
422
;
}
return
Task
.
FromResult
(
true
);
}
}
}
src/DotNetCore.CAP/Dashboard/Content/resx/Strings.Designer.cs
View file @
6a1b5441
...
@@ -10,7 +10,8 @@
...
@@ -10,7 +10,8 @@
using
System.Reflection
;
using
System.Reflection
;
namespace
Hangfire.Dashboard.Resources
{
namespace
DotNetCore.CAP.Dashboard.Resources
{
using
System
;
using
System
;
...
@@ -41,7 +42,7 @@ namespace Hangfire.Dashboard.Resources {
...
@@ -41,7 +42,7 @@ namespace Hangfire.Dashboard.Resources {
public
static
global
::
System
.
Resources
.
ResourceManager
ResourceManager
{
public
static
global
::
System
.
Resources
.
ResourceManager
ResourceManager
{
get
{
get
{
if
(
object
.
ReferenceEquals
(
resourceMan
,
null
))
{
if
(
object
.
ReferenceEquals
(
resourceMan
,
null
))
{
global
::
System
.
Resources
.
ResourceManager
temp
=
new
global
::
System
.
Resources
.
ResourceManager
(
"
Hangfire
.Dashboard.Content.resx.Strings"
,
typeof
(
Strings
).
GetTypeInfo
().
Assembly
);
global
::
System
.
Resources
.
ResourceManager
temp
=
new
global
::
System
.
Resources
.
ResourceManager
(
"
DotNetCore.CAP
.Dashboard.Content.resx.Strings"
,
typeof
(
Strings
).
GetTypeInfo
().
Assembly
);
resourceMan
=
temp
;
resourceMan
=
temp
;
}
}
return
resourceMan
;
return
resourceMan
;
...
...
src/DotNetCore.CAP/Dashboard/DashboardContext.cs
View file @
6a1b5441
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Text
;
using
System.Text
;
using
System.Text.RegularExpressions
;
namespace
DotNetCore.CAP.Dashboard
namespace
DotNetCore.CAP.Dashboard
{
{
class
DashboardContext
public
abstract
class
DashboardContext
{
{
protected
DashboardContext
(
IStorage
storage
,
DashboardOptions
options
)
{
if
(
storage
==
null
)
throw
new
ArgumentNullException
(
nameof
(
storage
));
if
(
options
==
null
)
throw
new
ArgumentNullException
(
nameof
(
options
));
Storage
=
storage
;
Options
=
options
;
}
public
IStorage
Storage
{
get
;
}
public
DashboardOptions
Options
{
get
;
}
public
Match
UriMatch
{
get
;
set
;
}
public
DashboardRequest
Request
{
get
;
protected
set
;
}
public
DashboardResponse
Response
{
get
;
protected
set
;
}
}
}
}
}
src/DotNetCore.CAP/Dashboard/DashboardMetric.cs
0 → 100644
View file @
6a1b5441
using
System
;
namespace
DotNetCore.CAP.Dashboard
{
public
class
DashboardMetric
{
public
DashboardMetric
(
string
name
,
Func
<
RazorPage
,
Metric
>
func
)
:
this
(
name
,
name
,
func
)
{
}
public
DashboardMetric
(
string
name
,
string
title
,
Func
<
RazorPage
,
Metric
>
func
)
{
Name
=
name
;
Title
=
title
;
Func
=
func
;
}
public
string
Name
{
get
;
}
public
Func
<
RazorPage
,
Metric
>
Func
{
get
;
}
public
string
Title
{
get
;
set
;
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/DashboardMetrics.cs
0 → 100644
View file @
6a1b5441
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
DotNetCore.CAP.Dashboard.Resources
;
namespace
DotNetCore.CAP.Dashboard
{
public
static
class
DashboardMetrics
{
private
static
readonly
Dictionary
<
string
,
DashboardMetric
>
Metrics
=
new
Dictionary
<
string
,
DashboardMetric
>();
static
DashboardMetrics
()
{
AddMetric
(
ServerCount
);
AddMetric
(
RecurringJobCount
);
AddMetric
(
RetriesCount
);
AddMetric
(
EnqueuedCountOrNull
);
AddMetric
(
FailedCountOrNull
);
AddMetric
(
EnqueuedAndQueueCount
);
AddMetric
(
ScheduledCount
);
AddMetric
(
ProcessingCount
);
AddMetric
(
SucceededCount
);
AddMetric
(
FailedCount
);
AddMetric
(
DeletedCount
);
AddMetric
(
AwaitingCount
);
}
public
static
void
AddMetric
(
DashboardMetric
metric
)
{
if
(
metric
==
null
)
throw
new
ArgumentNullException
(
nameof
(
metric
));
lock
(
Metrics
)
{
Metrics
[
metric
.
Name
]
=
metric
;
}
}
public
static
IEnumerable
<
DashboardMetric
>
GetMetrics
()
{
lock
(
Metrics
)
{
return
Metrics
.
Values
.
ToList
();
}
}
public
static
readonly
DashboardMetric
ServerCount
=
new
DashboardMetric
(
"servers:count"
,
"Metrics_Servers"
,
page
=>
new
Metric
(
page
.
Statistics
.
Servers
.
ToString
(
"N0"
))
{
Style
=
page
.
Statistics
.
Servers
==
0
?
MetricStyle
.
Warning
:
MetricStyle
.
Default
,
Highlighted
=
page
.
Statistics
.
Servers
==
0
,
Title
=
page
.
Statistics
.
Servers
==
0
?
"No active servers found. Jobs will not be processed."
:
null
});
public
static
readonly
DashboardMetric
RecurringJobCount
=
new
DashboardMetric
(
"recurring:count"
,
"Metrics_RecurringJobs"
,
page
=>
new
Metric
(
page
.
Statistics
.
Recurring
.
ToString
(
"N0"
)));
public
static
readonly
DashboardMetric
RetriesCount
=
new
DashboardMetric
(
"retries:count"
,
"Metrics_Retries"
,
page
=>
{
long
retryCount
;
using
(
var
connection
=
page
.
Storage
.
GetConnection
())
{
var
storageConnection
=
connection
as
IStorageConnection
;
if
(
storageConnection
==
null
)
{
return
null
;
}
retryCount
=
storageConnection
.
GetSetCount
(
"retries"
);
}
return
new
Metric
(
retryCount
.
ToString
(
"N0"
))
{
Style
=
retryCount
>
0
?
MetricStyle
.
Warning
:
MetricStyle
.
Default
};
});
public
static
readonly
DashboardMetric
EnqueuedCountOrNull
=
new
DashboardMetric
(
"enqueued:count-or-null"
,
"Metrics_EnqueuedCountOrNull"
,
page
=>
page
.
Statistics
.
Enqueued
>
0
||
page
.
Statistics
.
Failed
==
0
?
new
Metric
(
page
.
Statistics
.
Enqueued
.
ToString
(
"N0"
))
{
Style
=
page
.
Statistics
.
Enqueued
>
0
?
MetricStyle
.
Info
:
MetricStyle
.
Default
,
Highlighted
=
page
.
Statistics
.
Enqueued
>
0
&&
page
.
Statistics
.
Failed
==
0
}
:
null
);
public
static
readonly
DashboardMetric
FailedCountOrNull
=
new
DashboardMetric
(
"failed:count-or-null"
,
"Metrics_FailedJobs"
,
page
=>
page
.
Statistics
.
Failed
>
0
?
new
Metric
(
page
.
Statistics
.
Failed
.
ToString
(
"N0"
))
{
Style
=
MetricStyle
.
Danger
,
Highlighted
=
true
,
Title
=
string
.
Format
(
Strings
.
Metrics_FailedCountOrNull
,
page
.
Statistics
.
Failed
)
}
:
null
);
public
static
readonly
DashboardMetric
EnqueuedAndQueueCount
=
new
DashboardMetric
(
"enqueued-queues:count"
,
"Metrics_EnqueuedQueuesCount"
,
page
=>
new
Metric
(
$"
{
page
.
Statistics
.
Enqueued
:
N0
}
/
{
page
.
Statistics
.
Queues
:
N0
}
"
)
{
Style
=
page
.
Statistics
.
Enqueued
>
0
?
MetricStyle
.
Info
:
MetricStyle
.
Default
,
Highlighted
=
page
.
Statistics
.
Enqueued
>
0
});
public
static
readonly
DashboardMetric
ScheduledCount
=
new
DashboardMetric
(
"scheduled:count"
,
"Metrics_ScheduledJobs"
,
page
=>
new
Metric
(
page
.
Statistics
.
Scheduled
.
ToString
(
"N0"
))
{
Style
=
page
.
Statistics
.
Scheduled
>
0
?
MetricStyle
.
Info
:
MetricStyle
.
Default
});
public
static
readonly
DashboardMetric
ProcessingCount
=
new
DashboardMetric
(
"processing:count"
,
"Metrics_ProcessingJobs"
,
page
=>
new
Metric
(
page
.
Statistics
.
Processing
.
ToString
(
"N0"
))
{
Style
=
page
.
Statistics
.
Processing
>
0
?
MetricStyle
.
Warning
:
MetricStyle
.
Default
});
public
static
readonly
DashboardMetric
SucceededCount
=
new
DashboardMetric
(
"succeeded:count"
,
"Metrics_SucceededJobs"
,
page
=>
new
Metric
(
page
.
Statistics
.
Succeeded
.
ToString
(
"N0"
))
{
IntValue
=
page
.
Statistics
.
Succeeded
});
public
static
readonly
DashboardMetric
FailedCount
=
new
DashboardMetric
(
"failed:count"
,
"Metrics_FailedJobs"
,
page
=>
new
Metric
(
page
.
Statistics
.
Failed
.
ToString
(
"N0"
))
{
IntValue
=
page
.
Statistics
.
Failed
,
Style
=
page
.
Statistics
.
Failed
>
0
?
MetricStyle
.
Danger
:
MetricStyle
.
Default
,
Highlighted
=
page
.
Statistics
.
Failed
>
0
});
public
static
readonly
DashboardMetric
DeletedCount
=
new
DashboardMetric
(
"deleted:count"
,
"Metrics_DeletedJobs"
,
page
=>
new
Metric
(
page
.
Statistics
.
Deleted
.
ToString
(
"N0"
)));
public
static
readonly
DashboardMetric
AwaitingCount
=
new
DashboardMetric
(
"awaiting:count"
,
"Metrics_AwaitingCount"
,
page
=>
{
long
awaitingCount
=
-
1
;
using
(
var
connection
=
page
.
Storage
.
GetConnection
())
{
var
storageConnection
=
connection
as
IStorageConnection
;
if
(
storageConnection
!=
null
)
{
awaitingCount
=
storageConnection
.
GetSetCount
(
"awaiting"
);
}
}
return
new
Metric
(
awaitingCount
.
ToString
(
"N0"
))
{
Style
=
awaitingCount
>
0
?
MetricStyle
.
Info
:
MetricStyle
.
Default
};
});
}
}
src/DotNetCore.CAP/Dashboard/DashboardRequest.cs
0 → 100644
View file @
6a1b5441
using
System.Collections.Generic
;
using
System.Threading.Tasks
;
namespace
DotNetCore.CAP.Dashboard
{
public
abstract
class
DashboardRequest
{
public
abstract
string
Method
{
get
;
}
public
abstract
string
Path
{
get
;
}
public
abstract
string
PathBase
{
get
;
}
public
abstract
string
LocalIpAddress
{
get
;
}
public
abstract
string
RemoteIpAddress
{
get
;
}
public
abstract
string
GetQuery
(
string
key
);
public
abstract
Task
<
IList
<
string
>>
GetFormValuesAsync
(
string
key
);
}
}
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/DashboardResponse.cs
0 → 100644
View file @
6a1b5441
using
System
;
using
System.IO
;
using
System.Threading.Tasks
;
namespace
DotNetCore.CAP.Dashboard
{
public
abstract
class
DashboardResponse
{
public
abstract
string
ContentType
{
get
;
set
;
}
public
abstract
int
StatusCode
{
get
;
set
;
}
public
abstract
Stream
Body
{
get
;
}
public
abstract
void
SetExpire
(
DateTimeOffset
?
value
);
public
abstract
Task
WriteAsync
(
string
text
);
}
}
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/EmbeddedResourceDispatcher.cs
0 → 100644
View file @
6a1b5441
using
System
;
using
System.Reflection
;
using
System.Threading.Tasks
;
namespace
DotNetCore.CAP.Dashboard
{
internal
class
EmbeddedResourceDispatcher
:
IDashboardDispatcher
{
private
readonly
Assembly
_assembly
;
private
readonly
string
_resourceName
;
private
readonly
string
_contentType
;
public
EmbeddedResourceDispatcher
(
string
contentType
,
Assembly
assembly
,
string
resourceName
)
{
if
(
contentType
==
null
)
throw
new
ArgumentNullException
(
nameof
(
contentType
));
if
(
assembly
==
null
)
throw
new
ArgumentNullException
(
nameof
(
assembly
));
_assembly
=
assembly
;
_resourceName
=
resourceName
;
_contentType
=
contentType
;
}
public
Task
Dispatch
(
DashboardContext
context
)
{
context
.
Response
.
ContentType
=
_contentType
;
context
.
Response
.
SetExpire
(
DateTimeOffset
.
Now
.
AddYears
(
1
));
WriteResponse
(
context
.
Response
);
return
Task
.
FromResult
(
true
);
}
protected
virtual
void
WriteResponse
(
DashboardResponse
response
)
{
WriteResource
(
response
,
_assembly
,
_resourceName
);
}
protected
void
WriteResource
(
DashboardResponse
response
,
Assembly
assembly
,
string
resourceName
)
{
using
(
var
inputStream
=
assembly
.
GetManifestResourceStream
(
resourceName
))
{
if
(
inputStream
==
null
)
{
throw
new
ArgumentException
(
$@"Resource with name
{
resourceName
}
not found in assembly
{
assembly
}
."
);
}
inputStream
.
CopyTo
(
response
.
Body
);
}
}
}
}
src/DotNetCore.CAP/Dashboard/HtmlHelper.cs
0 → 100644
View file @
6a1b5441
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Net
;
using
System.Text
;
using
System.ComponentModel
;
using
System.Reflection
;
using
System.Text.RegularExpressions
;
using
DotNetCore.CAP.Dashboard.Resources
;
using
DotNetCore.CAP.Dashboard.Pages
;
using
DotNetCore.CAP.Infrastructure
;
using
DotNetCore.CAP.Models
;
namespace
DotNetCore.CAP.Dashboard
{
public
class
HtmlHelper
{
private
readonly
RazorPage
_page
;
public
HtmlHelper
(
RazorPage
page
)
{
if
(
page
==
null
)
throw
new
ArgumentNullException
(
nameof
(
page
));
_page
=
page
;
}
//public NonEscapedString Breadcrumbs(string title, IDictionary<string, string> items)
//{
// if (items == null) throw new ArgumentNullException(nameof(items));
// return RenderPartial(new Breadcrumbs(title, items));
//}
//public NonEscapedString JobsSidebar()
//{
// return RenderPartial(new SidebarMenu(JobsSidebarMenu.Items));
//}
//public NonEscapedString SidebarMenu(IEnumerable<Func<RazorPage, MenuItem>> items)
//{
// if (items == null) throw new ArgumentNullException(nameof(items));
// return RenderPartial(new SidebarMenu(items));
//}
public
NonEscapedString
BlockMetric
(
DashboardMetric
metric
)
{
if
(
metric
==
null
)
throw
new
ArgumentNullException
(
nameof
(
metric
));
return
RenderPartial
(
new
BlockMetric
(
metric
));
}
public
NonEscapedString
InlineMetric
(
DashboardMetric
metric
)
{
if
(
metric
==
null
)
throw
new
ArgumentNullException
(
nameof
(
metric
));
return
RenderPartial
(
new
InlineMetric
(
metric
));
}
//public NonEscapedString Paginator(Pager pager)
//{
// if (pager == null) throw new ArgumentNullException(nameof(pager));
// return RenderPartial(new Paginator(pager));
//}
//public NonEscapedString PerPageSelector(Pager pager)
//{
// if (pager == null) throw new ArgumentNullException(nameof(pager));
// return RenderPartial(new PerPageSelector(pager));
//}
public
NonEscapedString
RenderPartial
(
RazorPage
partialPage
)
{
partialPage
.
Assign
(
_page
);
return
new
NonEscapedString
(
partialPage
.
ToString
());
}
public
NonEscapedString
Raw
(
string
value
)
{
return
new
NonEscapedString
(
value
);
}
public
NonEscapedString
JobId
(
string
jobId
,
bool
shorten
=
true
)
{
Guid
guid
;
return
new
NonEscapedString
(
Guid
.
TryParse
(
jobId
,
out
guid
)
?
(
shorten
?
jobId
.
Substring
(
0
,
8
)
+
"…"
:
jobId
)
:
$"#
{
jobId
}
"
);
}
public
string
JobName
(
Message
job
)
{
if
(
job
==
null
)
{
return
Strings
.
Common_CannotFindTargetMethod
;
}
return
job
.
ToString
();
}
public
NonEscapedString
StateLabel
(
string
stateName
)
{
if
(
String
.
IsNullOrWhiteSpace
(
stateName
))
{
return
Raw
(
$"<em>
{
Strings
.
Common_NoState
}
</em>"
);
}
return
Raw
(
$"<span class=\"label label-default\" style=\"background-color:
{
JobHistoryRenderer
.
GetForegroundStateColor
(
stateName
)}
;\">
{
stateName
}
</span>"
);
}
public
NonEscapedString
JobIdLink
(
string
jobId
)
{
return
Raw
(
$"<a href=\"
{
_page
.
Url
.
JobDetails
(
jobId
)}
\">
{
JobId
(
jobId
)}
</a>"
);
}
public
NonEscapedString
JobNameLink
(
string
jobId
,
Message
job
)
{
return
Raw
(
$"<a class=\"job-method\" href=\"
{
_page
.
Url
.
JobDetails
(
jobId
)}
\">
{
HtmlEncode
(
JobName
(
job
))}
</a>"
);
}
public
NonEscapedString
RelativeTime
(
DateTime
value
)
{
return
Raw
(
$"<span data-moment=\"
{
Helper
.
ToTimestamp
(
value
)}
\">
{
value
}
</span>"
);
}
public
NonEscapedString
MomentTitle
(
DateTime
time
,
string
value
)
{
return
Raw
(
$"<span data-moment-title=\"
{
Helper
.
ToTimestamp
(
time
)}
\">
{
value
}
</span>"
);
}
public
NonEscapedString
LocalTime
(
DateTime
value
)
{
return
Raw
(
$"<span data-moment-local=\"
{
Helper
.
ToTimestamp
(
value
)}
\">
{
value
}
</span>"
);
}
public
string
ToHumanDuration
(
TimeSpan
?
duration
,
bool
displaySign
=
true
)
{
if
(
duration
==
null
)
return
null
;
var
builder
=
new
StringBuilder
();
if
(
displaySign
)
{
builder
.
Append
(
duration
.
Value
.
TotalMilliseconds
<
0
?
"-"
:
"+"
);
}
duration
=
duration
.
Value
.
Duration
();
if
(
duration
.
Value
.
Days
>
0
)
{
builder
.
Append
(
$"
{
duration
.
Value
.
Days
}
d "
);
}
if
(
duration
.
Value
.
Hours
>
0
)
{
builder
.
Append
(
$"
{
duration
.
Value
.
Hours
}
h "
);
}
if
(
duration
.
Value
.
Minutes
>
0
)
{
builder
.
Append
(
$"
{
duration
.
Value
.
Minutes
}
m "
);
}
if
(
duration
.
Value
.
TotalHours
<
1
)
{
if
(
duration
.
Value
.
Seconds
>
0
)
{
builder
.
Append
(
duration
.
Value
.
Seconds
);
if
(
duration
.
Value
.
Milliseconds
>
0
)
{
builder
.
Append
(
$".
{
duration
.
Value
.
Milliseconds
.
ToString
().
PadLeft
(
3
,
'0'
)}
"
);
}
builder
.
Append
(
"s "
);
}
else
{
if
(
duration
.
Value
.
Milliseconds
>
0
)
{
builder
.
Append
(
$"
{
duration
.
Value
.
Milliseconds
}
ms "
);
}
}
}
if
(
builder
.
Length
<=
1
)
{
builder
.
Append
(
" <1ms "
);
}
builder
.
Remove
(
builder
.
Length
-
1
,
1
);
return
builder
.
ToString
();
}
public
string
FormatProperties
(
IDictionary
<
string
,
string
>
properties
)
{
return
String
.
Join
(
", "
,
properties
.
Select
(
x
=>
$"
{
x
.
Key
}
: \"
{
x
.
Value
}
\""
));
}
public
NonEscapedString
QueueLabel
(
string
queue
)
{
var
label
=
queue
!=
null
?
$"<a class=\"text-uppercase\" href=\"
{
_page
.
Url
.
Queue
(
queue
)}
\">
{
queue
}
</a>"
:
$"<span class=\"label label-danger\"><i>
{
Strings
.
Common_Unknown
}
</i></span>"
;
return
new
NonEscapedString
(
label
);
}
public
NonEscapedString
ServerId
(
string
serverId
)
{
var
parts
=
serverId
.
Split
(
':'
);
var
shortenedId
=
parts
.
Length
>
1
?
String
.
Join
(
":"
,
parts
.
Take
(
parts
.
Length
-
1
))
:
serverId
;
return
new
NonEscapedString
(
$"<span class=\"labe label-defult text-uppercase\" title=\"
{
serverId
}
\">
{
shortenedId
}
</span>"
);
}
//private static readonly StackTraceHtmlFragments StackTraceHtmlFragments = new StackTraceHtmlFragments
//{
// BeforeFrame = "<span class='st-frame'>" , AfterFrame = "</span>",
// BeforeType = "<span class='st-type'>" , AfterType = "</span>",
// BeforeMethod = "<span class='st-method'>" , AfterMethod = "</span>",
// BeforeParameters = "<span class='st-params'>" , AfterParameters = "</span>",
// BeforeParameterType = "<span class='st-param'><span class='st-param-type'>", AfterParameterType = "</span>",
// BeforeParameterName = "<span class='st-param-name'>" , AfterParameterName = "</span></span>",
// BeforeFile = "<span class='st-file'>" , AfterFile = "</span>",
// BeforeLine = "<span class='st-line'>" , AfterLine = "</span>",
//};
public
NonEscapedString
StackTrace
(
string
stackTrace
)
{
try
{
//return new NonEscapedString(StackTraceFormatter.FormatHtml(stackTrace, StackTraceHtmlFragments));
return
new
NonEscapedString
(
stackTrace
);
}
catch
(
RegexMatchTimeoutException
)
{
return
new
NonEscapedString
(
HtmlEncode
(
stackTrace
));
}
}
public
string
HtmlEncode
(
string
text
)
{
return
WebUtility
.
HtmlEncode
(
text
);
}
}
}
src/DotNetCore.CAP/Dashboard/IDashboardAuthorizationFilter.cs
0 → 100644
View file @
6a1b5441
namespace
DotNetCore.CAP.Dashboard
{
public
interface
IDashboardAuthorizationFilter
{
bool
Authorize
(
DashboardContext
context
);
}
}
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/IDashboardDispatcher.cs
0 → 100644
View file @
6a1b5441
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
DotNetCore.CAP.Dashboard
{
public
interface
IDashboardDispatcher
{
Task
Dispatch
(
DashboardContext
context
);
}
}
src/DotNetCore.CAP/Dashboard/IMonitoringApi.cs
View file @
6a1b5441
// This file is part of Hangfire.
// Copyright 2013-2014 Sergey Odinokov.
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
Hangfire.Storage
.Monitoring
;
using
DotNetCore.CAP.Dashboard
.Monitoring
;
namespace
Hangfire.Storage
namespace
DotNetCore.CAP.Dashboard
{
{
public
interface
IMonitoringApi
public
interface
IMonitoringApi
{
{
...
...
src/DotNetCore.CAP/Dashboard/JobHistoryRenderer.cs
0 → 100644
View file @
6a1b5441
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
DotNetCore.CAP.Infrastructure
;
using
DotNetCore.CAP.Processor.States
;
using
Newtonsoft.Json
;
namespace
DotNetCore.CAP.Dashboard
{
public
static
class
JobHistoryRenderer
{
private
static
readonly
IDictionary
<
string
,
Func
<
HtmlHelper
,
IDictionary
<
string
,
string
>,
NonEscapedString
>>
Renderers
=
new
Dictionary
<
string
,
Func
<
HtmlHelper
,
IDictionary
<
string
,
string
>,
NonEscapedString
>>();
private
static
readonly
IDictionary
<
string
,
string
>
BackgroundStateColors
=
new
Dictionary
<
string
,
string
>();
private
static
readonly
IDictionary
<
string
,
string
>
ForegroundStateColors
=
new
Dictionary
<
string
,
string
>();
[
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessage
(
"Microsoft.Performance"
,
"CA1810:InitializeReferenceTypeStaticFieldsInline"
)]
static
JobHistoryRenderer
()
{
Register
(
SucceededState
.
StateName
,
SucceededRenderer
);
Register
(
FailedState
.
StateName
,
FailedRenderer
);
Register
(
ProcessingState
.
StateName
,
ProcessingRenderer
);
Register
(
EnqueuedState
.
StateName
,
EnqueuedRenderer
);
Register
(
ScheduledState
.
StateName
,
ScheduledRenderer
);
//Register(DeletedState.StateName, NullRenderer);
//Register(AwaitingState.StateName, AwaitingRenderer);
BackgroundStateColors
.
Add
(
EnqueuedState
.
StateName
,
"#F5F5F5"
);
BackgroundStateColors
.
Add
(
SucceededState
.
StateName
,
"#EDF7ED"
);
BackgroundStateColors
.
Add
(
FailedState
.
StateName
,
"#FAEBEA"
);
BackgroundStateColors
.
Add
(
ProcessingState
.
StateName
,
"#FCEFDC"
);
BackgroundStateColors
.
Add
(
ScheduledState
.
StateName
,
"#E0F3F8"
);
//BackgroundStateColors.Add(DeletedState.StateName, "#ddd");
//BackgroundStateColors.Add(AwaitingState.StateName, "#F5F5F5");
ForegroundStateColors
.
Add
(
EnqueuedState
.
StateName
,
"#999"
);
ForegroundStateColors
.
Add
(
SucceededState
.
StateName
,
"#5cb85c"
);
ForegroundStateColors
.
Add
(
FailedState
.
StateName
,
"#d9534f"
);
ForegroundStateColors
.
Add
(
ProcessingState
.
StateName
,
"#f0ad4e"
);
ForegroundStateColors
.
Add
(
ScheduledState
.
StateName
,
"#5bc0de"
);
//ForegroundStateColors.Add(DeletedState.StateName, "#777");
//ForegroundStateColors.Add(AwaitingState.StateName, "#999");
}
public
static
void
AddBackgroundStateColor
(
string
stateName
,
string
color
)
{
BackgroundStateColors
.
Add
(
stateName
,
color
);
}
public
static
string
GetBackgroundStateColor
(
string
stateName
)
{
if
(
stateName
==
null
||
!
BackgroundStateColors
.
ContainsKey
(
stateName
))
{
return
"inherit"
;
}
return
BackgroundStateColors
[
stateName
];
}
public
static
void
AddForegroundStateColor
(
string
stateName
,
string
color
)
{
ForegroundStateColors
.
Add
(
stateName
,
color
);
}
public
static
string
GetForegroundStateColor
(
string
stateName
)
{
if
(
stateName
==
null
||
!
ForegroundStateColors
.
ContainsKey
(
stateName
))
{
return
"inherit"
;
}
return
ForegroundStateColors
[
stateName
];
}
public
static
void
Register
(
string
state
,
Func
<
HtmlHelper
,
IDictionary
<
string
,
string
>,
NonEscapedString
>
renderer
)
{
if
(!
Renderers
.
ContainsKey
(
state
))
{
Renderers
.
Add
(
state
,
renderer
);
}
else
{
Renderers
[
state
]
=
renderer
;
}
}
public
static
bool
Exists
(
string
state
)
{
return
Renderers
.
ContainsKey
(
state
);
}
public
static
NonEscapedString
RenderHistory
(
this
HtmlHelper
helper
,
string
state
,
IDictionary
<
string
,
string
>
properties
)
{
var
renderer
=
Renderers
.
ContainsKey
(
state
)
?
Renderers
[
state
]
:
DefaultRenderer
;
return
renderer
?.
Invoke
(
helper
,
properties
);
}
public
static
NonEscapedString
NullRenderer
(
HtmlHelper
helper
,
IDictionary
<
string
,
string
>
properties
)
{
return
null
;
}
public
static
NonEscapedString
DefaultRenderer
(
HtmlHelper
helper
,
IDictionary
<
string
,
string
>
stateData
)
{
if
(
stateData
==
null
||
stateData
.
Count
==
0
)
return
null
;
var
builder
=
new
StringBuilder
();
builder
.
Append
(
"<dl class=\"dl-horizontal\">"
);
foreach
(
var
item
in
stateData
)
{
builder
.
Append
(
$"<dt>
{
item
.
Key
}
</dt>"
);
builder
.
Append
(
$"<dd>
{
item
.
Value
}
</dd>"
);
}
builder
.
Append
(
"</dl>"
);
return
new
NonEscapedString
(
builder
.
ToString
());
}
public
static
NonEscapedString
SucceededRenderer
(
HtmlHelper
html
,
IDictionary
<
string
,
string
>
stateData
)
{
var
builder
=
new
StringBuilder
();
builder
.
Append
(
"<dl class=\"dl-horizontal\">"
);
var
itemsAdded
=
false
;
if
(
stateData
.
ContainsKey
(
"Latency"
))
{
var
latency
=
TimeSpan
.
FromMilliseconds
(
long
.
Parse
(
stateData
[
"Latency"
]));
builder
.
Append
(
$"<dt>Latency:</dt><dd>
{
html
.
ToHumanDuration
(
latency
,
false
)}
</dd>"
);
itemsAdded
=
true
;
}
if
(
stateData
.
ContainsKey
(
"PerformanceDuration"
))
{
var
duration
=
TimeSpan
.
FromMilliseconds
(
long
.
Parse
(
stateData
[
"PerformanceDuration"
]));
builder
.
Append
(
$"<dt>Duration:</dt><dd>
{
html
.
ToHumanDuration
(
duration
,
false
)}
</dd>"
);
itemsAdded
=
true
;
}
if
(
stateData
.
ContainsKey
(
"Result"
)
&&
!
String
.
IsNullOrWhiteSpace
(
stateData
[
"Result"
]))
{
var
result
=
stateData
[
"Result"
];
builder
.
Append
(
$"<dt>Result:</dt><dd>
{
System
.
Net
.
WebUtility
.
HtmlEncode
(
result
)}
</dd>"
);
itemsAdded
=
true
;
}
builder
.
Append
(
"</dl>"
);
if
(!
itemsAdded
)
return
null
;
return
new
NonEscapedString
(
builder
.
ToString
());
}
private
static
NonEscapedString
FailedRenderer
(
HtmlHelper
html
,
IDictionary
<
string
,
string
>
stateData
)
{
var
stackTrace
=
html
.
StackTrace
(
stateData
[
"ExceptionDetails"
]).
ToString
();
return
new
NonEscapedString
(
$"<h4 class=\"exception-type\">
{
stateData
[
"ExceptionType"
]}
</h4><p class=\"text-muted\">
{
stateData
[
"ExceptionMessage"
]}
</p>
{
"<pre class=\"stack-trace\">"
+
stackTrace
+
"</pre>"
}
"
);
}
private
static
NonEscapedString
ProcessingRenderer
(
HtmlHelper
helper
,
IDictionary
<
string
,
string
>
stateData
)
{
var
builder
=
new
StringBuilder
();
builder
.
Append
(
"<dl class=\"dl-horizontal\">"
);
string
serverId
=
null
;
if
(
stateData
.
ContainsKey
(
"ServerId"
))
{
serverId
=
stateData
[
"ServerId"
];
}
else
if
(
stateData
.
ContainsKey
(
"ServerName"
))
{
serverId
=
stateData
[
"ServerName"
];
}
if
(
serverId
!=
null
)
{
builder
.
Append
(
"<dt>Server:</dt>"
);
builder
.
Append
(
$"<dd>
{
helper
.
ServerId
(
serverId
)}
</dd>"
);
}
if
(
stateData
.
ContainsKey
(
"WorkerId"
))
{
builder
.
Append
(
"<dt>Worker:</dt>"
);
builder
.
Append
(
$"<dd>
{
stateData
[
"WorkerId"
].
Substring
(
0
,
8
)}
</dd>"
);
}
else
if
(
stateData
.
ContainsKey
(
"WorkerNumber"
))
{
builder
.
Append
(
"<dt>Worker:</dt>"
);
builder
.
Append
(
$"<dd>#
{
stateData
[
"WorkerNumber"
]}
</dd>"
);
}
builder
.
Append
(
"</dl>"
);
return
new
NonEscapedString
(
builder
.
ToString
());
}
private
static
NonEscapedString
EnqueuedRenderer
(
HtmlHelper
helper
,
IDictionary
<
string
,
string
>
stateData
)
{
return
new
NonEscapedString
(
$"<dl class=\"dl-horizontal\"><dt>Queue:</dt><dd>
{
helper
.
QueueLabel
(
stateData
[
"Queue"
])}
</dd></dl>"
);
}
private
static
NonEscapedString
ScheduledRenderer
(
HtmlHelper
helper
,
IDictionary
<
string
,
string
>
stateData
)
{
var
enqueueAt
=
Helper
.
DeserializeDateTime
(
stateData
[
"EnqueueAt"
]);
return
new
NonEscapedString
(
$"<dl class=\"dl-horizontal\"><dt>Enqueue at:</dt><dd data-moment=\"
{
Helper
.
ToTimestamp
(
enqueueAt
)}
\">
{
enqueueAt
}
</dd></dl>"
);
}
private
static
NonEscapedString
AwaitingRenderer
(
HtmlHelper
helper
,
IDictionary
<
string
,
string
>
stateData
)
{
var
builder
=
new
StringBuilder
();
builder
.
Append
(
"<dl class=\"dl-horizontal\">"
);
if
(
stateData
.
ContainsKey
(
"ParentId"
))
{
builder
.
Append
(
$"<dt>Parent</dt><dd>
{
helper
.
JobIdLink
(
stateData
[
"ParentId"
])}
</dd>"
);
}
if
(
stateData
.
ContainsKey
(
"NextState"
))
{
var
nextState
=
JsonConvert
.
DeserializeObject
<
IState
>(
stateData
[
"NextState"
],
new
JsonSerializerSettings
{
TypeNameHandling
=
TypeNameHandling
.
All
});
builder
.
Append
(
$"<dt>Next State</dt><dd>
{
helper
.
StateLabel
(
nextState
.
Name
)}
</dd>"
);
}
if
(
stateData
.
ContainsKey
(
"Options"
))
{
builder
.
Append
(
$"<dt>Options</dt><dd><code>
{
helper
.
HtmlEncode
(
stateData
[
"Options"
])}
</code></dd>"
);
}
builder
.
Append
(
"</dl>"
);
return
new
NonEscapedString
(
builder
.
ToString
());
}
}
}
src/DotNetCore.CAP/Dashboard/JobsSidebarMenu.cs
0 → 100644
View file @
6a1b5441
using
System
;
using
System.Collections.Generic
;
using
DotNetCore.CAP.Dashboard.Resources
;
namespace
DotNetCore.CAP.Dashboard
{
public
static
class
JobsSidebarMenu
{
public
static
readonly
List
<
Func
<
RazorPage
,
MenuItem
>>
Items
=
new
List
<
Func
<
RazorPage
,
MenuItem
>>();
static
JobsSidebarMenu
()
{
Items
.
Add
(
page
=>
new
MenuItem
(
Strings
.
JobsSidebarMenu_Enqueued
,
page
.
Url
.
LinkToQueues
())
{
Active
=
page
.
RequestPath
.
StartsWith
(
"/jobs/enqueued"
),
Metric
=
DashboardMetrics
.
EnqueuedAndQueueCount
});
Items
.
Add
(
page
=>
new
MenuItem
(
Strings
.
JobsSidebarMenu_Scheduled
,
page
.
Url
.
To
(
"/jobs/scheduled"
))
{
Active
=
page
.
RequestPath
.
StartsWith
(
"/jobs/scheduled"
),
Metric
=
DashboardMetrics
.
ScheduledCount
});
Items
.
Add
(
page
=>
new
MenuItem
(
Strings
.
JobsSidebarMenu_Processing
,
page
.
Url
.
To
(
"/jobs/processing"
))
{
Active
=
page
.
RequestPath
.
StartsWith
(
"/jobs/processing"
),
Metric
=
DashboardMetrics
.
ProcessingCount
});
Items
.
Add
(
page
=>
new
MenuItem
(
Strings
.
JobsSidebarMenu_Succeeded
,
page
.
Url
.
To
(
"/jobs/succeeded"
))
{
Active
=
page
.
RequestPath
.
StartsWith
(
"/jobs/succeeded"
),
Metric
=
DashboardMetrics
.
SucceededCount
});
Items
.
Add
(
page
=>
new
MenuItem
(
Strings
.
JobsSidebarMenu_Failed
,
page
.
Url
.
To
(
"/jobs/failed"
))
{
Active
=
page
.
RequestPath
.
StartsWith
(
"/jobs/failed"
),
Metric
=
DashboardMetrics
.
FailedCount
});
Items
.
Add
(
page
=>
new
MenuItem
(
Strings
.
JobsSidebarMenu_Deleted
,
page
.
Url
.
To
(
"/jobs/deleted"
))
{
Active
=
page
.
RequestPath
.
StartsWith
(
"/jobs/deleted"
),
Metric
=
DashboardMetrics
.
DeletedCount
});
Items
.
Add
(
page
=>
new
MenuItem
(
Strings
.
JobsSidebarMenu_Awaiting
,
page
.
Url
.
To
(
"/jobs/awaiting"
))
{
Active
=
page
.
RequestPath
.
StartsWith
(
"/jobs/awaiting"
),
Metric
=
DashboardMetrics
.
AwaitingCount
});
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/JsonStats.cs
0 → 100644
View file @
6a1b5441
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Converters
;
using
Newtonsoft.Json.Serialization
;
namespace
DotNetCore.CAP.Dashboard
{
internal
class
JsonStats
:
IDashboardDispatcher
{
public
async
Task
Dispatch
(
DashboardContext
context
)
{
var
requestedMetrics
=
await
context
.
Request
.
GetFormValuesAsync
(
"metrics[]"
);
var
page
=
new
StubPage
();
page
.
Assign
(
context
);
var
metrics
=
DashboardMetrics
.
GetMetrics
().
Where
(
x
=>
requestedMetrics
.
Contains
(
x
.
Name
));
var
result
=
new
Dictionary
<
string
,
Metric
>();
foreach
(
var
metric
in
metrics
)
{
var
value
=
metric
.
Func
(
page
);
result
.
Add
(
metric
.
Name
,
value
);
}
var
settings
=
new
JsonSerializerSettings
{
ContractResolver
=
new
CamelCasePropertyNamesContractResolver
(),
Converters
=
new
JsonConverter
[]{
new
StringEnumConverter
{
CamelCaseText
=
true
}
}
};
var
serialized
=
JsonConvert
.
SerializeObject
(
result
,
settings
);
context
.
Response
.
ContentType
=
"application/json"
;
await
context
.
Response
.
WriteAsync
(
serialized
);
}
private
class
StubPage
:
RazorPage
{
public
override
void
Execute
()
{
}
}
}
}
src/DotNetCore.CAP/Dashboard/LocalRequestsOnlyAuthorizationFilter.cs
0 → 100644
View file @
6a1b5441
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
DotNetCore.CAP.Dashboard
{
public
class
LocalRequestsOnlyAuthorizationFilter
:
IDashboardAuthorizationFilter
{
public
bool
Authorize
(
DashboardContext
context
)
{
// if unknown, assume not local
if
(
String
.
IsNullOrEmpty
(
context
.
Request
.
RemoteIpAddress
))
return
false
;
// check if localhost
if
(
context
.
Request
.
RemoteIpAddress
==
"127.0.0.1"
||
context
.
Request
.
RemoteIpAddress
==
"::1"
)
return
true
;
// compare with local address
if
(
context
.
Request
.
RemoteIpAddress
==
context
.
Request
.
LocalIpAddress
)
return
true
;
return
false
;
}
}
}
src/DotNetCore.CAP/Dashboard/MenuItem.cs
0 → 100644
View file @
6a1b5441
using
System.Collections.Generic
;
using
System.Linq
;
namespace
DotNetCore.CAP.Dashboard
{
public
class
MenuItem
{
public
MenuItem
(
string
text
,
string
url
)
{
Text
=
text
;
Url
=
url
;
}
public
string
Text
{
get
;
}
public
string
Url
{
get
;
}
public
bool
Active
{
get
;
set
;
}
public
DashboardMetric
Metric
{
get
;
set
;
}
public
DashboardMetric
[]
Metrics
{
get
;
set
;
}
public
IEnumerable
<
DashboardMetric
>
GetAllMetrics
()
{
var
metrics
=
new
List
<
DashboardMetric
>
{
Metric
};
if
(
Metrics
!=
null
)
{
metrics
.
AddRange
(
Metrics
);
}
return
metrics
.
Where
(
x
=>
x
!=
null
).
ToList
();
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/Metric.cs
0 → 100644
View file @
6a1b5441
namespace
DotNetCore.CAP.Dashboard
{
public
class
Metric
{
public
Metric
(
string
value
)
{
Value
=
value
;
}
public
string
Value
{
get
;
}
public
long
IntValue
{
get
;
set
;
}
public
MetricStyle
Style
{
get
;
set
;
}
public
bool
Highlighted
{
get
;
set
;
}
public
string
Title
{
get
;
set
;
}
}
public
enum
MetricStyle
{
Default
,
Info
,
Success
,
Warning
,
Danger
,
}
internal
static
class
MetricStyleExtensions
{
public
static
string
ToClassName
(
this
MetricStyle
style
)
{
switch
(
style
)
{
case
MetricStyle
.
Default
:
return
"metric-default"
;
case
MetricStyle
.
Info
:
return
"metric-info"
;
case
MetricStyle
.
Success
:
return
"metric-success"
;
case
MetricStyle
.
Warning
:
return
"metric-warning"
;
case
MetricStyle
.
Danger
:
return
"metric-danger"
;
default
:
return
"metric-null"
;
}
}
}
}
src/DotNetCore.CAP/Dashboard/Monitoring/DeletedJobDto.cs
View file @
6a1b5441
using
System
;
using
System
;
using
Hangfire.Common
;
using
DotNetCore.CAP.Models
;
namespace
Hangfire.Storage
.Monitoring
namespace
DotNetCore.CAP.Dashboard
.Monitoring
{
{
public
class
DeletedJobDto
public
class
DeletedJobDto
{
{
...
@@ -10,7 +10,7 @@ namespace Hangfire.Storage.Monitoring
...
@@ -10,7 +10,7 @@ namespace Hangfire.Storage.Monitoring
InDeletedState
=
true
;
InDeletedState
=
true
;
}
}
public
Job
Job
{
get
;
set
;
}
public
Message
Message
{
get
;
set
;
}
public
DateTime
?
DeletedAt
{
get
;
set
;
}
public
DateTime
?
DeletedAt
{
get
;
set
;
}
public
bool
InDeletedState
{
get
;
set
;
}
public
bool
InDeletedState
{
get
;
set
;
}
}
}
...
...
src/DotNetCore.CAP/Dashboard/Monitoring/EnqueuedJobDto.cs
View file @
6a1b5441
// This file is part of Hangfire.
using
System
;
// Copyright © 2013-2014 Sergey Odinokov.
using
DotNetCore.CAP.Models
;
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
using
System
;
namespace
DotNetCore.CAP.Dashboard.Monitoring
using
Hangfire.Common
;
namespace
Hangfire.Storage.Monitoring
{
{
public
class
EnqueuedJobDto
public
class
EnqueuedJobDto
{
{
...
@@ -26,7 +10,7 @@ namespace Hangfire.Storage.Monitoring
...
@@ -26,7 +10,7 @@ namespace Hangfire.Storage.Monitoring
InEnqueuedState
=
true
;
InEnqueuedState
=
true
;
}
}
public
Job
Job
{
get
;
set
;
}
public
Message
Message
{
get
;
set
;
}
public
string
State
{
get
;
set
;
}
public
string
State
{
get
;
set
;
}
public
DateTime
?
EnqueuedAt
{
get
;
set
;
}
public
DateTime
?
EnqueuedAt
{
get
;
set
;
}
public
bool
InEnqueuedState
{
get
;
set
;
}
public
bool
InEnqueuedState
{
get
;
set
;
}
...
...
src/DotNetCore.CAP/Dashboard/Monitoring/FailedJobDto.cs
View file @
6a1b5441
// This file is part of Hangfire.
using
System
;
// Copyright © 2013-2014 Sergey Odinokov.
using
DotNetCore.CAP.Models
;
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
using
System
;
namespace
DotNetCore.CAP.Dashboard.Monitoring
using
Hangfire.Common
;
namespace
Hangfire.Storage.Monitoring
{
{
public
class
FailedJobDto
public
class
FailedJobDto
{
{
...
@@ -26,7 +10,7 @@ namespace Hangfire.Storage.Monitoring
...
@@ -26,7 +10,7 @@ namespace Hangfire.Storage.Monitoring
InFailedState
=
true
;
InFailedState
=
true
;
}
}
public
Job
Job
{
get
;
set
;
}
public
Message
Message
{
get
;
set
;
}
public
string
Reason
{
get
;
set
;
}
public
string
Reason
{
get
;
set
;
}
public
DateTime
?
FailedAt
{
get
;
set
;
}
public
DateTime
?
FailedAt
{
get
;
set
;
}
public
string
ExceptionType
{
get
;
set
;
}
public
string
ExceptionType
{
get
;
set
;
}
...
...
src/DotNetCore.CAP/Dashboard/Monitoring/FetchedJobDto.cs
View file @
6a1b5441
// This file is part of Hangfire.
using
System
;
// Copyright © 2013-2014 Sergey Odinokov.
using
DotNetCore.CAP.Models
;
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
using
System
;
namespace
DotNetCore.CAP.Dashboard.Monitoring
using
Hangfire.Common
;
namespace
Hangfire.Storage.Monitoring
{
{
public
class
FetchedJobDto
public
class
FetchedJobDto
{
{
public
Job
Job
{
get
;
set
;
}
public
Message
Message
{
get
;
set
;
}
public
string
State
{
get
;
set
;
}
public
string
State
{
get
;
set
;
}
public
DateTime
?
FetchedAt
{
get
;
set
;
}
public
DateTime
?
FetchedAt
{
get
;
set
;
}
}
}
...
...
src/DotNetCore.CAP/Dashboard/Monitoring/JobDetailsDto.cs
View file @
6a1b5441
// This file is part of Hangfire.
using
System
;
// Copyright © 2013-2014 Sergey Odinokov.
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
Hangfire.Common
;
using
DotNetCore.CAP.Models
;
namespace
Hangfire.Storage
.Monitoring
namespace
DotNetCore.CAP.Dashboard
.Monitoring
{
{
public
class
JobDetailsDto
public
class
JobDetailsDto
{
{
public
Job
Job
{
get
;
set
;
}
public
Message
Message
{
get
;
set
;
}
public
DateTime
?
CreatedAt
{
get
;
set
;
}
public
DateTime
?
CreatedAt
{
get
;
set
;
}
public
IDictionary
<
string
,
string
>
Properties
{
get
;
set
;
}
public
IDictionary
<
string
,
string
>
Properties
{
get
;
set
;
}
public
IList
<
StateHistoryDto
>
History
{
get
;
set
;
}
public
IList
<
StateHistoryDto
>
History
{
get
;
set
;
}
...
...
src/DotNetCore.CAP/Dashboard/Monitoring/JobList.cs
View file @
6a1b5441
// This file is part of Hangfire.
// Copyright © 2013-2014 Sergey Odinokov.
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
using
System.Collections.Generic
;
using
System.Collections.Generic
;
namespace
Hangfire.Storage
.Monitoring
namespace
DotNetCore.CAP.Dashboard
.Monitoring
{
{
public
class
JobList
<
TDto
>
:
List
<
KeyValuePair
<
string
,
TDto
>>
public
class
JobList
<
TDto
>
:
List
<
KeyValuePair
<
string
,
TDto
>>
{
{
...
...
src/DotNetCore.CAP/Dashboard/Monitoring/ProcessingJobDto.cs
View file @
6a1b5441
// This file is part of Hangfire.
using
System
;
// Copyright © 2013-2014 Sergey Odinokov.
using
DotNetCore.CAP.Models
;
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
using
System
;
namespace
DotNetCore.CAP.Dashboard.Monitoring
using
Hangfire.Common
;
namespace
Hangfire.Storage.Monitoring
{
{
public
class
ProcessingJobDto
public
class
ProcessingJobDto
{
{
...
@@ -26,7 +10,7 @@ namespace Hangfire.Storage.Monitoring
...
@@ -26,7 +10,7 @@ namespace Hangfire.Storage.Monitoring
InProcessingState
=
true
;
InProcessingState
=
true
;
}
}
public
Job
Job
{
get
;
set
;
}
public
Message
Message
{
get
;
set
;
}
public
bool
InProcessingState
{
get
;
set
;
}
public
bool
InProcessingState
{
get
;
set
;
}
public
string
ServerId
{
get
;
set
;
}
public
string
ServerId
{
get
;
set
;
}
public
DateTime
?
StartedAt
{
get
;
set
;
}
public
DateTime
?
StartedAt
{
get
;
set
;
}
...
...
src/DotNetCore.CAP/Dashboard/Monitoring/QueueWithTopEnqueuedJobsDto.cs
View file @
6a1b5441
// This file is part of Hangfire.
namespace
DotNetCore.CAP.Dashboard.Monitoring
// Copyright © 2013-2014 Sergey Odinokov.
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
namespace
Hangfire.Storage.Monitoring
{
{
public
class
QueueWithTopEnqueuedJobsDto
public
class
QueueWithTopEnqueuedJobsDto
{
{
...
...
src/DotNetCore.CAP/Dashboard/Monitoring/ScheduledJobDto.cs
View file @
6a1b5441
// This file is part of Hangfire.
using
System
;
// Copyright © 2013-2014 Sergey Odinokov.
using
DotNetCore.CAP.Models
;
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
using
System
;
namespace
DotNetCore.CAP.Dashboard.Monitoring
using
Hangfire.Common
;
namespace
Hangfire.Storage.Monitoring
{
{
public
class
ScheduledJobDto
public
class
ScheduledJobDto
{
{
...
@@ -26,7 +10,7 @@ namespace Hangfire.Storage.Monitoring
...
@@ -26,7 +10,7 @@ namespace Hangfire.Storage.Monitoring
InScheduledState
=
true
;
InScheduledState
=
true
;
}
}
public
Job
Job
{
get
;
set
;
}
public
Message
Message
{
get
;
set
;
}
public
DateTime
EnqueueAt
{
get
;
set
;
}
public
DateTime
EnqueueAt
{
get
;
set
;
}
public
DateTime
?
ScheduledAt
{
get
;
set
;
}
public
DateTime
?
ScheduledAt
{
get
;
set
;
}
public
bool
InScheduledState
{
get
;
set
;
}
public
bool
InScheduledState
{
get
;
set
;
}
...
...
src/DotNetCore.CAP/Dashboard/Monitoring/ServerDto.cs
View file @
6a1b5441
// This file is part of Hangfire.
using
System
;
// Copyright © 2013-2014 Sergey Odinokov.
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
namespace
Hangfire.Storage
.Monitoring
namespace
DotNetCore.CAP.Dashboard
.Monitoring
{
{
public
class
ServerDto
public
class
ServerDto
{
{
...
...
src/DotNetCore.CAP/Dashboard/Monitoring/StateHistoryDto.cs
View file @
6a1b5441
// This file is part of Hangfire.
using
System
;
// Copyright © 2013-2014 Sergey Odinokov.
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
namespace
Hangfire.Storage
.Monitoring
namespace
DotNetCore.CAP.Dashboard
.Monitoring
{
{
public
class
StateHistoryDto
public
class
StateHistoryDto
{
{
...
...
src/DotNetCore.CAP/Dashboard/Monitoring/StatisticsDto.cs
View file @
6a1b5441
// This file is part of Hangfire.
namespace
DotNetCore.CAP.Dashboard.Monitoring
// Copyright © 2013-2014 Sergey Odinokov.
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
namespace
Hangfire.Storage.Monitoring
{
{
public
class
StatisticsDto
public
class
StatisticsDto
{
{
...
...
src/DotNetCore.CAP/Dashboard/Monitoring/SucceededJobDto.cs
View file @
6a1b5441
using
System
;
using
System
;
using
Hangfire.Common
;
using
DotNetCore.CAP.Models
;
namespace
Hangfire.Storage
.Monitoring
namespace
DotNetCore.CAP.Dashboard
.Monitoring
{
{
public
class
SucceededJobDto
public
class
SucceededJobDto
{
{
...
@@ -10,7 +10,7 @@ namespace Hangfire.Storage.Monitoring
...
@@ -10,7 +10,7 @@ namespace Hangfire.Storage.Monitoring
InSucceededState
=
true
;
InSucceededState
=
true
;
}
}
public
Job
Job
{
get
;
set
;
}
public
Message
Message
{
get
;
set
;
}
public
object
Result
{
get
;
set
;
}
public
object
Result
{
get
;
set
;
}
public
long
?
TotalDuration
{
get
;
set
;
}
public
long
?
TotalDuration
{
get
;
set
;
}
public
DateTime
?
SucceededAt
{
get
;
set
;
}
public
DateTime
?
SucceededAt
{
get
;
set
;
}
...
...
src/DotNetCore.CAP/Dashboard/NavigationMenu.cs
0 → 100644
View file @
6a1b5441
using
System
;
using
System.Collections.Generic
;
using
DotNetCore.CAP.Dashboard.Resources
;
namespace
DotNetCore.CAP.Dashboard
{
public
static
class
NavigationMenu
{
public
static
readonly
List
<
Func
<
RazorPage
,
MenuItem
>>
Items
=
new
List
<
Func
<
RazorPage
,
MenuItem
>>();
static
NavigationMenu
()
{
Items
.
Add
(
page
=>
new
MenuItem
(
Strings
.
NavigationMenu_Jobs
,
page
.
Url
.
LinkToQueues
())
{
Active
=
page
.
RequestPath
.
StartsWith
(
"/jobs"
),
Metrics
=
new
[]
{
DashboardMetrics
.
EnqueuedCountOrNull
,
DashboardMetrics
.
FailedCountOrNull
}
});
Items
.
Add
(
page
=>
new
MenuItem
(
Strings
.
NavigationMenu_Retries
,
page
.
Url
.
To
(
"/retries"
))
{
Active
=
page
.
RequestPath
.
StartsWith
(
"/retries"
),
Metric
=
DashboardMetrics
.
RetriesCount
});
Items
.
Add
(
page
=>
new
MenuItem
(
Strings
.
NavigationMenu_RecurringJobs
,
page
.
Url
.
To
(
"/recurring"
))
{
Active
=
page
.
RequestPath
.
StartsWith
(
"/recurring"
),
Metric
=
DashboardMetrics
.
RecurringJobCount
});
Items
.
Add
(
page
=>
new
MenuItem
(
Strings
.
NavigationMenu_Servers
,
page
.
Url
.
To
(
"/servers"
))
{
Active
=
page
.
RequestPath
.
Equals
(
"/servers"
),
Metric
=
DashboardMetrics
.
ServerCount
});
}
}
}
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/NonEscapedString.cs
0 → 100644
View file @
6a1b5441
namespace
DotNetCore.CAP.Dashboard
{
public
class
NonEscapedString
{
private
readonly
string
_value
;
public
NonEscapedString
(
string
value
)
{
_value
=
value
;
}
public
override
string
ToString
()
{
return
_value
;
}
}
}
src/DotNetCore.CAP/Dashboard/Pager.cs
0 → 100644
View file @
6a1b5441
using
System
;
using
System.Collections.Generic
;
namespace
DotNetCore.CAP.Dashboard
{
public
class
Pager
{
private
const
int
PageItemsCount
=
7
;
private
const
int
DefaultRecordsPerPage
=
10
;
private
int
_startPageIndex
=
1
;
private
int
_endPageIndex
=
1
;
public
Pager
(
int
from
,
int
perPage
,
long
total
)
{
FromRecord
=
from
>=
0
?
from
:
0
;
RecordsPerPage
=
perPage
>
0
?
perPage
:
DefaultRecordsPerPage
;
TotalRecordCount
=
total
;
CurrentPage
=
FromRecord
/
RecordsPerPage
+
1
;
TotalPageCount
=
(
int
)
Math
.
Ceiling
((
double
)
TotalRecordCount
/
RecordsPerPage
);
PagerItems
=
GenerateItems
();
}
public
string
BasePageUrl
{
get
;
set
;
}
public
int
FromRecord
{
get
;
}
public
int
RecordsPerPage
{
get
;
}
public
int
CurrentPage
{
get
;
}
public
int
TotalPageCount
{
get
;
}
public
long
TotalRecordCount
{
get
;
}
internal
ICollection
<
Item
>
PagerItems
{
get
;
}
public
string
PageUrl
(
int
page
)
{
if
(
page
<
1
||
page
>
TotalPageCount
)
return
"#"
;
return
BasePageUrl
+
"?from="
+
(
page
-
1
)
*
RecordsPerPage
+
"&count="
+
RecordsPerPage
;
}
public
string
RecordsPerPageUrl
(
int
perPage
)
{
if
(
perPage
<=
0
)
return
"#"
;
return
BasePageUrl
+
"?from=0&count="
+
perPage
;
}
private
ICollection
<
Item
>
GenerateItems
()
{
// start page index
_startPageIndex
=
CurrentPage
-
PageItemsCount
/
2
;
if
(
_startPageIndex
+
PageItemsCount
>
TotalPageCount
)
_startPageIndex
=
TotalPageCount
+
1
-
PageItemsCount
;
if
(
_startPageIndex
<
1
)
_startPageIndex
=
1
;
// end page index
_endPageIndex
=
_startPageIndex
+
PageItemsCount
-
1
;
if
(
_endPageIndex
>
TotalPageCount
)
_endPageIndex
=
TotalPageCount
;
var
pagerItems
=
new
List
<
Item
>();
if
(
TotalPageCount
==
0
)
return
pagerItems
;
AddPrevious
(
pagerItems
);
// first page
if
(
_startPageIndex
>
1
)
pagerItems
.
Add
(
new
Item
(
1
,
false
,
ItemType
.
Page
));
// more page before numeric page buttons
AddMoreBefore
(
pagerItems
);
// numeric page
AddPageNumbers
(
pagerItems
);
// more page after numeric page buttons
AddMoreAfter
(
pagerItems
);
// last page
if
(
_endPageIndex
<
TotalPageCount
)
pagerItems
.
Add
(
new
Item
(
TotalPageCount
,
false
,
ItemType
.
Page
));
// Next page
AddNext
(
pagerItems
);
return
pagerItems
;
}
private
void
AddPrevious
(
ICollection
<
Item
>
results
)
{
var
item
=
new
Item
(
CurrentPage
-
1
,
CurrentPage
==
1
,
ItemType
.
PrevPage
);
results
.
Add
(
item
);
}
private
void
AddMoreBefore
(
ICollection
<
Item
>
results
)
{
if
(
_startPageIndex
>
2
)
{
var
index
=
_startPageIndex
-
1
;
if
(
index
<
1
)
index
=
1
;
var
item
=
new
Item
(
index
,
false
,
ItemType
.
MorePage
);
results
.
Add
(
item
);
}
}
private
void
AddMoreAfter
(
ICollection
<
Item
>
results
)
{
if
(
_endPageIndex
<
TotalPageCount
-
1
)
{
var
index
=
_startPageIndex
+
PageItemsCount
;
if
(
index
>
TotalPageCount
)
{
index
=
TotalPageCount
;
}
var
item
=
new
Item
(
index
,
false
,
ItemType
.
MorePage
);
results
.
Add
(
item
);
}
}
private
void
AddPageNumbers
(
ICollection
<
Item
>
results
)
{
for
(
var
pageIndex
=
_startPageIndex
;
pageIndex
<=
_endPageIndex
;
pageIndex
++)
{
var
item
=
new
Item
(
pageIndex
,
false
,
ItemType
.
Page
);
results
.
Add
(
item
);
}
}
private
void
AddNext
(
ICollection
<
Item
>
results
)
{
var
item
=
new
Item
(
CurrentPage
+
1
,
CurrentPage
>=
TotalPageCount
,
ItemType
.
NextPage
);
results
.
Add
(
item
);
}
internal
class
Item
{
public
Item
(
int
pageIndex
,
bool
disabled
,
ItemType
type
)
{
PageIndex
=
pageIndex
;
Disabled
=
disabled
;
Type
=
type
;
}
public
int
PageIndex
{
get
;
}
public
bool
Disabled
{
get
;
}
public
ItemType
Type
{
get
;
}
}
internal
enum
ItemType
{
Page
,
PrevPage
,
NextPage
,
MorePage
}
}
}
src/DotNetCore.CAP/Dashboard/
View
s/AwaitingJobsPage.cshtml
→
src/DotNetCore.CAP/Dashboard/
Page
s/AwaitingJobsPage.cshtml
View file @
6a1b5441
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: true *@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: true *@
@using System
@using System
@using System.Collections.Generic
@using System.Collections.Generic
@using Hangfire.Dashboard
@using DotNetCore.CAP
@using Hangfire.Dashboard.Pages
@using DotNetCore.CAP.Dashboard
@using Hangfire.Dashboard.Resources
@using DotNetCore.CAP.Dashboard.Pages
@using Hangfire.States
@using DotNetCore.CAP.Dashboard.Resources
@using Hangfire.Storage
@inherits RazorPage
@inherits RazorPage
@{
@{
Layout = new LayoutPage(Strings.AwaitingJobsPage_Title);
Layout = new LayoutPage(Strings.AwaitingJobsPage_Title);
...
@@ -20,7 +19,7 @@
...
@@ -20,7 +19,7 @@
using (var connection = Storage.GetConnection())
using (var connection = Storage.GetConnection())
{
{
var storageConnection = connection as
Job
StorageConnection;
var storageConnection = connection as
I
StorageConnection;
if (storageConnection != null)
if (storageConnection != null)
{
{
...
@@ -83,7 +82,7 @@
...
@@ -83,7 +82,7 @@
<tbody>
<tbody>
@foreach (var jobId in jobIds)
@foreach (var jobId in jobIds)
{
{
Job
Data jobData;
Message
Data jobData;
StateData stateData;
StateData stateData;
StateData parentStateData = null;
StateData parentStateData = null;
...
@@ -92,10 +91,10 @@
...
@@ -92,10 +91,10 @@
jobData = connection.GetJobData(jobId);
jobData = connection.GetJobData(jobId);
stateData = connection.GetStateData(jobId);
stateData = connection.GetStateData(jobId);
if (stateData != null && stateData.Name == AwaitingState.StateName)
//
if (stateData != null && stateData.Name == AwaitingState.StateName)
{
//
{
parentStateData = connection.GetStateData(stateData.Data["ParentId"]);
//
parentStateData = connection.GetStateData(stateData.Data["ParentId"]);
}
//
}
}
}
<tr class="js-jobs-list-row @(jobData != null ? "hover" : null)">
<tr class="js-jobs-list-row @(jobData != null ? "hover" : null)">
...
@@ -112,7 +111,7 @@
...
@@ -112,7 +111,7 @@
else
else
{
{
<td class="word-break">
<td class="word-break">
@Html.JobNameLink(jobId, jobData.
Job
)
@Html.JobNameLink(jobId, jobData.
Message
)
</td>
</td>
<td class="min-width">
<td class="min-width">
@if (stateData != null && stateData.Data.ContainsKey("Options") && !String.IsNullOrWhiteSpace(stateData.Data["Options"]))
@if (stateData != null && stateData.Data.ContainsKey("Options") && !String.IsNullOrWhiteSpace(stateData.Data["Options"]))
...
...
src/DotNetCore.CAP/Dashboard/
View
s/BlockMetric.cs
→
src/DotNetCore.CAP/Dashboard/
Page
s/BlockMetric.cs
View file @
6a1b5441
namespace
Hangfire
.Dashboard.Pages
namespace
DotNetCore.CAP
.Dashboard.Pages
{
{
partial
class
BlockMetric
partial
class
BlockMetric
{
{
...
...
src/DotNetCore.CAP/Dashboard/
View
s/Breadcrumbs.cs
→
src/DotNetCore.CAP/Dashboard/
Page
s/Breadcrumbs.cs
View file @
6a1b5441
using
System.Collections.Generic
;
using
System.Collections.Generic
;
namespace
Hangfire
.Dashboard.Pages
namespace
DotNetCore.CAP
.Dashboard.Pages
{
{
partial
class
Breadcrumbs
partial
class
Breadcrumbs
{
{
...
...
src/DotNetCore.CAP/Dashboard/
View
s/HomePage.cs
→
src/DotNetCore.CAP/Dashboard/
Page
s/HomePage.cs
View file @
6a1b5441
using
System.Collections.Generic
;
using
System.Collections.Generic
;
namespace
Hangfire
.Dashboard.Pages
namespace
DotNetCore.CAP
.Dashboard.Pages
{
{
partial
class
HomePage
internal
partial
class
HomePage
{
{
public
static
readonly
List
<
DashboardMetric
>
Metrics
=
new
List
<
DashboardMetric
>();
public
static
readonly
List
<
DashboardMetric
>
Metrics
=
new
List
<
DashboardMetric
>();
}
}
...
...
src/DotNetCore.CAP/Dashboard/
View
s/HomePage.cshtml
→
src/DotNetCore.CAP/Dashboard/
Page
s/HomePage.cshtml
View file @
6a1b5441
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using System
@using System
@using System.Collections.Generic
@using System.Collections.Generic
@using
Hangfire
.Dashboard
@using
DotNetCore.CAP
.Dashboard
@using
Hangfire
.Dashboard.Pages
@using
DotNetCore.CAP
.Dashboard.Pages
@using
Hangfire
.Dashboard.Resources
@using
DotNetCore.CAP
.Dashboard.Resources
@using Newtonsoft.Json
@using Newtonsoft.Json
@inherits RazorPage
@inherits RazorPage
@{
@{
...
...
src/DotNetCore.CAP/Dashboard/
View
s/HomePage.generated.cs
→
src/DotNetCore.CAP/Dashboard/
Page
s/HomePage.generated.cs
View file @
6a1b5441
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
// </auto-generated>
// </auto-generated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
namespace
Hangfire
.Dashboard.Pages
namespace
DotNetCore.CAP
.Dashboard.Pages
{
{
#
line
2
"..\..\Dashboard\Pages\HomePage.cshtml"
#
line
2
"..\..\Dashboard\Pages\HomePage.cshtml"
...
@@ -27,19 +27,19 @@ namespace Hangfire.Dashboard.Pages
...
@@ -27,19 +27,19 @@ namespace Hangfire.Dashboard.Pages
using
System.Text
;
using
System.Text
;
#
line
4
"..\..\Dashboard\Pages\HomePage.cshtml"
#
line
4
"..\..\Dashboard\Pages\HomePage.cshtml"
using
Hangfire
.Dashboard
;
using
DotNetCore.CAP
.Dashboard
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
#
line
5
"..\..\Dashboard\Pages\HomePage.cshtml"
#
line
5
"..\..\Dashboard\Pages\HomePage.cshtml"
using
Hangfire
.Dashboard.Pages
;
using
DotNetCore.CAP
.Dashboard.Pages
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
#
line
6
"..\..\Dashboard\Pages\HomePage.cshtml"
#
line
6
"..\..\Dashboard\Pages\HomePage.cshtml"
using
Hangfire
.Dashboard.Resources
;
using
DotNetCore.CAP
.Dashboard.Resources
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
...
...
src/DotNetCore.CAP/Dashboard/
View
s/InlineMetric.cs
→
src/DotNetCore.CAP/Dashboard/
Page
s/InlineMetric.cs
View file @
6a1b5441
namespace
Hangfire
.Dashboard.Pages
namespace
DotNetCore.CAP
.Dashboard.Pages
{
{
partial
class
InlineMetric
internal
partial
class
InlineMetric
{
{
public
InlineMetric
(
DashboardMetric
dashboardMetric
)
public
InlineMetric
(
DashboardMetric
dashboardMetric
)
{
{
...
...
src/DotNetCore.CAP/Dashboard/
View
s/LayoutPage.cs
→
src/DotNetCore.CAP/Dashboard/
Page
s/LayoutPage.cs
View file @
6a1b5441
namespace
Hangfire
.Dashboard.Pages
namespace
DotNetCore.CAP
.Dashboard.Pages
{
{
partial
class
LayoutPage
partial
class
LayoutPage
{
{
...
...
src/DotNetCore.CAP/Dashboard/
View
s/LayoutPage.cshtml
→
src/DotNetCore.CAP/Dashboard/
Page
s/LayoutPage.cshtml
View file @
6a1b5441
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
@using System
@using System
@using System.Globalization
@using System.Globalization
@using System.Reflection
@using System.Reflection
@using
Hangfire
.Dashboard
@using
DotNetCore.CAP
.Dashboard
@using
Hangfire
.Dashboard.Pages
@using
DotNetCore.CAP
.Dashboard.Pages
@using
Hangfire
.Dashboard.Resources
@using
DotNetCore.CAP
.Dashboard.Resources
@inherits RazorPage
@inherits RazorPage
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"@CultureInfo.CurrentUICulture.TwoLetterISOLanguageName"
>
<html
lang=
"@CultureInfo.CurrentUICulture.TwoLetterISOLanguageName"
>
...
...
src/DotNetCore.CAP/Dashboard/
View
s/LayoutPage.generated.cs
→
src/DotNetCore.CAP/Dashboard/
Page
s/LayoutPage.generated.cs
View file @
6a1b5441
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
// </auto-generated>
// </auto-generated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
namespace
Hangfire
.Dashboard.Pages
namespace
DotNetCore.CAP
.Dashboard.Pages
{
{
#
line
2
"..\..\Dashboard\Pages\LayoutPage.cshtml"
#
line
2
"..\..\Dashboard\Pages\LayoutPage.cshtml"
...
@@ -34,19 +34,19 @@ namespace Hangfire.Dashboard.Pages
...
@@ -34,19 +34,19 @@ namespace Hangfire.Dashboard.Pages
using
System.Text
;
using
System.Text
;
#
line
5
"..\..\Dashboard\Pages\LayoutPage.cshtml"
#
line
5
"..\..\Dashboard\Pages\LayoutPage.cshtml"
using
Hangfire
.Dashboard
;
using
DotNetCore.CAP
.Dashboard
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
#
line
6
"..\..\Dashboard\Pages\LayoutPage.cshtml"
#
line
6
"..\..\Dashboard\Pages\LayoutPage.cshtml"
using
Hangfire
.Dashboard.Pages
;
using
DotNetCore.CAP
.Dashboard.Pages
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
#
line
7
"..\..\Dashboard\Pages\LayoutPage.cshtml"
#
line
7
"..\..\Dashboard\Pages\LayoutPage.cshtml"
using
Hangfire
.Dashboard.Resources
;
using
DotNetCore.CAP
.Dashboard.Resources
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
...
...
src/DotNetCore.CAP/Dashboard/
View
s/ProcessingJobsPage.cshtml
→
src/DotNetCore.CAP/Dashboard/
Page
s/ProcessingJobsPage.cshtml
View file @
6a1b5441
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using System
@using System
@using System.Linq
@using System.Linq
@using
Hangfire
.Dashboard
@using
DotNetCore.CAP
.Dashboard
@using
Hangfire
.Dashboard.Pages
@using
DotNetCore.CAP
.Dashboard.Pages
@using
Hangfire
.Dashboard.Resources
@using
DotNetCore.CAP
.Dashboard.Resources
@inherits RazorPage
@inherits RazorPage
@{
@{
Layout = new LayoutPage(Strings.ProcessingJobsPage_Title);
Layout = new LayoutPage(Strings.ProcessingJobsPage_Title);
...
...
src/DotNetCore.CAP/Dashboard/Pages/SidebarMenu.cs
0 → 100644
View file @
6a1b5441
using
System
;
using
System.Collections.Generic
;
namespace
DotNetCore.CAP.Dashboard.Pages
{
partial
class
SidebarMenu
{
public
SidebarMenu
(
IEnumerable
<
Func
<
RazorPage
,
MenuItem
>>
items
)
{
if
(
items
==
null
)
throw
new
ArgumentNullException
(
nameof
(
items
));
Items
=
items
;
}
public
IEnumerable
<
Func
<
RazorPage
,
MenuItem
>>
Items
{
get
;
}
}
}
src/DotNetCore.CAP/Dashboard/
View
s/SucceededJobs.cshtml
→
src/DotNetCore.CAP/Dashboard/
Page
s/SucceededJobs.cshtml
View file @
6a1b5441
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using System
@using System
@using
Hangfire
.Dashboard
@using
DotNetCore.CAP
.Dashboard
@using
Hangfire
.Dashboard.Pages
@using
DotNetCore.CAP
.Dashboard.Pages
@using
Hangfire
.Dashboard.Resources
@using
DotNetCore.CAP
.Dashboard.Resources
@inherits RazorPage
@inherits RazorPage
@{
@{
Layout = new LayoutPage(Strings.SucceededJobsPage_Title);
Layout = new LayoutPage(Strings.SucceededJobsPage_Title);
...
...
src/DotNetCore.CAP/Dashboard/
View
s/_BlockMetric.cshtml
→
src/DotNetCore.CAP/Dashboard/
Page
s/_BlockMetric.cshtml
View file @
6a1b5441
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@using
Hangfire
.Dashboard
@using
DotNetCore.CAP
.Dashboard
@using
Hangfire
.Dashboard.Resources
@using
DotNetCore.CAP
.Dashboard.Resources
@inherits RazorPage
@inherits RazorPage
@{
@{
var metric = DashboardMetric.Func(this);
var metric = DashboardMetric.Func(this);
...
...
src/DotNetCore.CAP/Dashboard/
View
s/_BlockMetric.generated.cs
→
src/DotNetCore.CAP/Dashboard/
Page
s/_BlockMetric.generated.cs
View file @
6a1b5441
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
// </auto-generated>
// </auto-generated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
namespace
Hangfire
.Dashboard.Pages
namespace
DotNetCore.CAP
.Dashboard.Pages
{
{
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -17,13 +17,13 @@ namespace Hangfire.Dashboard.Pages
...
@@ -17,13 +17,13 @@ namespace Hangfire.Dashboard.Pages
using
System.Text
;
using
System.Text
;
#
line
2
"..\..\Dashboard\Pages\_BlockMetric.cshtml"
#
line
2
"..\..\Dashboard\Pages\_BlockMetric.cshtml"
using
Hangfire
.Dashboard
;
using
DotNetCore.CAP
.Dashboard
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
#
line
3
"..\..\Dashboard\Pages\_BlockMetric.cshtml"
#
line
3
"..\..\Dashboard\Pages\_BlockMetric.cshtml"
using
Hangfire
.Dashboard.Resources
;
using
DotNetCore.CAP
.Dashboard.Resources
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
...
...
src/DotNetCore.CAP/Dashboard/
View
s/_Breadcrumbs.cshtml
→
src/DotNetCore.CAP/Dashboard/
Page
s/_Breadcrumbs.cshtml
View file @
6a1b5441
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@using
Hangfire
.Dashboard
@using
DotNetCore.CAP
.Dashboard
@inherits RazorPage
@inherits RazorPage
<ol class="breadcrumb">
<ol class="breadcrumb">
...
...
src/DotNetCore.CAP/Dashboard/
View
s/_InlineMetric.cshtml
→
src/DotNetCore.CAP/Dashboard/
Page
s/_InlineMetric.cshtml
View file @
6a1b5441
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@using
Hangfire
.Dashboard
@using
DotNetCore.CAP
.Dashboard
@inherits RazorPage
@inherits RazorPage
@{
@{
var metric = DashboardMetric.Func(this);
var metric = DashboardMetric.Func(this);
...
...
src/DotNetCore.CAP/Dashboard/
View
s/_InlineMetric.generated.cs
→
src/DotNetCore.CAP/Dashboard/
Page
s/_InlineMetric.generated.cs
View file @
6a1b5441
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
// </auto-generated>
// </auto-generated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
namespace
Hangfire
.Dashboard.Pages
namespace
DotNetCore.CAP
.Dashboard.Pages
{
{
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -17,7 +17,7 @@ namespace Hangfire.Dashboard.Pages
...
@@ -17,7 +17,7 @@ namespace Hangfire.Dashboard.Pages
using
System.Text
;
using
System.Text
;
#
line
2
"..\..\Dashboard\Pages\_InlineMetric.cshtml"
#
line
2
"..\..\Dashboard\Pages\_InlineMetric.cshtml"
using
Hangfire
.Dashboard
;
using
DotNetCore.CAP
.Dashboard
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
...
...
src/DotNetCore.CAP/Dashboard/
View
s/_Navigation.cshtml
→
src/DotNetCore.CAP/Dashboard/
Page
s/_Navigation.cshtml
View file @
6a1b5441
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@using
Hangfire
.Dashboard
@using
DotNetCore.CAP
.Dashboard
@inherits RazorPage
@inherits RazorPage
@if (NavigationMenu.Items.Count > 0)
@if (NavigationMenu.Items.Count > 0)
{
{
...
...
src/DotNetCore.CAP/Dashboard/
View
s/_Navigation.generated.cs
→
src/DotNetCore.CAP/Dashboard/
Page
s/_Navigation.generated.cs
View file @
6a1b5441
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
// </auto-generated>
// </auto-generated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
namespace
Hangfire
.Dashboard.Pages
namespace
DotNetCore.CAP
.Dashboard.Pages
{
{
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -17,7 +17,7 @@ namespace Hangfire.Dashboard.Pages
...
@@ -17,7 +17,7 @@ namespace Hangfire.Dashboard.Pages
using
System.Text
;
using
System.Text
;
#
line
2
"..\..\Dashboard\Pages\_Navigation.cshtml"
#
line
2
"..\..\Dashboard\Pages\_Navigation.cshtml"
using
Hangfire
.Dashboard
;
using
DotNetCore.CAP
.Dashboard
;
#
line
default
#
line
default
#
line
hidden
#
line
hidden
...
...
src/DotNetCore.CAP/Dashboard/
View
s/_Paginator.cs
→
src/DotNetCore.CAP/Dashboard/
Page
s/_Paginator.cs
View file @
6a1b5441
namespace
Hangfire
.Dashboard.Pages
namespace
DotNetCore.CAP
.Dashboard.Pages
{
{
partial
class
Paginator
partial
class
Paginator
{
{
...
...
src/DotNetCore.CAP/Dashboard/
View
s/_Paginator.cshtml
→
src/DotNetCore.CAP/Dashboard/
Page
s/_Paginator.cshtml
View file @
6a1b5441
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@using
Hangfire
.Dashboard
@using
DotNetCore.CAP
.Dashboard
@using
Hangfire
.Dashboard.Resources;
@using
DotNetCore.CAP
.Dashboard.Resources;
@inherits RazorPage
@inherits RazorPage
<div class="btn-toolbar">
<div class="btn-toolbar">
...
...
src/DotNetCore.CAP/Dashboard/
View
s/_PerPageSelector.cs
→
src/DotNetCore.CAP/Dashboard/
Page
s/_PerPageSelector.cs
View file @
6a1b5441
namespace
Hangfire
.Dashboard.Pages
namespace
DotNetCore.CAP
.Dashboard.Pages
{
{
partial
class
PerPageSelector
partial
class
PerPageSelector
{
{
...
...
src/DotNetCore.CAP/Dashboard/
View
s/_PerPageSelector.cshtml
→
src/DotNetCore.CAP/Dashboard/
Page
s/_PerPageSelector.cshtml
View file @
6a1b5441
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@using
Hangfire
.Dashboard.Resources;
@using
DotNetCore.CAP
.Dashboard.Resources;
@inherits
Hangfire
.Dashboard.RazorPage
@inherits
DotNetCore.CAP
.Dashboard.RazorPage
<div class="btn-group pull-right paginator">
<div class="btn-group pull-right paginator">
@foreach (var count in new[] { 10, 20, 50, 100, 500 })
@foreach (var count in new[] { 10, 20, 50, 100, 500 })
...
...
src/DotNetCore.CAP/Dashboard/
View
s/_SidebarMenu.cshtml
→
src/DotNetCore.CAP/Dashboard/
Page
s/_SidebarMenu.cshtml
View file @
6a1b5441
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True TrimLeadingUnderscores : true *@
@using
Hangfire
.Dashboard
@using
DotNetCore.CAP
.Dashboard
@inherits RazorPage
@inherits RazorPage
@if (Items.Any())
@if (Items.Any())
{
{
...
...
src/DotNetCore.CAP/Dashboard/RazorPage.cs
View file @
6a1b5441
// This file is part of Hangfire.
using
System
;
// Copyright © 2013-2014 Sergey Odinokov.
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
using
System
;
using
System.Diagnostics
;
using
System.Diagnostics
;
using
System.Net
;
using
System.Net
;
using
System.Text
;
using
System.Text
;
using
Hangfire.Storage.Monitoring
;
using
System.Threading.Tasks
;
using
DotNetCore.CAP.Dashboard.Monitoring
;
namespace
Hangfire
.Dashboard
namespace
DotNetCore.CAP
.Dashboard
{
{
public
abstract
class
RazorPage
public
abstract
class
RazorPage
{
{
...
@@ -39,7 +24,7 @@ namespace Hangfire.Dashboard
...
@@ -39,7 +24,7 @@ namespace Hangfire.Dashboard
public
HtmlHelper
Html
{
get
;
private
set
;
}
public
HtmlHelper
Html
{
get
;
private
set
;
}
public
UrlHelper
Url
{
get
;
private
set
;
}
public
UrlHelper
Url
{
get
;
private
set
;
}
public
Job
Storage
Storage
{
get
;
internal
set
;
}
public
I
Storage
Storage
{
get
;
internal
set
;
}
public
string
AppPath
{
get
;
internal
set
;
}
public
string
AppPath
{
get
;
internal
set
;
}
public
int
StatsPollingInterval
{
get
;
internal
set
;
}
public
int
StatsPollingInterval
{
get
;
internal
set
;
}
public
Stopwatch
GenerationTime
{
get
;
private
set
;
}
public
Stopwatch
GenerationTime
{
get
;
private
set
;
}
...
...
src/DotNetCore.CAP/Dashboard/RazorPageDispatcher.cs
0 → 100644
View file @
6a1b5441
using
System
;
using
System.Text.RegularExpressions
;
using
System.Threading.Tasks
;
namespace
DotNetCore.CAP.Dashboard
{
internal
class
RazorPageDispatcher
:
IDashboardDispatcher
{
private
readonly
Func
<
Match
,
RazorPage
>
_pageFunc
;
public
RazorPageDispatcher
(
Func
<
Match
,
RazorPage
>
pageFunc
)
{
_pageFunc
=
pageFunc
;
}
public
Task
Dispatch
(
DashboardContext
context
)
{
context
.
Response
.
ContentType
=
"text/html"
;
var
page
=
_pageFunc
(
context
.
UriMatch
);
page
.
Assign
(
context
);
return
context
.
Response
.
WriteAsync
(
page
.
ToString
());
}
}
}
src/DotNetCore.CAP/Dashboard/UrlHelper.cs
0 → 100644
View file @
6a1b5441
using
System
;
using
System.Collections.Generic
;
namespace
DotNetCore.CAP.Dashboard
{
public
class
UrlHelper
{
private
readonly
DashboardContext
_context
;
public
UrlHelper
(
DashboardContext
context
)
{
if
(
context
==
null
)
throw
new
ArgumentNullException
(
nameof
(
context
));
_context
=
context
;
}
public
string
To
(
string
relativePath
)
{
return
_context
.
Request
.
PathBase
+
relativePath
;
}
public
string
Home
()
{
return
To
(
"/"
);
}
public
string
JobDetails
(
string
jobId
)
{
return
To
(
"/jobs/details/"
+
jobId
);
}
public
string
LinkToQueues
()
{
return
To
(
"/jobs/enqueued"
);
}
public
string
Queue
(
string
queue
)
{
return
To
(
"/jobs/enqueued/"
+
queue
);
}
}
}
src/DotNetCore.CAP/Dashboard/Views/AwaitingJobsPage.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
#
line
2
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
using
System
;
#
line
default
#
line
hidden
#
line
3
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
using
System.Collections.Generic
;
#
line
default
#
line
hidden
using
System.Linq
;
using
System.Text
;
#
line
4
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
#
line
5
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
using
Hangfire.Dashboard.Pages
;
#
line
default
#
line
hidden
#
line
6
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
#
line
7
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
using
Hangfire.States
;
#
line
default
#
line
hidden
#
line
8
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
using
Hangfire.Storage
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
AwaitingJobsPage
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
#
line
10
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
AwaitingJobsPage_Title
);
int
from
,
perPage
;
int
.
TryParse
(
Query
(
"from"
),
out
from
);
int
.
TryParse
(
Query
(
"count"
),
out
perPage
);
List
<
string
>
jobIds
=
null
;
Pager
pager
=
null
;
using
(
var
connection
=
Storage
.
GetConnection
())
{
var
storageConnection
=
connection
as
JobStorageConnection
;
if
(
storageConnection
!=
null
)
{
pager
=
new
Pager
(
from
,
perPage
,
storageConnection
.
GetSetCount
(
"awaiting"
));
jobIds
=
storageConnection
.
GetRangeFromSet
(
"awaiting"
,
pager
.
FromRecord
,
pager
.
FromRecord
+
pager
.
RecordsPerPage
-
1
);
}
}
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-3\">\r\n "
);
#
line
35
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Html
.
JobsSidebar
());
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n <div class=\"col-md-9\">\r\n <h1 class=\"page-header\">"
);
#
line
38
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
AwaitingJobsPage_Title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</h1>\r\n\r\n"
);
#
line
40
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
if
(
jobIds
==
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-warning\">\r\n <h4>"
);
#
line
43
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
AwaitingJobsPage_ContinuationsWarning_Title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</h4>\r\n <p>"
);
#
line
44
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
AwaitingJobsPage_ContinuationsWarning_Text
);
#
line
default
#
line
hidden
WriteLiteral
(
"</p>\r\n </div>\r\n"
);
#
line
46
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
}
else
if
(
jobIds
.
Count
>
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"js-jobs-list\">\r\n <div class=\"btn-toolbar b"
+
"tn-toolbar-top\">\r\n <button class=\"js-jobs-list-command btn bt"
+
"n-sm btn-primary\"\r\n data-url=\""
);
#
line
52
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Url
.
To
(
"/jobs/awaiting/enqueue"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
53
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
Common_Enqueueing
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <span class=\"glyphicon glyphicon-repeat\"></span>\r\n "
+
" "
);
#
line
55
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
Common_EnqueueButton_Text
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n <button class=\"js-jobs-lis"
+
"t-command btn btn-sm btn-default\"\r\n data-url=\""
);
#
line
59
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Url
.
To
(
"/jobs/awaiting/delete"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
60
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
Common_Deleting
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-confirm=\""
);
#
line
61
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
Common_DeleteConfirm
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <span class=\"glyphicon glyphicon-remove\"></span>\r\n "
+
" "
);
#
line
63
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
Common_DeleteSelected
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n "
);
#
line
66
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Html
.
PerPageSelector
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
@"
</div>
<div class=""table-responsive"">
<table class=""table table-hover"">
<thead>
<tr>
<th class=""min-width"">
<input type=""checkbox"" class=""js-jobs-list-select-all"" />
</th>
<th class=""min-width"">"
);
#
line
76
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
Common_Id
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
77
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
Common_Job
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"min-width\">"
);
#
line
78
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
AwaitingJobsPage_Table_Options
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"min-width\">"
);
#
line
79
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
AwaitingJobsPage_Table_Parent
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"align-right\">"
);
#
line
80
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
Common_Created
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n "
+
" <tbody>\r\n"
);
#
line
84
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
foreach
(
var
jobId
in
jobIds
)
{
JobData
jobData
;
StateData
stateData
;
StateData
parentStateData
=
null
;
using
(
var
connection
=
Storage
.
GetConnection
())
{
jobData
=
connection
.
GetJobData
(
jobId
);
stateData
=
connection
.
GetStateData
(
jobId
);
if
(
stateData
!=
null
&&
stateData
.
Name
==
AwaitingState
.
StateName
)
{
parentStateData
=
connection
.
GetStateData
(
stateData
.
Data
[
"ParentId"
]);
}
}
#
line
default
#
line
hidden
WriteLiteral
(
" <tr class=\"js-jobs-list-row "
);
#
line
101
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
jobData
!=
null
?
"hover"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <td>\r\n "
+
" <input type=\"checkbox\" class=\"js-jobs-list-checkbox\" name=\"jobs[]\" value=\""
);
#
line
103
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
jobId
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" />\r\n </td>\r\n "
+
" <td class=\"min-width\">\r\n "
);
#
line
106
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Html
.
JobIdLink
(
jobId
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
#
line
108
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
if
(
jobData
==
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td colspan=\"2\"><em>"
);
#
line
110
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
Common_JobExpired
);
#
line
default
#
line
hidden
WriteLiteral
(
"</em></td>\r\n"
);
#
line
111
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td class=\"word-break\">\r\n "
+
" "
);
#
line
115
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Html
.
JobNameLink
(
jobId
,
jobData
.
Job
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
WriteLiteral
(
" <td class=\"min-width\">\r\n"
);
#
line
118
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
if
(
stateData
!=
null
&&
stateData
.
Data
.
ContainsKey
(
"Options"
)
&&
!
String
.
IsNullOrWhiteSpace
(
stateData
.
Data
[
"Options"
]))
{
#
line
default
#
line
hidden
WriteLiteral
(
" <code>"
);
#
line
120
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
stateData
.
Data
[
"Options"
]);
#
line
default
#
line
hidden
WriteLiteral
(
"</code>\r\n"
);
#
line
121
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <em>"
);
#
line
124
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
Common_NotAvailable
);
#
line
default
#
line
hidden
WriteLiteral
(
"</em>\r\n"
);
#
line
125
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n"
);
WriteLiteral
(
" <td class=\"min-width\">\r\n"
);
#
line
128
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
if
(
parentStateData
!=
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <a href=\""
);
#
line
130
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Url
.
JobDetails
(
stateData
.
Data
[
"ParentId"
]));
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <span class=\"label label-"
+
"default label-hover\" style=\""
);
#
line
131
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
$"background-color:
{
JobHistoryRenderer
.
GetForegroundStateColor
(
parentStateData
.
Name
)}
;"
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n "
);
#
line
132
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
parentStateData
.
Name
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </span>\r\n "
+
" </a>\r\n"
);
#
line
135
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <em>"
);
#
line
138
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
Common_NotAvailable
);
#
line
default
#
line
hidden
WriteLiteral
(
"</em>\r\n"
);
#
line
139
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n"
);
WriteLiteral
(
" <td class=\"min-width align-right\">\r\n "
+
" "
);
#
line
142
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Html
.
RelativeTime
(
jobData
.
CreatedAt
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
#
line
144
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tr>\r\n"
);
#
line
146
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n <"
+
"/div>\r\n "
);
#
line
150
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Html
.
Paginator
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
152
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-info\">\r\n "
);
#
line
156
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
Write
(
Strings
.
AwaitingJobsPage_NoJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
158
"..\..\Dashboard\Pages\AwaitingJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n</div>\r\n"
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/DeletedJobsPage.cshtml
deleted
100644 → 0
View file @
fc50d995
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using Hangfire.Dashboard
@using Hangfire.Dashboard.Pages
@using Hangfire.Dashboard.Resources
@inherits RazorPage
@{
Layout = new LayoutPage(Strings.DeletedJobsPage_Title);
int from, perPage;
int.TryParse(Query("from"), out from);
int.TryParse(Query("count"), out perPage);
var monitor = Storage.GetMonitoringApi();
var pager = new Pager(from, perPage, monitor.DeletedListCount());
var jobs = monitor.DeletedJobs(pager.FromRecord, pager.RecordsPerPage);
}
<div class="row">
<div class="col-md-3">
@Html.JobsSidebar()
</div>
<div class="col-md-9">
<h1 class="page-header">@Strings.DeletedJobsPage_Title</h1>
@if (pager.TotalPageCount == 0)
{
<div class="alert alert-info">
@Strings.DeletedJobsPage_NoJobs
</div>
}
else
{
<div class="js-jobs-list">
<div class="btn-toolbar btn-toolbar-top">
<button class="js-jobs-list-command btn btn-sm btn-primary"
data-url="@Url.To("/jobs/deleted/requeue")"
data-loading-text="@Strings.Common_Enqueueing"
disabled="disabled">
<span class="glyphicon glyphicon-repeat"></span>
@Strings.Common_RequeueJobs
</button>
@Html.PerPageSelector(pager)
</div>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th class="min-width">
<input type="checkbox" class="js-jobs-list-select-all" />
</th>
<th class="min-width">@Strings.Common_Id</th>
<th>@Strings.Common_Job</th>
<th class="align-right">@Strings.DeletedJobsPage_Table_Deleted</th>
</tr>
</thead>
<tbody>
@foreach (var job in jobs)
{
<tr class="js-jobs-list-row @(job.Value == null || !job.Value.InDeletedState ? "obsolete-data" : null) @(job.Value != null && job.Value.InDeletedState && job.Value != null ? "hover" : null)">
<td>
@if (job.Value == null || job.Value.InDeletedState)
{
<input type="checkbox" class="js-jobs-list-checkbox" name="jobs[]" value="@job.Key" />
}
</td>
<td class="min-width">
@Html.JobIdLink(job.Key)
@if (job.Value != null && !job.Value.InDeletedState)
{
<span title="@Strings.Common_JobStateChanged_Text" class="glyphicon glyphicon-question-sign"></span>
}
</td>
@if (job.Value == null)
{
<td colspan="2"><em>@Strings.Common_JobExpired</em></td>
}
else
{
<td class="word-break">
@Html.JobNameLink(job.Key, job.Value.Job)
</td>
<td class="align-right">
@if (job.Value.DeletedAt.HasValue)
{
@Html.RelativeTime(job.Value.DeletedAt.Value)
}
</td>
}
</tr>
}
</tbody>
</table>
</div>
@Html.Paginator(pager)
</div>
}
</div>
</div>
src/DotNetCore.CAP/Dashboard/Views/DeletedJobsPage.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
#
line
2
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
#
line
3
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
using
Hangfire.Dashboard.Pages
;
#
line
default
#
line
hidden
#
line
4
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
DeletedJobsPage
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
#
line
6
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
DeletedJobsPage_Title
);
int
from
,
perPage
;
int
.
TryParse
(
Query
(
"from"
),
out
from
);
int
.
TryParse
(
Query
(
"count"
),
out
perPage
);
var
monitor
=
Storage
.
GetMonitoringApi
();
var
pager
=
new
Pager
(
from
,
perPage
,
monitor
.
DeletedListCount
());
var
jobs
=
monitor
.
DeletedJobs
(
pager
.
FromRecord
,
pager
.
RecordsPerPage
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-3\">\r\n "
);
#
line
21
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Html
.
JobsSidebar
());
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n <div class=\"col-md-9\">\r\n <h1 class=\"page-header\">"
);
#
line
24
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Strings
.
DeletedJobsPage_Title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</h1>\r\n\r\n"
);
#
line
26
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
if
(
pager
.
TotalPageCount
==
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-info\">\r\n "
);
#
line
29
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Strings
.
DeletedJobsPage_NoJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
31
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"js-jobs-list\">\r\n <div class=\"btn-toolbar b"
+
"tn-toolbar-top\">\r\n <button class=\"js-jobs-list-command btn bt"
+
"n-sm btn-primary\"\r\n data-url=\""
);
#
line
37
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Url
.
To
(
"/jobs/deleted/requeue"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
38
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Strings
.
Common_Enqueueing
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <spa"
+
"n class=\"glyphicon glyphicon-repeat\"></span>\r\n "
);
#
line
41
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Strings
.
Common_RequeueJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n "
);
#
line
43
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Html
.
PerPageSelector
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
@"
</div>
<div class=""table-responsive"">
<table class=""table"">
<thead>
<tr>
<th class=""min-width"">
<input type=""checkbox"" class=""js-jobs-list-select-all"" />
</th>
<th class=""min-width"">"
);
#
line
52
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Strings
.
Common_Id
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
53
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Strings
.
Common_Job
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"align-right\">"
);
#
line
54
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Strings
.
DeletedJobsPage_Table_Deleted
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n "
+
" <tbody>\r\n"
);
#
line
58
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
foreach
(
var
job
in
jobs
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <tr class=\"js-jobs-list-row "
);
#
line
60
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
job
.
Value
==
null
||
!
job
.
Value
.
InDeletedState
?
"obsolete-data"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
" "
);
#
line
60
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
job
.
Value
!=
null
&&
job
.
Value
.
InDeletedState
&&
job
.
Value
!=
null
?
"hover"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <td>\r\n"
);
#
line
62
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
if
(
job
.
Value
==
null
||
job
.
Value
.
InDeletedState
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <input type=\"checkbox\" class=\"js-jobs"
+
"-list-checkbox\" name=\"jobs[]\" value=\""
);
#
line
64
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
job
.
Key
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" />\r\n"
);
#
line
65
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <t"
+
"d class=\"min-width\">\r\n "
);
#
line
68
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Html
.
JobIdLink
(
job
.
Key
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
69
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
if
(
job
.
Value
!=
null
&&
!
job
.
Value
.
InDeletedState
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <span title=\""
);
#
line
71
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Strings
.
Common_JobStateChanged_Text
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" class=\"glyphicon glyphicon-question-sign\"></span>\r\n"
);
#
line
72
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n\r\n"
);
#
line
75
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
if
(
job
.
Value
==
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td colspan=\"2\"><em>"
);
#
line
77
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Strings
.
Common_JobExpired
);
#
line
default
#
line
hidden
WriteLiteral
(
"</em></td>\r\n"
);
#
line
78
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td class=\"word-break\">\r\n "
+
" "
);
#
line
82
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Html
.
JobNameLink
(
job
.
Key
,
job
.
Value
.
Job
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
WriteLiteral
(
" <td class=\"align-right\">\r\n"
);
#
line
85
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
if
(
job
.
Value
.
DeletedAt
.
HasValue
)
{
#
line
default
#
line
hidden
#
line
87
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Html
.
RelativeTime
(
job
.
Value
.
DeletedAt
.
Value
));
#
line
default
#
line
hidden
#
line
87
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n"
);
#
line
90
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tr>\r\n"
);
#
line
92
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n <"
+
"/div>\r\n\r\n "
);
#
line
97
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
Write
(
Html
.
Paginator
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
99
"..\..\Dashboard\Pages\DeletedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n</div>\r\n\r\n"
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/EnqueuedJobsPage.cs
deleted
100644 → 0
View file @
fc50d995
namespace
Hangfire.Dashboard.Pages
{
partial
class
EnqueuedJobsPage
{
public
EnqueuedJobsPage
(
string
queue
)
{
Queue
=
queue
;
}
public
string
Queue
{
get
;
}
}
}
src/DotNetCore.CAP/Dashboard/Views/EnqueuedJobsPage.cshtml
deleted
100644 → 0
View file @
fc50d995
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using System.Collections
@using System.Collections.Generic
@using Hangfire.Dashboard
@using Hangfire.Dashboard.Pages
@using Hangfire.Dashboard.Resources
@inherits RazorPage
@{
Layout = new LayoutPage(Queue.ToUpperInvariant());
int from, perPage;
int.TryParse(Query("from"), out from);
int.TryParse(Query("count"), out perPage);
var monitor = Storage.GetMonitoringApi();
var pager = new Pager(from, perPage, monitor.EnqueuedCount(Queue));
var enqueuedJobs = monitor.EnqueuedJobs(Queue, pager.FromRecord, pager.RecordsPerPage);
}
<div class="row">
<div class="col-md-3">
@Html.JobsSidebar()
</div>
<div class="col-md-9">
@Html.Breadcrumbs(Queue.ToUpperInvariant(), new Dictionary<string, string>
{
{ "Queues", Url.LinkToQueues() }
})
<h1 class="page-header">@Queue.ToUpperInvariant() <small>@Strings.EnqueuedJobsPage_Title</small></h1>
@if (pager.TotalPageCount == 0)
{
<div class="alert alert-info">
@Strings.EnqueuedJobsPage_NoJobs
</div>
}
else
{
<div class="js-jobs-list">
<div class="btn-toolbar btn-toolbar-top">
<button class="js-jobs-list-command btn btn-sm btn-default"
data-url="@Url.To("/jobs/enqueued/delete")"
data-loading-text="@Strings.Common_Deleting"
data-confirm="@Strings.Common_DeleteConfirm"
disabled="disabled">
<span class="glyphicon glyphicon-remove"></span>
@Strings.Common_DeleteSelected
</button>
@Html.PerPageSelector(pager)
</div>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th class="min-width">
<input type="checkbox" class="js-jobs-list-select-all"/>
</th>
<th class="min-width">@Strings.Common_Id</th>
<th class="min-width">@Strings.Common_State</th>
<th>@Strings.Common_Job</th>
<th class="align-right">@Strings.Common_Enqueued</th>
</tr>
</thead>
<tbody>
@foreach (var job in enqueuedJobs)
{
<tr class="js-jobs-list-row hover @(job.Value == null || !job.Value.InEnqueuedState ? "obsolete-data" : null)">
<td>
@if (job.Value != null)
{
<input type="checkbox" class="js-jobs-list-checkbox" name="jobs[]" value="@job.Key"/>
}
</td>
<td class="min-width">
@Html.JobIdLink(job.Key)
@if (job.Value != null && !job.Value.InEnqueuedState)
{
<span title="@Strings.Common_JobStateChanged_Text" class="glyphicon glyphicon-question-sign"></span>
}
</td>
@if (job.Value == null)
{
<td colspan="3"><em>@Strings.Common_JobExpired</em></td>
}
else
{
<td class="min-width">
@Html.StateLabel(job.Value.State)
</td>
<td class="word-break">
@Html.JobNameLink(job.Key, job.Value.Job)
</td>
<td class="align-right">
@if (job.Value.EnqueuedAt.HasValue)
{
@Html.RelativeTime(job.Value.EnqueuedAt.Value)
}
else
{
<em>@Strings.Common_NotAvailable</em>
}
</td>
}
</tr>
}
</tbody>
</table>
</div>
@Html.Paginator(pager)
</div>
}
</div>
</div>
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/Views/EnqueuedJobsPage.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
using
System
;
#
line
2
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
using
System.Collections
;
#
line
default
#
line
hidden
#
line
3
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
using
System.Collections.Generic
;
#
line
default
#
line
hidden
using
System.Linq
;
using
System.Text
;
#
line
4
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
#
line
5
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
using
Hangfire.Dashboard.Pages
;
#
line
default
#
line
hidden
#
line
6
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
EnqueuedJobsPage
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
#
line
8
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Layout
=
new
LayoutPage
(
Queue
.
ToUpperInvariant
());
int
from
,
perPage
;
int
.
TryParse
(
Query
(
"from"
),
out
from
);
int
.
TryParse
(
Query
(
"count"
),
out
perPage
);
var
monitor
=
Storage
.
GetMonitoringApi
();
var
pager
=
new
Pager
(
from
,
perPage
,
monitor
.
EnqueuedCount
(
Queue
));
var
enqueuedJobs
=
monitor
.
EnqueuedJobs
(
Queue
,
pager
.
FromRecord
,
pager
.
RecordsPerPage
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-3\">\r\n "
);
#
line
23
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Html
.
JobsSidebar
());
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n <div class=\"col-md-9\">\r\n "
);
#
line
26
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Html
.
Breadcrumbs
(
Queue
.
ToUpperInvariant
(),
new
Dictionary
<
string
,
string
>
{
{
"Queues"
,
Url
.
LinkToQueues
()
}
}));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n\r\n <h1 class=\"page-header\">"
);
#
line
31
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Queue
.
ToUpperInvariant
());
#
line
default
#
line
hidden
WriteLiteral
(
" <small>"
);
#
line
31
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Strings
.
EnqueuedJobsPage_Title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</small></h1>\r\n\r\n"
);
#
line
33
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
if
(
pager
.
TotalPageCount
==
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-info\">\r\n "
);
#
line
36
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Strings
.
EnqueuedJobsPage_NoJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
38
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"js-jobs-list\">\r\n <div class=\"btn-toolbar b"
+
"tn-toolbar-top\">\r\n <button class=\"js-jobs-list-command btn bt"
+
"n-sm btn-default\"\r\n data-url=\""
);
#
line
44
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Url
.
To
(
"/jobs/enqueued/delete"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
45
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Strings
.
Common_Deleting
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-confirm=\""
);
#
line
46
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Strings
.
Common_DeleteConfirm
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <spa"
+
"n class=\"glyphicon glyphicon-remove\"></span>\r\n "
);
#
line
49
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Strings
.
Common_DeleteSelected
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n "
);
#
line
52
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Html
.
PerPageSelector
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
@"
</div>
<div class=""table-responsive"">
<table class=""table"">
<thead>
<tr>
<th class=""min-width"">
<input type=""checkbox"" class=""js-jobs-list-select-all""/>
</th>
<th class=""min-width"">"
);
#
line
62
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Strings
.
Common_Id
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"min-width\">"
);
#
line
63
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Strings
.
Common_State
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
64
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Strings
.
Common_Job
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"align-right\">"
);
#
line
65
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Strings
.
Common_Enqueued
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n "
+
" <tbody>\r\n"
);
#
line
69
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
foreach
(
var
job
in
enqueuedJobs
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <tr class=\"js-jobs-list-row hover "
);
#
line
71
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
job
.
Value
==
null
||
!
job
.
Value
.
InEnqueuedState
?
"obsolete-data"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <td>\r\n"
);
#
line
73
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
if
(
job
.
Value
!=
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <input type=\"checkbox\" class=\"js-jobs-lis"
+
"t-checkbox\" name=\"jobs[]\" value=\""
);
#
line
75
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
job
.
Key
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"/>\r\n"
);
#
line
76
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <td class="
+
"\"min-width\">\r\n "
);
#
line
79
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Html
.
JobIdLink
(
job
.
Key
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
80
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
if
(
job
.
Value
!=
null
&&
!
job
.
Value
.
InEnqueuedState
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <span title=\""
);
#
line
82
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Strings
.
Common_JobStateChanged_Text
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" class=\"glyphicon glyphicon-question-sign\"></span>\r\n"
);
#
line
83
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n"
);
#
line
85
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
if
(
job
.
Value
==
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td colspan=\"3\"><em>"
);
#
line
87
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Strings
.
Common_JobExpired
);
#
line
default
#
line
hidden
WriteLiteral
(
"</em></td>\r\n"
);
#
line
88
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td class=\"min-width\">\r\n "
+
" "
);
#
line
92
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Html
.
StateLabel
(
job
.
Value
.
State
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
WriteLiteral
(
" <td class=\"word-break\">\r\n "
+
" "
);
#
line
95
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Html
.
JobNameLink
(
job
.
Key
,
job
.
Value
.
Job
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
WriteLiteral
(
" <td class=\"align-right\">\r\n"
);
#
line
98
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
if
(
job
.
Value
.
EnqueuedAt
.
HasValue
)
{
#
line
default
#
line
hidden
#
line
100
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Html
.
RelativeTime
(
job
.
Value
.
EnqueuedAt
.
Value
));
#
line
default
#
line
hidden
#
line
100
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <em>"
);
#
line
104
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Strings
.
Common_NotAvailable
);
#
line
default
#
line
hidden
WriteLiteral
(
"</em>\r\n"
);
#
line
105
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n"
);
#
line
107
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tr>\r\n"
);
#
line
109
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n <"
+
"/div>\r\n\r\n "
);
#
line
114
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
Write
(
Html
.
Paginator
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
116
"..\..\Dashboard\Pages\EnqueuedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n</div>"
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/FailedJobsPage.cshtml
deleted
100644 → 0
View file @
fc50d995
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using System
@using Hangfire.Dashboard
@using Hangfire.Dashboard.Pages
@using Hangfire.Dashboard.Resources
@inherits RazorPage
@{
Layout = new LayoutPage(Strings.FailedJobsPage_Title);
int from, perPage;
int.TryParse(Query("from"), out from);
int.TryParse(Query("count"), out perPage);
var monitor = Storage.GetMonitoringApi();
var pager = new Pager(from, perPage, monitor.FailedCount());
var failedJobs = monitor.FailedJobs(pager.FromRecord, pager.RecordsPerPage);
}
<div class="row">
<div class="col-md-3">
@Html.JobsSidebar()
</div>
<div class="col-md-9">
<h1 class="page-header">@Strings.FailedJobsPage_Title</h1>
@if (pager.TotalPageCount == 0)
{
<div class="alert alert-success">
@Strings.FailedJobsPage_NoJobs
</div>
}
else
{
<div class="alert alert-warning">
@Html.Raw(Strings.FailedJobsPage_FailedJobsNotExpire_Warning_Html)
</div>
<div class="js-jobs-list">
<div class="btn-toolbar btn-toolbar-top">
<button class="js-jobs-list-command btn btn-sm btn-primary"
data-url="@Url.To("/jobs/failed/requeue")"
data-loading-text="@Strings.Common_Enqueueing"
disabled="disabled">
<span class="glyphicon glyphicon-repeat"></span>
@Strings.Common_RequeueJobs
</button>
<button class="js-jobs-list-command btn btn-sm btn-default"
data-url="@Url.To("/jobs/failed/delete")"
data-loading-text="@Strings.Common_Deleting"
data-confirm="@Strings.Common_DeleteConfirm">
<span class="glyphicon glyphicon-remove"></span>
@Strings.Common_DeleteSelected
</button>
@Html.PerPageSelector(pager)
</div>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th class="min-width">
<input type="checkbox" class="js-jobs-list-select-all" />
</th>
<th class="min-width">@Strings.Common_Id</th>
<th>@Strings.FailedJobsPage_Table_Failed</th>
<th>@Strings.Common_Job</th>
</tr>
</thead>
<tbody>
@{ var index = 0; }
@foreach (var job in failedJobs)
{
<tr class="js-jobs-list-row @(!job.Value.InFailedState ? "obsolete-data" : null) @(job.Value.InFailedState ? "hover" : null)">
<td rowspan="@(job.Value.InFailedState ? "2" : "1")">
@if (job.Value.InFailedState)
{
<input type="checkbox" class="js-jobs-list-checkbox" name="jobs[]" value="@job.Key" />
}
</td>
<td class="min-width" rowspan="@(job.Value.InFailedState ? "2" : "1")">
@Html.JobIdLink(job.Key)
@if (!job.Value.InFailedState)
{
<span title="@Strings.Common_JobStateChanged_Text" class="glyphicon glyphicon-question-sign"></span>
}
</td>
<td class="min-width">
@if (job.Value.FailedAt.HasValue)
{
@Html.RelativeTime(job.Value.FailedAt.Value)
}
</td>
<td>
<div class="word-break">
@Html.JobNameLink(job.Key, job.Value.Job)
</div>
@if (!String.IsNullOrEmpty(job.Value.ExceptionMessage))
{
<div style="color: #888;">
@job.Value.Reason <a class="expander" href="#">@(index == 0 ? Strings.Common_LessDetails : Strings.Common_MoreDetails)</a>
</div>
}
</td>
</tr>
if (job.Value.InFailedState)
{
<tr>
<td colspan="2" class="failed-job-details">
<div class="expandable" style="@(index++ == 0 ? "display: block;" : null)">
<h4>@job.Value.ExceptionType</h4>
<p class="text-muted">
@job.Value.ExceptionMessage
</p>
@if (!String.IsNullOrEmpty(job.Value.ExceptionDetails))
{
<pre class="stack-trace"><code>@Html.StackTrace(job.Value.ExceptionDetails)</code></pre>
}
</div>
</td>
</tr>
}
}
</tbody>
</table>
</div>
@Html.Paginator(pager)
</div>
}
</div>
</div>
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/Views/FailedJobsPage.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
#
line
2
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
using
System
;
#
line
default
#
line
hidden
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
#
line
3
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
#
line
4
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
using
Hangfire.Dashboard.Pages
;
#
line
default
#
line
hidden
#
line
5
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
FailedJobsPage
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
#
line
7
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
FailedJobsPage_Title
);
int
from
,
perPage
;
int
.
TryParse
(
Query
(
"from"
),
out
from
);
int
.
TryParse
(
Query
(
"count"
),
out
perPage
);
var
monitor
=
Storage
.
GetMonitoringApi
();
var
pager
=
new
Pager
(
from
,
perPage
,
monitor
.
FailedCount
());
var
failedJobs
=
monitor
.
FailedJobs
(
pager
.
FromRecord
,
pager
.
RecordsPerPage
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-3\">\r\n "
);
#
line
22
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Html
.
JobsSidebar
());
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n <div class=\"col-md-9\">\r\n <h1 class=\"page-header\">"
);
#
line
25
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Strings
.
FailedJobsPage_Title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</h1>\r\n\r\n"
);
#
line
27
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
if
(
pager
.
TotalPageCount
==
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-success\">\r\n "
);
#
line
30
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Strings
.
FailedJobsPage_NoJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
32
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-warning\">\r\n "
);
#
line
36
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Html
.
Raw
(
Strings
.
FailedJobsPage_FailedJobsNotExpire_Warning_Html
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
38
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"js-jobs-list\">\r\n <div class=\"btn-toolbar b"
+
"tn-toolbar-top\">\r\n <button class=\"js-jobs-list-command btn bt"
+
"n-sm btn-primary\"\r\n data-url=\""
);
#
line
42
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Url
.
To
(
"/jobs/failed/requeue"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
43
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Strings
.
Common_Enqueueing
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <spa"
+
"n class=\"glyphicon glyphicon-repeat\"></span>\r\n "
);
#
line
46
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Strings
.
Common_RequeueJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n <button class=\"js-jobs-lis"
+
"t-command btn btn-sm btn-default\"\r\n data-url=\""
);
#
line
50
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Url
.
To
(
"/jobs/failed/delete"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
51
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Strings
.
Common_Deleting
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-confirm=\""
);
#
line
52
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Strings
.
Common_DeleteConfirm
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <span class=\"glyphicon glyphicon-remove\"></span>\r\n "
+
" "
);
#
line
54
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Strings
.
Common_DeleteSelected
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n "
);
#
line
57
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Html
.
PerPageSelector
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
@"
</div>
<div class=""table-responsive"">
<table class=""table"">
<thead>
<tr>
<th class=""min-width"">
<input type=""checkbox"" class=""js-jobs-list-select-all"" />
</th>
<th class=""min-width"">"
);
#
line
67
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Strings
.
Common_Id
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
68
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Strings
.
FailedJobsPage_Table_Failed
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
69
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Strings
.
Common_Job
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n "
+
" <tbody>\r\n"
);
#
line
73
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
var
index
=
0
;
#
line
default
#
line
hidden
#
line
74
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
foreach
(
var
job
in
failedJobs
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <tr class=\"js-jobs-list-row "
);
#
line
76
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(!
job
.
Value
.
InFailedState
?
"obsolete-data"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
" "
);
#
line
76
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
job
.
Value
.
InFailedState
?
"hover"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <td rowspan=\""
);
#
line
77
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
job
.
Value
.
InFailedState
?
"2"
:
"1"
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n"
);
#
line
78
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
if
(
job
.
Value
.
InFailedState
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <input type=\"checkbox\" class=\"js-jobs"
+
"-list-checkbox\" name=\"jobs[]\" value=\""
);
#
line
80
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
job
.
Key
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" />\r\n"
);
#
line
81
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <t"
+
"d class=\"min-width\" rowspan=\""
);
#
line
83
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
job
.
Value
.
InFailedState
?
"2"
:
"1"
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n "
);
#
line
84
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Html
.
JobIdLink
(
job
.
Key
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
85
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
if
(!
job
.
Value
.
InFailedState
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <span title=\""
);
#
line
87
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Strings
.
Common_JobStateChanged_Text
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" class=\"glyphicon glyphicon-question-sign\"></span>\r\n"
);
#
line
88
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <t"
+
"d class=\"min-width\">\r\n"
);
#
line
91
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
if
(
job
.
Value
.
FailedAt
.
HasValue
)
{
#
line
default
#
line
hidden
#
line
93
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Html
.
RelativeTime
(
job
.
Value
.
FailedAt
.
Value
));
#
line
default
#
line
hidden
#
line
93
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <t"
+
"d>\r\n <div class=\"word-break\">\r\n "
+
" "
);
#
line
98
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Html
.
JobNameLink
(
job
.
Key
,
job
.
Value
.
Job
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
100
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
if
(!
String
.
IsNullOrEmpty
(
job
.
Value
.
ExceptionMessage
))
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div style=\"color: #888;\">\r\n "
+
" "
);
#
line
103
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
job
.
Value
.
Reason
);
#
line
default
#
line
hidden
WriteLiteral
(
" <a class=\"expander\" href=\"#\">"
);
#
line
103
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
index
==
0
?
Strings
.
Common_LessDetails
:
Strings
.
Common_MoreDetails
);
#
line
default
#
line
hidden
WriteLiteral
(
"</a>\r\n </div>\r\n"
);
#
line
105
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n </tr>\r"
+
"\n"
);
#
line
108
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
if
(
job
.
Value
.
InFailedState
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <tr>\r\n "
+
" <td colspan=\"2\" class=\"failed-job-details\">\r\n "
+
" <div class=\"expandable\" style=\""
);
#
line
112
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
index
++
==
0
?
"display: block;"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <h4>"
);
#
line
113
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
job
.
Value
.
ExceptionType
);
#
line
default
#
line
hidden
WriteLiteral
(
"</h4>\r\n <p class=\"text-muted\">\r\n "
+
" "
);
#
line
115
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
job
.
Value
.
ExceptionMessage
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </p>\r\n\r\n"
);
#
line
118
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
if
(!
String
.
IsNullOrEmpty
(
job
.
Value
.
ExceptionDetails
))
{
#
line
default
#
line
hidden
WriteLiteral
(
" <pre class=\"stack-trace\"><cod"
+
"e>"
);
#
line
120
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Html
.
StackTrace
(
job
.
Value
.
ExceptionDetails
));
#
line
default
#
line
hidden
WriteLiteral
(
"</code></pre>\r\n"
);
#
line
121
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n "
+
" </td>\r\n </tr>\r\n"
);
#
line
125
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
}
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n <"
+
"/div>\r\n\r\n "
);
#
line
131
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
Write
(
Html
.
Paginator
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
133
"..\..\Dashboard\Pages\FailedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n</div>"
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/FetchedJobsPage.cs
deleted
100644 → 0
View file @
fc50d995
namespace
Hangfire.Dashboard.Pages
{
partial
class
FetchedJobsPage
{
public
FetchedJobsPage
(
string
queue
)
{
Queue
=
queue
;
}
public
string
Queue
{
get
;
}
}
}
src/DotNetCore.CAP/Dashboard/Views/FetchedJobsPage.cshtml
deleted
100644 → 0
View file @
fc50d995
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using System.Collections
@using System.Collections.Generic
@using Hangfire.Dashboard
@using Hangfire.Dashboard.Pages
@using Hangfire.Dashboard.Resources
@inherits RazorPage
@{
Layout = new LayoutPage(Queue.ToUpperInvariant());
int from, perPage;
int.TryParse(Query("from"), out from);
int.TryParse(Query("count"), out perPage);
var monitor = Storage.GetMonitoringApi();
var pager = new Pager(from, perPage, monitor.FetchedCount(Queue));
var fetchedJobs = monitor.FetchedJobs(Queue, pager.FromRecord, pager.RecordsPerPage);
}
<div class="row">
<div class="col-md-3">
@Html.JobsSidebar()
</div>
<div class="col-md-9">
@Html.Breadcrumbs(Strings.FetchedJobsPage_Title, new Dictionary<string, string>
{
{ "Queues", Url.LinkToQueues() },
{ Queue.ToUpperInvariant(), Url.Queue(Queue) }
})
<h1 class="page-header">
@Queue.ToUpperInvariant() <small>@Strings.FetchedJobsPage_Title</small>
</h1>
@if (pager.TotalPageCount == 0)
{
<div class="alert alert-info">
@Strings.FetchedJobsPage_NoJobs
</div>
}
else
{
<div class="js-jobs-list">
<div class="btn-toolbar btn-toolbar-top">
<button class="js-jobs-list-command btn btn-sm btn-primary"
data-url="@Url.To("/jobs/enqueued/requeue")"
data-loading-text="@Strings.Common_Enqueueing"
disabled="disabled">
<span class="glyphicon glyphicon-repeat"></span>
@Strings.Common_RequeueJobs
</button>
<button class="js-jobs-list-command btn btn-sm btn-default"
data-url="@Url.To("/jobs/enqueued/delete")"
data-loading-text="@Strings.Common_Deleting"
data-confirm="@Strings.Common_DeleteConfirm"
disabled="disabled">
<span class="glyphicon glyphicon-remove"></span>
@Strings.Common_DeleteSelected
</button>
@Html.PerPageSelector(pager)
</div>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th class="min-width">
<input type="checkbox" class="js-jobs-list-select-all" />
</th>
<th class="min-width">@Strings.Common_Id</th>
<th class="min-width">@Strings.Common_State</th>
<th>@Strings.Common_Job</th>
<th class="align-right">@Strings.Common_Fetched</th>
</tr>
</thead>
<tbody>
@foreach (var job in fetchedJobs)
{
<tr class="js-jobs-list-row hover @(job.Value == null ? "obsolete-data" : null)">
<td>
@if (job.Value != null)
{
<input type="checkbox" class="js-jobs-list-checkbox" name="jobs[]" value="@job.Key" />
}
</td>
<td class="min-width">
@Html.JobIdLink(job.Key)
</td>
@if (job.Value == null)
{
<td colspan="3"><em>@Strings.Common_JobExpired</em></td>
}
else
{
<td class="min-width">
@Html.StateLabel(job.Value.State)
</td>
<td class="word-break">
@Html.JobNameLink(job.Key, job.Value.Job)
</td>
<td class="align-right">
@if (job.Value.FetchedAt.HasValue)
{
@Html.RelativeTime(job.Value.FetchedAt.Value)
}
</td>
}
</tr>
}
</tbody>
</table>
</div>
@Html.Paginator(pager)
</div>
}
</div>
</div>
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/Views/FetchedJobsPage.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
using
System
;
#
line
2
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
using
System.Collections
;
#
line
default
#
line
hidden
#
line
3
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
using
System.Collections.Generic
;
#
line
default
#
line
hidden
using
System.Linq
;
using
System.Text
;
#
line
4
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
#
line
5
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
using
Hangfire.Dashboard.Pages
;
#
line
default
#
line
hidden
#
line
6
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
FetchedJobsPage
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
#
line
8
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Layout
=
new
LayoutPage
(
Queue
.
ToUpperInvariant
());
int
from
,
perPage
;
int
.
TryParse
(
Query
(
"from"
),
out
from
);
int
.
TryParse
(
Query
(
"count"
),
out
perPage
);
var
monitor
=
Storage
.
GetMonitoringApi
();
var
pager
=
new
Pager
(
from
,
perPage
,
monitor
.
FetchedCount
(
Queue
));
var
fetchedJobs
=
monitor
.
FetchedJobs
(
Queue
,
pager
.
FromRecord
,
pager
.
RecordsPerPage
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-3\">\r\n "
);
#
line
23
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Html
.
JobsSidebar
());
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n <div class=\"col-md-9\">\r\n "
);
#
line
26
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Html
.
Breadcrumbs
(
Strings
.
FetchedJobsPage_Title
,
new
Dictionary
<
string
,
string
>
{
{
"Queues"
,
Url
.
LinkToQueues
()
},
{
Queue
.
ToUpperInvariant
(),
Url
.
Queue
(
Queue
)
}
}));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n\r\n <h1 class=\"page-header\">\r\n "
);
#
line
33
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Queue
.
ToUpperInvariant
());
#
line
default
#
line
hidden
WriteLiteral
(
" <small>"
);
#
line
33
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Strings
.
FetchedJobsPage_Title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</small>\r\n </h1>\r\n\r\n"
);
#
line
36
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
if
(
pager
.
TotalPageCount
==
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-info\">\r\n "
);
#
line
39
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Strings
.
FetchedJobsPage_NoJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
41
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"js-jobs-list\">\r\n <div class=\"btn-toolbar btn-toolb"
+
"ar-top\">\r\n <button class=\"js-jobs-list-command btn btn-sm btn-pri"
+
"mary\"\r\n data-url=\""
);
#
line
47
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Url
.
To
(
"/jobs/enqueued/requeue"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
48
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Strings
.
Common_Enqueueing
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <span class="
+
"\"glyphicon glyphicon-repeat\"></span>\r\n "
);
#
line
51
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Strings
.
Common_RequeueJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n <button class=\"js-jobs-list-comman"
+
"d btn btn-sm btn-default\"\r\n data-url=\""
);
#
line
55
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Url
.
To
(
"/jobs/enqueued/delete"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
56
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Strings
.
Common_Deleting
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-confirm=\""
);
#
line
57
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Strings
.
Common_DeleteConfirm
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <span class="
+
"\"glyphicon glyphicon-remove\"></span>\r\n "
);
#
line
60
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Strings
.
Common_DeleteSelected
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n "
);
#
line
63
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Html
.
PerPageSelector
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
@"
</div>
<div class=""table-responsive"">
<table class=""table"">
<thead>
<tr>
<th class=""min-width"">
<input type=""checkbox"" class=""js-jobs-list-select-all"" />
</th>
<th class=""min-width"">"
);
#
line
73
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Strings
.
Common_Id
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"min-width\">"
);
#
line
74
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Strings
.
Common_State
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
75
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Strings
.
Common_Job
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"align-right\">"
);
#
line
76
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Strings
.
Common_Fetched
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n "
+
" <tbody>\r\n"
);
#
line
80
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
foreach
(
var
job
in
fetchedJobs
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <tr class=\"js-jobs-list-row hover "
);
#
line
82
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
job
.
Value
==
null
?
"obsolete-data"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <td>\r\n"
);
#
line
84
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
if
(
job
.
Value
!=
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <input type=\"checkbox\" class=\"js-jobs-lis"
+
"t-checkbox\" name=\"jobs[]\" value=\""
);
#
line
86
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
job
.
Key
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" />\r\n"
);
#
line
87
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <td class="
+
"\"min-width\">\r\n "
);
#
line
90
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Html
.
JobIdLink
(
job
.
Key
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
#
line
92
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
if
(
job
.
Value
==
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td colspan=\"3\"><em>"
);
#
line
94
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Strings
.
Common_JobExpired
);
#
line
default
#
line
hidden
WriteLiteral
(
"</em></td>\r\n"
);
#
line
95
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td class=\"min-width\">\r\n "
+
" "
);
#
line
99
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Html
.
StateLabel
(
job
.
Value
.
State
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
WriteLiteral
(
" <td class=\"word-break\">\r\n "
+
" "
);
#
line
102
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Html
.
JobNameLink
(
job
.
Key
,
job
.
Value
.
Job
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
WriteLiteral
(
" <td class=\"align-right\">\r\n"
);
#
line
105
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
if
(
job
.
Value
.
FetchedAt
.
HasValue
)
{
#
line
default
#
line
hidden
#
line
107
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Html
.
RelativeTime
(
job
.
Value
.
FetchedAt
.
Value
));
#
line
default
#
line
hidden
#
line
107
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n"
);
#
line
110
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tr>\r\n"
);
#
line
112
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n </div>\r\n\r\n "
+
" "
);
#
line
117
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
Write
(
Html
.
Paginator
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
119
"..\..\Dashboard\Pages\FetchedJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n</div>"
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/JobDetailsPage.cs
deleted
100644 → 0
View file @
fc50d995
using
Hangfire.Annotations
;
namespace
Hangfire.Dashboard.Pages
{
partial
class
JobDetailsPage
{
public
JobDetailsPage
(
string
jobId
)
{
JobId
=
jobId
;
}
public
string
JobId
{
get
;
}
}
}
src/DotNetCore.CAP/Dashboard/Views/JobDetailsPage.cshtml
deleted
100644 → 0
View file @
fc50d995
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using System
@using System.Collections.Generic
@using System.Linq
@using Hangfire
@using Hangfire.Common
@using Hangfire.Dashboard
@using Hangfire.Dashboard.Pages
@using Hangfire.Dashboard.Resources
@using Hangfire.States
@using Hangfire.Storage
@using Hangfire.Storage.Monitoring
@inherits RazorPage
@{
var monitor = Storage.GetMonitoringApi();
var job = monitor.JobDetails(JobId);
string title = null;
if (job != null)
{
title = job.Job != null ? Html.JobName(job.Job) : null;
job.History.Add(new StateHistoryDto { StateName = "Created", CreatedAt = job.CreatedAt ?? default(DateTime) });
}
title = title ?? Strings.Common_Job;
Layout = new LayoutPage(title);
}
<div class="row">
<div class="col-md-3">
@Html.JobsSidebar()
</div>
<div class="col-md-9">
<h1 class="page-header">@title</h1>
@if (job == null)
{
<div class="alert alert-warning">
@String.Format(Strings.JobDetailsPage_JobExpired, JobId)
</div>
}
else
{
var currentState = job.History[0];
if (currentState.StateName == ProcessingState.StateName)
{
var server = monitor.Servers().FirstOrDefault(x => x.Name == currentState.Data["ServerId"]);
if (server == null)
{
<div class="alert alert-danger">
@Html.Raw(String.Format(Strings.JobDetailsPage_JobAbortedNotActive_Warning_Html, currentState.Data["ServerId"], Url.To("/servers")))
</div>
}
else if (server.Heartbeat.HasValue && server.Heartbeat < DateTime.UtcNow.AddMinutes(-1))
{
<div class="alert alert-warning">
@Html.Raw(String.Format(Strings.JobDetailsPage_JobAbortedWithHeartbeat_Warning_Html, server.Name))
</div>
}
}
if (job.ExpireAt.HasValue)
{
<div class="alert alert-info">
@Html.Raw(String.Format(Strings.JobDetailsPage_JobFinished_Warning_Html, JobHelper.ToTimestamp(job.ExpireAt.Value), job.ExpireAt))
</div>
}
<div class="job-snippet">
<div class="job-snippet-code">
<pre><code><span class="comment">// @Strings.JobDetailsPage_JobId: @Html.JobId(JobId.ToString(), false)</span>
@JobMethodCallRenderer.Render(job.Job)
</code></pre>
</div>
@if (job.Properties.Count > 0)
{
<div class="job-snippet-properties">
<dl>
@foreach (var property in job.Properties.Where(x => x.Key != "Continuations"))
{
<dt>@property.Key</dt>
<dd><pre><code>@property.Value</code></pre></dd>
}
</dl>
</div>
}
</div>
if (job.Properties.ContainsKey("Continuations"))
{
List<ContinuationsSupportAttribute.Continuation> continuations;
using (var connection = Storage.GetConnection())
{
continuations = JobHelper.FromJson<List<ContinuationsSupportAttribute.Continuation>>(connection.GetJobParameter(
JobId, "Continuations")) ?? new List<ContinuationsSupportAttribute.Continuation>();
}
if (continuations.Count > 0)
{
<h3>@Strings.Common_Continuations</h3>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th class="min-width">@Strings.Common_Id</th>
<th class="min-width">@Strings.Common_Condition</th>
<th class="min-width">@Strings.Common_State</th>
<th>@Strings.Common_Job</th>
<th class="align-right">@Strings.Common_Created</th>
</tr>
</thead>
<tbody>
@foreach (var continuation in continuations)
{
JobData jobData;
using (var connection = Storage.GetConnection())
{
jobData = connection.GetJobData(continuation.JobId);
}
<tr>
@if (jobData == null)
{
<td colspan="5"><em>@String.Format(Strings.JobDetailsPage_JobExpired, continuation.JobId)</em></td>
}
else
{
<td class="min-width">@Html.JobIdLink(continuation.JobId)</td>
<td class="min-width"><code>@continuation.Options.ToString("G")</code></td>
<td class="min-width">@Html.StateLabel(jobData.State)</td>
<td class="word-break">@Html.JobNameLink(continuation.JobId, jobData.Job)</td>
<td class="align-right">@Html.RelativeTime(jobData.CreatedAt)</td>
}
</tr>
}
</tbody>
</table>
</div>
}
}
<h3>
@if (job.History.Count > 1)
{
<span class="job-snippet-buttons pull-right">
<button class="btn btn-sm btn-default" data-ajax="@Url.To("/jobs/actions/requeue/" + JobId)" data-loading-text="@Strings.Common_Enqueueing">@Strings.JobDetailsPage_Requeue</button>
<button class="btn btn-sm btn-death" data-ajax="@Url.To("/jobs/actions/delete/" + JobId)" data-loading-text="@Strings.Common_Deleting" data-confirm="@Strings.JobDetailsPage_DeleteConfirm">@Strings.Common_Delete</button>
</span>
}
@Strings.JobDetailsPage_State
</h3>
var index = 0;
foreach (var entry in job.History)
{
var accentColor = JobHistoryRenderer.GetForegroundStateColor(entry.StateName);
var backgroundColor = JobHistoryRenderer.GetBackgroundStateColor(entry.StateName);
<div class="state-card" style="@(index == 0 ? $"border-color: {accentColor}" : null)">
<h4 class="state-card-title" style="@(index == 0 ? $"color: {accentColor}" : null)">
<small class="pull-right text-muted">
@if (index == job.History.Count - 1)
{
@Html.RelativeTime(entry.CreatedAt)
}
else
{
var duration = Html.ToHumanDuration(entry.CreatedAt - job.History[index + 1].CreatedAt);
if (index == 0)
{
@: @Html.RelativeTime(entry.CreatedAt) (@duration)
}
else
{
@: @Html.MomentTitle(entry.CreatedAt, duration)
}
}
</small>
@entry.StateName
</h4>
@if (!String.IsNullOrWhiteSpace(entry.Reason))
{
<p class="state-card-text text-muted">@entry.Reason</p>
}
@{
var rendered = Html.RenderHistory(entry.StateName, entry.Data);
}
@if (rendered != null)
{
<div class="state-card-body" style="@(index == 0 ? $"background-color: {backgroundColor}" : null)">
@rendered
</div>
}
</div>
index++;
}
}
</div>
</div>
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/Views/JobDetailsPage1.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
#
line
2
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
using
System
;
#
line
default
#
line
hidden
#
line
3
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
using
System.Collections.Generic
;
#
line
default
#
line
hidden
#
line
4
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
using
System.Linq
;
#
line
default
#
line
hidden
using
System.Text
;
#
line
5
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
using
Hangfire
;
#
line
default
#
line
hidden
#
line
6
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
using
Hangfire.Common
;
#
line
default
#
line
hidden
#
line
7
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
#
line
8
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
using
Hangfire.Dashboard.Pages
;
#
line
default
#
line
hidden
#
line
9
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
#
line
10
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
using
Hangfire.States
;
#
line
default
#
line
hidden
#
line
11
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
using
Hangfire.Storage
;
#
line
default
#
line
hidden
#
line
12
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
using
Hangfire.Storage.Monitoring
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
JobDetailsPage
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
#
line
14
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
var
monitor
=
Storage
.
GetMonitoringApi
();
var
job
=
monitor
.
JobDetails
(
JobId
);
string
title
=
null
;
if
(
job
!=
null
)
{
title
=
job
.
Job
!=
null
?
Html
.
JobName
(
job
.
Job
)
:
null
;
job
.
History
.
Add
(
new
StateHistoryDto
{
StateName
=
"Created"
,
CreatedAt
=
job
.
CreatedAt
??
default
(
DateTime
)
});
}
title
=
title
??
Strings
.
Common_Job
;
Layout
=
new
LayoutPage
(
title
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-3\">\r\n "
);
#
line
32
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Html
.
JobsSidebar
());
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n <div class=\"col-md-9\">\r\n <h1 class=\"page-header\">"
);
#
line
35
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</h1>\r\n\r\n"
);
#
line
37
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
if
(
job
==
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-warning\">\r\n "
);
#
line
40
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
String
.
Format
(
Strings
.
JobDetailsPage_JobExpired
,
JobId
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
42
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
else
{
var
currentState
=
job
.
History
[
0
];
if
(
currentState
.
StateName
==
ProcessingState
.
StateName
)
{
var
server
=
monitor
.
Servers
().
FirstOrDefault
(
x
=>
x
.
Name
==
currentState
.
Data
[
"ServerId"
]);
if
(
server
==
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-danger\">\r\n "
);
#
line
52
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Html
.
Raw
(
String
.
Format
(
Strings
.
JobDetailsPage_JobAbortedNotActive_Warning_Html
,
currentState
.
Data
[
"ServerId"
],
Url
.
To
(
"/servers"
))));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
54
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
else
if
(
server
.
Heartbeat
.
HasValue
&&
server
.
Heartbeat
<
DateTime
.
UtcNow
.
AddMinutes
(-
1
))
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-warning\">\r\n "
);
#
line
58
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Html
.
Raw
(
String
.
Format
(
Strings
.
JobDetailsPage_JobAbortedWithHeartbeat_Warning_Html
,
server
.
Name
)));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
60
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
}
if
(
job
.
ExpireAt
.
HasValue
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-info\">\r\n "
);
#
line
66
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Html
.
Raw
(
String
.
Format
(
Strings
.
JobDetailsPage_JobFinished_Warning_Html
,
JobHelper
.
ToTimestamp
(
job
.
ExpireAt
.
Value
),
job
.
ExpireAt
)));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
68
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"job-snippet\">\r\n <div class=\"job-snippet-co"
+
"de\">\r\n <pre><code><span class=\"comment\">// "
);
#
line
72
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Strings
.
JobDetailsPage_JobId
);
#
line
default
#
line
hidden
WriteLiteral
(
": "
);
#
line
72
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Html
.
JobId
(
JobId
.
ToString
(),
false
));
#
line
default
#
line
hidden
WriteLiteral
(
"</span>\r\n"
);
#
line
73
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
JobMethodCallRenderer
.
Render
(
job
.
Job
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n</code></pre>\r\n </div>\r\n\r\n"
);
#
line
77
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
if
(
job
.
Properties
.
Count
>
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"job-snippet-properties\">\r\n "
+
" <dl>\r\n"
);
#
line
81
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
foreach
(
var
property
in
job
.
Properties
.
Where
(
x
=>
x
.
Key
!=
"Continuations"
))
{
#
line
default
#
line
hidden
WriteLiteral
(
" <dt>"
);
#
line
83
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
property
.
Key
);
#
line
default
#
line
hidden
WriteLiteral
(
"</dt>\r\n"
);
WriteLiteral
(
" <dd><pre><code>"
);
#
line
84
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
property
.
Value
);
#
line
default
#
line
hidden
WriteLiteral
(
"</code></pre></dd>\r\n"
);
#
line
85
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </dl>\r\n </div>\r\n"
);
#
line
88
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n"
);
#
line
90
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
if
(
job
.
Properties
.
ContainsKey
(
"Continuations"
))
{
List
<
ContinuationsSupportAttribute
.
Continuation
>
continuations
;
using
(
var
connection
=
Storage
.
GetConnection
())
{
continuations
=
JobHelper
.
FromJson
<
List
<
ContinuationsSupportAttribute
.
Continuation
>>(
connection
.
GetJobParameter
(
JobId
,
"Continuations"
))
??
new
List
<
ContinuationsSupportAttribute
.
Continuation
>();
}
if
(
continuations
.
Count
>
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <h3>"
);
#
line
103
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Strings
.
Common_Continuations
);
#
line
default
#
line
hidden
WriteLiteral
(
"</h3>\r\n"
);
WriteLiteral
(
" <div class=\"table-responsive\">\r\n <tabl"
+
"e class=\"table\">\r\n <thead>\r\n "
+
" <tr>\r\n <th class=\"min-width\">"
);
#
line
108
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Strings
.
Common_Id
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"min-width\">"
);
#
line
109
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Strings
.
Common_Condition
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"min-width\">"
);
#
line
110
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Strings
.
Common_State
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
111
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Strings
.
Common_Job
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"align-right\">"
);
#
line
112
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Strings
.
Common_Created
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n "
+
" <tbody>\r\n"
);
#
line
116
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
foreach
(
var
continuation
in
continuations
)
{
JobData
jobData
;
using
(
var
connection
=
Storage
.
GetConnection
())
{
jobData
=
connection
.
GetJobData
(
continuation
.
JobId
);
}
#
line
default
#
line
hidden
WriteLiteral
(
" <tr>\r\n"
);
#
line
126
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
if
(
jobData
==
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td colspan=\"5\"><em>"
);
#
line
128
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
String
.
Format
(
Strings
.
JobDetailsPage_JobExpired
,
continuation
.
JobId
));
#
line
default
#
line
hidden
WriteLiteral
(
"</em></td>\r\n"
);
#
line
129
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td class=\"min-width\">"
);
#
line
132
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Html
.
JobIdLink
(
continuation
.
JobId
));
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n"
);
WriteLiteral
(
" <td class=\"min-width\"><code>"
);
#
line
133
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
continuation
.
Options
.
ToString
(
"G"
));
#
line
default
#
line
hidden
WriteLiteral
(
"</code></td>\r\n"
);
WriteLiteral
(
" <td class=\"min-width\">"
);
#
line
134
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Html
.
StateLabel
(
jobData
.
State
));
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n"
);
WriteLiteral
(
" <td class=\"word-break\">"
);
#
line
135
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Html
.
JobNameLink
(
continuation
.
JobId
,
jobData
.
Job
));
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n"
);
WriteLiteral
(
" <td class=\"align-right\">"
);
#
line
136
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Html
.
RelativeTime
(
jobData
.
CreatedAt
));
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n"
);
#
line
137
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tr>\r\n"
);
#
line
139
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n "
+
" </div>\r\n"
);
#
line
143
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
}
#
line
default
#
line
hidden
WriteLiteral
(
" <h3>\r\n"
);
#
line
147
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
if
(
job
.
History
.
Count
>
1
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <span class=\"job-snippet-buttons pull-right\">\r\n "
+
" <button class=\"btn btn-sm btn-default\" data-ajax=\""
);
#
line
150
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Url
.
To
(
"/jobs/actions/requeue/"
+
JobId
));
#
line
default
#
line
hidden
WriteLiteral
(
"\" data-loading-text=\""
);
#
line
150
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Strings
.
Common_Enqueueing
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">"
);
#
line
150
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Strings
.
JobDetailsPage_Requeue
);
#
line
default
#
line
hidden
WriteLiteral
(
"</button>\r\n <button class=\"btn btn-sm btn-death\" data-ajax"
+
"=\""
);
#
line
151
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Url
.
To
(
"/jobs/actions/delete/"
+
JobId
));
#
line
default
#
line
hidden
WriteLiteral
(
"\" data-loading-text=\""
);
#
line
151
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Strings
.
Common_Deleting
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" data-confirm=\""
);
#
line
151
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Strings
.
JobDetailsPage_DeleteConfirm
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">"
);
#
line
151
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Strings
.
Common_Delete
);
#
line
default
#
line
hidden
WriteLiteral
(
"</button>\r\n </span>\r\n"
);
#
line
153
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n "
);
#
line
155
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Strings
.
JobDetailsPage_State
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </h3>\r\n"
);
#
line
157
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
var
index
=
0
;
foreach
(
var
entry
in
job
.
History
)
{
var
accentColor
=
JobHistoryRenderer
.
GetForegroundStateColor
(
entry
.
StateName
);
var
backgroundColor
=
JobHistoryRenderer
.
GetBackgroundStateColor
(
entry
.
StateName
);
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"state-card\" style=\""
);
#
line
165
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
index
==
0
?
$"border-color:
{
accentColor
}
"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <h4 class=\"state-card-title\" style=\""
);
#
line
166
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
index
==
0
?
$"color:
{
accentColor
}
"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <small class=\"pull-right text-muted\">\r\n"
);
#
line
168
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
if
(
index
==
job
.
History
.
Count
-
1
)
{
#
line
default
#
line
hidden
#
line
170
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Html
.
RelativeTime
(
entry
.
CreatedAt
));
#
line
default
#
line
hidden
#
line
170
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
else
{
var
duration
=
Html
.
ToHumanDuration
(
entry
.
CreatedAt
-
job
.
History
[
index
+
1
].
CreatedAt
);
if
(
index
==
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" "
);
WriteLiteral
(
" "
);
#
line
178
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Html
.
RelativeTime
(
entry
.
CreatedAt
));
#
line
default
#
line
hidden
WriteLiteral
(
" ("
);
#
line
178
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
duration
);
#
line
default
#
line
hidden
WriteLiteral
(
")\r\n"
);
#
line
179
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" "
);
WriteLiteral
(
" "
);
#
line
182
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
Html
.
MomentTitle
(
entry
.
CreatedAt
,
duration
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
183
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
}
#
line
default
#
line
hidden
WriteLiteral
(
" </small>\r\n\r\n "
);
#
line
187
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
entry
.
StateName
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </h4>\r\n\r\n"
);
#
line
190
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
if
(!
String
.
IsNullOrWhiteSpace
(
entry
.
Reason
))
{
#
line
default
#
line
hidden
WriteLiteral
(
" <p class=\"state-card-text text-muted\">"
);
#
line
192
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
entry
.
Reason
);
#
line
default
#
line
hidden
WriteLiteral
(
"</p>\r\n"
);
#
line
193
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
195
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
var
rendered
=
Html
.
RenderHistory
(
entry
.
StateName
,
entry
.
Data
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
199
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
if
(
rendered
!=
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"state-card-body\" style=\""
);
#
line
201
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
index
==
0
?
$"background-color:
{
backgroundColor
}
"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n "
);
#
line
202
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
Write
(
rendered
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
204
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n"
);
#
line
206
"..\..\Dashboard\Pages\JobDetailsPage.cshtml"
index
++;
}
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n</div>"
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/ProcessingJobsPage.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
#
line
2
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
using
System
;
#
line
default
#
line
hidden
using
System.Collections.Generic
;
#
line
3
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
using
System.Linq
;
#
line
default
#
line
hidden
using
System.Text
;
#
line
4
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
#
line
5
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
using
Hangfire.Dashboard.Pages
;
#
line
default
#
line
hidden
#
line
6
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
ProcessingJobsPage
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
#
line
8
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
ProcessingJobsPage_Title
);
int
from
,
perPage
;
int
.
TryParse
(
Query
(
"from"
),
out
from
);
int
.
TryParse
(
Query
(
"count"
),
out
perPage
);
var
monitor
=
Storage
.
GetMonitoringApi
();
var
pager
=
new
Pager
(
from
,
perPage
,
monitor
.
ProcessingCount
());
var
processingJobs
=
monitor
.
ProcessingJobs
(
pager
.
FromRecord
,
pager
.
RecordsPerPage
);
var
servers
=
monitor
.
Servers
();
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-3\">\r\n "
);
#
line
24
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Html
.
JobsSidebar
());
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n <div class=\"col-md-9\">\r\n <h1 class=\"page-header\">"
);
#
line
27
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Strings
.
ProcessingJobsPage_Title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</h1>\r\n\r\n"
);
#
line
29
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
if
(
pager
.
TotalPageCount
==
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-info\">\r\n "
);
#
line
32
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Strings
.
ProcessingJobsPage_NoJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
34
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"js-jobs-list\">\r\n <div class=\"btn-toolbar b"
+
"tn-toolbar-top\">\r\n <button class=\"js-jobs-list-command btn bt"
+
"n-sm btn-primary\"\r\n data-url=\""
);
#
line
40
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Url
.
To
(
"/jobs/processing/requeue"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
41
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Strings
.
Common_Enqueueing
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <spa"
+
"n class=\"glyphicon glyphicon-repeat\"></span>\r\n "
);
#
line
44
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Strings
.
Common_RequeueJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n <button class=\"js-jobs-lis"
+
"t-command btn btn-sm btn-default\"\r\n data-url=\""
);
#
line
48
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Url
.
To
(
"/jobs/processing/delete"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
49
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Strings
.
Common_Deleting
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-confirm=\""
);
#
line
50
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Strings
.
Common_DeleteConfirm
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <spa"
+
"n class=\"glyphicon glyphicon-remove\"></span>\r\n "
);
#
line
53
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Strings
.
Common_DeleteSelected
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n "
);
#
line
56
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Html
.
PerPageSelector
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
@"
</div>
<div class=""table-responsive"">
<table class=""table"">
<thead>
<tr>
<th class=""min-width"">
<input type=""checkbox"" class=""js-jobs-list-select-all"" />
</th>
<th class=""min-width"">"
);
#
line
66
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Strings
.
Common_Id
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"min-width\">"
);
#
line
67
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Strings
.
Common_Server
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
68
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Strings
.
Common_Job
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"align-right\">"
);
#
line
69
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Strings
.
ProcessingJobsPage_Table_Started
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n "
+
" <tbody>\r\n"
);
#
line
73
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
foreach
(
var
job
in
processingJobs
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <tr class=\"js-jobs-list-row "
);
#
line
75
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(!
job
.
Value
.
InProcessingState
?
"obsolete-data"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
" "
);
#
line
75
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
job
.
Value
.
InProcessingState
?
"hover"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <td>\r\n"
);
#
line
77
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
if
(
job
.
Value
.
InProcessingState
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <input type=\"checkbox\" class=\"js-jobs"
+
"-list-checkbox\" name=\"jobs[]\" value=\""
);
#
line
79
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
job
.
Key
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" />\r\n"
);
#
line
80
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <t"
+
"d class=\"min-width\">\r\n "
);
#
line
83
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Html
.
JobIdLink
(
job
.
Key
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
84
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
if
(!
job
.
Value
.
InProcessingState
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <span title=\""
);
#
line
86
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Strings
.
Common_JobStateChanged_Text
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" class=\"glyphicon glyphicon-question-sign\"></span>\r\n"
);
#
line
87
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n"
);
#
line
89
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
if
(!
job
.
Value
.
InProcessingState
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td colspan=\"3\">"
);
#
line
91
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Strings
.
Common_JobStateChanged_Text
);
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n"
);
#
line
92
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td class=\"min-width\">\r\n "
+
" "
);
#
line
96
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Html
.
ServerId
(
job
.
Value
.
ServerId
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
WriteLiteral
(
" <td class=\"word-break\">\r\n"
);
#
line
99
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
if
(
servers
.
All
(
x
=>
x
.
Name
!=
job
.
Value
.
ServerId
||
x
.
Heartbeat
<
DateTime
.
UtcNow
.
AddMinutes
(-
1
)))
{
#
line
default
#
line
hidden
WriteLiteral
(
" <span title=\""
);
#
line
101
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Strings
.
ProcessingJobsPage_Aborted
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" class=\"glyphicon glyphicon-warning-sign\" style=\"font-size: 10px;\"></span>\r\n"
);
#
line
102
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n "
);
#
line
104
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Html
.
JobNameLink
(
job
.
Key
,
job
.
Value
.
Job
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
WriteLiteral
(
" <td class=\"align-right\">\r\n"
);
#
line
107
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
if
(
job
.
Value
.
StartedAt
.
HasValue
)
{
#
line
default
#
line
hidden
#
line
109
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Html
.
RelativeTime
(
job
.
Value
.
StartedAt
.
Value
));
#
line
default
#
line
hidden
#
line
109
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n"
);
#
line
112
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tr>\r\n"
);
#
line
114
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n <"
+
"/div>\r\n\r\n "
);
#
line
119
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
Write
(
Html
.
Paginator
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
121
"..\..\Dashboard\Pages\ProcessingJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n</div>"
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/QueuesPage.cshtml
deleted
100644 → 0
View file @
fc50d995
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using System.Linq
@using Hangfire.Dashboard
@using Hangfire.Dashboard.Pages
@using Hangfire.Dashboard.Resources
@inherits RazorPage
@{
Layout = new LayoutPage(Strings.QueuesPage_Title);
var monitor = Storage.GetMonitoringApi();
var queues = monitor.Queues();
}
<div class="row">
<div class="col-md-3">
@Html.JobsSidebar()
</div>
<div class="col-md-9">
<h1 class="page-header">@Strings.QueuesPage_Title</h1>
@if (queues.Count == 0)
{
<div class="alert alert-warning">
@Strings.QueuesPage_NoQueues
</div>
}
else
{
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th style="min-width: 200px;">@Strings.QueuesPage_Table_Queue</th>
<th>@Strings.QueuesPage_Table_Length</th>
<th>@Strings.Common_Fetched</th>
<th>@Strings.QueuesPage_Table_NextsJobs</th>
</tr>
</thead>
<tbody>
@foreach (var queue in queues)
{
<tr>
<td>@Html.QueueLabel(queue.Name)</td>
<td>@queue.Length</td>
<td>
@if (queue.Fetched.HasValue)
{
<a href="@Url.To("/jobs/enqueued/fetched/" + queue.Name)">
@queue.Fetched
</a>
}
else
{
<em>@Strings.Common_NotAvailable</em>
}
</td>
<td>
@if (queue.FirstJobs.Count == 0)
{
<em>
@Strings.QueuesPage_NoJobs
</em>
}
else
{
<table class="table table-condensed table-inner">
<thead>
<tr>
<th class="min-width">@Strings.Common_Id</th>
<th class="min-width">@Strings.Common_State</th>
<th>@Strings.Common_Job</th>
<th class="align-right min-width">@Strings.Common_Enqueued</th>
</tr>
</thead>
<tbody>
@foreach (var job in queue.FirstJobs)
{
<tr class="@(job.Value == null || !job.Value.InEnqueuedState ? "obsolete-data" : null)">
<td class="min-width">
@Html.JobIdLink(job.Key)
@if (job.Value != null && !job.Value.InEnqueuedState)
{
<span title="@Strings.Common_JobStateChanged_Text" class="glyphicon glyphicon-question-sign"></span>
}
</td>
@if (job.Value == null)
{
<td colspan="3"><em>@Strings.Common_JobExpired</em></td>
}
else
{
<td class="min-width">
@Html.StateLabel(job.Value.State)
</td>
<td class="word-break">
@Html.JobNameLink(job.Key, job.Value.Job)
</td>
<td class="align-right min-width">
@if (job.Value.EnqueuedAt.HasValue)
{
@Html.RelativeTime(job.Value.EnqueuedAt.Value)
}
else
{
<em>@Strings.Common_NotAvailable</em>
}
</td>
}
</tr>
}
</tbody>
</table>
}
</td>
</tr>
}
</tbody>
</table>
</div>
}
</div>
</div>
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/Views/QueuesPage.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
using
System
;
using
System.Collections.Generic
;
#
line
2
"..\..\Dashboard\Pages\QueuesPage.cshtml"
using
System.Linq
;
#
line
default
#
line
hidden
using
System.Text
;
#
line
3
"..\..\Dashboard\Pages\QueuesPage.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
#
line
4
"..\..\Dashboard\Pages\QueuesPage.cshtml"
using
Hangfire.Dashboard.Pages
;
#
line
default
#
line
hidden
#
line
5
"..\..\Dashboard\Pages\QueuesPage.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
QueuesPage
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
#
line
7
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
QueuesPage_Title
);
var
monitor
=
Storage
.
GetMonitoringApi
();
var
queues
=
monitor
.
Queues
();
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-3\">\r\n "
);
#
line
16
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Html
.
JobsSidebar
());
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n <div class=\"col-md-9\">\r\n <h1 class=\"page-header\">"
);
#
line
19
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
QueuesPage_Title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</h1>\r\n\r\n"
);
#
line
21
"..\..\Dashboard\Pages\QueuesPage.cshtml"
if
(
queues
.
Count
==
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-warning\">\r\n "
);
#
line
24
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
QueuesPage_NoQueues
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
26
"..\..\Dashboard\Pages\QueuesPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"table-responsive\">\r\n <table class=\"table t"
+
"able-striped\">\r\n <thead>\r\n <tr>\r\n "
+
" <th style=\"min-width: 200px;\">"
);
#
line
33
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
QueuesPage_Table_Queue
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
34
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
QueuesPage_Table_Length
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
35
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
Common_Fetched
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
36
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
QueuesPage_Table_NextsJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n "
+
" <tbody>\r\n"
);
#
line
40
"..\..\Dashboard\Pages\QueuesPage.cshtml"
foreach
(
var
queue
in
queues
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <tr>\r\n <td>"
);
#
line
43
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Html
.
QueueLabel
(
queue
.
Name
));
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n <td>"
);
#
line
44
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
queue
.
Length
);
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n <td>\r\n"
);
#
line
46
"..\..\Dashboard\Pages\QueuesPage.cshtml"
if
(
queue
.
Fetched
.
HasValue
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <a href=\""
);
#
line
48
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Url
.
To
(
"/jobs/enqueued/fetched/"
+
queue
.
Name
));
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n "
);
#
line
49
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
queue
.
Fetched
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </a>\r\n"
);
#
line
51
"..\..\Dashboard\Pages\QueuesPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <em>"
);
#
line
54
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
Common_NotAvailable
);
#
line
default
#
line
hidden
WriteLiteral
(
"</em>\r\n"
);
#
line
55
"..\..\Dashboard\Pages\QueuesPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <td>\r\n"
);
#
line
58
"..\..\Dashboard\Pages\QueuesPage.cshtml"
if
(
queue
.
FirstJobs
.
Count
==
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <em>\r\n "
+
" "
);
#
line
61
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
QueuesPage_NoJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </em>\r\n"
);
#
line
63
"..\..\Dashboard\Pages\QueuesPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
@" <table class=""table table-condensed table-inner"">
<thead>
<tr>
<th class=""min-width"">"
);
#
line
69
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
Common_Id
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"min-width\">"
+
""
);
#
line
70
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
Common_State
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
71
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
Common_Job
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"align-right"
+
" min-width\">"
);
#
line
72
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
Common_Enqueued
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n "
+
" </thead>\r\n <"
+
"tbody>\r\n"
);
#
line
76
"..\..\Dashboard\Pages\QueuesPage.cshtml"
foreach
(
var
job
in
queue
.
FirstJobs
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <tr class=\""
);
#
line
78
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
job
.
Value
==
null
||
!
job
.
Value
.
InEnqueuedState
?
"obsolete-data"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <td class=\"min-width\""
+
">\r\n "
);
#
line
80
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Html
.
JobIdLink
(
job
.
Key
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
81
"..\..\Dashboard\Pages\QueuesPage.cshtml"
if
(
job
.
Value
!=
null
&&
!
job
.
Value
.
InEnqueuedState
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <span title=\""
);
#
line
83
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
Common_JobStateChanged_Text
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" class=\"glyphicon glyphicon-question-sign\"></span>\r\n"
);
#
line
84
"..\..\Dashboard\Pages\QueuesPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n"
);
#
line
86
"..\..\Dashboard\Pages\QueuesPage.cshtml"
if
(
job
.
Value
==
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td colspan=\"3\"><em>"
);
#
line
88
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
Common_JobExpired
);
#
line
default
#
line
hidden
WriteLiteral
(
"</em></td>\r\n"
);
#
line
89
"..\..\Dashboard\Pages\QueuesPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td class=\"min-width\""
+
">\r\n "
);
#
line
93
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Html
.
StateLabel
(
job
.
Value
.
State
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
WriteLiteral
(
" <td class=\"word-break"
+
"\">\r\n "
);
#
line
96
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Html
.
JobNameLink
(
job
.
Key
,
job
.
Value
.
Job
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
WriteLiteral
(
" <td class=\"align-righ"
+
"t min-width\">\r\n"
);
#
line
99
"..\..\Dashboard\Pages\QueuesPage.cshtml"
if
(
job
.
Value
.
EnqueuedAt
.
HasValue
)
{
#
line
default
#
line
hidden
#
line
101
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Html
.
RelativeTime
(
job
.
Value
.
EnqueuedAt
.
Value
));
#
line
default
#
line
hidden
#
line
101
"..\..\Dashboard\Pages\QueuesPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <em>"
);
#
line
105
"..\..\Dashboard\Pages\QueuesPage.cshtml"
Write
(
Strings
.
Common_NotAvailable
);
#
line
default
#
line
hidden
WriteLiteral
(
"</em>\r\n"
);
#
line
106
"..\..\Dashboard\Pages\QueuesPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n"
);
#
line
108
"..\..\Dashboard\Pages\QueuesPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tr>\r\n"
);
#
line
110
"..\..\Dashboard\Pages\QueuesPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tbody>\r\n "
+
" </table>\r\n"
);
#
line
113
"..\..\Dashboard\Pages\QueuesPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n </tr>\r\n"
);
#
line
116
"..\..\Dashboard\Pages\QueuesPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n </div>\r\n"
);
#
line
120
"..\..\Dashboard\Pages\QueuesPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n</div>"
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/RecurringJobsPage.cshtml
deleted
100644 → 0
View file @
fc50d995
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: true *@
@using System
@using System.Collections.Generic
@using Hangfire.Dashboard
@using Hangfire.Dashboard.Pages
@using Hangfire.Dashboard.Resources
@using Hangfire.Storage
@inherits RazorPage
@{
Layout = new LayoutPage(Strings.RecurringJobsPage_Title);
List<RecurringJobDto> recurringJobs;
int from, perPage;
int.TryParse(Query("from"), out from);
int.TryParse(Query("count"), out perPage);
Pager pager = null;
using (var connection = Storage.GetConnection())
{
var storageConnection = connection as JobStorageConnection;
if (storageConnection != null)
{
pager = new Pager(from, perPage, storageConnection.GetRecurringJobCount());
recurringJobs = storageConnection.GetRecurringJobs(pager.FromRecord, pager.FromRecord + pager.RecordsPerPage);
}
else
{
recurringJobs = connection.GetRecurringJobs();
}
}
}
<div class="row">
<div class="col-md-12">
<h1 class="page-header">@Strings.RecurringJobsPage_Title</h1>
@if (recurringJobs.Count == 0)
{
<div class="alert alert-info">
@Strings.RecurringJobsPage_NoJobs
</div>
}
else
{
<div class="js-jobs-list">
<div class="btn-toolbar btn-toolbar-top">
<button class="js-jobs-list-command btn btn-sm btn-primary"
data-url="@Url.To("/recurring/trigger")"
data-loading-text="@Strings.RecurringJobsPage_Triggering"
disabled="disabled">
<span class="glyphicon glyphicon-play-circle"></span>
@Strings.RecurringJobsPage_TriggerNow
</button>
<button class="js-jobs-list-command btn btn-sm btn-default"
data-url="@Url.To("/recurring/remove")"
data-loading-text="@Strings.Common_Deleting"
data-confirm="@Strings.Common_DeleteConfirm"
disabled="disabled">
<span class="glyphicon glyphicon-remove"></span>
@Strings.Common_Delete
</button>
@if (pager != null)
{
@: @Html.PerPageSelector(pager)
}
</div>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th class="min-width">
<input type="checkbox" class="js-jobs-list-select-all" />
</th>
<th class="min-width">@Strings.Common_Id</th>
<th class="min-width">@Strings.RecurringJobsPage_Table_Cron</th>
<th class="min-width">@Strings.RecurringJobsPage_Table_TimeZone</th>
<th>@Strings.Common_Job</th>
<th class="align-right min-width">@Strings.RecurringJobsPage_Table_NextExecution</th>
<th class="align-right min-width">@Strings.RecurringJobsPage_Table_LastExecution</th>
<th class="align-right min-width">@Strings.Common_Created</th>
</tr>
</thead>
<tbody>
@foreach (var job in recurringJobs)
{
<tr class="js-jobs-list-row hover">
<td>
<input type="checkbox" class="js-jobs-list-checkbox" name="jobs[]" value="@job.Id" />
</td>
<td class="min-width">@job.Id</td>
<td class="min-width">
@* ReSharper disable once EmptyGeneralCatchClause *@
@{
string cronDescription = null;
#if NETFULL
try
{
cronDescription = string.IsNullOrEmpty(job.Cron) ? null : CronExpressionDescriptor.ExpressionDescriptor.GetDescription(job.Cron);
}
catch (FormatException)
{
}
#endif
}
@if (cronDescription != null)
{
<code title="@cronDescription">@job.Cron</code>
}
else
{
<code>@job.Cron</code>
}
</td>
<td class="min-width">
@if (!String.IsNullOrWhiteSpace(job.TimeZoneId))
{
<span title="@TimeZoneInfo.FindSystemTimeZoneById(job.TimeZoneId).DisplayName" data-container="body">@job.TimeZoneId</span>
}
else
{
@: UTC
}
</td>
<td class="word-break">
@if (job.Job != null)
{
@: @Html.JobName(job.Job)
}
else
{
<em>@job.LoadException.InnerException.Message</em>
}
</td>
<td class="align-right min-width">
@if (job.NextExecution != null)
{
@Html.RelativeTime(job.NextExecution.Value)
}
else
{
<em>@Strings.Common_NotAvailable</em>
}
</td>
<td class="align-right min-width">
@if (job.LastExecution != null)
{
if (!String.IsNullOrEmpty(job.LastJobId))
{
<a href="@Url.JobDetails(job.LastJobId)">
<span class="label label-default label-hover" style="@($"background-color: {JobHistoryRenderer.GetForegroundStateColor(job.LastJobState)};")">
@Html.RelativeTime(job.LastExecution.Value)
</span>
</a>
}
else
{
<em>
@Strings.RecurringJobsPage_Canceled @Html.RelativeTime(job.LastExecution.Value)
</em>
}
}
else
{
<em>@Strings.Common_NotAvailable</em>
}
</td>
<td class="align-right min-width">
@if (job.CreatedAt != null)
{
@Html.RelativeTime(job.CreatedAt.Value)
}
else
{
<em>N/A</em>
}
</td>
</tr>
}
</tbody>
</table>
</div>
@if (pager != null)
{
@: @Html.Paginator(pager)
}
</div>
}
</div>
</div>
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/Views/RecurringJobsPage.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
#
line
2
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
using
System
;
#
line
default
#
line
hidden
#
line
3
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
using
System.Collections.Generic
;
#
line
default
#
line
hidden
using
System.Linq
;
using
System.Text
;
#
line
4
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
#
line
5
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
using
Hangfire.Dashboard.Pages
;
#
line
default
#
line
hidden
#
line
6
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
#
line
7
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
using
Hangfire.Storage
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
RecurringJobsPage
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
#
line
9
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
RecurringJobsPage_Title
);
List
<
RecurringJobDto
>
recurringJobs
;
int
from
,
perPage
;
int
.
TryParse
(
Query
(
"from"
),
out
from
);
int
.
TryParse
(
Query
(
"count"
),
out
perPage
);
Pager
pager
=
null
;
using
(
var
connection
=
Storage
.
GetConnection
())
{
var
storageConnection
=
connection
as
JobStorageConnection
;
if
(
storageConnection
!=
null
)
{
pager
=
new
Pager
(
from
,
perPage
,
storageConnection
.
GetRecurringJobCount
());
recurringJobs
=
storageConnection
.
GetRecurringJobs
(
pager
.
FromRecord
,
pager
.
FromRecord
+
pager
.
RecordsPerPage
-
1
);
}
else
{
recurringJobs
=
connection
.
GetRecurringJobs
();
}
}
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <h1 class=\"page-header\""
+
">"
);
#
line
37
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
RecurringJobsPage_Title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</h1>\r\n\r\n"
);
#
line
39
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
if
(
recurringJobs
.
Count
==
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-info\">\r\n "
);
#
line
42
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
RecurringJobsPage_NoJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
44
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"js-jobs-list\">\r\n <div class=\"btn-toolbar b"
+
"tn-toolbar-top\">\r\n <button class=\"js-jobs-list-command btn bt"
+
"n-sm btn-primary\"\r\n data-url=\""
);
#
line
50
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Url
.
To
(
"/recurring/trigger"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
51
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
RecurringJobsPage_Triggering
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <spa"
+
"n class=\"glyphicon glyphicon-play-circle\"></span>\r\n "
);
#
line
54
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
RecurringJobsPage_TriggerNow
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n <button class=\"js-jobs-lis"
+
"t-command btn btn-sm btn-default\"\r\n data-url=\""
);
#
line
58
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Url
.
To
(
"/recurring/remove"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
59
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
Common_Deleting
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-confirm=\""
);
#
line
60
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
Common_DeleteConfirm
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <spa"
+
"n class=\"glyphicon glyphicon-remove\"></span>\r\n "
);
#
line
63
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
Common_Delete
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n"
);
#
line
66
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
if
(
pager
!=
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" "
);
WriteLiteral
(
" "
);
#
line
68
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Html
.
PerPageSelector
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
69
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
@" </div>
<div class=""table-responsive"">
<table class=""table"">
<thead>
<tr>
<th class=""min-width"">
<input type=""checkbox"" class=""js-jobs-list-select-all"" />
</th>
<th class=""min-width"">"
);
#
line
79
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
Common_Id
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"min-width\">"
);
#
line
80
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
RecurringJobsPage_Table_Cron
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"min-width\">"
);
#
line
81
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
RecurringJobsPage_Table_TimeZone
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
82
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
Common_Job
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"align-right min-width\">"
);
#
line
83
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
RecurringJobsPage_Table_NextExecution
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"align-right min-width\">"
);
#
line
84
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
RecurringJobsPage_Table_LastExecution
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"align-right min-width\">"
);
#
line
85
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
Common_Created
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n "
+
" <tbody>\r\n"
);
#
line
89
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
foreach
(
var
job
in
recurringJobs
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <tr class=\"js-jobs-list-row hover\">\r\n "
+
" <td>\r\n <input typ"
+
"e=\"checkbox\" class=\"js-jobs-list-checkbox\" name=\"jobs[]\" value=\""
);
#
line
93
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
job
.
Id
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" />\r\n </td>\r\n "
+
" <td class=\"min-width\">"
);
#
line
95
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
job
.
Id
);
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n <td class=\"min-width\">\r\n "
+
" "
);
WriteLiteral
(
"\r\n"
);
#
line
98
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
string
cronDescription
=
null
;
#if NETFULL
try
{
cronDescription
=
string
.
IsNullOrEmpty
(
job
.
Cron
)
?
null
:
CronExpressionDescriptor
.
ExpressionDescriptor
.
GetDescription
(
job
.
Cron
);
}
catch
(
FormatException
)
{
}
#endif
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
111
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
if
(
cronDescription
!=
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <code title=\""
);
#
line
113
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
cronDescription
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">"
);
#
line
113
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
job
.
Cron
);
#
line
default
#
line
hidden
WriteLiteral
(
"</code>\r\n"
);
#
line
114
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <code>"
);
#
line
117
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
job
.
Cron
);
#
line
default
#
line
hidden
WriteLiteral
(
"</code>\r\n"
);
#
line
118
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <t"
+
"d class=\"min-width\">\r\n"
);
#
line
121
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
if
(!
String
.
IsNullOrWhiteSpace
(
job
.
TimeZoneId
))
{
#
line
default
#
line
hidden
WriteLiteral
(
" <span title=\""
);
#
line
123
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
TimeZoneInfo
.
FindSystemTimeZoneById
(
job
.
TimeZoneId
).
DisplayName
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" data-container=\"body\">"
);
#
line
123
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
job
.
TimeZoneId
);
#
line
default
#
line
hidden
WriteLiteral
(
"</span>\r\n"
);
#
line
124
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" "
);
WriteLiteral
(
" UTC\r\n"
);
#
line
128
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <t"
+
"d class=\"word-break\">\r\n"
);
#
line
131
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
if
(
job
.
Job
!=
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" "
);
WriteLiteral
(
" "
);
#
line
133
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Html
.
JobName
(
job
.
Job
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
134
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <em>"
);
#
line
137
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
job
.
LoadException
.
InnerException
.
Message
);
#
line
default
#
line
hidden
WriteLiteral
(
"</em>\r\n"
);
#
line
138
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <t"
+
"d class=\"align-right min-width\">\r\n"
);
#
line
141
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
if
(
job
.
NextExecution
!=
null
)
{
#
line
default
#
line
hidden
#
line
143
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Html
.
RelativeTime
(
job
.
NextExecution
.
Value
));
#
line
default
#
line
hidden
#
line
143
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <em>"
);
#
line
147
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
Common_NotAvailable
);
#
line
default
#
line
hidden
WriteLiteral
(
"</em>\r\n"
);
#
line
148
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <t"
+
"d class=\"align-right min-width\">\r\n"
);
#
line
151
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
if
(
job
.
LastExecution
!=
null
)
{
if
(!
String
.
IsNullOrEmpty
(
job
.
LastJobId
))
{
#
line
default
#
line
hidden
WriteLiteral
(
" <a href=\""
);
#
line
155
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Url
.
JobDetails
(
job
.
LastJobId
));
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <span class=\"label label-"
+
"default label-hover\" style=\""
);
#
line
156
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
$"background-color:
{
JobHistoryRenderer
.
GetForegroundStateColor
(
job
.
LastJobState
)}
;"
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n "
);
#
line
157
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Html
.
RelativeTime
(
job
.
LastExecution
.
Value
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </span>\r\n "
+
" </a>\r\n"
);
#
line
160
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <em>\r\n "
+
" "
);
#
line
164
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
RecurringJobsPage_Canceled
);
#
line
default
#
line
hidden
WriteLiteral
(
" "
);
#
line
164
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Html
.
RelativeTime
(
job
.
LastExecution
.
Value
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </em>\r\n"
);
#
line
166
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <em>"
);
#
line
170
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Strings
.
Common_NotAvailable
);
#
line
default
#
line
hidden
WriteLiteral
(
"</em>\r\n"
);
#
line
171
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <t"
+
"d class=\"align-right min-width\">\r\n"
);
#
line
174
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
if
(
job
.
CreatedAt
!=
null
)
{
#
line
default
#
line
hidden
#
line
176
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Html
.
RelativeTime
(
job
.
CreatedAt
.
Value
));
#
line
default
#
line
hidden
#
line
176
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <em>N/A</em>\r\n"
);
#
line
181
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n </tr>\r"
+
"\n"
);
#
line
184
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n <"
+
"/div>\r\n\r\n"
);
#
line
189
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
if
(
pager
!=
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" "
);
WriteLiteral
(
" "
);
#
line
191
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
Write
(
Html
.
Paginator
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
192
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n"
);
#
line
194
"..\..\Dashboard\Pages\RecurringJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n</div> "
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/RetriesPage.cshtml
deleted
100644 → 0
View file @
fc50d995
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using System.Collections.Generic
@using Hangfire.Common
@using Hangfire.Dashboard
@using Hangfire.Dashboard.Pages
@using Hangfire.Dashboard.Resources
@using Hangfire.Storage
@inherits RazorPage
@{
Layout = new LayoutPage(Strings.RetriesPage_Title);
int from, perPage;
int.TryParse(Query("from"), out from);
int.TryParse(Query("count"), out perPage);
Pager pager = null;
List<string> jobIds = null;
using (var connection = Storage.GetConnection())
{
var storageConnection = connection as JobStorageConnection;
if (storageConnection != null)
{
pager = new Pager(@from, perPage, storageConnection.GetSetCount("retries"));
jobIds = storageConnection.GetRangeFromSet("retries", pager.FromRecord, pager.FromRecord + pager.RecordsPerPage - 1);
}
}
}
@if (pager == null)
{
<div class="alert alert-warning">
@Html.Raw(String.Format(Strings.RetriesPage_Warning_Html, Url.To("/jobs/scheduled")))
</div>
}
else
{
<div class="row">
<div class="col-md-12">
<h1 class="page-header">@Strings.RetriesPage_Title</h1>
@if (jobIds.Count == 0)
{
<div class="alert alert-success">
@Strings.RetriesPage_NoJobs
</div>
}
else
{
<div class="js-jobs-list">
<div class="btn-toolbar btn-toolbar-top">
<button class="js-jobs-list-command btn btn-sm btn-primary"
data-url="@Url.To("/jobs/scheduled/enqueue")"
data-loading-text="@Strings.Common_Enqueueing"
disabled="disabled">
<span class="glyphicon glyphicon-repeat"></span>
@Strings.Common_EnqueueButton_Text
</button>
<button class="js-jobs-list-command btn btn-sm btn-default"
data-url="@Url.To("/jobs/scheduled/delete")"
data-loading-text="@Strings.Common_Deleting"
data-confirm="@Strings.Common_DeleteConfirm"
disabled="disabled">
<span class="glyphicon glyphicon-remove"></span>
@Strings.Common_DeleteSelected
</button>
@Html.PerPageSelector(pager)
</div>
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th class="min-width">
<input type="checkbox" class="js-jobs-list-select-all" />
</th>
<th class="min-width">@Strings.Common_Id</th>
<th class="min-width">@Strings.Common_State</th>
<th>@Strings.Common_Job</th>
<th>@Strings.Common_Reason</th>
<th class="align-right">@Strings.Common_Retry</th>
<th class="align-right">@Strings.Common_Created</th>
</tr>
</thead>
<tbody>
@foreach (var jobId in jobIds)
{
JobData jobData;
StateData stateData;
using (var connection = Storage.GetConnection())
{
jobData = connection.GetJobData(jobId);
stateData = connection.GetStateData(jobId);
}
<tr class="js-jobs-list-row @(jobData != null ? "hover" : null)">
<td>
<input type="checkbox" class="js-jobs-list-checkbox" name="jobs[]" value="@jobId" />
</td>
<td class="min-width">
@Html.JobIdLink(jobId)
</td>
@if (jobData == null)
{
<td colspan="5"><em>Job expired.</em></td>
}
else
{
<td class="min-width">
@Html.StateLabel(jobData.State)
</td>
<td class="word-break">
@Html.JobNameLink(jobId, jobData.Job)
</td>
<td>
@(stateData?.Reason)
</td>
<td class="align-right">
@if (stateData != null && stateData.Data.ContainsKey("EnqueueAt"))
{
@Html.RelativeTime(JobHelper.DeserializeDateTime(stateData.Data["EnqueueAt"]))
}
</td>
<td class="align-right">
@Html.RelativeTime(jobData.CreatedAt)
</td>
}
</tr>
}
</tbody>
</table>
</div>
@Html.Paginator(pager)
</div>
}
</div>
</div>
}
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/Views/RetriesPage.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
using
System
;
#
line
2
"..\..\Dashboard\Pages\RetriesPage.cshtml"
using
System.Collections.Generic
;
#
line
default
#
line
hidden
using
System.Linq
;
using
System.Text
;
#
line
3
"..\..\Dashboard\Pages\RetriesPage.cshtml"
using
Hangfire.Common
;
#
line
default
#
line
hidden
#
line
4
"..\..\Dashboard\Pages\RetriesPage.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
#
line
5
"..\..\Dashboard\Pages\RetriesPage.cshtml"
using
Hangfire.Dashboard.Pages
;
#
line
default
#
line
hidden
#
line
6
"..\..\Dashboard\Pages\RetriesPage.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
#
line
7
"..\..\Dashboard\Pages\RetriesPage.cshtml"
using
Hangfire.Storage
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
RetriesPage
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
#
line
9
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
RetriesPage_Title
);
int
from
,
perPage
;
int
.
TryParse
(
Query
(
"from"
),
out
from
);
int
.
TryParse
(
Query
(
"count"
),
out
perPage
);
Pager
pager
=
null
;
List
<
string
>
jobIds
=
null
;
using
(
var
connection
=
Storage
.
GetConnection
())
{
var
storageConnection
=
connection
as
JobStorageConnection
;
if
(
storageConnection
!=
null
)
{
pager
=
new
Pager
(
@from
,
perPage
,
storageConnection
.
GetSetCount
(
"retries"
));
jobIds
=
storageConnection
.
GetRangeFromSet
(
"retries"
,
pager
.
FromRecord
,
pager
.
FromRecord
+
pager
.
RecordsPerPage
-
1
);
}
}
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
32
"..\..\Dashboard\Pages\RetriesPage.cshtml"
if
(
pager
==
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-warning\">\r\n "
);
#
line
35
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Html
.
Raw
(
String
.
Format
(
Strings
.
RetriesPage_Warning_Html
,
Url
.
To
(
"/jobs/scheduled"
))));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
37
"..\..\Dashboard\Pages\RetriesPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <h1 class=\"pa"
+
"ge-header\">"
);
#
line
42
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Strings
.
RetriesPage_Title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</h1>\r\n"
);
#
line
43
"..\..\Dashboard\Pages\RetriesPage.cshtml"
if
(
jobIds
.
Count
==
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-success\">\r\n "
);
#
line
46
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Strings
.
RetriesPage_NoJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
48
"..\..\Dashboard\Pages\RetriesPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"js-jobs-list\">\r\n <div class=\"btn-t"
+
"oolbar btn-toolbar-top\">\r\n <button class=\"js-jobs-list-co"
+
"mmand btn btn-sm btn-primary\"\r\n data-url=\""
);
#
line
54
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Url
.
To
(
"/jobs/scheduled/enqueue"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
55
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Strings
.
Common_Enqueueing
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n "
+
" <span class=\"glyphicon glyphicon-repeat\"></span>\r\n "
+
" "
);
#
line
58
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Strings
.
Common_EnqueueButton_Text
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n <button class=\"js-"
+
"jobs-list-command btn btn-sm btn-default\"\r\n data-"
+
"url=\""
);
#
line
62
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Url
.
To
(
"/jobs/scheduled/delete"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
63
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Strings
.
Common_Deleting
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-confirm=\""
);
#
line
64
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Strings
.
Common_DeleteConfirm
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n "
+
" <span class=\"glyphicon glyphicon-remove\"></span>\r\n "
+
" "
);
#
line
67
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Strings
.
Common_DeleteSelected
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n "
);
#
line
70
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Html
.
PerPageSelector
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
@"
</div>
<div class=""table-responsive"">
<table class=""table table-hover"">
<thead>
<tr>
<th class=""min-width"">
<input type=""checkbox"" class=""js-jobs-list-select-all"" />
</th>
<th class=""min-width"">"
);
#
line
80
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Strings
.
Common_Id
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"min-width\">"
);
#
line
81
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Strings
.
Common_State
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
82
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Strings
.
Common_Job
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
83
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Strings
.
Common_Reason
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"align-right\">"
);
#
line
84
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Strings
.
Common_Retry
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"align-right\">"
);
#
line
85
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Strings
.
Common_Created
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead"
+
">\r\n <tbody>\r\n"
);
#
line
89
"..\..\Dashboard\Pages\RetriesPage.cshtml"
foreach
(
var
jobId
in
jobIds
)
{
JobData
jobData
;
StateData
stateData
;
using
(
var
connection
=
Storage
.
GetConnection
())
{
jobData
=
connection
.
GetJobData
(
jobId
);
stateData
=
connection
.
GetStateData
(
jobId
);
}
#
line
default
#
line
hidden
WriteLiteral
(
" <tr class=\"js-jobs-list-row "
);
#
line
100
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
jobData
!=
null
?
"hover"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <td>\r\n "
+
" <input type=\"checkbox\" class=\"js-jobs-list-checkbox\" name=\"jobs[]\" "
+
"value=\""
);
#
line
102
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
jobId
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" />\r\n </td>\r\n "
+
" <td class=\"min-width\">\r\n "
+
""
);
#
line
105
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Html
.
JobIdLink
(
jobId
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
#
line
107
"..\..\Dashboard\Pages\RetriesPage.cshtml"
if
(
jobData
==
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td colspan=\"5\"><em>Job expired.</em>"
+
"</td>\r\n"
);
#
line
110
"..\..\Dashboard\Pages\RetriesPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td class=\"min-width\">\r\n "
+
" "
);
#
line
114
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Html
.
StateLabel
(
jobData
.
State
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
WriteLiteral
(
" <td class=\"word-break\">\r\n "
+
" "
);
#
line
117
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Html
.
JobNameLink
(
jobId
,
jobData
.
Job
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
WriteLiteral
(
" <td>\r\n "
+
" "
);
#
line
120
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
stateData
?.
Reason
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
WriteLiteral
(
" <td class=\"align-right\">\r\n"
);
#
line
123
"..\..\Dashboard\Pages\RetriesPage.cshtml"
if
(
stateData
!=
null
&&
stateData
.
Data
.
ContainsKey
(
"EnqueueAt"
))
{
#
line
default
#
line
hidden
#
line
125
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Html
.
RelativeTime
(
JobHelper
.
DeserializeDateTime
(
stateData
.
Data
[
"EnqueueAt"
])));
#
line
default
#
line
hidden
#
line
125
"..\..\Dashboard\Pages\RetriesPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n"
);
WriteLiteral
(
" <td class=\"align-right\">\r\n "
+
" "
);
#
line
129
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Html
.
RelativeTime
(
jobData
.
CreatedAt
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
#
line
131
"..\..\Dashboard\Pages\RetriesPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tr>\r\n"
);
#
line
133
"..\..\Dashboard\Pages\RetriesPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n "
+
" </div>\r\n\r\n "
);
#
line
138
"..\..\Dashboard\Pages\RetriesPage.cshtml"
Write
(
Html
.
Paginator
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
140
"..\..\Dashboard\Pages\RetriesPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n </div>\r\n"
);
#
line
143
"..\..\Dashboard\Pages\RetriesPage.cshtml"
}
#
line
default
#
line
hidden
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/ScheduledJobsPage.cshtml
deleted
100644 → 0
View file @
fc50d995
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using Hangfire.Dashboard
@using Hangfire.Dashboard.Pages
@using Hangfire.Dashboard.Resources
@inherits RazorPage
@{
Layout = new LayoutPage(Strings.ScheduledJobsPage_Title);
int from, perPage;
int.TryParse(Query("from"), out from);
int.TryParse(Query("count"), out perPage);
var monitor = Storage.GetMonitoringApi();
var pager = new Pager(from, perPage, monitor.ScheduledCount());
var scheduledJobs = monitor.ScheduledJobs(pager.FromRecord, pager.RecordsPerPage);
}
<div class="row">
<div class="col-md-3">
@Html.JobsSidebar()
</div>
<div class="col-md-9">
<h1 class="page-header">@Strings.ScheduledJobsPage_Title</h1>
@if (pager.TotalPageCount == 0)
{
<div class="alert alert-info">
@Strings.ScheduledJobsPage_NoJobs
</div>
}
else
{
<div class="js-jobs-list">
<div class="btn-toolbar btn-toolbar-top">
<button class="js-jobs-list-command btn btn-sm btn-primary"
data-url="@Url.To("/jobs/scheduled/enqueue")"
data-loading-text="@Strings.Common_Enqueueing"
disabled="disabled">
<span class="glyphicon glyphicon-play"></span>
@Strings.ScheduledJobsPage_EnqueueNow
</button>
<button class="js-jobs-list-command btn btn-sm btn-default"
data-url="@Url.To("/jobs/scheduled/delete")"
data-loading-text="@Strings.Common_Deleting"
data-confirm="@Strings.Common_DeleteConfirm"
disabled="disabled">
<span class="glyphicon glyphicon-remove"></span>
@Strings.Common_DeleteSelected
</button>
@Html.PerPageSelector(pager)
</div>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th class="min-width">
<input type="checkbox" class="js-jobs-list-select-all" />
</th>
<th class="min-width">@Strings.Common_Id</th>
<th>@Strings.ScheduledJobsPage_Table_Enqueue</th>
<th>@Strings.Common_Job</th>
<th class="align-right">@Strings.ScheduledJobsPage_Table_Scheduled</th>
</tr>
</thead>
@foreach (var job in scheduledJobs)
{
<tr class="js-jobs-list-row @(!job.Value.InScheduledState ? "obsolete-data" : null) @(job.Value.InScheduledState ? "hover" : null)">
<td>
@if (job.Value.InScheduledState)
{
<input type="checkbox" class="js-jobs-list-checkbox" name="jobs[]" value="@job.Key" />
}
</td>
<td class="min-width">
@Html.JobIdLink(job.Key)
@if (!job.Value.InScheduledState)
{
<span title="@Strings.Common_JobStateChanged_Text" class="glyphicon glyphicon-question-sign"></span>
}
</td>
<td class="min-width">
@Html.RelativeTime(job.Value.EnqueueAt)
</td>
<td class="word-break">
@Html.JobNameLink(job.Key, job.Value.Job)
</td>
<td class="align-right">
@if (job.Value.ScheduledAt.HasValue)
{
@Html.RelativeTime(job.Value.ScheduledAt.Value)
}
</td>
</tr>
}
</table>
</div>
@Html.Paginator(pager)
</div>
}
</div>
</div>
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/Views/ScheduledJobsPage.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
#
line
2
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
#
line
3
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
using
Hangfire.Dashboard.Pages
;
#
line
default
#
line
hidden
#
line
4
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
ScheduledJobsPage
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
#
line
6
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
ScheduledJobsPage_Title
);
int
from
,
perPage
;
int
.
TryParse
(
Query
(
"from"
),
out
from
);
int
.
TryParse
(
Query
(
"count"
),
out
perPage
);
var
monitor
=
Storage
.
GetMonitoringApi
();
var
pager
=
new
Pager
(
from
,
perPage
,
monitor
.
ScheduledCount
());
var
scheduledJobs
=
monitor
.
ScheduledJobs
(
pager
.
FromRecord
,
pager
.
RecordsPerPage
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-3\">\r\n "
);
#
line
21
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Html
.
JobsSidebar
());
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n <div class=\"col-md-9\">\r\n <h1 class=\"page-header\">"
);
#
line
24
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Strings
.
ScheduledJobsPage_Title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</h1>\r\n\r\n"
);
#
line
26
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
if
(
pager
.
TotalPageCount
==
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-info\">\r\n "
);
#
line
29
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Strings
.
ScheduledJobsPage_NoJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
31
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"js-jobs-list\">\r\n <div class=\"btn-toolbar b"
+
"tn-toolbar-top\">\r\n <button class=\"js-jobs-list-command btn bt"
+
"n-sm btn-primary\"\r\n data-url=\""
);
#
line
37
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Url
.
To
(
"/jobs/scheduled/enqueue"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
38
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Strings
.
Common_Enqueueing
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <spa"
+
"n class=\"glyphicon glyphicon-play\"></span>\r\n "
);
#
line
41
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Strings
.
ScheduledJobsPage_EnqueueNow
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n <button class=\"js-jobs-lis"
+
"t-command btn btn-sm btn-default\"\r\n data-url=\""
);
#
line
45
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Url
.
To
(
"/jobs/scheduled/delete"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
46
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Strings
.
Common_Deleting
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-confirm=\""
);
#
line
47
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Strings
.
Common_DeleteConfirm
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <spa"
+
"n class=\"glyphicon glyphicon-remove\"></span>\r\n "
);
#
line
50
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Strings
.
Common_DeleteSelected
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n "
);
#
line
53
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Html
.
PerPageSelector
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
@"
</div>
<div class=""table-responsive"">
<table class=""table"">
<thead>
<tr>
<th class=""min-width"">
<input type=""checkbox"" class=""js-jobs-list-select-all"" />
</th>
<th class=""min-width"">"
);
#
line
63
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Strings
.
Common_Id
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
64
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Strings
.
ScheduledJobsPage_Table_Enqueue
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
65
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Strings
.
Common_Job
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"align-right\">"
);
#
line
66
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Strings
.
ScheduledJobsPage_Table_Scheduled
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n"
);
#
line
69
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
foreach
(
var
job
in
scheduledJobs
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <tr class=\"js-jobs-list-row "
);
#
line
71
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(!
job
.
Value
.
InScheduledState
?
"obsolete-data"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
" "
);
#
line
71
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
job
.
Value
.
InScheduledState
?
"hover"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <td>\r\n"
);
#
line
73
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
if
(
job
.
Value
.
InScheduledState
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <input type=\"checkbox\" class=\"js-jobs-lis"
+
"t-checkbox\" name=\"jobs[]\" value=\""
);
#
line
75
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
job
.
Key
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" />\r\n"
);
#
line
76
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <td class="
+
"\"min-width\">\r\n "
);
#
line
79
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Html
.
JobIdLink
(
job
.
Key
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
80
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
if
(!
job
.
Value
.
InScheduledState
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <span title=\""
);
#
line
82
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Strings
.
Common_JobStateChanged_Text
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" class=\"glyphicon glyphicon-question-sign\"></span>\r\n"
);
#
line
83
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <td class="
+
"\"min-width\">\r\n "
);
#
line
86
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Html
.
RelativeTime
(
job
.
Value
.
EnqueueAt
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n <td clas"
+
"s=\"word-break\">\r\n "
);
#
line
89
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Html
.
JobNameLink
(
job
.
Key
,
job
.
Value
.
Job
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n <td clas"
+
"s=\"align-right\">\r\n"
);
#
line
92
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
if
(
job
.
Value
.
ScheduledAt
.
HasValue
)
{
#
line
default
#
line
hidden
#
line
94
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Html
.
RelativeTime
(
job
.
Value
.
ScheduledAt
.
Value
));
#
line
default
#
line
hidden
#
line
94
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n </tr>\r\n"
);
#
line
98
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </table>\r\n </div>\r\n\r\n "
);
#
line
102
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
Write
(
Html
.
Paginator
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
104
"..\..\Dashboard\Pages\ScheduledJobsPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n</div>"
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/ServersPage.cshtml
deleted
100644 → 0
View file @
fc50d995
@* Generator: Template TypeVisibility: Internal GeneratePrettyNames: True *@
@using System
@using System.Linq
@using Hangfire.Common
@using Hangfire.Dashboard
@using Hangfire.Dashboard.Pages
@using Hangfire.Dashboard.Resources
@inherits RazorPage
@{
Layout = new LayoutPage(Strings.ServersPage_Title);
var monitor = Storage.GetMonitoringApi();
var servers = monitor.Servers();
}
<div class="row">
<div class="col-md-12">
<h1 class="page-header">@Strings.ServersPage_Title</h1>
@if (servers.Count == 0)
{
<div class="alert alert-warning">
@Strings.ServersPage_NoServers
</div>
}
else
{
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>@Strings.ServersPage_Table_Name</th>
<th>@Strings.ServersPage_Table_Workers</th>
<th>@Strings.ServersPage_Table_Queues</th>
<th>@Strings.ServersPage_Table_Started</th>
<th>@Strings.ServersPage_Table_Heartbeat</th>
</tr>
</thead>
<tbody>
@foreach (var server in servers)
{
<tr>
<td>@Html.ServerId(server.Name)</td>
<td>@server.WorkersCount</td>
<td>@Html.Raw(String.Join(", ", server.Queues.Select(Html.QueueLabel)))</td>
<td data-moment="@JobHelper.ToTimestamp(server.StartedAt)">@server.StartedAt</td>
<td>
@if (server.Heartbeat.HasValue)
{
@Html.RelativeTime(server.Heartbeat.Value)
}
</td>
</tr>
}
</tbody>
</table>
</div>
}
</div>
</div>
\ No newline at end of file
src/DotNetCore.CAP/Dashboard/Views/ServersPage.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
#
line
2
"..\..\Dashboard\Pages\ServersPage.cshtml"
using
System
;
#
line
default
#
line
hidden
using
System.Collections.Generic
;
#
line
3
"..\..\Dashboard\Pages\ServersPage.cshtml"
using
System.Linq
;
#
line
default
#
line
hidden
using
System.Text
;
#
line
4
"..\..\Dashboard\Pages\ServersPage.cshtml"
using
Hangfire.Common
;
#
line
default
#
line
hidden
#
line
5
"..\..\Dashboard\Pages\ServersPage.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
#
line
6
"..\..\Dashboard\Pages\ServersPage.cshtml"
using
Hangfire.Dashboard.Pages
;
#
line
default
#
line
hidden
#
line
7
"..\..\Dashboard\Pages\ServersPage.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
ServersPage
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
#
line
9
"..\..\Dashboard\Pages\ServersPage.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
ServersPage_Title
);
var
monitor
=
Storage
.
GetMonitoringApi
();
var
servers
=
monitor
.
Servers
();
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <h1 class=\"page-header\""
+
">"
);
#
line
18
"..\..\Dashboard\Pages\ServersPage.cshtml"
Write
(
Strings
.
ServersPage_Title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</h1>\r\n\r\n"
);
#
line
20
"..\..\Dashboard\Pages\ServersPage.cshtml"
if
(
servers
.
Count
==
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-warning\">\r\n "
);
#
line
23
"..\..\Dashboard\Pages\ServersPage.cshtml"
Write
(
Strings
.
ServersPage_NoServers
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
25
"..\..\Dashboard\Pages\ServersPage.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"table-responsive\">\r\n <table class=\"table\">"
+
"\r\n <thead>\r\n <tr>\r\n "
+
" <th>"
);
#
line
32
"..\..\Dashboard\Pages\ServersPage.cshtml"
Write
(
Strings
.
ServersPage_Table_Name
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
33
"..\..\Dashboard\Pages\ServersPage.cshtml"
Write
(
Strings
.
ServersPage_Table_Workers
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
34
"..\..\Dashboard\Pages\ServersPage.cshtml"
Write
(
Strings
.
ServersPage_Table_Queues
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
35
"..\..\Dashboard\Pages\ServersPage.cshtml"
Write
(
Strings
.
ServersPage_Table_Started
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
36
"..\..\Dashboard\Pages\ServersPage.cshtml"
Write
(
Strings
.
ServersPage_Table_Heartbeat
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n "
+
" <tbody>\r\n"
);
#
line
40
"..\..\Dashboard\Pages\ServersPage.cshtml"
foreach
(
var
server
in
servers
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <tr>\r\n <td>"
);
#
line
43
"..\..\Dashboard\Pages\ServersPage.cshtml"
Write
(
Html
.
ServerId
(
server
.
Name
));
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n <td>"
);
#
line
44
"..\..\Dashboard\Pages\ServersPage.cshtml"
Write
(
server
.
WorkersCount
);
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n <td>"
);
#
line
45
"..\..\Dashboard\Pages\ServersPage.cshtml"
Write
(
Html
.
Raw
(
String
.
Join
(
", "
,
server
.
Queues
.
Select
(
Html
.
QueueLabel
))));
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n <td data-moment=\""
);
#
line
46
"..\..\Dashboard\Pages\ServersPage.cshtml"
Write
(
JobHelper
.
ToTimestamp
(
server
.
StartedAt
));
#
line
default
#
line
hidden
WriteLiteral
(
"\">"
);
#
line
46
"..\..\Dashboard\Pages\ServersPage.cshtml"
Write
(
server
.
StartedAt
);
#
line
default
#
line
hidden
WriteLiteral
(
"</td>\r\n <td>\r\n"
);
#
line
48
"..\..\Dashboard\Pages\ServersPage.cshtml"
if
(
server
.
Heartbeat
.
HasValue
)
{
#
line
default
#
line
hidden
#
line
50
"..\..\Dashboard\Pages\ServersPage.cshtml"
Write
(
Html
.
RelativeTime
(
server
.
Heartbeat
.
Value
));
#
line
default
#
line
hidden
#
line
50
"..\..\Dashboard\Pages\ServersPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n </tr>\r\n"
);
#
line
54
"..\..\Dashboard\Pages\ServersPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n </div>\r\n"
);
#
line
58
"..\..\Dashboard\Pages\ServersPage.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n</div>"
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/SidebarMenu.cs
deleted
100644 → 0
View file @
fc50d995
// This file is part of Hangfire.
// Copyright © 2015 Sergey Odinokov.
//
// Hangfire is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3
// of the License, or any later version.
//
// Hangfire is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with Hangfire. If not, see <http://www.gnu.org/licenses/>.
using
System
;
using
System.Collections.Generic
;
using
Hangfire.Annotations
;
namespace
Hangfire.Dashboard.Pages
{
partial
class
SidebarMenu
{
public
SidebarMenu
([
NotNull
]
IEnumerable
<
Func
<
RazorPage
,
MenuItem
>>
items
)
{
if
(
items
==
null
)
throw
new
ArgumentNullException
(
nameof
(
items
));
Items
=
items
;
}
public
IEnumerable
<
Func
<
RazorPage
,
MenuItem
>>
Items
{
get
;
}
}
}
src/DotNetCore.CAP/Dashboard/Views/SucceededJobs1.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
#
line
2
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
using
System
;
#
line
default
#
line
hidden
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
#
line
3
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
#
line
4
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
using
Hangfire.Dashboard.Pages
;
#
line
default
#
line
hidden
#
line
5
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
SucceededJobs
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
#
line
7
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Layout
=
new
LayoutPage
(
Strings
.
SucceededJobsPage_Title
);
int
from
,
perPage
;
int
.
TryParse
(
Query
(
"from"
),
out
from
);
int
.
TryParse
(
Query
(
"count"
),
out
perPage
);
var
monitor
=
Storage
.
GetMonitoringApi
();
var
pager
=
new
Pager
(
from
,
perPage
,
monitor
.
SucceededListCount
());
var
succeededJobs
=
monitor
.
SucceededJobs
(
pager
.
FromRecord
,
pager
.
RecordsPerPage
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n<div class=\"row\">\r\n <div class=\"col-md-3\">\r\n "
);
#
line
22
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Html
.
JobsSidebar
());
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n <div class=\"col-md-9\">\r\n <h1 class=\"page-header\">"
);
#
line
25
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Strings
.
SucceededJobsPage_Title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</h1>\r\n\r\n"
);
#
line
27
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
if
(
pager
.
TotalPageCount
==
0
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"alert alert-info\">\r\n "
);
#
line
30
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Strings
.
SucceededJobsPage_NoJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
32
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"js-jobs-list\">\r\n <div class=\"btn-toolbar b"
+
"tn-toolbar-top\">\r\n <button class=\"js-jobs-list-command btn bt"
+
"n-sm btn-primary\"\r\n data-url=\""
);
#
line
38
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Url
.
To
(
"/jobs/succeeded/requeue"
));
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n data-loading-text=\""
);
#
line
39
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Strings
.
Common_Enqueueing
);
#
line
default
#
line
hidden
WriteLiteral
(
"\"\r\n disabled=\"disabled\">\r\n <spa"
+
"n class=\"glyphicon glyphicon-repeat\"></span>\r\n "
);
#
line
42
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Strings
.
Common_RequeueJobs
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </button>\r\n\r\n "
);
#
line
45
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Html
.
PerPageSelector
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
@"
</div>
<div class=""table-responsive"">
<table class=""table"">
<thead>
<tr>
<th class=""min-width"">
<input type=""checkbox"" class=""js-jobs-list-select-all"" />
</th>
<th class=""min-width"">"
);
#
line
55
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Strings
.
Common_Id
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th>"
);
#
line
56
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Strings
.
Common_Job
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"min-width\">"
);
#
line
57
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Strings
.
SucceededJobsPage_Table_TotalDuration
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n <th class=\"align-right\">"
);
#
line
58
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Strings
.
SucceededJobsPage_Table_Succeeded
);
#
line
default
#
line
hidden
WriteLiteral
(
"</th>\r\n </tr>\r\n </thead>\r\n "
+
" <tbody>\r\n"
);
#
line
62
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
foreach
(
var
job
in
succeededJobs
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <tr class=\"js-jobs-list-row "
);
#
line
64
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
job
.
Value
==
null
||
!
job
.
Value
.
InSucceededState
?
"obsolete-data"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
" "
);
#
line
64
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
job
.
Value
!=
null
&&
job
.
Value
.
InSucceededState
?
"hover"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n <td>\r\n"
);
#
line
66
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
if
(
job
.
Value
==
null
||
job
.
Value
.
InSucceededState
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <input type=\"checkbox\" class=\"js-jobs"
+
"-list-checkbox\" name=\"jobs[]\" value=\""
);
#
line
68
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
job
.
Key
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" />\r\n"
);
#
line
69
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n <t"
+
"d class=\"min-width\">\r\n "
);
#
line
72
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Html
.
JobIdLink
(
job
.
Key
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n"
);
#
line
73
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
if
(
job
.
Value
!=
null
&&
!
job
.
Value
.
InSucceededState
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <span title=\""
);
#
line
75
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Strings
.
Common_JobStateChanged_Text
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" class=\"glyphicon glyphicon-question-sign\"></span>\r\n"
);
#
line
76
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n\r\n"
);
#
line
79
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
if
(
job
.
Value
==
null
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td colspan=\"3\">\r\n "
+
" <em>"
);
#
line
82
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Strings
.
Common_JobExpired
);
#
line
default
#
line
hidden
WriteLiteral
(
"</em>\r\n </td>\r\n"
);
#
line
84
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
}
else
{
#
line
default
#
line
hidden
WriteLiteral
(
" <td class=\"word-break\">\r\n "
+
" "
);
#
line
88
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Html
.
JobNameLink
(
job
.
Key
,
job
.
Value
.
Job
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </td>\r\n"
);
WriteLiteral
(
" <td class=\"min-width align-right\">\r\n"
);
#
line
91
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
if
(
job
.
Value
.
TotalDuration
.
HasValue
)
{
#
line
default
#
line
hidden
#
line
93
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Html
.
ToHumanDuration
(
TimeSpan
.
FromMilliseconds
(
job
.
Value
.
TotalDuration
.
Value
),
false
));
#
line
default
#
line
hidden
#
line
93
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n"
);
WriteLiteral
(
" <td class=\"min-width align-right\">\r\n"
);
#
line
97
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
if
(
job
.
Value
.
SucceededAt
.
HasValue
)
{
#
line
default
#
line
hidden
#
line
99
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Html
.
RelativeTime
(
job
.
Value
.
SucceededAt
.
Value
));
#
line
default
#
line
hidden
#
line
99
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </td>\r\n"
);
#
line
102
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tr>\r\n"
);
#
line
104
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </tbody>\r\n </table>\r\n <"
+
"/div>\r\n\r\n "
);
#
line
109
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
Write
(
Html
.
Paginator
(
pager
));
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n"
);
#
line
111
"..\..\Dashboard\Pages\SucceededJobs.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n</div>"
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/_Breadcrumbs.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
#
line
2
"..\..\Dashboard\Pages\_Breadcrumbs.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
Breadcrumbs
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"\r\n<ol class=\"breadcrumb\">\r\n <li><a href=\""
);
#
line
6
"..\..\Dashboard\Pages\_Breadcrumbs.cshtml"
Write
(
Url
.
Home
());
#
line
default
#
line
hidden
WriteLiteral
(
"\"><span class=\"glyphicon glyphicon-home\"></span></a></li>\r\n"
);
#
line
7
"..\..\Dashboard\Pages\_Breadcrumbs.cshtml"
foreach
(
var
item
in
Items
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <li><a href=\""
);
#
line
9
"..\..\Dashboard\Pages\_Breadcrumbs.cshtml"
Write
(
item
.
Value
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">"
);
#
line
9
"..\..\Dashboard\Pages\_Breadcrumbs.cshtml"
Write
(
item
.
Key
);
#
line
default
#
line
hidden
WriteLiteral
(
"</a></li>\r\n"
);
#
line
10
"..\..\Dashboard\Pages\_Breadcrumbs.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" <li class=\"active\">"
);
#
line
11
"..\..\Dashboard\Pages\_Breadcrumbs.cshtml"
Write
(
Title
);
#
line
default
#
line
hidden
WriteLiteral
(
"</li>\r\n</ol>"
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/_Paginator.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
#
line
2
"..\..\Dashboard\Pages\_Paginator.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
#
line
3
"..\..\Dashboard\Pages\_Paginator.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
Paginator
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"<div class=\"btn-toolbar\">\r\n"
);
#
line
7
"..\..\Dashboard\Pages\_Paginator.cshtml"
if
(
_pager
.
TotalPageCount
>
1
)
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div class=\"btn-group paginator\">\r\n"
);
#
line
10
"..\..\Dashboard\Pages\_Paginator.cshtml"
foreach
(
var
page
in
_pager
.
PagerItems
)
{
switch
(
page
.
Type
)
{
case
Pager
.
ItemType
.
Page
:
#
line
default
#
line
hidden
WriteLiteral
(
" <a href=\""
);
#
line
15
"..\..\Dashboard\Pages\_Paginator.cshtml"
Write
(
_pager
.
PageUrl
(
page
.
PageIndex
));
#
line
default
#
line
hidden
WriteLiteral
(
"\" class=\"btn btn-default "
);
#
line
15
"..\..\Dashboard\Pages\_Paginator.cshtml"
Write
(
_pager
.
CurrentPage
==
page
.
PageIndex
?
"active"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n "
);
#
line
16
"..\..\Dashboard\Pages\_Paginator.cshtml"
Write
(
page
.
PageIndex
);
#
line
default
#
line
hidden
WriteLiteral
(
" \r\n </a>\r\n"
);
#
line
18
"..\..\Dashboard\Pages\_Paginator.cshtml"
break
;
case
Pager
.
ItemType
.
NextPage
:
#
line
default
#
line
hidden
WriteLiteral
(
" <a href=\""
);
#
line
20
"..\..\Dashboard\Pages\_Paginator.cshtml"
Write
(
_pager
.
PageUrl
(
page
.
PageIndex
));
#
line
default
#
line
hidden
WriteLiteral
(
"\" class=\"btn btn-default "
);
#
line
20
"..\..\Dashboard\Pages\_Paginator.cshtml"
Write
(
page
.
Disabled
?
"disabled"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n "
);
#
line
21
"..\..\Dashboard\Pages\_Paginator.cshtml"
Write
(
Strings
.
Paginator_Next
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </a>\r\n"
);
#
line
23
"..\..\Dashboard\Pages\_Paginator.cshtml"
break
;
case
Pager
.
ItemType
.
PrevPage
:
#
line
default
#
line
hidden
WriteLiteral
(
" <a href=\""
);
#
line
25
"..\..\Dashboard\Pages\_Paginator.cshtml"
Write
(
_pager
.
PageUrl
(
page
.
PageIndex
));
#
line
default
#
line
hidden
WriteLiteral
(
"\" class=\"btn btn-default "
);
#
line
25
"..\..\Dashboard\Pages\_Paginator.cshtml"
Write
(
page
.
Disabled
?
"disabled"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n "
);
#
line
26
"..\..\Dashboard\Pages\_Paginator.cshtml"
Write
(
Strings
.
Paginator_Prev
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </a>\r\n"
);
#
line
28
"..\..\Dashboard\Pages\_Paginator.cshtml"
break
;
case
Pager
.
ItemType
.
MorePage
:
#
line
default
#
line
hidden
WriteLiteral
(
" <a href=\"#\" class=\"btn btn-default disabled\">\r\n "
+
" …\r\n </a>\r\n"
);
#
line
33
"..\..\Dashboard\Pages\_Paginator.cshtml"
break
;
}
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n"
);
WriteLiteral
(
" <div class=\"btn-toolbar-spacer\"></div>\r\n"
);
#
line
38
"..\..\Dashboard\Pages\_Paginator.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n <div class=\"btn-toolbar-label\">\r\n "
);
#
line
41
"..\..\Dashboard\Pages\_Paginator.cshtml"
Write
(
Strings
.
Paginator_TotalItems
);
#
line
default
#
line
hidden
WriteLiteral
(
": "
);
#
line
41
"..\..\Dashboard\Pages\_Paginator.cshtml"
Write
(
_pager
.
TotalRecordCount
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n </div>\r\n</div>\r\n"
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/_PerPageSelector.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
#
line
2
"..\..\Dashboard\Pages\_PerPageSelector.cshtml"
using
Hangfire.Dashboard.Resources
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
PerPageSelector
:
Hangfire
.
Dashboard
.
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
WriteLiteral
(
"\r\n <div class=\"btn-group pull-right paginator\">\r\n"
);
#
line
6
"..\..\Dashboard\Pages\_PerPageSelector.cshtml"
foreach
(
var
count
in
new
[]
{
10
,
20
,
50
,
100
,
500
})
{
#
line
default
#
line
hidden
WriteLiteral
(
" <a class=\"btn btn-sm btn-default "
);
#
line
8
"..\..\Dashboard\Pages\_PerPageSelector.cshtml"
Write
(
count
==
_pager
.
RecordsPerPage
?
"active"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" \r\n href=\""
);
#
line
9
"..\..\Dashboard\Pages\_PerPageSelector.cshtml"
Write
(
_pager
.
RecordsPerPageUrl
(
count
));
#
line
default
#
line
hidden
WriteLiteral
(
"\">"
);
#
line
9
"..\..\Dashboard\Pages\_PerPageSelector.cshtml"
Write
(
count
);
#
line
default
#
line
hidden
WriteLiteral
(
"</a> \r\n"
);
#
line
10
"..\..\Dashboard\Pages\_PerPageSelector.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n <div class=\"btn-toolbar-spacer pull-right\"></div>\r\n <div class"
+
"=\"btn-toolbar-label btn-toolbar-label-sm pull-right\">\r\n "
);
#
line
14
"..\..\Dashboard\Pages\_PerPageSelector.cshtml"
Write
(
Strings
.
PerPageSelector_ItemsPerPage
);
#
line
default
#
line
hidden
WriteLiteral
(
":\r\n </div>\r\n"
);
}
}
}
#pragma warning restore 1591
src/DotNetCore.CAP/Dashboard/Views/_SidebarMenu.generated.cs
deleted
100644 → 0
View file @
fc50d995
#
pragma
warning
disable
1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace
Hangfire.Dashboard.Pages
{
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
#
line
2
"..\..\Dashboard\Pages\_SidebarMenu.cshtml"
using
Hangfire.Dashboard
;
#
line
default
#
line
hidden
[
System
.
CodeDom
.
Compiler
.
GeneratedCodeAttribute
(
"RazorGenerator"
,
"2.0.0.0"
)]
internal
partial
class
SidebarMenu
:
RazorPage
{
#line hidden
public
override
void
Execute
()
{
WriteLiteral
(
"\r\n"
);
#
line
4
"..\..\Dashboard\Pages\_SidebarMenu.cshtml"
if
(
Items
.
Any
())
{
#
line
default
#
line
hidden
WriteLiteral
(
" <div id=\"stats\" class=\"list-group\">\r\n"
);
#
line
7
"..\..\Dashboard\Pages\_SidebarMenu.cshtml"
foreach
(
var
item
in
Items
)
{
var
itemValue
=
item
(
this
);
#
line
default
#
line
hidden
WriteLiteral
(
" <a href=\""
);
#
line
10
"..\..\Dashboard\Pages\_SidebarMenu.cshtml"
Write
(
itemValue
.
Url
);
#
line
default
#
line
hidden
WriteLiteral
(
"\" class=\"list-group-item "
);
#
line
10
"..\..\Dashboard\Pages\_SidebarMenu.cshtml"
Write
(
itemValue
.
Active
?
"active"
:
null
);
#
line
default
#
line
hidden
WriteLiteral
(
"\">\r\n "
);
#
line
11
"..\..\Dashboard\Pages\_SidebarMenu.cshtml"
Write
(
itemValue
.
Text
);
#
line
default
#
line
hidden
WriteLiteral
(
"\r\n <span class=\"pull-right\">\r\n"
);
#
line
13
"..\..\Dashboard\Pages\_SidebarMenu.cshtml"
foreach
(
var
metric
in
itemValue
.
GetAllMetrics
())
{
#
line
default
#
line
hidden
#
line
15
"..\..\Dashboard\Pages\_SidebarMenu.cshtml"
Write
(
Html
.
InlineMetric
(
metric
));
#
line
default
#
line
hidden
#
line
15
"..\..\Dashboard\Pages\_SidebarMenu.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </span>\r\n </a>\r\n"
);
#
line
19
"..\..\Dashboard\Pages\_SidebarMenu.cshtml"
}
#
line
default
#
line
hidden
WriteLiteral
(
" </div>\r\n"
);
#
line
21
"..\..\Dashboard\Pages\_SidebarMenu.cshtml"
}
#
line
default
#
line
hidden
}
}
}
#pragma warning restore 1591
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment