Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
status-site
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmytro Bogatov
status-site
Commits
eb7d137e
Commit
eb7d137e
authored
Aug 06, 2017
by
Dmytro Bogatov
💕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix.
parent
7c63666e
Pipeline
#590
canceled with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
10 deletions
+27
-10
client/ts/modules/utility.ts
client/ts/modules/utility.ts
+15
-7
src/shared/Services/NotificationService.cs
src/shared/Services/NotificationService.cs
+1
-1
src/web/TagHelpers/UtcTimeTagHelper.cs
src/web/TagHelpers/UtcTimeTagHelper.cs
+4
-1
src/web/Views/Admin/Index.cshtml
src/web/Views/Admin/Index.cshtml
+7
-1
No files found.
client/ts/modules/utility.ts
View file @
eb7d137e
...
...
@@ -161,16 +161,24 @@ export class Utility {
);
});
$
(
"
.utc-date
"
).
each
(
function
()
{
$
(
this
).
text
(
Utility
.
toLocalTimezone
(
new
Date
(
$
(
this
).
text
())
).
toString
()
);
});
}
public
static
toUtcDate
(
date
:
Date
):
number
{
public
static
toUtcDate
(
date
:
Date
):
number
{
return
Date
.
UTC
(
date
.
getUTCFullYear
(),
date
.
getUTCMonth
(),
date
.
getUTCDate
(),
date
.
getUTCHours
(),
date
.
getUTCMinutes
(),
date
.
getUTCSeconds
(),
date
.
getUTCFullYear
(),
date
.
getUTCMonth
(),
date
.
getUTCDate
(),
date
.
getUTCHours
(),
date
.
getUTCMinutes
(),
date
.
getUTCSeconds
(),
date
.
getUTCMilliseconds
()
);
}
...
...
src/shared/Services/NotificationService.cs
View file @
eb7d137e
...
...
@@ -154,7 +154,7 @@ namespace StatusMonitor.Shared.Services
return
unresolved
==
0
?
"There are no outstanding issues. Well done."
:
$"There
{(
unresolved
==
1
?
"is"
:
"are"
)}
still outstanding
{
unresolved
}
issue
{(
unresolved
==
1
?
""
:
"s"
)}
."
$"There
{(
unresolved
==
1
?
"is"
:
"are"
)}
still outstanding
{
unresolved
}
issue
{(
unresolved
==
1
?
""
:
"s"
)}
.
See admin panel.
"
;
}
...
...
src/web/TagHelpers/UtcTimeTagHelper.cs
View file @
eb7d137e
...
...
@@ -12,6 +12,8 @@ namespace StatusMonitor.Web.TagHelpers
/// </summary>
public
class
UtcTimeTagHelper
:
TagHelper
{
public
bool
ShowDate
{
get
;
set
;
}
=
false
;
public
DateTime
Time
{
get
;
set
;
}
[
ViewContext
]
...
...
@@ -26,7 +28,8 @@ namespace StatusMonitor.Web.TagHelpers
output
.
TagMode
=
TagMode
.
StartTagAndEndTag
;
output
.
Attributes
.
Clear
();
output
.
Attributes
.
Add
(
"class"
,
"utc-time"
);
output
.
Attributes
.
Add
(
"class"
,
ShowDate
?
"utc-date"
:
"utc-time"
);
output
.
Content
.
SetHtmlContent
(
Time
.
ToString
());
...
...
src/web/Views/Admin/Index.cshtml
View file @
eb7d137e
@using StatusMonitor.Shared.Models.Entities
@using Microsoft.Extensions.Configuration
@inject IConfiguration Config
@{
ViewData["Title"] = "Admin panel";
...
...
@@ -111,7 +114,10 @@
<div
class=
"card-header"
>
<h2>
Discrepancies
<small>
View the list of resolved and unresolved dicrepancies from TODO until now
@{
var discrepancyDataStartDate = DateTime.UtcNow - new TimeSpan(0, 0, Convert.ToInt32(Config["ServiceManager:CleanService:MaxAge"]));
}
View the list of resolved and unresolved dicrepancies from
<utc-time
time=
"@discrepancyDataStartDate"
show-date=
true
/>
until now.
</small>
</h2>
</div>
...
...
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