Skip to content

Commit 0b4d531

Browse files
authored
Merge pull request #157 from aleksbobic/develop
Introduce external datasets as a default data source and fix a few bugs
2 parents cdb54d2 + 0d8de0e commit 0b4d531

File tree

137 files changed

+13244
-6731
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+13244
-6731
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

3+
__pycache__
4+
venv/
5+
36
# dependencies
47
/app/node_modules
58
/app/.pnp

.vscode/launch.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Python remote attach",
6+
"type": "python",
7+
"request": "attach",
8+
"port": 5678,
9+
"host": "localhost",
10+
"pathMappings": [
11+
{
12+
"localRoot": "${workspaceFolder}/server/app",
13+
"remoteRoot": "/cs/app"
14+
}
15+
]
16+
}]
17+
}

.vscode/settings.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
{
2-
"python.formatting.provider": "black"
2+
"python.formatting.provider": "none",
3+
"python.linting.flake8Enabled": true,
4+
"python.linting.enabled": true,
5+
"[python]": {
6+
"editor.defaultFormatter": "ms-python.black-formatter"
7+
}
38
}

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ To configure, disable or enable various csx features visit the `./app/.env.{deve
100100
|REACT_APP_SURVEY_MESSAGE| The message that should show up when the survey popup displays. | string |
101101
|REACT_APP_SURVEY_SHOW_AFTER_HISTORY_DEPTH| Dispaly the survey popup after a user performs a particular number of actions on a graph | number (int) |
102102

103+
### Starting with elastic container
104+
1. Make sure to delete the previously existing volumes, containers and images.
105+
2. Make sure that the SEARCH_SOURCE environment vairable in the environment of the server service in docker-compose is set to `elastic`.
106+
3. Run the following command: `docker-compose --profile elastic up --build`
107+
103108

104109
### Starting the project in production mode 🚀
105110

@@ -110,3 +115,7 @@ Open [http://localhost:8880](http://localhost:8880) to view it in the browser.
110115

111116
### Running production mode with analytics enabled
112117
In additiona to making sure the flag `REACT_APP_DISABLE_TRACKING` in `./app/.env.production` is set to `false` you must run the docker-compose command with particular parameters: `MATOMO_PASS=your_db_pass docker-compose -f docker-compose.prod.yml --profile analytics up --build --remove-orphans --force-recreate`
118+
119+
To run also with elastic in production make sure to also add `--profile elastic` right after `--profile analytics` and also set the `ELASTIC_PASS` env variable.
120+
121+
To run with mongo just make sure that the `SEARCH_SOURCE` in the environment of the server service is set to `mongo` and that the `MONGO_USER` and `MONGO_PASS` are set.

app/package-lock.json

+27-23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "csx",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"private": true,
55
"dependencies": {
66
"@chakra-ui/react": "^1.8.8",
@@ -48,7 +48,7 @@
4848
"react-flow-renderer": "^10.3.17",
4949
"react-force-graph-3d": "^1.21.13",
5050
"react-helmet-async": "^1.3.0",
51-
"react-joyride": "^2.3.0",
51+
"react-joyride": "^2.5.4",
5252
"react-markdown": "^8.0.3",
5353
"react-resize-detector": "^7.1.2",
5454
"react-router-dom": "^5.2.0",
@@ -121,4 +121,4 @@
121121
"pre-commit": "lint-staged"
122122
}
123123
}
124-
}
124+
}

app/src/app/App.jsx

+56-26
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import { Box, useColorMode, useToast } from '@chakra-ui/react';
2-
import ControlPanelComponent from 'components/interface/controlpanel/ControlPanel.component';
2+
import LeftPanel from 'components/interface/leftpanel/LeftPanel.component';
33
import NavigationPanelComponent from 'components/interface/navigation/NavigationPanel.component';
44
import { observer } from 'mobx-react';
5-
import OverviewGraphPage from 'pages/graph/Graph.page';
5+
import GraphPage from 'pages/graph/Graph.page';
66
import HomePage from 'pages/home/Home.page';
77
import SearchPage from 'pages/search/Search.page';
88
import { Helmet, HelmetProvider } from 'react-helmet-async';
99

1010
import {
11-
BrowserRouter as Router,
11+
Switch as RRSwitch,
1212
Route,
13-
Switch as RRSwitch
13+
BrowserRouter as Router
1414
} from 'react-router-dom';
1515
import './App.scss';
1616

@@ -32,29 +32,44 @@ function CSX() {
3232
useEffect(() => {
3333
window.addEventListener('beforeunload', () => {
3434
store.track.trackEvent(
35-
'Global',
36-
'Tab Switch',
3735
JSON.stringify({
38-
value: 'User closed the tab'
36+
area: 'Global'
37+
}),
38+
JSON.stringify({
39+
item_type: null
40+
}),
41+
JSON.stringify({
42+
event_type: 'Tab interaction',
43+
event_action: 'Close tab'
3944
})
4045
);
4146
});
4247

4348
window.addEventListener('visibilitychange', () => {
4449
if (document.hidden) {
4550
store.track.trackEvent(
46-
'Global',
47-
'Tab Switch',
4851
JSON.stringify({
49-
value: 'User switched to a different tab'
52+
area: 'Global'
53+
}),
54+
JSON.stringify({
55+
item_type: null
56+
}),
57+
JSON.stringify({
58+
event_type: 'Tab interaction',
59+
event_action: 'Switch to another tab'
5060
})
5161
);
5262
} else {
5363
store.track.trackEvent(
54-
'Global',
55-
'Tab Switch',
5664
JSON.stringify({
57-
value: 'User returned to the csx tab'
65+
area: 'Global'
66+
}),
67+
JSON.stringify({
68+
item_type: null
69+
}),
70+
JSON.stringify({
71+
event_type: 'Tab interaction',
72+
event_action: 'Return to tab'
5873
})
5974
);
6075
}
@@ -63,28 +78,43 @@ function CSX() {
6378
return () => {
6479
window.removeEventListener('beforeunload', () => {
6580
store.track.trackEvent(
66-
'Global',
67-
'Tab Switch',
6881
JSON.stringify({
69-
value: 'User closed the tab'
82+
area: 'Global'
83+
}),
84+
JSON.stringify({
85+
item_type: null
86+
}),
87+
JSON.stringify({
88+
event_type: 'Tab interaction',
89+
event_action: 'Close tab'
7090
})
7191
);
7292
});
7393
window.removeEventListener('visibilitychange', () => {
7494
if (document.hidden) {
7595
store.track.trackEvent(
76-
'Global',
77-
'Tab Switch',
7896
JSON.stringify({
79-
value: 'User switched to a different tab'
97+
area: 'Global'
98+
}),
99+
JSON.stringify({
100+
item_type: null
101+
}),
102+
JSON.stringify({
103+
event_type: 'Tab interaction',
104+
event_action: 'Switch to another tab'
80105
})
81106
);
82107
} else {
83108
store.track.trackEvent(
84-
'Global',
85-
'Tab Switch',
86109
JSON.stringify({
87-
value: 'User returned to the csx tab'
110+
area: 'Global'
111+
}),
112+
JSON.stringify({
113+
item_type: null
114+
}),
115+
JSON.stringify({
116+
event_type: 'Tab interaction',
117+
event_action: 'Return to tab'
88118
})
89119
);
90120
}
@@ -150,13 +180,13 @@ function CSX() {
150180
</Route>
151181
<Route path="/graph/detail" label="graphdetail">
152182
<CommentModal />
153-
<ControlPanelComponent />
154-
<OverviewGraphPage />
183+
<LeftPanel />
184+
<GraphPage />
155185
</Route>
156186
<Route path="/graph" label="graph">
157187
<CommentModal />
158-
<ControlPanelComponent />
159-
<OverviewGraphPage />
188+
<LeftPanel />
189+
<GraphPage />
160190
</Route>
161191
<Route exact path="/present" label="present">
162192
<PresentPage />

0 commit comments

Comments
 (0)