Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
3dc8797
EventTimeline : Server-side skeleton
vvancak Feb 23, 2017
2c91213
EventTimeline : Client-side skeleton
vvancak Feb 26, 2017
188f8bb
EventTimeline: Server-side event people extraction
vvancak Mar 9, 2017
a513844
EventTimeline: EventTimeline: API fixes
vvancak Mar 17, 2017
379fb9a
EventTimeline: IDE down, changes flush
vvancak Mar 18, 2017
a342c63
EventTimeline: Server event query fixes
vvancak Mar 18, 2017
60cda52
EventTimeline: Client-Side event extraction complete
vvancak Mar 18, 2017
fc4e83e
EventTimeline: Mocked data visualization
vvancak Mar 21, 2017
0ec0581
EventTimeline: Version updates
vvancak Mar 23, 2017
052a5f6
EventTimeline: Query updates - deduplication & More people data
vvancak Mar 26, 2017
9074ded
EventTimeline: client fixes
vvancak Mar 26, 2017
e71d50f
EventTimeline: API changes
vvancak Mar 26, 2017
2685322
EventTimeline: Events in table
vvancak Mar 26, 2017
ffca1bf
EventTimeline: Queries work, data ready
vvancak Mar 26, 2017
f53019a
EventTimeline: Version revert, react-addons blocking installations
vvancak Mar 27, 2017
5dff18c
EventTimeline: Data visualization added, scaling improvements pending
vvancak Mar 28, 2017
44cf369
EventTimeline: Visualizer component rewritten to use TimeSeries
vvancak Mar 30, 2017
4b3f1d7
EventTimeline: Configuration selections, EventInfo visualization base
vvancak Mar 31, 2017
e8a8dbc
EventTimeline: Start/End selections work
vvancak Apr 1, 2017
491fd20
Event people selection works, more data needed
vvancak Apr 1, 2017
3db9745
EventTimeline: Start & End -> single Date (more data & people)
vvancak Apr 2, 2017
aa0fc79
Merge branch 'master' into develop
vvancak Apr 8, 2017
8f7918d
EventTimeline: Configuration saving
vvancak Apr 8, 2017
a6b3d1c
Timeline : Queries & Extractors
vvancak Apr 30, 2017
9b56456
TimeLine: Service API
vvancak May 1, 2017
5bf6606
TimeLine: Moved from eventTimeLine, JavaScript api & module preparation
vvancak May 1, 2017
c8869e4
TimeLine: Server fixes (injection & extractors)
vvancak May 4, 2017
e03f179
TimeLine : Visualization cleanup & refactor
vvancak May 4, 2017
dbd2c26
TimeLine : Server-Side fixes
vvancak May 6, 2017
61f24ba
TimeLine: intervals in client-side
vvancak May 6, 2017
021d19c
TimeLine: Added server support for get connection by type
vvancak May 8, 2017
b5f9b4f
TimeLine: Things Connected to Intervals/Instants - init implementation
vvancak May 8, 2017
376dfc1
TimeLine: Limits
vvancak May 8, 2017
6d6e3f7
TimeLine: Visualization fixes, Usage of official components
vvancak May 9, 2017
9bca10b
TimeLine: Counts
vvancak May 11, 2017
88e1888
TimeLine : Labels
vvancak May 11, 2017
981450e
TimeLine: Server Time extraction fixes
vvancak May 13, 2017
285070d
TimeLine : Selected Time Record, Time Range & Pages visualizers defin…
vvancak May 13, 2017
d69a6f0
TimeLine: Comments
vvancak May 13, 2017
b4cd889
TimeLine: Visualization fixes
vvancak May 14, 2017
fed652a
TimeLine : App routes & minor fixes
vvancak May 14, 2017
4300873
TimeLine : Data format changes
vvancak May 21, 2017
4e44d48
TimeLine: Style changes
vvancak May 21, 2017
0c83920
TimeLine: Routes, Bundles, Code autoformat
vvancak May 21, 2017
bf1257d
TimeLine: Comments API to conf routes
vvancak May 21, 2017
f68122d
TimeLine: count resetting, tti routes & api fixes
vvancak May 21, 2017
7220858
TimeLine: moving backend to separate package
vvancak May 22, 2017
996ea4a
TimeLine: Visualizer API creating
vvancak May 22, 2017
2a41cf5
TimeLine: API query limits
vvancak May 24, 2017
b33a15a
Configuration toolbar
vvancak May 25, 2017
4d43578
TimeLine: Configuration to ConfigToolbar
vvancak May 26, 2017
a7106b3
GoogleMaps: Queries & Extractors
vvancak May 26, 2017
08972c5
GoogleMaps: API
vvancak May 27, 2017
6f0d983
GoogleMaps: JS API, TimeLine: pages fixes
vvancak May 27, 2017
8e1ca28
GoogleMaps: markers visualizations - initial
vvancak May 30, 2017
7ef6a42
GoogleMaps: code reformat & optimize imports
vvancak May 30, 2017
102afaf
TimeLine: Package moving & naming consistency; Improved count loading
vvancak May 30, 2017
ba622bc
GoogleMaps: Counts
vvancak May 30, 2017
15ec316
GoogleMaps: Quantified values loading
vvancak Jun 2, 2017
dfef81d
GoogleMaps: Quantified values client loaders
vvancak Jun 2, 2017
477630d
GoogleMaps: quantified places & things with places visualization
vvancak Jun 3, 2017
52f2e43
TLV, GMV : Fixes
vvancak Jun 3, 2017
269d834
Record selector pages navigation
vvancak Jun 4, 2017
4d554e1
TimeLine: Levels - solving instant / intervals timeline colisions
vvancak Jun 4, 2017
7c4c66c
TLV, GMV: divided api calls to batches, timeline visualization levels…
vvancak Jun 5, 2017
b85ccdc
TimeLine: reset button always available - fix
vvancak Jun 6, 2017
b2ae780
Dereferencing, Refactor I
vvancak Jun 8, 2017
389da6a
Object info visualization, Refactor II
vvancak Jun 8, 2017
efb2c4c
TimeLine: Zoom
vvancak Jun 9, 2017
1593a12
TimeLine: Levels & Improved time records loading
vvancak Jun 9, 2017
329cdec
TimeLine: Colors
vvancak Jun 9, 2017
45131c8
GoogleMaps: Colors
vvancak Jun 10, 2017
f2f2a92
TimeLine: Loading status fixes
vvancak Jun 10, 2017
a3cde17
GoogleMaps: Configuration saving & Embedding
vvancak Jun 11, 2017
e4f9037
TimeLine: Configuration saving & Embed
vvancak Jun 11, 2017
e486368
Google Maps & Time Line - Naming fixes, Automatic visualizer install,…
vvancak Jul 15, 2017
d95c8e3
TimeLine: removing usage of deprecated methods
vvancak Jul 17, 2017
bf1d8c8
TimeLine: Naming tweaks, comments
vvancak Jul 18, 2017
f5cbf3c
TimeLine: Naming tweaks II
vvancak Jul 18, 2017
4d58caa
TimeLine: Minor query changes + Comments
vvancak Jul 18, 2017
105d09a
Google Maps: Query minor fixes & Comments
vvancak Jul 18, 2017
13c04b6
Quantified Places loader bugfix
vvancak Jul 19, 2017
45f3244
TimeLine & Google Maps naming tweaks
vvancak Jul 19, 2017
4a1b93d
Merge visualizer definitions to main vocabulary repository
vvancak Aug 19, 2017
eb3826a
GoogleMaps & TimeLine visualizers: Code style fixes
vvancak Sep 5, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export function getAvailableVerticalSpace(element) {
const offsetTop = element.getBoundingClientRect().top + window.pageYOffset - document.documentElement.clientTop;
return screenHeight - offsetTop;
}
export function getAvailableHorizontalSpace(element){
return element.offsetWidth - window.pageXOffset;
}

