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

Trim down time display to hour:min:second #7103

Merged
merged 1 commit into from Mar 2, 2018

Conversation

qhuynh96
Copy link
Contributor

@qhuynh96 qhuynh96 commented Mar 2, 2018

screen shot 2018-03-02 at 11 40 51 am

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 2, 2018
@qhuynh96 qhuynh96 changed the title Trim down display to hour:min:second Trim down time display to hour:min:second Mar 2, 2018
@qhuynh96
Copy link
Contributor Author

qhuynh96 commented Mar 2, 2018

/assign @stevekuznetsov

Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 2, 2018
@qhuynh96
Copy link
Contributor Author

qhuynh96 commented Mar 2, 2018

/retest

@rmmh
Copy link
Contributor

rmmh commented Mar 2, 2018

/hold
Showing only hours for results >1 day old isn't so helpful. For old results, can you switch to month/day?

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 2, 2018

var tooltip = document.createElement("div");
tooltip.textContent = age;
tooltip.textContent = momentTime.format('MMM DD YYYY, HH:mm:ss [GMT]ZZ');
Copy link
Contributor

Choose a reason for hiding this comment

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

"zZZ" should format as "PST-0800" which should be friendlier.

Copy link
Member

Choose a reason for hiding this comment

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

Sure, this came from trimming down the default format (though accidentally capitalizing a bit much :-(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

z has been deprecated
moment/moment#162

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, never mind then. It should be UTC instead of GMT.

var age = momentTime.fromNow();
var timeString = momentTime.format('MMM DD YYYY, HH:MM:SS [GMT]ZZ');
main.textContent = timeString;
main.textContent = momentTime.format('HH:mm:ss');
Copy link
Contributor

Choose a reason for hiding this comment

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

Make this show days if it's older?

main.TextContent = momentTime.format(momentTime.isBefore(moment().startOf('day')) ? 'MMM DD HH:mm' : 'HH:mm:ss')

Copy link
Member

Choose a reason for hiding this comment

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

to be fair this is basically an edge case doesn't in deck since we constantly purge jobs with sinker

Copy link
Contributor

Choose a reason for hiding this comment

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

http://prow.k8s.io/?type=batch has 3 days of jobs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Handles a day old time cell
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 2, 2018
@rmmh
Copy link
Contributor

rmmh commented Mar 2, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 2, 2018
@rmmh
Copy link
Contributor

rmmh commented Mar 2, 2018

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 2, 2018
@BenTheElder
Copy link
Member

@qhuynh96 can we get a tap/click to copy full timestamp in a follow-up?

@qhuynh96
Copy link
Contributor Author

qhuynh96 commented Mar 2, 2018 via email

@stevekuznetsov
Copy link
Contributor

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder, qhuynh96, rmmh, stevekuznetsov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit babda20 into kubernetes:master Mar 2, 2018
@qhuynh96
Copy link
Contributor Author

qhuynh96 commented Mar 3, 2018

/woof

@k8s-ci-robot
Copy link
Contributor

@qhuynh96: dog image

In response to this:

/woof

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@qhuynh96 qhuynh96 deleted the time branch March 13, 2018 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants