ktmud commented on a change in pull request #13291:
URL: https://github.com/apache/superset/pull/13291#discussion_r580725882
##########
File path: superset-frontend/src/views/CRUD/welcome/ActivityTable.tsx
##########
@@ -23,25 +23,43 @@ import { styled, t } from '@superset-ui/core';
import Loading from 'src/components/Loading';
import ListViewCard from 'src/components/ListViewCard';
import SubMenu from 'src/components/Menu/SubMenu';
+import { Chart } from 'src/types/Chart';
+import { Dashboard, SavedQueryObject } from 'src/views/CRUD/types';
+import { mq, CardStyles } from 'src/views/CRUD/utils';
+
import { ActivityData } from './Welcome';
-import { mq, CardStyles } from '../utils';
import EmptyState from './EmptyState';
-interface ActivityObjects {
- action?: string;
- item_title?: string;
- slice_name: string;
- time: string;
- changed_on_utc: string;
- url: string;
- sql: string;
- dashboard_title: string;
- label: string;
- id: string;
- table: object;
+/**
+ * Return result from /superset/recent_activity/{user_id}
+ */
+interface RecentActivity {
+ action: string;
+ item_type: 'slice' | 'dashboard';
item_url: string;
+ item_title: string;
+ time: number;
+ time_delta_humanized?: string;
+}
+
+interface RecentSlice extends RecentActivity {
+ item_type: 'slice';
+}
+
+interface RecentDashboard extends RecentActivity {
+ item_type: 'dashboard';
}
+/**
+ * Recent activity objects fetched by `getRecentAcitivtyObjs`.
+ */
+type ActivityObject =
Review comment:
Yes, as `ActivityTable` renders [`ActivityData`
](https://github.com/apache/superset/blob/3e0681b4384d9c91a7b1f8654f4391cfab4bc2b8/superset-frontend/src/views/CRUD/welcome/Welcome.tsx#L137)
and `ActivityData` comes from
[`getRecentAcitivtyObjs`](https://github.com/apache/superset/blob/3e0681b4384d9c91a7b1f8654f4391cfab4bc2b8/superset-frontend/src/views/CRUD/welcome/Welcome.tsx#L94),
which then calls [these API
endpoints](https://github.com/apache/superset/blob/3e0681b4384d9c91a7b1f8654f4391cfab4bc2b8/superset-frontend/src/views/CRUD/utils.tsx#L98-115).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]