-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
show outdated csi value #45
Conversation
…and the color of the ring to grey
…ith the date of the last results
… the german date format to utils
…til function calls to the components
def name = it.name | ||
def lastDateOfResult = JobResult.createCriteria().list(max: 1) { | ||
eq("jobGroupName", name) | ||
order("id", "desc") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better sort by date desc to make sure it's the last jobGroup
[ | ||
id : it.id, | ||
name : it.name, | ||
dateOfLastResults: lastDateOfResult[0].date.format("yyyy-MM-dd") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may give you a NPE if lastDateOfResult
is empty (no job result so far)
@@ -1,7 +1,11 @@ | |||
<div class="card"> | |||
<div class="card" data-toggle="tooltip" | |||
title="{{isCsiOutdated((pageCsiDate$ | async), lastDateOfResult) ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate code. You could extract that as a method which provides the correct translation-key directly.
You could also put the tooltip in the osm-csi-value
.
data-toggle
is not needed afaik.
} | ||
|
||
private updateDescription() { | ||
if (this.isBig && new Date().toISOString().substring(0, 10) > this.csiDate) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this date comparison working? It compares strings, doesn't it?
it('should be described as is set', () =>{ | ||
const description: string = "description"; | ||
component.description = description; | ||
it('should be described as "CSI" if the circle is not big', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also add test cases for the new cases you defined.
-The dashboard shows outdated csi values. Then the csi circle turns grey.
-If the csi value was not created today, the date of the csi value is shown in the circle instead of 'today'.
-If the csi value of a page is outdated, the circle also turns grey. A hint shows the calculation date of the csi page value.