New Landing Page v1.0 (#4463)

* Updated welcome landing page

* fixed test and linting

* linting

* addressing comments

* fix test

* fix test

* remove unneeded var

* add magic comments
This commit is contained in:
Hugh A. Miles II
2018-02-26 17:02:41 -08:00
committed by Maxime Beauchemin
parent 56f65158a2
commit 11ea83ecf1
7 changed files with 158 additions and 84 deletions

View File

@@ -10,10 +10,11 @@ const propTypes = {
export default class RecentActivity extends React.PureComponent {
render() {
const rowLimit = 50;
const mutator = function (data) {
return data.map(row => ({
action: row.action,
item: <a href={row.item_url}>{row.item_title}</a>,
name: <a href={row.item_url}>{row.item_title}</a>,
type: row.action,
time: moment.utc(row.time).fromNow(),
_time: row.time,
}));
@@ -24,7 +25,7 @@ export default class RecentActivity extends React.PureComponent {
className="table table-condensed"
mutator={mutator}
sortable
dataEndpoint={`/superset/recent_activity/${this.props.user.userId}/`}
dataEndpoint={`/superset/recent_activity/${this.props.user.userId}/?limit=${rowLimit}`}
/>
</div>
);