Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
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
Show 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,9 +161,17 @@ export class Utility {
...
@@ -161,9 +161,17 @@ 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
(
return
Date
.
UTC
(
date
.
getUTCFullYear
(),
date
.
getUTCFullYear
(),
date
.
getUTCMonth
(),
date
.
getUTCMonth
(),
...
...
src/shared/Services/NotificationService.cs
View file @
eb7d137e
...
@@ -154,7 +154,7 @@ namespace StatusMonitor.Shared.Services
...
@@ -154,7 +154,7 @@ namespace StatusMonitor.Shared.Services
return
return
unresolved
==
0
?
unresolved
==
0
?
"There are no outstanding issues. Well done."
:
"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
...
@@ -12,6 +12,8 @@ namespace StatusMonitor.Web.TagHelpers
/// </summary>
/// </summary>
public
class
UtcTimeTagHelper
:
TagHelper
public
class
UtcTimeTagHelper
:
TagHelper
{
{
public
bool
ShowDate
{
get
;
set
;
}
=
false
;
public
DateTime
Time
{
get
;
set
;
}
public
DateTime
Time
{
get
;
set
;
}
[
ViewContext
]
[
ViewContext
]
...
@@ -26,7 +28,8 @@ namespace StatusMonitor.Web.TagHelpers
...
@@ -26,7 +28,8 @@ namespace StatusMonitor.Web.TagHelpers
output
.
TagMode
=
TagMode
.
StartTagAndEndTag
;
output
.
TagMode
=
TagMode
.
StartTagAndEndTag
;
output
.
Attributes
.
Clear
();
output
.
Attributes
.
Clear
();
output
.
Attributes
.
Add
(
"class"
,
"utc-time"
);
output
.
Attributes
.
Add
(
"class"
,
ShowDate
?
"utc-date"
:
"utc-time"
);
output
.
Content
.
SetHtmlContent
(
Time
.
ToString
());
output
.
Content
.
SetHtmlContent
(
Time
.
ToString
());
...
...
src/web/Views/Admin/Index.cshtml
View file @
eb7d137e
@using StatusMonitor.Shared.Models.Entities
@using StatusMonitor.Shared.Models.Entities
@using Microsoft.Extensions.Configuration
@inject IConfiguration Config
@{
@{
ViewData["Title"] = "Admin panel";
ViewData["Title"] = "Admin panel";
...
@@ -111,7 +114,10 @@
...
@@ -111,7 +114,10 @@
<div
class=
"card-header"
>
<div
class=
"card-header"
>
<h2>
Discrepancies
<h2>
Discrepancies
<small>
<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>
</small>
</h2>
</h2>
</div>
</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