import { h, Component, createRef } from 'preact'; import WBNavbarCommon from 'wb-navbar-common'; import WBArvadosCrumbs from 'wb-arvados-crumbs'; import WBNameAndUuid from 'wb-name-and-uuid'; import WBSelect from 'wb-select'; import WBTable from 'wb-table'; import WBPickObjectDialog from 'wb-pick-object-dialog'; import makeArvadosRequest from 'make-arvados-request'; class WBSharingPage extends Component { constructor(...args) { super(...args); this.state.rows = []; this.dialogRef = createRef(); } componentDidMount() { this.fetchData(); } fetchData() { const { app, uuid } = this.props; const { arvHost, arvToken } = app.state; let prom = makeArvadosRequest(arvHost, arvToken, '/arvados/v1/permissions/' + encodeURIComponent(uuid)); prom = prom.then(xhr => this.setState({ 'rows': this.prepareRows(xhr.response.items) })); } deletePermission(uuid) { throw Error('Not implemented'); } prepareRows(items) { const { app } = this.props; return items.map(it => [ ( ), ( ), ( ) ]); } addEntry(it) { throw Error('Not implemented'); } save() { throw Error('Not implemented'); } render({ app, uuid }, { rows }) { return (
This is the sharing management page for { uuid }
); } } export default WBSharingPage;