/**
* Creates scrollable container that vertically fills in the remaining screen space
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import initEntry from '../misc/initEntry'
import googleMapsCoordinatesRoutes from '../modules/visualizers/googleMaps/bundles/coordinates/applicationRoutes'

initEntry(googleMapsCoordinatesRoutes);
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import initEntry from '../misc/initEntry'
import googleMapsPlacesRoutes from '../modules/visualizers/googleMaps/bundles/places/applicationRoutes'

initEntry(googleMapsPlacesRoutes);
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import initEntry from '../misc/initEntry'
import googleMapsPlacesValuesRoutes from '../modules/visualizers/googleMaps/bundles/quantifiedPlaces/applicationRoutes'

initEntry(googleMapsPlacesValuesRoutes);
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import initEntry from '../misc/initEntry'
import googleMapsThingsPlacesValuesRoutes from '../modules/visualizers/googleMaps/bundles/quantifiedThings/applicationRoutes'

initEntry(googleMapsThingsPlacesValuesRoutes);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import createRoutes from '../modules/visualizers/googleMaps/applicationRoutes'
import createRoutes from '../modules/visualizers/googleMaps/bundles/v1/applicationRoutes'
import initEntry from '../misc/initEntry'

initEntry(createRoutes);
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import initEntry from '../misc/initEntry'
import timelineInstantsRoutes from '../modules/visualizers/timeline/bundles/instants/applicationRoutes'

initEntry(timelineInstantsRoutes);
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import initEntry from '../misc/initEntry'
import timelineIntervalsRoutes from '../modules/visualizers/timeline/bundles/intervals/applicationRoutes'

initEntry(timelineIntervalsRoutes);
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import initEntry from '../misc/initEntry'
import timelineThingsInstantsRoutes from '../modules/visualizers/timeline/bundles/thingsInstants/applicationRoutes'

initEntry(timelineThingsInstantsRoutes);

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import initEntry from '../misc/initEntry'
import timelineThingsIntervalsRoutes from '../modules/visualizers/timeline/bundles/thingsIntervals/applicationRoutes'

initEntry(timelineThingsIntervalsRoutes);
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import initEntry from '../misc/initEntry'
import timelineThingsThingsInstantsRoutes from '../modules/visualizers/timeline/bundles/thingsThingsInstants/applicationRoutes'

initEntry(timelineThingsThingsInstantsRoutes);

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import initEntry from '../misc/initEntry'
import timelineThingsThingsIntervalsRoutes from '../modules/visualizers/timeline/bundles/thingsThingsIntervals/applicationRoutes'

initEntry(timelineThingsThingsIntervalsRoutes);
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ export async function getLabels(appId, resourceUris) {
const result = await rest('commonVisualizer/getLabels/' + appId, { resourceUris });
return result.data.labels;
}

export async function getComments(appId, resourceUris) {
const result = await rest('commonVisualizer/getComments/' + appId, { resourceUris });
return result.data.comments;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import React, { Component, PropTypes } from 'react'
import { createStructuredSelector } from 'reselect'
import { connect } from 'react-redux'
import { Map } from 'immutable'
import makePureRender from '../../../misc/makePureRender'
import LocalizedValue from './LocalizedValue'
import { isLocalizedValueEmpty } from '../misc/languageUtils'
import { commentsSelector, getComments } from '../ducks/comments'

class Comment extends Component {
static propTypes = {
dispatch: PropTypes.func.isRequired,
uri: PropTypes.string.isRequired,
comment: PropTypes.any,
availableComments: PropTypes.instanceOf(Map).isRequired
};

load() {
// Prop 'comment' might be a "custom comment" or passed down from wherever, we don't care,
// if it's missing, we will try to load a new one from the server.
const { dispatch, uri, comment, availableComments } = this.props;
if (isLocalizedValueEmpty(comment) && !availableComments.has(uri)) {
dispatch(getComments([uri]));
}
}

componentWillMount() {
this.load();
}

componentDidUpdate() {
this.load();
}

render() {
const { uri, comment, availableComments } = this.props;
const finalComment = isLocalizedValueEmpty(comment) ? availableComments.get(uri) : comment;
return <LocalizedValue localizedValue={finalComment} defaultValue={uri}/>
}
}

const selector = createStructuredSelector({
availableComments: commentsSelector
});

export default connect(selector)(makePureRender(Comment));
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Label extends Component {
availableLabels: PropTypes.instanceOf(Map).isRequired
};

componentDidMount() {
load() {
// Prop 'label' might be a "custom label" or passed down from wherever, we don't care,
// if it's missing, we will try to load a new one from the server.
const { dispatch, uri, label, availableLabels } = this.props;
Expand All @@ -24,10 +24,18 @@ class Label extends Component {
}
}

componentWillMount() {
this.load();
}

componentDidUpdate() {
this.load();
}

render() {
const { uri, label, availableLabels } = this.props;
const finalLabel = isLocalizedValueEmpty(label) ? availableLabels.get(uri) : label;
return <LocalizedValue localizedValue={finalLabel} defaultValue={uri} />
return <LocalizedValue localizedValue={finalLabel} defaultValue={uri}/>
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import React, { Component, PropTypes } from 'react'
import { connect } from 'react-redux'
import { createStructuredSelector } from 'reselect'
import { limit_default, limitSelector, setLimit, setLimitReset } from '../ducks/limit'
import Button from '../../../components/Button'

class LimiterContainer extends Component {
static propTypes = {
dispatch: PropTypes.func.isRequired,
limit: PropTypes.number.isRequired
};

componentWillUnmount() {
const {dispatch} = this.props;

dispatch(setLimitReset());
}

componentDidUpdate() {
const {limit} = this.props;
var elements = document.getElementsByName('limit');
if (elements.length > 0) {
elements[0].value = limit;
}
}

setLimit() {
const {dispatch} = this.props;

var elements = document.getElementsByName('limit');
if (elements.length > 0) {
const value = parseInt(elements[0].value);
dispatch(setLimit(value));
}
}

resetLimit() {
const {dispatch, limit} = this.props;
dispatch(setLimitReset());

var elements = document.getElementsByName('limit');
if (elements.length > 0) {
elements[0].value = limit_default;
}
};

render() {
const {limit} = this.props;

var resetEnabled = limit != limit_default;
return <div>
<table>
<tbody>
<tr>
<th>LIMIT</th>
<th><input type="value" name="limit" defaultValue={limit} onChange={() => this.setLimit()}/></th>
<th><Button raised={resetEnabled}
onTouchTap={() => this.resetLimit()}
disabled={!resetEnabled}
label="RESET"
/></th>
</tr>
</tbody>
</table>
</div>

}
}

const selector = createStructuredSelector({
limit: limitSelector
});

export default connect(selector)(LimiterContainer);
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import React, { Component, PropTypes } from 'react'
import { createStructuredSelector } from 'reselect'
import { connect } from 'react-redux'
import { getLabels, labelsSelector } from '../ducks/labels'
import { commentsSelector, getComments } from '../ducks/comments'
import { Map as ImmutableMap } from 'immutable'
import LocalizedValue from './LocalizedValue'
import makePureRender from '../../../misc/makePureRender'

// Shows all available info about an object.
class ObjectInfo extends Component {
static propTypes = {
dispatch: PropTypes.func.isRequired,

header: PropTypes.string.isRequired,
url: PropTypes.string.isRequired,

availableLabels: PropTypes.instanceOf(ImmutableMap).isRequired,
availableComments: PropTypes.instanceOf(ImmutableMap).isRequired
};

load() {
const { dispatch, url, availableLabels, availableComments } = this.props;
if (!availableLabels.has(url)) {
dispatch(getLabels([url]));
}
if (!availableComments.has(url)) {
dispatch(getComments([url]));
}
}

componentWillMount() {
this.load();
}

componentDidUpdate() {
this.load();
}

render() {
const { header, url, availableComments, availableLabels } = this.props;

return <table>
<tbody>
<tr>
<td><b>{header}: </b></td>
<td>{url}</td>
</tr>
<tr>
<td>Label:</td>
<td>
<LocalizedValue localizedValue={availableLabels.get(url)} defaultValue="n/a"/>
</td>
</tr>
<tr>
<td>Comment:</td>
<td>
<LocalizedValue localizedValue={availableComments.get(url)} defaultValue="n/a"/>
</td>
</tr>
</tbody>
</table>
}
}
const selector = createStructuredSelector({
availableLabels: labelsSelector,
availableComments: commentsSelector
});

export default connect(selector)(makePureRender(ObjectInfo));
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { fromJS, Map as ImmutableMap } from 'immutable'
import { createSelector } from 'reselect'
import prefix from '../../core/prefix'
import createAction from '../../../misc/createAction'
import * as api from '../api'
import withApplicationId from '../misc/withApplicationId'
import { GET_APPLICATION_START } from './application'
import moduleSelector from '../selector'

// Actions

export const GET_COMMENTS = prefix('GET_COMMENTS');
export const GET_COMMENTS_START = prefix('GET_COMMENTS_START');
export const GET_COMMENTS_ERROR = prefix('GET_COMMENTS_ERROR');
export const GET_COMMENTS_SUCCESS = prefix('GET_COMMENTS_SUCCESS');

let resourceUrisBuffer = [];

export function getComments(resourceUris) {
return withApplicationId(id => dispatch => {
// Just like labels, use a buffer to cache uris and then make one big request.
resourceUrisBuffer = resourceUrisBuffer.concat(resourceUris);
setTimeout(() => {
if (resourceUrisBuffer.length > 0) {
const promise = api.getComments(id, resourceUrisBuffer);
dispatch(createAction(GET_COMMENTS, { promise }));
resourceUrisBuffer = [];
}
}, 200);
})
}

// Reducer

const initialState = new ImmutableMap();
export default function commentsReducer(state = initialState, action) {
switch (action.type) {
case GET_APPLICATION_START:
return initialState;

case GET_COMMENTS_SUCCESS:
return state.mergeDeep(fromJS(action.payload));
}
return state;
}


// Selectors

export const commentsSelector = createSelector(
[moduleSelector],
parentState => parentState.comments
);
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ export const GET_CONFIGURATION_RESET = prefix('GET_CONFIGURATION_RESET');
const commonConfigurationSelector = createSelector(
[moduleSelector],
state => ({
customLabels: state.customLabels.toJS()
customLabels: state.customLabels.toJS(),
limit: state.limit
})
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import { GET_APPLICATION_START } from './application'
import { SAVE_CONFIGURATION_START, SAVE_CONFIGURATION_ERROR, GET_CONFIGURATION_SUCCESS } from './configuration'
import { GET_CONFIGURATION_SUCCESS, SAVE_CONFIGURATION_ERROR, SAVE_CONFIGURATION_START } from './configuration'
import { UPDATE_CUSTOM_LABEL } from './customLabels'
import { SET_LIMIT, SET_LIMIT_RESET } from './limit'

export function createDirtyReducer(actions) {
return function dirtyReducer(state = false, action) {
// Custom actions provided by visualizer
if (actions.indexOf(action.type) !== -1) {
if (actions.indexOf(action.type) !== -1) {
return true;
}

switch (action.type) {
case UPDATE_CUSTOM_LABEL:
case SAVE_CONFIGURATION_ERROR:
case SET_LIMIT:
case SET_LIMIT_RESET:
return true;

// We need to use the START event, not the SUCCESS, as the START event marks the snapshot
Expand Down
Loading