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

format timestamp as date to make it more easy to read in systemCheckPage #19256

Closed
wants to merge 2 commits into from

Conversation

mikkeschiren
Copy link
Contributor

Description:

Make it easier to read and understand when latest archiving was done.

Review

@mikkeschiren mikkeschiren changed the title format timestamp as date to make it more easy to read format timestamp as date to make it more easy to read in systemCheckPage May 22, 2022
@justinvelluppillai justinvelluppillai added Needs Review PRs that need a code review c: Design / UI For issues that impact Matomo's user interface or the design overall. labels May 23, 2022
Comment on lines +45 to +46
$results[] = DiagnosticResult::informationalResult('Archive Time Last Started', date("Y-m-d H:i:s", Option::get(CronArchive::OPTION_ARCHIVING_STARTED_TS)));
$results[] = DiagnosticResult::informationalResult('Archive Time Last Finished', date("Y-m-d H:i:s", Option::get(CronArchive::OPTION_ARCHIVING_FINISHED_TS)));
Copy link
Member

Choose a reason for hiding this comment

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

For a new installation where the archiving might have never been started or finished, the option values might not exist. In that case I guess 1970-01-01 01:00:00 would be displayed. We could maybe simply output a - for that case (e.g. if the Option::get returns false).

Copy link
Contributor

Choose a reason for hiding this comment

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

Adding a suggestion to make it easier to implement @sgiehl's solution - @mikkeschiren can you please review and commit this change if satisfied? Then we can merge this PR I think.

Suggested change
$results[] = DiagnosticResult::informationalResult('Archive Time Last Started', date("Y-m-d H:i:s", Option::get(CronArchive::OPTION_ARCHIVING_STARTED_TS)));
$results[] = DiagnosticResult::informationalResult('Archive Time Last Finished', date("Y-m-d H:i:s", Option::get(CronArchive::OPTION_ARCHIVING_FINISHED_TS)));
$archive_start = Option::get(CronArchive::OPTION_ARCHIVING_STARTED_TS);
$results[] = DiagnosticResult::informationalResult('Archive Time Last Started', ($archive_start ? date("Y-m-d H:i:s", $archive_start) : '-'));
$archive_end = Option::get(CronArchive::OPTION_ARCHIVING_FINISHED_TS);
$results[] = DiagnosticResult::informationalResult('Archive Time Last Finished', ($archive_end ? date("Y-m-d H:i:s", $archive_end) : '-'));

@sgiehl sgiehl added Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. and removed Needs Review PRs that need a code review labels May 24, 2022
@github-actions
Copy link
Contributor

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@github-actions github-actions bot added the Stale The label used by the Close Stale Issues action label Jun 14, 2022
@justinvelluppillai justinvelluppillai removed the Stale The label used by the Close Stale Issues action label Jun 14, 2022
@github-actions
Copy link
Contributor

If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'.

@github-actions github-actions bot added the Stale The label used by the Close Stale Issues action label Jun 29, 2022
@sgiehl
Copy link
Member

sgiehl commented Aug 4, 2022

Closing this PR. I'll cherry-pick and adjust the changes directly to 4.x-dev.

@sgiehl sgiehl closed this Aug 4, 2022
@sgiehl sgiehl removed Waiting for user feedback Indicates the Matomo team is waiting for feedback from the author or other users. Stale The label used by the Close Stale Issues action labels Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Design / UI For issues that impact Matomo's user interface or the design overall.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants