mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Adding links pointing to the new user profile page (#1704)
* Adding links pointing to the new user profile page * Raising coverage * Fixing tests
This commit is contained in:
committed by
GitHub
parent
50da4f8c07
commit
7eef46e941
@@ -19,6 +19,7 @@ export default class Favorites extends React.PureComponent {
|
||||
renderSliceTable() {
|
||||
const mutator = (data) => data.map(slice => ({
|
||||
slice: <a href={slice.url}>{slice.title}</a>,
|
||||
creator: <a href={slice.creator_url}>{slice.creator}</a>,
|
||||
favorited: moment.utc(slice.dttm).fromNow(),
|
||||
_favorited: slice.dttm,
|
||||
}));
|
||||
@@ -26,7 +27,7 @@ export default class Favorites extends React.PureComponent {
|
||||
<TableLoader
|
||||
dataEndpoint={`/superset/fave_slices/${this.props.user.userId}/`}
|
||||
className="table table-condensed"
|
||||
columns={['slice', 'favorited']}
|
||||
columns={['slice', 'creator', 'favorited']}
|
||||
mutator={mutator}
|
||||
noDataText="No favorite slices yet, go click on stars!"
|
||||
sortable
|
||||
@@ -36,6 +37,7 @@ export default class Favorites extends React.PureComponent {
|
||||
renderDashboardTable() {
|
||||
const mutator = (data) => data.map(dash => ({
|
||||
dashboard: <a href={dash.url}>{dash.title}</a>,
|
||||
creator: <a href={dash.creator_url}>{dash.creator}</a>,
|
||||
favorited: moment.utc(dash.dttm).fromNow(),
|
||||
}));
|
||||
return (
|
||||
@@ -44,7 +46,7 @@ export default class Favorites extends React.PureComponent {
|
||||
mutator={mutator}
|
||||
dataEndpoint={`/superset/fave_dashboards/${this.props.user.userId}/`}
|
||||
noDataText="No favorite dashboards yet, go click on stars!"
|
||||
columns={['dashboard', 'favorited']}
|
||||
columns={['dashboard', 'creator', 'favorited']}
|
||||
sortable
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user