Skip to content

Commit 4a99551

Browse files
nielsdejongBennuFireMarius Conjeaud“Bastienbastienhubert
authored
2.2.1 Release (#294)
* Master to dev Release (#259) * TableChart : Auto-hide columns prefixed with __ * Master to dev Release (#259) * Added prettier (config based on neo4j/nx repository) * Added eslint and husky (config based on neo4j/nx repository) * Updated eslint config to be as light as possible with Typescript * Updated all files with prettier and linter, refactored files to avoid errors * Added Eslint check step in Github workflows * Updated all files with prettier and linter after rebase on Develop branch * Squash Security Bumbs (#281) * Bump loader-utils from 2.0.2 to 2.0.4 in /gallery Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.4. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md) - [Commits](webpack/loader-utils@v2.0.2...v2.0.4) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Bump loader-utils from 1.4.0 to 1.4.2 Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](webpack/loader-utils@v1.4.0...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Update yarn.lock * yarn gallery util 3.2.1 * bump * remove lodash 4.17.15 lock * remove minimatch 3.0.4 lock * remove d3 color lock * remove node.fet color lock * ut * no node fetch * lod * lod2 * ncheck * d3 init Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Niels de Jong <[email protected]> * Bump loader-utils from 2.0.2 to 2.0.4 in /gallery (#264) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.4. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md) - [Commits](webpack/loader-utils@v2.0.2...v2.0.4) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fixes #160 (#269) * Fix : Replace parameter in iFrame URLs (#276) * Fix : Replace parameter in iFrame URLs * Fix wrong merge conflict Co-authored-by: Marius Conjeaud <[email protected]> * Bump loader-utils from 2.0.2 to 2.0.4 in /gallery (#290) * Bump loader-utils from 1.4.0 to 1.4.2 (#265) Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md) - [Commits](webpack/loader-utils@v1.4.0...v1.4.2) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump loader-utils from 2.0.2 to 2.0.4 in /gallery Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.2 to 2.0.4. - [Release notes](https://github.com/webpack/loader-utils/releases) - [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md) - [Commits](webpack/loader-utils@v2.0.2...v2.0.4) --- updated-dependencies: - dependency-name: loader-utils dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Niels de Jong <[email protected]> * Crash on Boolean options parameter selection (#285) * bug on non string values * Fix merge conflicts * Fix merge conflicts * Fix merge conflicts * Fix merge conflicts * Fix merge conflicts Co-authored-by: Niels de Jong <[email protected]> * Hotfix for Neo4j container issues with 5.3 (#293) * Updated deployment scripts to use minimal build without source maps (#271) * Changed build script to use mimimal (no source map) deployment * Added TODOs based on comments * Changing card image download logic (#273) * feature(): Changing download logic for card download by downloading the entire card instead of just the view. This kind of change adds also the buttons to the downloaded image, that is not ideal. * fix(download report image): added missing ref for card expanded view * Removed package-lock.json Co-authored-by: Alfred Rubin <[email protected]> Co-authored-by: Niels de Jong <[email protected]> * Dynamic Card titles (#270) * change of names * Resolving conflicts * Bug fix * Refactoring * Fixed replacement of params in card headers Co-authored-by: Niels de Jong <[email protected]> * Docs on custom map provider (#282) * Docs on custom map provider * Update docs/modules/ROOT/pages/user-guide/reports/map.adoc Co-authored-by: MariusC <[email protected]> Co-authored-by: MariusC <[email protected]> Co-authored-by: Niels de Jong <[email protected]> * Added release notes, bumped version number Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Harold Agudelo <[email protected]> Co-authored-by: Marius Conjeaud <[email protected]> Co-authored-by: “Bastien <“[email protected]”> Co-authored-by: Bastien Hubert <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Neil Menezes <[email protected]> Co-authored-by: MariusC <[email protected]> Co-authored-by: alfredorubin96 <[email protected]> Co-authored-by: Alfred Rubin <[email protected]>
1 parent a4f17bd commit 4a99551

File tree

136 files changed

+15423
-12018
lines changed

Some content is hidden

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

136 files changed

+15423
-12018
lines changed

.eslintrc.json

+170
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"plugins": ["@typescript-eslint", "react"],
4+
"extends": ["eslint:recommended", "prettier", "plugin:@typescript-eslint/recommended"], // this is optional
5+
"env": {
6+
"browser": true,
7+
"node": true
8+
},
9+
"settings": {
10+
"react": {
11+
"version": "detect"
12+
}
13+
},
14+
"ignorePatterns": ["node_modules/**", "packages/**/dist/**", "packages/**/coverage/**"],
15+
"rules": {
16+
"@typescript-eslint/no-explicit-any": "off", // Off for v1
17+
"@typescript-eslint/ban-ts-comment": "off", // Off for v1
18+
"@typescript-eslint/no-empty-function": "off", // Off for v1
19+
"@typescript-eslint/no-unused-vars": [
20+
"error",
21+
{ "vars": "all", "varsIgnorePattern": "^_*", "args": "after-used", "argsIgnorePattern": "^_" }
22+
],
23+
"array-callback-return": "off", // Off for v1
24+
"arrow-body-style": "off",
25+
"block-scoped-var": "error",
26+
"camelcase": "off", // Off for v1
27+
"consistent-return": "off", // Off for v1
28+
"consistent-this": ["error", "self"],
29+
"constructor-super": "error",
30+
"curly": ["error", "all"],
31+
"default-case": "error",
32+
"default-param-last": "off", // Off for v1
33+
"dot-notation": "error",
34+
"eqeqeq": "off", // Off for v1
35+
"func-names": "error",
36+
"func-style": [
37+
"error",
38+
"declaration",
39+
{
40+
"allowArrowFunctions": true
41+
}
42+
],
43+
"grouped-accessor-pairs": "error",
44+
"line-comment-position": "off", // Off for v1
45+
"lines-between-class-members": "error",
46+
"max-depth": "error",
47+
"max-len": [
48+
"off", // Off for v1
49+
{
50+
"code": 120,
51+
"comments": 120,
52+
"ignoreUrls": true,
53+
"ignoreTemplateLiterals": true
54+
}
55+
],
56+
"max-lines-per-function": ["off"],
57+
"max-nested-callbacks": ["error", 5],
58+
"max-statements": ["off"],
59+
"max-statements-per-line": "error",
60+
"no-alert": "off", // Off for v1
61+
"no-array-constructor": "error",
62+
"no-await-in-loop": "off", // Off for v1
63+
"no-buffer-constructor": "error",
64+
"no-caller": "error",
65+
"no-confusing-arrow": "error",
66+
"no-console": "warn",
67+
"no-constructor-return": "error",
68+
"no-constant-condition": "error",
69+
"no-debugger": "warn",
70+
"no-dupe-else-if": "error",
71+
"no-else-return": "error",
72+
"no-empty-function": [
73+
"off", // Off for v1
74+
{
75+
"allow": ["constructors"]
76+
}
77+
],
78+
"no-eq-null": "off", // Off for V1
79+
"no-eval": "error",
80+
"no-extend-native": "error",
81+
"no-extra-bind": "error",
82+
"no-extra-label": "error",
83+
"no-implicit-coercion": "error",
84+
"no-implicit-globals": "error",
85+
"no-implied-eval": "error",
86+
"no-import-assign": "error",
87+
"no-invalid-this": "off",
88+
"no-iterator": "error",
89+
"no-labels": "error",
90+
"no-lone-blocks": "error",
91+
"no-lonely-if": "error",
92+
"no-loop-func": "error",
93+
"no-magic-numbers": "off",
94+
"no-multi-assign": "error",
95+
"no-multi-str": "error",
96+
"no-nested-ternary": "off", // Off for v1
97+
"no-new": "error",
98+
"no-new-func": "error",
99+
"no-new-object": "error",
100+
"no-new-wrappers": "error",
101+
"no-octal-escape": "error",
102+
"no-param-reassign": "off", // Off for v1
103+
"no-path-concat": "error",
104+
"no-plusplus": [
105+
"error",
106+
{
107+
"allowForLoopAfterthoughts": true
108+
}
109+
],
110+
"no-proto": "off", // Off for v1
111+
"no-restricted-globals": "error",
112+
"no-return-assign": "error",
113+
"no-return-await": "error",
114+
"no-self-compare": "error",
115+
"no-sequences": "error",
116+
"no-setter-return": "error",
117+
"no-sync": "error",
118+
"no-tabs": "error",
119+
"no-template-curly-in-string": "error",
120+
"no-underscore-dangle": "off", // Off for v1
121+
"no-unmodified-loop-condition": "error",
122+
"no-unneeded-ternary": "error",
123+
"no-unreachable": "error",
124+
"no-unused-expressions": "off", // Off for v1
125+
"no-useless-call": "error",
126+
"no-useless-computed-key": "error",
127+
"no-useless-concat": "off", // Off for v1
128+
"no-useless-rename": "error",
129+
"no-useless-return": "error",
130+
"no-var": "error",
131+
"no-void": ["error", { "allowAsStatement": true }],
132+
"one-var": ["error", "never"],
133+
"operator-assignment": "error",
134+
"padding-line-between-statements": "error",
135+
"prefer-arrow-callback": "warn",
136+
"prefer-const": "off", // Off for v1
137+
"prefer-destructuring": [
138+
// Off for v1
139+
"warn",
140+
{
141+
"VariableDeclarator": {
142+
"array": true,
143+
"object": true
144+
},
145+
"AssignmentExpression": {
146+
"array": false,
147+
"object": false
148+
}
149+
}
150+
],
151+
"prefer-numeric-literals": "warn",
152+
"prefer-promise-reject-errors": "warn",
153+
"prefer-rest-params": "warn",
154+
"prefer-spread": "warn",
155+
"prefer-template": "warn",
156+
"radix": "off", // Off for v1
157+
"require-atomic-updates": "error",
158+
"require-await": "warn", // Warn for v1
159+
"sort-keys": "off",
160+
"spaced-comment": [
161+
"warn",
162+
"always",
163+
{
164+
"markers": ["/"]
165+
}
166+
],
167+
"symbol-description": "error",
168+
"yoda": "error"
169+
}
170+
}

.github/workflows/develop-deployment.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Test/Deploy Develop
2-
2+
33
on:
44
push:
55
branches: [ develop ]
6-
6+
77
jobs:
88
build-test:
99
runs-on: ubuntu-latest
@@ -25,6 +25,8 @@ jobs:
2525
./scripts/docker-neo4j-initializer/start-movies-db.sh
2626
- run: rm -rf docs
2727
- run: yarn install
28+
- name: Eslint check
29+
run: yarn run lint
2830
- name: Cypress run
2931
uses: cypress-io/github-action@v2
3032
with:
@@ -44,7 +46,7 @@ jobs:
4446
with:
4547
node-version: ${{ matrix.node-version }}
4648
- run: yarn install
47-
- run: PRODUCTION=true && yarn run build
49+
- run: yarn run build-minimal
4850
- name: Set AWS credentials
4951
uses: aws-actions/configure-aws-credentials@v1
5052
with:

.github/workflows/develop-test.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: Test Develop
2-
2+
33
on:
44
pull_request:
55
branches: [ develop ]
6-
7-
6+
87
jobs:
98
build-test:
109
runs-on: ubuntu-latest
@@ -25,6 +24,8 @@ jobs:
2524
chmod +x ./scripts/docker-neo4j-initializer/start-movies-db.sh
2625
./scripts/docker-neo4j-initializer/start-movies-db.sh
2726
- run: yarn install
27+
- name: Eslint check
28+
run: yarn run lint
2829
- name: Cypress run
2930
uses: cypress-io/github-action@v2
3031
with:

.github/workflows/master-deployment.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: Test/Deploy Master
2-
2+
33
on:
44
push:
55
branches: [ master ]
6-
7-
6+
87
jobs:
98
build-test:
109
runs-on: ubuntu-latest
@@ -26,6 +25,8 @@ jobs:
2625
./scripts/docker-neo4j-initializer/start-movies-db.sh
2726
- run: rm -rf docs
2827
- run: yarn install
28+
- name: Eslint check
29+
run: yarn run lint
2930
- name: Cypress run
3031
uses: cypress-io/github-action@v2
3132
with:
@@ -46,7 +47,7 @@ jobs:
4647
# node-version: ${{ matrix.node-version }}
4748
# - run: rm -rf docs
4849
# - run: yarn install
49-
# - run: yarn run build
50+
# - run: yarn run build-minimal
5051
# - name: Set AWS credentials
5152
# uses: aws-actions/configure-aws-credentials@v1
5253
# with:
@@ -78,7 +79,7 @@ jobs:
7879
context: .
7980
file: ./Dockerfile
8081
push: true
81-
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.2.0
82+
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.2.1
8283
# build-npm:
8384
# needs: build-test
8485
# runs-on: ubuntu-latest
@@ -92,8 +93,8 @@ jobs:
9293
# with:
9394
# node-version: ${{ matrix.node-version }}
9495
# - run: rm -rf docs
95-
# - run: yarn install
96-
# - run: yarn run build
96+
# - run: yarn install-minimal
97+
# - run: yarn run build-minimal
9798
# - run: curl ${{ secrets.INDEX_HTML_DEPLOYMENT_URL }} > dist/index.html
9899
# - run: npm pack
99100
# - run: rm -rf target
@@ -128,7 +129,7 @@ jobs:
128129
with:
129130
node-version: ${{ matrix.node-version }}
130131
- run: cd gallery && yarn install
131-
- run: cd gallery && CI=false yarn run build
132+
- run: cd gallery && yarn run build
132133
- name: Set AWS credentials
133134
uses: aws-actions/configure-aws-credentials@v1
134135
with:

.github/workflows/master-test.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: Test Master
2-
2+
33
on:
44
pull_request:
55
branches: [ master ]
6-
7-
6+
87
jobs:
98
build-test:
109
runs-on: ubuntu-latest
@@ -25,6 +24,8 @@ jobs:
2524
chmod +x ./scripts/docker-neo4j-initializer/start-movies-db.sh
2625
./scripts/docker-neo4j-initializer/start-movies-db.sh
2726
- run: yarn install
27+
- name: Eslint check
28+
run: yarn run lint
2829
- name: Cypress run
2930
uses: cypress-io/github-action@v2
3031
with:

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
yarn run lint-staged

.lintstagedrc.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"*.ts": ["prettier --write", "eslint --fix"],
3+
"*.tsx": ["prettier --write", "eslint --fix"],
4+
"*.json": ["prettier --write"],
5+
"*.js": ["prettier --write"]
6+
}

.prettierignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
coverage
2+
dist
3+
node_modules
4+
docs

.prettierrc.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"printWidth": 120,
3+
"semi": true,
4+
"singleQuote": true,
5+
"jsxSingleQuote": true,
6+
"useTabs": false,
7+
"tabWidth": 2,
8+
"arrowParens": "always",
9+
"trailingComma": "es5",
10+
"bracketSpacing": true,
11+
"endOfLine": "lf"
12+
}

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ COPY ./package.json /usr/local/src/neodash/package.json
1313

1414
RUN yarn install
1515
COPY ./ /usr/local/src/neodash
16-
RUN PRODUCTION=true && yarn run build
16+
RUN yarn run build-minimal
1717

1818
# production stage
1919
FROM nginx:alpine AS neodash
@@ -38,4 +38,4 @@ RUN chown -R nginx:nginx /usr/share/nginx/html/
3838
USER nginx
3939
EXPOSE 5005
4040
HEALTHCHECK cmd curl --fail http://localhost:5005 || exit 1
41-
LABEL version="2.2.0"
41+
LABEL version="2.2.1"

README.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
## NeoDash - Neo4j Dashboard Builder
3-
NeoDash is an open source tool for visualizing your Neo4j data. It lets you group visualizations together as dashboards, and allow for interactions between reports.
3+
NeoDash is an open source tool for visualizing your Neo4j data. It lets you group visualizations together as dashboards, and allow for interactions between reports.
44

