Feature #19047

Unify the way how we display dates

Added by Marek Hulán 9 months ago. Updated 3 months ago.

Status:Closed
Priority:Normal
Assigned To:Marek Hulán
Category:Reporting
Target version:Team Marek backlog
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4820
Story points-
Velocity based estimate-
Release1.16.0Release relationshipAuto

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1435973

When checking last report in `/config_reports?search=eventful+%3D+true` the column "Last report" it only shows the time since this config run was execueted. If multiple runs are made in a given time it's very difficult to understand which one belongs to which run.
To figure out which run was made at which time, one needs to select the report to get this information. It would be therefore nice to report actual time/date of the `puppet` run instead of "ago". So having an option to set "Last Report" to "Reported at" which then would give time and date, would be appreciated.

When multiple runs are done in short or also when something is happening on a host it's difficult to quickly elect the right report in the UI. Having real time and date it's easier to understand when a `puppet` run happen and therefore find quickly the right report to check.
Having "Last Report" reporting the real time instead of the time that elaps since the last `puppet` run would ease that task and avoid lot's of unecessary clicking in the UI

We should either provide time/date in "Last Report" by default or provide a switch where the functionality can be enabled globally. Meanding for all kind of report that are showing this behavior.

"Last Report" should show "2017-03-22 07:19:37 UTC" or similar instead of "4 days ago"


Related issues

Related to OpenSCAP - Refactor #21038: Ensure dates are printed consistently with core Closed 09/20/2017
Related to Ansible - Refactor #21039: Ensure dates are printed consistently with core New 09/20/2017
Related to virt-who configure - Refactor #21040: Ensure dates are printed consistently with core New 09/20/2017
Related to Discovery - Refactor #21041: Ensure dates are printed consistently with core New 09/20/2017
Related to Docker - Refactor #21042: Ensure dates are printed consistently with core New 09/20/2017
Related to Foreman Remote Execution - Refactor #21043: Ensure dates are printed consistently with core New 09/20/2017
Related to Katello - Refactor #21045: Ensure dates are printed consistently with core Ready For Testing 09/20/2017
Related to foreman-tasks - Refactor #21044: Ensure dates are printed consistently with core New 09/20/2017
Related to Foreman - Bug #21213: not view certs in puppetca on smart proxy Closed 10/05/2017
Related to Foreman - Feature #21312: Foreman should provide react components for formatting dates Closed 10/12/2017
Related to Foreman - Feature #21497: As discussed on PR that introduced date helpers, we shoul... New 10/27/2017

Associated revisions

Revision d738d2c0
Added by Marek Hulán 3 months ago

Fixes #19047 - unify date formats

This introduces two new helpers for printing date in absolute and
relative format. Helper for absolute accepts also a parameter to choose
between long and short variant. The long one includes the year. The date
also has a title so you see the other format after hovering mouse
cursor.

Revision fde12b1d
Added by Marek Hulán 3 months ago

Fixes #19047 - unify date formats

This introduces two new helpers for printing date in absolute and
relative format. Helper for absolute accepts also a parameter to choose
between long and short variant. The long one includes the year. The date
also has a title so you see the other format after hovering mouse
cursor.

(cherry picked from commit d738d2c03a58e52b5e04d056ca259925ae71e057)

History

#1 Updated by Marek Hulán 9 months ago

  • Subject changed from Show actual date and not time since report in Config Report to Show actual date and not time since report in Config Report
  • Category changed from Statistics to Reporting

#2 Updated by Marek Hulán 9 months ago

  • Target version set to Team Marek backlog

#3 Updated by The Foreman Bot 9 months ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Marek Hulán
  • Pull request https://github.com/theforeman/foreman/pull/4419 added

#4 Updated by The Foreman Bot 3 months ago

  • Pull request https://github.com/theforeman/foreman/pull/4820 added

#5 Updated by Marek Hulán 3 months ago

  • Pull request deleted (https://github.com/theforeman/foreman/pull/4419)

#6 Updated by Ivan Necas 3 months ago

  • Subject changed from Show actual date and not time since report in Config Report to Unify
  • Release set to 1.16.0

#7 Updated by Marek Hulán 3 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#8 Updated by Marek Hulán 3 months ago

  • Subject changed from Unify to Unify the way how we display dates

#9 Updated by Ivan Necas 3 months ago

  • Bugzilla link deleted (1435973)

#10 Updated by Marek Hulán 3 months ago

  • Related to Refactor #21038: Ensure dates are printed consistently with core added

#11 Updated by Marek Hulán 3 months ago

  • Related to Refactor #21039: Ensure dates are printed consistently with core added

#12 Updated by Marek Hulán 3 months ago

  • Related to Refactor #21040: Ensure dates are printed consistently with core added

#13 Updated by Marek Hulán 3 months ago

  • Related to Refactor #21041: Ensure dates are printed consistently with core added

#14 Updated by Marek Hulán 3 months ago

  • Related to Refactor #21042: Ensure dates are printed consistently with core added

#15 Updated by Marek Hulán 3 months ago

  • Related to Refactor #21043: Ensure dates are printed consistently with core added

#16 Updated by Marek Hulán 3 months ago

  • Related to Refactor #21045: Ensure dates are printed consistently with core added

#17 Updated by Marek Hulán 3 months ago

  • Related to Refactor #21044: Ensure dates are printed consistently with core added

#18 Updated by Marek Hulán 2 months ago

  • Related to Bug #21213: not view certs in puppetca on smart proxy added

#19 Updated by Tomáš Strachota 2 months ago

  • Related to Feature #21312: Foreman should provide react components for formatting dates added

#20 Updated by Marek Hulán about 1 month ago

  • Related to Feature #21497: As discussed on PR that introduced date helpers, we should make date format configurable on few places added

Also available in: Atom PDF