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
Conversation
qhuynh96
commented
Mar 2, 2018
•
edited
edited
- Fixes prow: deck: time hover is backwards #7098
- Full time can be seen by hovering the time
/assign @stevekuznetsov |
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.
/lgtm
/retest |
/hold |
prow/cmd/deck/static/script.js
Outdated
|
||
var tooltip = document.createElement("div"); | ||
tooltip.textContent = age; | ||
tooltip.textContent = momentTime.format('MMM DD YYYY, HH:mm:ss [GMT]ZZ'); |
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.
"zZZ" should format as "PST-0800" which should be friendlier.
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.
Sure, this came from trimming down the default format (though accidentally capitalizing a bit much :-(
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.
z has been deprecated
moment/moment#162
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.
Ah, never mind then. It should be UTC instead of GMT.
prow/cmd/deck/static/script.js
Outdated
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'); |
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.
Make this show days if it's older?
main.TextContent = momentTime.format(momentTime.isBefore(moment().startOf('day')) ? 'MMM DD HH:mm' : 'HH:mm:ss')
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.
to be fair this is basically an edge case doesn't in deck since we constantly purge jobs with sinker
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.
http://prow.k8s.io/?type=batch has 3 days of jobs
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.
done
Handles a day old time cell
/lgtm |
/hold cancel |
@qhuynh96 can we get a tap/click to copy full timestamp in a follow-up? |
Sure
…On Fri, Mar 2, 2018 at 1:27 PM Benjamin Elder ***@***.***> wrote:
@qhuynh96 <https://github.com/qhuynh96> can we get a tap/click to copy
full timestamp in a follow-up?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7103 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AXPCrYWbkhXQWp7nBaYwmO9H1B17_gi6ks5tabk9gaJpZM4SaZbM>
.
|
/lgtm |
[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 |
/woof |
In response to this:
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. |