You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2021/11/23 00:13:07 UTC
[superset] 03/09: fix(other): column name in created content on profile page (#17029)
This is an automated email from the ASF dual-hosted git repository.
elizabeth pushed a commit to branch 1.4
in repository https://gitbox.apache.org/repos/asf/superset.git
commit b4f4f4cdfa8a6d1a1b1a173593a812bf92a2c43f
Author: jinghua-qa <81...@users.noreply.github.com>
AuthorDate: Mon Oct 11 08:21:05 2021 -0700
fix(other): column name in created content on profile page (#17029)
* fix: fix name in created content on profile page
* add more fix on mutater
(cherry picked from commit f2d41dc416da9daf7b4e51487a9c07bf06ba21d7)
---
superset-frontend/src/profile/components/CreatedContent.tsx | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/superset-frontend/src/profile/components/CreatedContent.tsx b/superset-frontend/src/profile/components/CreatedContent.tsx
index 41f21d6..b097dee 100644
--- a/superset-frontend/src/profile/components/CreatedContent.tsx
+++ b/superset-frontend/src/profile/components/CreatedContent.tsx
@@ -33,14 +33,14 @@ class CreatedContent extends React.PureComponent<CreatedContentProps> {
const mutator = (data: Slice[]) =>
data.map(slice => ({
slice: <a href={slice.url}>{slice.title}</a>,
- favorited: moment.utc(slice.dttm).fromNow(),
- _favorited: slice.dttm,
+ created: moment.utc(slice.dttm).fromNow(),
+ _created: slice.dttm,
}));
return (
<TableLoader
dataEndpoint={`/superset/created_slices/${this.props.user.userId}/`}
className="table-condensed"
- columns={['slice', 'favorited']}
+ columns={['slice', 'created']}
mutator={mutator}
noDataText={t('No charts')}
sortable
@@ -52,8 +52,8 @@ class CreatedContent extends React.PureComponent<CreatedContentProps> {
const mutator = (data: Dashboard[]) =>
data.map(dash => ({
dashboard: <a href={dash.url}>{dash.title}</a>,
- favorited: moment.utc(dash.dttm).fromNow(),
- _favorited: dash.dttm,
+ created: moment.utc(dash.dttm).fromNow(),
+ _created: dash.dttm,
}));
return (
<TableLoader
@@ -61,7 +61,7 @@ class CreatedContent extends React.PureComponent<CreatedContentProps> {
mutator={mutator}
dataEndpoint={`/superset/created_dashboards/${this.props.user.userId}/`}
noDataText={t('No dashboards')}
- columns={['dashboard', 'favorited']}
+ columns={['dashboard', 'created']}
sortable
/>
);