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

EPMRPP-89534 || Migrate service API dates from ms to microseconds UI … #3839

Merged
merged 2 commits into from
May 21, 2024
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 @@ -47,7 +47,7 @@ export const calculateTooltipParams = (data, color, customProps) => {

return {
itemName: `${name} #${number}`,
startTime: Number(startTime),
startTime: new Date(startTime).getTime(),
itemCases: `${value} ${formatMessage(messages.cases)}`,
color: color(id),
issueStatNameProps: { itemName: formatMessage(statusLocalization[FAILED]) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const calculateTooltipParams = (data, color, customProps) => {

return {
itemName: isTimeline ? date : `${name} #${number}`,
startTime: isTimeline ? null : Number(startTime),
startTime: isTimeline ? null : new Date(startTime).getTime(),
itemCases: `${Number(value).toFixed(2)}%`,
color: color(id),
issueStatNameProps: { itemName: messages[id] ? formatMessage(messages[id]) : id },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const calculateTooltipParams = (data, color, customProps) => {

return {
itemName: isTimeline ? date : `${name} #${number}`,
startTime: isTimeline ? null : Number(startTime),
startTime: isTimeline ? null : new Date(startTime).getTime(),
itemCases: `${value} ${formatMessage(messages.cases)}`,
color: color(id),
issueStatNameProps: { itemName: id, defectTypes, formatMessage },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const calculateTooltipParams = (data, color, customProps) => {

return {
itemName: `${name} #${number}`,
startTime: Number(startTime),
startTime: new Date(startTime).getTime(),
itemCases: `${value}%`,
color: color(id),
issueStatNameProps: { itemName: id, defectTypes, noTotal: true, formatMessage },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const calculateTooltipParams = (data, color, customProps) => {

return {
itemName: `${name} #${number}`,
startTime: Number(startTime),
startTime: new Date(startTime).getTime(),
itemCases: `${Number(value).toFixed(2)}%`,
color: color(id),
issueStatNameProps: { itemName: formatMessage(messages.failedSkippedTotal) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const calculateTooltipParams = (data, color, customProps) => {

return {
itemName: isTimeline ? date : `${name} #${number}`,
startTime: isTimeline ? '' : dateFormat(Number(startTime)),
startTime: isTimeline ? '' : dateFormat(new Date(startTime).getTime()),
growth,
growthClass,
total,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export class ProjectActivity extends Component {
{ActivityComponent}
<AbsRelTime
setStartTimeFormatAction={START_TIME_FORMAT_ABSOLUTE}
startTime={+activity.lastModified}
startTime={new Date(activity.lastModified).getTime()}
customClass={cx('time')}
/>
</div>
Expand Down
13 changes: 7 additions & 6 deletions app/src/pages/inside/common/itemInfo/itemInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ export class ItemInfo extends Component {
hideDescription,
} = this.props;

const startTime = new Date(value.startTime).getTime();
const endTime = new Date(value.endTime).getTime();

const autoAnalysisLabel = value.analysing?.find(
(item) => item === ANALYZER_TYPES.AUTO_ANALYZER || item === ANALYZER_TYPES.CLUSTER_ANALYSER,
);
Expand Down Expand Up @@ -213,23 +216,21 @@ export class ItemInfo extends Component {
withPreloader
/>
))}
{value.startTime && (
{!!startTime && (
<span className={cx('duration-block')}>
<DurationBlock
type={value.type}
status={value.status}
itemNumber={value.number}
timing={{
start: value.startTime,
end: value.endTime,
start: startTime,
end: endTime,
approxTime: value.approximateDuration,
}}
/>
</span>
)}
{value.startTime && (
<div className={cx('mobile-start-time')}>{fromNowFormat(value.startTime)}</div>
)}
{!!startTime && <div className={cx('mobile-start-time')}>{fromNowFormat(startTime)}</div>}
{value.hasRetries && (
<div className={cx('retry-icon')} title={intl.formatMessage(messages.retryTooltip)}>
{Parser(RetryIcon)}
Expand Down
Loading