Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AmendsenProject
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shaik Janipasha
AmendsenProject
Commits
5110dc5b
Unverified
Commit
5110dc5b
authored
Mar 07, 2019
by
Daniel
Committed by
GitHub
Mar 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed date format and message for stats collection info (#45)
parent
9752b675
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
16 deletions
+9
-16
index.tsx
...omponents/TableDetail/DetailList/DetailListItem/index.tsx
+9
-16
No files found.
amundsen_application/static/js/components/TableDetail/DetailList/DetailListItem/index.tsx
View file @
5110dc5b
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
import
moment
from
'moment-timezone'
;
import
ColumnDescEditableText
from
'../../../../containers/TableDetail/ColumnDescEditableText'
;
import
ColumnDescEditableText
from
'../../../../containers/TableDetail/ColumnDescEditableText'
;
import
InfoButton
from
'../../../common/InfoButton'
;
import
{
TableColumn
}
from
'../../types'
;
import
{
TableColumn
}
from
'../../types'
;
// TODO: Use css-modules instead of 'import'
// TODO: Use css-modules instead of 'import'
...
@@ -36,12 +35,8 @@ class DetailListItem extends React.Component<DetailListItemProps, DetailListItem
...
@@ -36,12 +35,8 @@ class DetailListItem extends React.Component<DetailListItemProps, DetailListItem
}));
}));
};
};
formatDate
=
(
unixEpochTimeValue
)
=>
{
formatDate
=
(
unixEpochSeconds
)
=>
{
const
date
=
new
Date
(
0
);
return
moment
(
unixEpochSeconds
*
1000
).
format
(
"MMM DD, YYYY"
);
date
.
setSeconds
(
unixEpochTimeValue
);
/* TODO: Internationalization */
return
date
.
toLocaleDateString
();
};
};
render
()
{
render
()
{
...
@@ -53,17 +48,15 @@ class DetailListItem extends React.Component<DetailListItemProps, DetailListItem
...
@@ -53,17 +48,15 @@ class DetailListItem extends React.Component<DetailListItemProps, DetailListItem
const
startDate
=
isExpandable
?
this
.
formatDate
(
startEpoch
)
:
null
;
const
startDate
=
isExpandable
?
this
.
formatDate
(
startEpoch
)
:
null
;
const
endDate
=
isExpandable
?
this
.
formatDate
(
endEpoch
)
:
null
;
const
endDate
=
isExpandable
?
this
.
formatDate
(
endEpoch
)
:
null
;
let
infoText
=
'Stats collected'
;
let
infoText
=
'Stats
reflect data
collected'
;
if
(
startDate
&&
endDate
)
{
if
(
startDate
&&
endDate
)
{
if
(
startDate
===
endDate
)
{
if
(
startDate
===
endDate
)
{
infoText
=
`
${
infoText
}
on
${
startDate
}
partition`
;
infoText
=
`
${
infoText
}
on
${
startDate
}
only. (daily partition)`
;
}
else
{
infoText
=
`
${
infoText
}
between
${
startDate
}
and
${
endDate
}
.`
;
}
}
else
{
}
else
{
infoText
=
`
${
infoText
}
between
${
startDate
}
and
${
endDate
}
`
;
infoText
=
`
${
infoText
}
over a recent period of time.`
;
}
}
else
{
infoText
=
`
${
infoText
}
over a recent period of time`
;
}
}
return
(
return
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment