Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Dmytro Bogatov
status-site
Commits
eb7d137e
Commit
eb7d137e
authored
Aug 06, 2017
by
Dmytro Bogatov
💕
Browse files
Fix.
parent
7c63666e
Pipeline
#590
canceled with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
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