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 seconds in trace start time on the trace page #430

Merged
merged 1 commit into from
Aug 4, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ limitations under the License.
padding: 0.25rem 0.5rem;
}

.TracePageHeader--overviewItem--valueDetail {
color: #aaa;
}

.TracePageHeader--overviewItem--value:hover > .TracePageHeader--overviewItem--valueDetail {
color: unset;
}

.TracePageHeader--archiveIcon {
font-size: 1.78em;
margin-right: 0.15em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,18 @@ export const HEADER_ITEMS = [
{
key: 'timestamp',
label: 'Trace Start',
renderer: (trace: Trace) => formatDatetime(trace.startTime),
renderer: (trace: Trace) => {
const dateStr = formatDatetime(trace.startTime);
const match = dateStr.match(/^(.+)(:\d\d\.\d+)$/);
Copy link
Member

Choose a reason for hiding this comment

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

I would only lower the contrast for sub-seconds, not for seconds

return match ? (
<span className="TracePageHeader--overviewItem--value">
{match[1]}
<span className="TracePageHeader--overviewItem--valueDetail">{match[2]}</span>
</span>
) : (
dateStr
Copy link
Member

Choose a reason for hiding this comment

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

should this also use <span> for consistency?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, it's better to leave it off if it's not serving a purpose.

);
},
},
{
key: 'duration',
Expand Down
2 changes: 1 addition & 1 deletion packages/jaeger-ui/src/utils/date.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const YESTERDAY = 'Yesterday';

export const STANDARD_DATE_FORMAT = 'YYYY-MM-DD';
export const STANDARD_TIME_FORMAT = 'HH:mm';
export const STANDARD_DATETIME_FORMAT = 'LLL';
export const STANDARD_DATETIME_FORMAT = 'MMMM D YYYY, HH:mm:ss.SSS';
export const ONE_MILLISECOND = 1000;
export const ONE_SECOND = 1000 * ONE_MILLISECOND;
export const DEFAULT_MS_PRECISION = Math.log10(ONE_MILLISECOND);
Expand Down