55
![screenshot](public/screenshot.png)
66

@@ -22,6 +22,23 @@ docker run -it --rm -p 5005:5005 nielsdejong/neodash
2222
2323
See the [Developer Guide](https://neo4j.com/labs/neodash/2.1/developer-guide/) for more on installing, building, and running the application.
2424

25+
## Coding practices
26+
In order to improve the code quality, we added a Prettier and a Linter to this repository.
27+
28+
### Behavior
29+
While commiting, a pre-commit hook will be executed in order to prettify and run the Linter on your staged files. Linter warnings are currently accepted. The commands executed by this hook can be found in /.lintstagedrc.json.
30+
31+
There is also a dedicated linting step in the Github project pipeline in order to catch each potential inconsistency.
32+
33+
**Don't hesitate to setup your IDE formatting feature to use the Prettier module and our defined rules (.prettierrc.json).**
34+
35+
### Manual execution
36+
If you want to **manually prettify all the project .ts and .tsx files**, you can run `yarn run format`.
37+
38+
If you wan to **manually run linting of all your .ts and .tsx files**, you can run `yarn run lint`.
39+
40+
If you wan to **manually run linting of all your .ts and .tsx staged files**, you can run `yarn run lint-staged`.
41+
2542
## User Guide
2643
NeoDash comes with built-in examples of dashboards and reports. For more details on the types of reports and how to customize them, see the [User Guide](
2744
https://neo4j.com/labs/neodash/2.1/user-guide/).

0 commit comments

Comments
 (0)