diff --git a/superset-frontend/src/views/chartList/ChartList.tsx b/superset-frontend/src/views/chartList/ChartList.tsx index fc5f99271e7..5f96eef2c26 100644 --- a/superset-frontend/src/views/chartList/ChartList.tsx +++ b/superset-frontend/src/views/chartList/ChartList.tsx @@ -146,8 +146,8 @@ class ChartList extends React.PureComponent { }, }, }: any) => {changedByName}, - Header: t('Creator'), - accessor: 'changed_by_fk', + Header: t('Modified By'), + accessor: 'changed_by.first_name', }, { Cell: ({ diff --git a/superset-frontend/src/views/dashboardList/DashboardList.tsx b/superset-frontend/src/views/dashboardList/DashboardList.tsx index 95de66a4220..09c3cc50d43 100644 --- a/superset-frontend/src/views/dashboardList/DashboardList.tsx +++ b/superset-frontend/src/views/dashboardList/DashboardList.tsx @@ -161,8 +161,8 @@ class DashboardList extends React.PureComponent { }, }, }: any) => {changedByName}, - Header: t('Creator'), - accessor: 'changed_by_fk', + Header: t('Modified By'), + accessor: 'changed_by.first_name', }, { Cell: ({ diff --git a/superset-frontend/src/welcome/DashboardTable.tsx b/superset-frontend/src/welcome/DashboardTable.tsx index 430548a3aab..971b54f8cb2 100644 --- a/superset-frontend/src/welcome/DashboardTable.tsx +++ b/superset-frontend/src/welcome/DashboardTable.tsx @@ -77,8 +77,8 @@ class DashboardTable extends React.PureComponent< }) => {dashboardTitle}, }, { - accessor: 'changed_by_fk', - Header: 'Creator', + accessor: 'changed_by.first_name', + Header: 'Modified By', Cell: ({ row: { original: { changed_by_name: changedByName, changedByUrl }, diff --git a/superset/charts/api.py b/superset/charts/api.py index 9f5f92e3b56..6c8635bbeb5 100644 --- a/superset/charts/api.py +++ b/superset/charts/api.py @@ -106,8 +106,6 @@ class ChartRestApi(BaseSupersetModelRestApi): "slice_name", "url", "description", - "changed_by_fk", - "created_by_fk", "changed_by_name", "changed_by_url", "changed_by.first_name", @@ -124,12 +122,12 @@ class ChartRestApi(BaseSupersetModelRestApi): "params", "cache_timeout", ] - list_select_columns = list_columns + ["changed_on"] + list_select_columns = list_columns + ["changed_on", "changed_by_fk"] order_columns = [ "slice_name", "viz_type", "datasource_name", - "changed_by_fk", + "changed_by.first_name", "changed_on_delta_humanized", ] search_columns = ( diff --git a/superset/dashboards/api.py b/superset/dashboards/api.py index a62f67ed751..7afecc20d78 100644 --- a/superset/dashboards/api.py +++ b/superset/dashboards/api.py @@ -119,12 +119,12 @@ class DashboardRestApi(BaseSupersetModelRestApi): "owners.first_name", "owners.last_name", ] - list_select_columns = list_columns + ["changed_on"] + list_select_columns = list_columns + ["changed_on", "changed_by_fk"] order_columns = [ "dashboard_title", "changed_on_delta_humanized", "published", - "changed_by_fk", + "changed_by.first_name", ] add_columns = [ diff --git a/superset/models/helpers.py b/superset/models/helpers.py index 969669c916d..d903d271a14 100644 --- a/superset/models/helpers.py +++ b/superset/models/helpers.py @@ -366,8 +366,8 @@ class AuditMixinNullable(AuditMixin): @property def changed_by_name(self) -> str: - if self.created_by: - return escape("{}".format(self.created_by)) + if self.changed_by: + return escape("{}".format(self.changed_by)) return "" @renders("created_by")