Skip to content
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 time tooltips for events FirstSeen and LastSeen #4156

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/app/frontend/common/components/date/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
limitations under the License.
-->

<span *ngIf="_relative"
class="kd-date"
<span class="kd-date"
[matTooltip]="date | date:format">
{{date | kdRelativeTime}}
</span>
<span *ngIf="!_relative">
{{date | date:format}}
{{_relative ? (date | kdRelativeTime) : (date | date)}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be date:format at the end?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

date:format gives the longer version of the timestamp which is sometimes longer than column displays. Since the longer version is already shown in the tooltip, I think the main display can be the shorter one with date.

</span>
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@
<mat-header-cell *matHeaderCellDef
i18n>First Seen</mat-header-cell>
<mat-cell *matCellDef="let event">
{{event.firstSeen | date}}
<kd-date [date]="event.firstSeen"></kd-date>
</mat-cell>
</ng-container>

<ng-container [matColumnDef]="getDisplayColumns()[6]">
<mat-header-cell *matHeaderCellDef
i18n>Last Seen</mat-header-cell>
<mat-cell *matCellDef="let event">
{{event.lastSeen | date}}
<kd-date [date]="event.lastSeen"></kd-date>
</mat-cell>
</ng-container>

Expand Down