Commit f29fc20a authored by Alejandro De Maria Antolinos's avatar Alejandro De Maria Antolinos

Preparing new release

parents 0046bbf1 a7118984
......@@ -6,7 +6,7 @@ package-lock.json
# See https://help.github.com/ignore-files/ for more about ignoring files.
# personal script used to populate the database. Not for production.
# personal folders. Not for production
/forDevOnly
/doc
......
......@@ -2,13 +2,16 @@ FROM node:alpine
ENV NODE_ENV production
WORKDIR /edataportal
COPY . /edataportal
RUN apk --no-cache add --virtual build-dependencies git \
RUN apk --no-cache add git \
&& npm install \
&& apk del build-dependencies
&& npm install -g serve
WORKDIR /edataportal
EXPOSE 5000
EXPOSE 3000
ENTRYPOINT ["/bin/sh", "/edataportal/entrypoint"]
CMD ["serve", "-s", "build"]
CMD ["npm", "start"]
HEALTHCHECK --start-period=60s --timeout=5s --retries=1 CMD /edataportal/healthcheck
#!/bin/sh
npm run build
exec $@
#!/bin/sh
wget --spider -Sq http://localhost:5000 2> /dev/null | head -n1 | grep -Fq '200 OK' || exit 1
......@@ -20,6 +20,7 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
......
......@@ -19,15 +19,11 @@ class App extends Component {
<LoginContainer></LoginContainer>
*/
render() {
debugger
render() {
return (
<Router>
<div>
<Route exact path="/" component={WelcomePage} />
<div>
<Route exact path="/" component={MyDataPage} />
<Route exact path="/home" component={MyDataPage} />
<Route exact path="/investigations" component={MyDataPage} />
......@@ -39,6 +35,7 @@ class App extends Component {
<Route exact path="/investigation/:investigationId/events" component={EventsPage} />
<Route exact path="/selection" component={SelectionPage} />
<Route exact path="/selection/mint" component={MintSelectionPage} />
<Footer></Footer>
</div>
......@@ -79,6 +76,18 @@ class SelectionPage extends React.Component {
}
}
class MintSelectionPage extends React.Component {
render() {
return (
<div>
<MenuContainer/>
<LoginContainer/>
<MintSelectionContainer investigationId={this.props.match.params.investigationId} {...this.props} />
</div>
);
}
}
class MyDataPage extends React.Component {
render() {
......@@ -129,7 +138,6 @@ function EventsPage(props) {
<ExpirationLoginContainer></ExpirationLoginContainer>
<InvestigationContainer activeTab={3} investigationId={props.match.params.investigationId} {...props}/>
</div>
);
);
}
......@@ -2,25 +2,6 @@
import axios from 'axios'
import { URL } from '../../api/icat/icatPlus.js'
/**
* Request events for the givent investigationId
* @param {string} sessionId the session id
* @param {string} investigationId the investigation id
* @param {func} onSuccess the callback function executed after the events have been received successfully.
* @param {func} onError the callback function executed when an error occured during the request.
*/
export function getEventsByInvestigationId(sessionId, investigationId, onSuccess, onError) {
axios({
method: 'get',
url: URL.getAllEventsByInvestigationId(investigationId, sessionId),
})
.then(data => { onSuccess(data.data) })
.catch((error) => {
console.log("[ERROR] An error occured while retrieving the event list.")
onError(error)
})
}
/**
* Create the event on ICAT+ server
* @param {*} newEvent the event object to be created
......
import axios from "axios"
import {
getInvestigationsWithDOI,
} from '../api/icat/icat.js'
import {
getInvestigationsByUser,
} from '../api/icat/icatPlus.js'
import {
getOpenDataInvestigations,
} from '../api/icat/icatPlus.js'
import {
FECTH_INVESTIGATIONS,
FECTH_INVESTIGATIONS_DOI
} from '../constants/ActionTypes'
import axios from "axios";
import { getInvestigationsByUser, getInvestigations } from '../api/icat/icatPlus.js';
import { FECTH_INVESTIGATIONS, FECTH_MY_INVESTIGATIONS, FECTH_INVESTIGATIONS_DOI } from '../constants/ActionTypes';
export function fetchMyInvestigations(sessionId, username) {
return function (dispatch) {
dispatch(
{
type: FECTH_INVESTIGATIONS,
payload : axios.get(getInvestigationsByUser(sessionId, username))
//return function (dispatch) {
return {
type: FECTH_MY_INVESTIGATIONS,
payload: axios.get(getInvestigationsByUser(sessionId))
});
}
};
// }
}
export function fetchOpenDataInvestigations(sessionId, username) {
return function (dispatch) {
dispatch(
{
type: FECTH_INVESTIGATIONS,
payload : axios.get(getOpenDataInvestigations(sessionId, username))
});
}
}
export function fetchInvestigationsWithDOI(sessionId, username) {
return function (dispatch) {
dispatch(
{
type: FECTH_INVESTIGATIONS_DOI,
payload : axios.get(getInvestigationsWithDOI(sessionId, username))
});
}
export function fetchInvestigations(sessionId) {
//return function (dispatch) {
return {
type: FECTH_INVESTIGATIONS,
payload : axios.get(getInvestigations(sessionId))
};
// }
}
import $ from 'jquery';
import ICATPLUS from '../config/icat/icatPlus.js'
import ICATPLUS from '../config/icat/icatPlus.js';
import { fetchMyInvestigations, fetchInvestigations } from './data.js';
import {
LOG_IN,
LOGGED_IN,
......@@ -40,7 +40,9 @@ export function doSignIn(plugin, username, password) {
success: function( data ) {
if (data){
if (data.sessionId){
dispatch({type: LOGGED_IN, username: username, sessionId: data.sessionId});
dispatch({type: LOGGED_IN, username: username, sessionId: data.sessionId});
dispatch(fetchInvestigations(data.sessionId));
dispatch(fetchMyInvestigations(data.sessionId));
}
}
},
......
import ICAT from '../../config/icat/icat.js'
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, dataset.location FROM DatasetParameter as parameter JOIN parameter.dataset dataset JOIN parameter.type parameterType JOIN dataset.investigation investigation where investigation.id = :investigationId";
......@@ -15,27 +14,27 @@ const ICAT_ENTITY_MANAGER = ICAT.server + "/icat/entityManager?";
const GET_FILES_BY_DATASETID_ID = "query=select distinct datafile from Datafile datafile , datafile.dataset as dataset where dataset.id = :datasetId limit 0, 10000 "
function getSession(sessionId, user){
return GET_SESSION.replace(":sessionId", sessionId);
function getSession(sessionId, user) {
return GET_SESSION.replace(":sessionId", sessionId);
}
export function getInvestigationsWithDOI(sessionId, user){
return ICAT_ENTITY_MANAGER + getSession(sessionId) + "&" + GET_INVESTIGATIONS_WITH_DOI.replace(":user", user) + "&server=https://icat.esrf.fr";
export function getInvestigationsWithDOI(sessionId, user) {
return ICAT_ENTITY_MANAGER + getSession(sessionId) + "&" + GET_INVESTIGATIONS_WITH_DOI.replace(":user", user) + "&server=https://icat.esrf.fr";
}
export function getDatasetsByInvestigationId(sessionId, user, investigationId){
return ICAT_ENTITY_MANAGER + getSession(sessionId) + "&" + GET_DATASETS_BY_INVESTIGATION_ID.replace(":investigationId", investigationId) + "&server=https://icat.esrf.fr";
export function getDatasetsByInvestigationId(sessionId, user, investigationId) {
return ICAT_ENTITY_MANAGER + getSession(sessionId) + "&" + GET_DATASETS_BY_INVESTIGATION_ID.replace(":investigationId", investigationId) + "&server=https://icat.esrf.fr";
}
export function getFilesByDatasetId(sessionId, datasetId){
return ICAT_ENTITY_MANAGER + getSession(sessionId) + "&" + GET_FILES_BY_DATASETID_ID.replace(":datasetId", datasetId) + "&server=https://icat.esrf.fr";
export function getFilesByDatasetId(sessionId, datasetId) {
return ICAT_ENTITY_MANAGER + getSession(sessionId) + "&" + GET_FILES_BY_DATASETID_ID.replace(":datasetId", datasetId) + "&server=https://icat.esrf.fr";
}
export function getDatasetsById(sessionId, user, datasetIdList){
return ICAT_ENTITY_MANAGER + getSession(sessionId) + "&" + GET_DATASETS_BY_ID.replace(":datasetIdList", datasetIdList) + "&server=https://icat.esrf.fr";
}
export function getDatasetsById(sessionId, user, datasetIdList) {
return ICAT_ENTITY_MANAGER + getSession(sessionId) + "&" + GET_DATASETS_BY_ID.replace(":datasetIdList", datasetIdList) + "&server=https://icat.esrf.fr";
}
\ No newline at end of file
import ICATPLUS from '../../config/icat/icatPlus.js'
import StringConverterForRegexp from 'escape-string-regexp';
/**
* This class contains all the URL used to communicate with the icat-plus server.
*/
export class URL {
/**
* Get URL used to retrieve events for a given investigation from walleLog
* @param {*} investigationId the investigation indentifier
* Get URL needed to retrieve events for a given investigation
* @param {String} investigationId the session identifier
* @param {String} sessionId the session identifier
* @return {String} the URL to get the requested events
* @return {String} the URL to get the requested events. Null if investigationId or sessionId is missing.
*/
static getEventsByInvestigationId(investigationId, sessionId) {
if (investigationId && sessionId) {
return ICATPLUS.server + "/investigations/" + investigationId + "/events/query" + "?sessionId=" + sessionId;
}
return null;
}
/**
* Get URL needed to retrieve the event count for a given investigation
* @param {*} investigationId the investigation identifier
* @param {*} sessionId the session identifier
* @return {String} the URL to get the requested event count
*/
static getEventCountByInvestigationId(investigationId, sessionId) {
return ICATPLUS.server + "/investigations/" + investigationId + "/events/query/count?sessionId=" + sessionId;
}
/**
* Get URL used to update events for a given investigation from ICAT+
* @param {*} investigationId the investigation indentifier
* @param {String} sessionId the session identifier
* @return {String} the URL to get the requested events
*/
static getAllEventsByInvestigationId(investigationId, sessionId) {
return ICATPLUS.server + "/investigations/" + investigationId + "/events?sessionId=" + sessionId;
}
}
/**
......@@ -70,14 +93,140 @@ export function getDataCollectionByDatasetId(sessionId, datasetId) {
return ICATPLUS.server + "/datasets/" + datasetId + "/datacollection?sessionId=" + sessionId;
}
export function getInvestigationsByUser(sessionId){
export function getInvestigationsByUser(sessionId) {
return ICATPLUS.server + "/investigations?sessionId=" + sessionId;
}
export function getOpenDataInvestigations(sessionId){
export function getInvestigations(sessionId) {
return ICATPLUS.server + "/investigations?sessionId=" + sessionId + "&opendata=true";
}
export function getDatasetByDOI(sessionId, doi){
return ICATPLUS.server + "/doi/" + doi + "/datasets?sessionId=" + sessionId;
}
\ No newline at end of file
export function getDatasetByDOI(sessionId, doi) {
return ICATPLUS.server + "/doi/" + doi + "/datasets?sessionId=" + sessionId;
}
/**
* Returns the corresponding selection filter for mongoDB
* @param {array} criteria the search criteria as provided by the combosearch component
* @returns {Object} the selection query to be used for the mongoDB query
*/
export function getSelectionFilterForMongoDB(criteria) {
const REGEXP_FILTER_TYPE = "regexpFilterType";
const EQUALITY_FILTER_TYPE = "equalityFilterType";
/**
* A filter used to search a single word inside text, using regexp, not dates
* @param {*} criterion the single criterion
*/
function regexpFilterOnSingleCriterion(criterion) {
return { $regex: '.*' + StringConverterForRegexp(criterion.search) + '.*', $options: 'i' };
}
function getDateFilterOnSingleCriterion(criterion) {
if (criterion.momentDate) {
if (criterion.search === "before") {
return { $lt: criterion.momentDate.format("YYYY-MM-DDTHH:mm:ss.SSS") + 'Z' };
}
if (criterion.search === "after") {
return { $gte: criterion.momentDate.format("YYYY-MM-DDTHH:mm:ss.SSS") + 'Z' };
}
}
return null;
}
function equalityFilterOnSingleCriterion(criterion) {
let filter = {};
if (criterion && criterion.criteria && criterion.search) {
filter[criterion.criteria.toLowerCase()] = criterion.search;
return filter;
}
}
/**
* pop a filter inside a array oof filters. Used for $and and $or filters
* @param {Array} filter the array to pop the filter in
* @param {*} criterion the criterion which is searched
* @param {*} filterType the type of filter, 'regexpFilter' or 'equalityFilter'
*/
function popSingleFilter(filter, criterion, filterType) {
if (criterion.criteria.toLowerCase() === "author") {
filter['username'] = regexpFilterOnSingleCriterion(criterion);
} else if (criterion.criteria.toLowerCase() === "creation date") {
if (getDateFilterOnSingleCriterion(criterion)) {
filter['creationDate'] = getDateFilterOnSingleCriterion(criterion);
} else {
return null;
}
} else if (criterion.criteria.toLowerCase() === "content") {
filter['content.text'] = regexpFilterOnSingleCriterion(criterion);
} else {
if (filterType === REGEXP_FILTER_TYPE) {
filter[criterion.criteria.toLowerCase()] = regexpFilterOnSingleCriterion(criterion);
} else if (filterType === EQUALITY_FILTER_TYPE) {
filter = equalityFilterOnSingleCriterion(criterion);
}
}
return filter;
}
/**
* Create the or filter which is used in all requests to get only event which type is annotation of
* notification but not attachment.
*/
function getNotificationOrAnnotationFilter() {
let filter = {}
let orFilter = [];
let orFilterItem = popSingleFilter({}, { criteria: 'type', search: 'annotation' }, EQUALITY_FILTER_TYPE);
orFilter.push(orFilterItem);
orFilterItem = popSingleFilter({}, { criteria: 'type', search: 'notification' }, EQUALITY_FILTER_TYPE);
orFilter.push(orFilterItem);
filter['$or'] = orFilter;
return filter
}
let filter = {}; // the final filter
let andExpressions = [];
// the first part of the AND filter which selects annotation and notification systematically
andExpressions.push(getNotificationOrAnnotationFilter());
// the second part of the AND filter which selects according to user search
let secondANDexpression = {};
let userSearchANDArray = [];
if (criteria && criteria instanceof Array) {
criteria.forEach(criterion => {
if (criterion.criteria && criterion.search) {
if (criterion.criteria.toLowerCase() === "everywhere") {
let orFilter = [];
let orFilterItem = popSingleFilter({}, { criteria: 'title', search: criterion.search }, REGEXP_FILTER_TYPE);
orFilter.push(orFilterItem);
orFilterItem = popSingleFilter({}, { criteria: 'type', search: criterion.search }, REGEXP_FILTER_TYPE);
orFilter.push(orFilterItem);
orFilterItem = popSingleFilter({}, { criteria: 'category', search: criterion.search }, REGEXP_FILTER_TYPE);
orFilter.push(orFilterItem);
orFilterItem = popSingleFilter({}, { criteria: 'username', search: criterion.search }, REGEXP_FILTER_TYPE);
orFilter.push(orFilterItem);
orFilterItem = popSingleFilter({}, { criteria: 'content.text', search: criterion.search }, REGEXP_FILTER_TYPE);
orFilter.push(orFilterItem);
userSearchANDArray.push({ '$or': orFilter });
} else {
let singleFilter = popSingleFilter({}, criterion, REGEXP_FILTER_TYPE);
if (singleFilter) {
userSearchANDArray.push(singleFilter);
}
}
}
})
if (userSearchANDArray.length !== 0) {
secondANDexpression['$and'] = userSearchANDArray;
andExpressions.push(secondANDexpression);
}
}
filter['$and'] = andExpressions;
return filter;
}
......@@ -3,7 +3,7 @@ import { Breadcrumb, Label } from 'react-bootstrap';
export class InvestigationBreadCrumbs extends React.Component {
render() {
render() {
var items = [];
if (this.props.breadcrumbsList){
if (this.props.breadcrumbsList.items) {
......@@ -12,13 +12,15 @@ export class InvestigationBreadCrumbs extends React.Component {
}
/** breadCrumbsSize is used to mark as active the latest item in the list */
var breadCrumbsSize = items.length;
return (<Breadcrumb style={{ height: '30px', borderBotton: '1px solid #f2f2f2', backgroundColor: '#e7e7e7', marginLeft: '30px', fontSize: '12px' }}>
<Breadcrumb.Item href="/home">Home</Breadcrumb.Item>
return (<Breadcrumb style={{ backgroundColor:'#bfbfbf', marginTop:-20, borderBotton: '1px solid #f2f2f2', fontSize: '14px' }}>
{items.map(function (breadcrumb, i) {
if (breadCrumbsSize === (i + 1)){
return <Breadcrumb.Item active href={breadcrumb.link}><Label style={{backgroundColor:'#007bff', fontSize:'12px'}}>{breadcrumb.badge}</Label>{breadcrumb.name}</Breadcrumb.Item>;
return <Breadcrumb.Item active href={breadcrumb.link}>
<Label style={{fontSize:'12px'}}>{breadcrumb.badge}</Label>
{breadcrumb.name}</Breadcrumb.Item>;
}
return <Breadcrumb.Item href={breadcrumb.link}>{breadcrumb.name}</Breadcrumb.Item>;
return <Breadcrumb.Item style={{marginLeft:40}} href={breadcrumb.link}>{breadcrumb.name}</Breadcrumb.Item>;
})}
</Breadcrumb>)
......
......@@ -3,6 +3,7 @@ import { Well, Button, ButtonToolbar, Glyphicon, Tooltip, OverlayTrigger, Grid,
import { getPDF } from '../../api/icat/icatPlus'
import { ComboSearch } from 'react-combo-search'
import PropTypes from 'prop-types';
import { MONITORING_VIEW, DOC_VIEW, NEW_EVENT_VISIBLE } from '../../constants/EventTypes';
// styles
require('../../react-datetime.css');
......@@ -12,18 +13,20 @@ require('../../react-combo-search.css');
/**
* The menu displayed above the event list
*/
class ListMenu extends React.Component {
class EventActionBar extends React.Component {
constructor(props) {
super(props);
this.state = {
isAdvancedSearchVisible: false // whether the advanced search panel is visible or not
}
this.onSearch = this.onSearch.bind(this);
}
render() {
const { investigationId, isShowingNewEvent } = this.props;
const sessionId = this.props.sessionId;
const { investigationId,
isShowingNewEvent,
numberOfMatchingEventsFound,
reloadEvents,
sessionId,
setNewEventVisibility,
setView } = this.props;
return (
<Grid fluid={true} style={{ marginTop: '10px' }}>
......@@ -34,7 +37,7 @@ class ListMenu extends React.Component {
<EnabledMenu
sessionId={sessionId}
investigationId={investigationId}
onNewEventButtonClicked={this.props.onNewEventButtonClicked} />}
setNewEventVisibility={setNewEventVisibility} />}
</Col>
<Col xs={2}>
......@@ -47,8 +50,8 @@ class ListMenu extends React.Component {
}>
<ButtonToolbar style={{ display: 'inline-block' }}>
<ToggleButtonGroup type="radio" name="view" defaultValue={2}>
<ToggleButton value={1} onClick={this.props.setMonitoringView}><Glyphicon glyph="list" /> List</ToggleButton>
<ToggleButton value={2} onClick={this.props.setDocView}><Glyphicon glyph="list-alt" /> Doc </ToggleButton>
<ToggleButton value={1} onClick={() => setView(MONITORING_VIEW)}><Glyphicon glyph="list" /> List</ToggleButton>
<ToggleButton value={2} onClick={() => setView(DOC_VIEW)}><Glyphicon glyph="list-alt" /> Doc </ToggleButton>
</ToggleButtonGroup>
</ButtonToolbar>
</OverlayTrigger>
......@@ -60,10 +63,14 @@ class ListMenu extends React.Component {
<p style={{ marginTop: '4px' }}> Search: </p>
</div>
<div style={{ flexGrow: '1', maxWidth: '500px' }} >
<FilterPanel filterData={this.props.filterData} numberOfMatchingEventsFound={this.props.numberOfMatchingEventsFound} onCloseFilterPanelClicked={this.onCloseFilterPanelClicked} />
<ComboSearch
onSearch={this.onSearch}
selectData={['Everywhere', 'Content', 'Title', 'Type', 'Category', 'Author', 'Creation date']}
datePickerCriteria='Creation date'
/>
</div>
<div style={{ flexGrow: '0', minWidth: '100px' }} >
<Well style={{ padding: '4px', marginBottom: '0px', borderTopLeftRadius: '0px', borderBottomLeftRadius: '0px' }}> <b> &nbsp; {this.props.numberOfMatchingEventsFound} found </b> </Well>
<Well style={{ padding: '4px', marginBottom: '0px', borderTopLeftRadius: '0px', borderBottomLeftRadius: '0px' }}> <b> &nbsp; {numberOfMatchingEventsFound} found </b> </Well>
</div>
</div>
</Col>
......@@ -71,6 +78,10 @@ class ListMenu extends React.Component {
</Grid >
)
}
onSearch(data) {
return this.props.searchEvents(data);
}
}
/**
......@@ -100,7 +111,7 @@ const EnabledMenu = (props) => {
return (<ButtonToolbar>
<OverlayTrigger placement="bottom" overlay={tooltip("Create a new event")}>
<Button bsSize="small" bsStyle="primary" onClick={() => props.onNewEventButtonClicked()} enabled >
<Button bsSize="small" bsStyle="primary" onClick={() => props.setNewEventVisibility(NEW_EVENT_VISIBLE)} enabled >
<Glyphicon glyph="plus" /> New
</Button>
......@@ -114,26 +125,21 @@ const EnabledMenu = (props) => {
)
}
/**
* Component which renders the filter panel
* @param {*} props props passed to the component
*/
const FilterPanel = (props) => {
return (
<ComboSearch
onSearch={props.filterData}
selectData={['Everywhere', 'Content', 'Title', 'Type', 'Category', 'Author', 'Creation date']}
datePickerCriteria='Creation date'
/>
)
EventActionBar.propTypes = {
/** the identifier of the current investigation */
investigationId: PropTypes.string,
/** True when the user is writing a new event */
isShowingNewEvent: PropTypes.bool,
/** the number of events found */
numberOfMatchingEventsFound: PropTypes.number,
/** Callback function which reloads the events based on search criteria*/
searchEvents: PropTypes.func,
/** Callback function triggered when the user clicks on the new event button */
setNewEventVisibility: PropTypes.func,
/** The current session Id */
sessionId: PropTypes.string.isRequired,
/** the callback function executed when the user clicks the view buttons */
setView: PropTypes.func,
}
ListMenu.propTypes = {
/** the callback function executed when the user click the list button */
setMonitoringView: PropTypes.func,
/** the callback function executed when the user click the details button */
setDocView: PropTypes.func,
}
export default ListMenu;
\ No newline at end of file
export default EventActionBar;
\ No newline at end of file
......@@ -5,6 +5,7 @@ import { getOriginalEvent, getEventIcon, getLastCommentContent } from '../../hel
import EventContentDisplayer from './EventContentDisplayer';
import { ANNOTATION, NOTIFICATION } from '../../constants/EventTypes';
require("./event.css");
/**
* The class to display an event which is in the doc view
*/
......@@ -68,7 +69,6 @@ class EventDocViewRead extends React.Component {
}
let event = this.props.event;
if (event && event.type) {
if (event.type === NOTIFICATION) {
let showLastComment = (this.props.showLastComment !== undefined && this.props.showLastComment !== null) ? this.props.showLastComment : true;
......@@ -77,6 +77,8 @@ class EventDocViewRead extends React.Component {
return showAnnotation(event);
}
return null;
} else {
return null;
}
}
}
......
import { MONITORING_VIEW, DOC_VIEW } from '../../constants/EventTypes';
import React from 'react'
import ReactDOM from 'react-dom'
import { Grid, Row, Col, OverlayTrigger, Tooltip } from 'react-bootstrap'
......@@ -7,16 +9,14 @@ import Moment from 'moment'
import EventListView from './EventListView'
import EventDocView from './EventDocView'
import NewEvent from './NewEvent'
import ListMenu from './ListMenu'
import EventActionBar from './EventActionBar'
import { getOriginalEvent } from '../../helpers/EventHelpers'
import { filterEvents } from '../../helpers/FilterHelpers'
import PaginationHelper from '../../helpers/PaginationHelper'
require("./event.css");
const VERTICAL_BAR_EXTRA_LENGTH_ON_TOP = 10;
const VERTICAL_BAR_EXTRA_LENGTH_ON_BOTTOM = 15;
const VERTICAL_BAR_LENGTH_UNIT = 'px';
const EVENTS_PER_PAGE = 200;
/**
* The list of the all events
......@@ -28,19 +28,13 @@ class EventList extends React.Component {
this.state = {
verticalBarLength: '0px',
isShowingNewEvent: false,
view: 'doc', // 'doc' or 'monitoring'
events: this.props.eventList, // the displayed (ie filtered) event list. The original list is in this.props.eventList
events: this.props.events, // the displayed (ie filtered) event list. The original list is in this.props.eventList
activePage: 0
}