/* eslint no-unused-vars: 0 */ import React from 'react'; import ReactDOM from 'react-dom'; import PropTypes from 'prop-types'; import { Table, Tr, Td, Thead, Th, unsafe } from 'reactable'; import '../../stylesheets/reactable-pagination.css'; const $ = window.$ = require('jquery'); const propTypes = { search: PropTypes.string, }; export default class DashboardTable extends React.PureComponent { constructor(props) { super(props); this.state = { dashboards: false, }; } componentDidMount() { const url = ( '/dashboardmodelviewasync/api/read' + '?_oc_DashboardModelViewAsync=changed_on' + '&_od_DashboardModelViewAsync=desc'); $.getJSON(url, (data) => { this.setState({ dashboards: data.result }); }); } render() { if (this.state.dashboards) { return (
| {o.dashboard_title} | {unsafe(o.creator)} | {unsafe(o.modified)} |
);
}
}
DashboardTable.propTypes = propTypes;