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
a038fff3
Commit
a038fff3
authored
Sep 29, 2017
by
Savorboard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed file.
parent
9f6b0e5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
MessageHistoryRenderer.cs
src/DotNetCore.CAP/Dashboard/MessageHistoryRenderer.cs
+18
-18
No files found.
src/DotNetCore.CAP/Dashboard/
Job
HistoryRenderer.cs
→
src/DotNetCore.CAP/Dashboard/
Message
HistoryRenderer.cs
View file @
a038fff3
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Text
;
using
System.Text
;
using
DotNetCore.CAP.
Processor.States
;
using
DotNetCore.CAP.
Infrastructure
;
namespace
DotNetCore.CAP.Dashboard
namespace
DotNetCore.CAP.Dashboard
{
{
public
static
class
Job
HistoryRenderer
public
static
class
Message
HistoryRenderer
{
{
private
static
readonly
IDictionary
<
string
,
Func
<
HtmlHelper
,
IDictionary
<
string
,
string
>,
NonEscapedString
>>
private
static
readonly
IDictionary
<
string
,
Func
<
HtmlHelper
,
IDictionary
<
string
,
string
>,
NonEscapedString
>>
Renderers
=
new
Dictionary
<
string
,
Func
<
HtmlHelper
,
IDictionary
<
string
,
string
>,
NonEscapedString
>>();
Renderers
=
new
Dictionary
<
string
,
Func
<
HtmlHelper
,
IDictionary
<
string
,
string
>,
NonEscapedString
>>();
...
@@ -17,23 +17,23 @@ namespace DotNetCore.CAP.Dashboard
...
@@ -17,23 +17,23 @@ namespace DotNetCore.CAP.Dashboard
=
new
Dictionary
<
string
,
string
>();
=
new
Dictionary
<
string
,
string
>();
[
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessage
(
"Microsoft.Performance"
,
"CA1810:InitializeReferenceTypeStaticFieldsInline"
)]
[
System
.
Diagnostics
.
CodeAnalysis
.
SuppressMessage
(
"Microsoft.Performance"
,
"CA1810:InitializeReferenceTypeStaticFieldsInline"
)]
static
Job
HistoryRenderer
()
static
Message
HistoryRenderer
()
{
{
Register
(
S
ucceededState
.
StateName
,
SucceededRenderer
);
Register
(
S
tatusName
.
Succeeded
,
SucceededRenderer
);
Register
(
FailedState
.
StateName
,
FailedRenderer
);
Register
(
StatusName
.
Failed
,
FailedRenderer
);
Register
(
ProcessingState
.
StateName
,
ProcessingRenderer
);
Register
(
StatusName
.
Processing
,
ProcessingRenderer
);
BackgroundStateColors
.
Add
(
EnqueuedState
.
StateName
,
"#F5F5F5"
);
BackgroundStateColors
.
Add
(
StatusName
.
Enqueued
,
"#F5F5F5"
);
BackgroundStateColors
.
Add
(
S
ucceededState
.
StateName
,
"#EDF7ED"
);
BackgroundStateColors
.
Add
(
S
tatusName
.
Succeeded
,
"#EDF7ED"
);
BackgroundStateColors
.
Add
(
FailedState
.
StateName
,
"#FAEBEA"
);
BackgroundStateColors
.
Add
(
StatusName
.
Failed
,
"#FAEBEA"
);
BackgroundStateColors
.
Add
(
ProcessingState
.
StateName
,
"#FCEFDC"
);
BackgroundStateColors
.
Add
(
StatusName
.
Processing
,
"#FCEFDC"
);
BackgroundStateColors
.
Add
(
S
cheduledState
.
StateName
,
"#E0F3F8"
);
BackgroundStateColors
.
Add
(
S
tatusName
.
Scheduled
,
"#E0F3F8"
);
ForegroundStateColors
.
Add
(
EnqueuedState
.
StateName
,
"#999"
);
ForegroundStateColors
.
Add
(
StatusName
.
Enqueued
,
"#999"
);
ForegroundStateColors
.
Add
(
S
ucceededState
.
StateName
,
"#5cb85c"
);
ForegroundStateColors
.
Add
(
S
tatusName
.
Succeeded
,
"#5cb85c"
);
ForegroundStateColors
.
Add
(
FailedState
.
StateName
,
"#d9534f"
);
ForegroundStateColors
.
Add
(
StatusName
.
Failed
,
"#d9534f"
);
ForegroundStateColors
.
Add
(
ProcessingState
.
StateName
,
"#f0ad4e"
);
ForegroundStateColors
.
Add
(
StatusName
.
Processing
,
"#f0ad4e"
);
ForegroundStateColors
.
Add
(
S
cheduledState
.
StateName
,
"#5bc0de"
);
ForegroundStateColors
.
Add
(
S
tatusName
.
Scheduled
,
"#5bc0de"
);
}
}
public
static
void
AddBackgroundStateColor
(
string
stateName
,
string
color
)
public
static
void
AddBackgroundStateColor
(
string
stateName
,
string
color
)
...
...
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