Some reoriganization of code

parent d4744432
......@@ -9,22 +9,7 @@ import WalleLog from './components/Event/walleLog.jsx'
import Footer from './components/Footer.js'
import { BrowserRouter as Router, Route } from "react-router-dom";
function requireAuth(nextState, replace, callback) {
alert("Auth")
debugger
}
/*
<Router>
<div>
<Route exact path="/" component={WelcomePage} />
<Route path="/doi" component={DOIContainer} />
<Route path="/wallelog" component={WalleLog} />
<Route path="/topics" />
<Route path="/investigation/:id" component={InvestigationContainer} />
<Route path="/investigations" component={InvestigationsContainer} />
</div>
</Router>
*/
class App extends Component {
render() {
return (
......
......@@ -5,7 +5,7 @@ const GET_INVESTIGATIONS_BY_USER = "query=select distinct investigation from Inv
const GET_INVESTIGATIONS_WITH_DOI = "query=select distinct investigation from Investigation investigation , investigation.investigationUsers as investigationUserPivot , investigationUserPivot.user as investigationUser where investigation.doi <> null ORDER BY investigation.name asc "
const GET_DATASETS_BY_INVESTIGATION_ID = "query=SELECT dataset.id, dataset.name, dataset.startDate, dataset.endDate, investigation.name, parameterType.name, parameter.stringValue, parameter.numericValue FROM DatasetParameter as parameter JOIN parameter.dataset dataset JOIN parameter.type parameterType JOIN dataset.investigation investigation where investigation.id = :investigationId";
const GET_DATASETS_BY_INVESTIGATION_ID = "query=SELECT dataset.id, dataset.name, dataset.startDate, dataset.endDate, investigation.name, parameterType.name, parameter.stringValue, parameter.numericValue, dataset.location FROM DatasetParameter as parameter JOIN parameter.dataset dataset JOIN parameter.type parameterType JOIN dataset.investigation investigation where investigation.id = :investigationId";
const GET_SESSION = "sessionId=:sessionId";
const ICAT_ENTITY_MANAGER = ICAT.server + "/icat/entityManager?";
......
......@@ -23,4 +23,9 @@
.dataset-name{
font-weight: bold;
}
.dataset-location{
color: #586069;
font-size : 10px;
}
\ No newline at end of file
......@@ -15,6 +15,9 @@ class DatasetHeader extends React.Component {
<span className="glyphicon glyphicon-collapse-down color-gray"></span>
<span className="dataset-type left-margin">{this.props.definition}</span>
<span className="left-margin dataset-name">{this.props.name}</span>
<span className="left-margin dataset-location">{this.props.location}</span>
</div>
<div className="pull-right">
<span><Moment className="dataset-header-date" parse="YYYY-MM-DD HH:mm" format="LLLL">{this.props.startDate}</Moment></span>
......
......@@ -28,6 +28,7 @@ class DatasetTable extends React.Component {
definition={dataset.definition}
name={dataset.name}
startDate={dataset.startDate}
location={dataset.location}
></DatasetHeader>
</Panel.Title>
</Panel.Heading>
......
......@@ -69,7 +69,8 @@ class InvestigationContainer extends Component {
datasets[datasetId]["name"] = param[1];
datasets[datasetId]["startDate"] = param[2];
datasets[datasetId]["endDate"] = param[3];
datasets[datasetId]["investigationName"] = param[4];
datasets[datasetId]["investigationName"] = param[4];
datasets[datasetId]["location"] = param[8];
}
}
......@@ -113,7 +114,7 @@ class InvestigationContainer extends Component {
case PERSPECTIVE.DATASETS:
return <div>
<InvestigationContainerMenu investigationId={this.state.investigationId} perspective={perspective} ></InvestigationContainerMenu>
<DatasetTable datasets={this.state.datasets} fetching={this.state.fetching}></DatasetTable>
<DatasetTable datasets={this.state.datasets} fetching={this.state.fetching}></DatasetTable>
</div>
case PERSPECTIVE.FILES:
......
......@@ -6,7 +6,7 @@ import './InvestigationContainerMenu.css';
class InvestigationContainerMenu extends Component {
render() {
let logURL = "/investigation/" + this.props.investigationId;
debugger
return <Grid fluid className="navbar-fixed-top MenuBar">
<Row>
<Col xs={2}>
......@@ -33,7 +33,7 @@ class InvestigationContainerMenu extends Component {
</Col>
<Col xs={2}>
<FormControl bsSize="small" type="text" placeholder="Search" style={{"margin-top":"4px", "margin-left": "30px"}}/>
<FormControl bsSize="small" type="text" placeholder="Search" style={{"margin-top":"4px", "marginLeft": "30px"}}/>
</Col>
</Row>
......
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