Commit 0d64be32 authored by ale's avatar ale

Dataset grid

parent 6d859262
Components
----------
**src/App.js**
### 1. App
-----
**src/components/Header.js**
### 1. Header
-----
**src/components/Investigation/InvestigationTable.js**
### 1. InvestigationTable
-----
**src/components/Login/LoginForm.js**
### 1. LoginForm
Property | Type | Required | Default value | Description
:--- | :--- | :--- | :--- | :---
username|string|no||
-----
**src/components/Menu/Menu.js**
### 1. Menu
-----
**src/containers/DOIContainer.js**
### 1. DOIContainer
-----
**src/containers/DatasetsContainer.js**
### 1. DatasetsContainer
-----
**src/containers/InvestigationsContainer.js**
### 1. InvestigationsContainer
-----
**src/containers/LoginContainer.js**
### 1. LoginContainer
-----
<sub>This document was generated by the <a href="https://github.com/marborkowski/react-doc-generator" target="_blank">**React DOC Generator v1.2.5**</a>.</sub>
......@@ -368,6 +368,12 @@
"resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
"integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c="
},
"ast-types": {
"version": "0.10.1",
"resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.10.1.tgz",
"integrity": "sha512-UY7+9DPzlJ9VM8eY0b2TUZcZvF+1pO0hzMtAyjBYKhOmnvRlqYNYnWdtsMj0V16CGaMlpL0G1jnLbLo4AyotuQ==",
"dev": true
},
"ast-types-flow": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz",
......@@ -1885,6 +1891,23 @@
"restore-cursor": "2.0.0"
}
},
"cli-table": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz",
"integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=",
"dev": true,
"requires": {
"colors": "1.0.3"
},
"dependencies": {
"colors": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz",
"integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=",
"dev": true
}
}
},
"cli-width": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
......@@ -4836,6 +4859,12 @@
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
},
"graceful-readlink": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
"integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=",
"dev": true
},
"growly": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz",
......@@ -7207,6 +7236,15 @@
"lower-case": "1.1.4"
}
},
"node-dir": {
"version": "0.1.17",
"resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz",
"integrity": "sha1-X1Zl2TNRM1yqvvjxxVRRbPXx5OU=",
"dev": true,
"requires": {
"minimatch": "3.0.4"
}
},
"node-fetch": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz",
......@@ -9243,6 +9281,81 @@
"text-table": "0.2.0"
}
},
"react-doc-generator": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/react-doc-generator/-/react-doc-generator-1.2.5.tgz",
"integrity": "sha1-xocSdVsrWdh9hEoj6T+ph3avzaw=",
"dev": true,
"requires": {
"cli-table": "0.3.1",
"colors": "1.1.2",
"commander": "2.9.0",
"handlebars": "4.0.11",
"node-dir": "0.1.17",
"react": "15.6.2",
"react-docgen": "2.20.1",
"react-dom": "15.6.2"
},
"dependencies": {
"commander": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
"integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=",
"dev": true,
"requires": {
"graceful-readlink": "1.0.1"
}
},
"react": {
"version": "15.6.2",
"resolved": "https://registry.npmjs.org/react/-/react-15.6.2.tgz",
"integrity": "sha1-26BDSrQ5z+gvEI8PURZjkIF5qnI=",
"dev": true,
"requires": {
"create-react-class": "15.6.3",
"fbjs": "0.8.16",
"loose-envify": "1.3.1",
"object-assign": "4.1.1",
"prop-types": "15.6.1"
}
},
"react-dom": {
"version": "15.6.2",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-15.6.2.tgz",
"integrity": "sha1-Qc+t9pO3V/rycIRDodH9WgK+9zA=",
"dev": true,
"requires": {
"fbjs": "0.8.16",
"loose-envify": "1.3.1",
"object-assign": "4.1.1",
"prop-types": "15.6.1"
}
}
}
},
"react-docgen": {
"version": "2.20.1",
"resolved": "https://registry.npmjs.org/react-docgen/-/react-docgen-2.20.1.tgz",
"integrity": "sha512-NYmD8nDPMWpIpqWqhSZjQ3P5iQml55IMkDG0ZInyWP7JD2ljaNhrxNWZnXPrOezUu6bYlcZUCxjw19s7zhE2uw==",
"dev": true,
"requires": {
"async": "2.6.0",
"babel-runtime": "6.26.0",
"babylon": "5.8.38",
"commander": "2.15.1",
"doctrine": "2.1.0",
"node-dir": "0.1.17",
"recast": "0.12.9"
},
"dependencies": {
"babylon": {
"version": "5.8.38",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-5.8.38.tgz",
"integrity": "sha1-7JsSCxG/bM1Bc6GL8hfmC3mFn/0=",
"dev": true
}
}
},
"react-dom": {
"version": "16.3.2",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.3.2.tgz",
......@@ -9498,6 +9611,33 @@
"set-immediate-shim": "1.0.1"
}
},
"recast": {
"version": "0.12.9",
"resolved": "https://registry.npmjs.org/recast/-/recast-0.12.9.tgz",
"integrity": "sha512-y7ANxCWmMW8xLOaiopiRDlyjQ9ajKRENBH+2wjntIbk3A6ZR1+BLQttkmSHMY7Arl+AAZFwJ10grg2T6f1WI8A==",
"dev": true,
"requires": {
"ast-types": "0.10.1",
"core-js": "2.5.6",
"esprima": "4.0.0",
"private": "0.1.8",
"source-map": "0.6.1"
},
"dependencies": {
"core-js": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.6.tgz",
"integrity": "sha512-lQUVfQi0aLix2xpyjrrJEvfuYCqPc/HwmTKsC/VNf8q0zsjX7SQZtp4+oRONN5Tsur9GDETPjj+Ub2iDiGZfSQ==",
"dev": true
},
"esprima": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz",
"integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==",
"dev": true
}
}
},
"recursive-readdir": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.1.tgz",
......
......@@ -27,5 +27,8 @@
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"devDependencies": {
"react-doc-generator": "^1.2.5"
}
}
span.doiBadge {
font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif;
color: #fff;
background: #000;
text-decoration: none;
padding: 2px 0 2px 4px;
border-color: #000;
}
span.doiBadge a {
color: #fff;
background: #09c;
text-decoration: none;
margin-left: 4px;
padding: 2px 5px 2px 4px;
border-radius: 0 5px 5px 0;
}
a {
color: #007bff;
text-decoration: none;
background-color: transparent;
-webkit-text-decoration-skip: objects;
}
.borderRadius-5 {
border-radius: 5px;
}
.font-1p4rem {
font-size: 1.4rem;
}
.investigation-table-container{
margin-top: 5px;
margin-bottom: 10px;
margin-right: 30px;
margin-left: 30px;
}
import React from 'react';
import Moment from 'react-moment';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
import './DatasetTable.css';
class DatasetTable extends React.Component {
constructor(props) {
super(props);
}
componentDidMount(){
}
render() {
if (this.props.fetching){
return "Loading";
}
const options = {
paginationSize: 5,
sizePerPage: 25,
paginationShowsTotal: true,
hidePageListOnlyOnePage: true
};
return (
<div className='investigation-table-container'>
<BootstrapTable
data={ this.props.datasets }
options={ options }
pagination
striped
search
hover
condensed>
<TableHeaderColumn width='10%' hidden isKey dataField='id'>id</TableHeaderColumn>
<TableHeaderColumn width='10%' dataField='name'>Name</TableHeaderColumn>
</BootstrapTable>
</div>
);
}
}
export default DatasetTable;
\ No newline at end of file
......@@ -17,7 +17,6 @@ class InvestigationTable extends React.Component {
doiFormatter(cell, row) { // String example
if (cell != null) {
//return `<span class='doiBadge borderRadius-5 font-1p4rem'>DOI<a id='doiLink' href='https://doi.esrf.fr/{cell}'>{cell}</a></span>`;
return `<span class='doiBadge borderRadius-5 font-1p4rem'>DOI<a id='doiLink' target='_blank' href='https://doi.esrf.fr/${cell}' >${cell}</a></span>`;
}
}
......
......@@ -3,7 +3,7 @@ import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { fetchDatasetsByInvestigationId } from '../actions/data.js';
import InvestigationTable from "../components/Investigation/InvestigationTable.js"
import DatasetTable from "../components/Dataset/DatasetTable.js"
class DatasetsContainer extends Component {
......@@ -23,7 +23,7 @@ class DatasetsContainer extends Component {
}
render() {
return this.state.username;
return <DatasetTable datasets={ this.props.data.datasets }></DatasetTable>;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment