Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.2.1 Release #294

Merged
merged 25 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
dacc2d0
Master to dev Release (#259)
BennuFire Nov 10, 2022
c7f4338
Merge pull request #260 from neo4j-labs/master
BennuFire Nov 10, 2022
e7139df
TableChart : Auto-hide columns prefixed with __
Nov 29, 2022
e883fa6
Merge pull request #275 from neo4j-labs/task/hidden_column_table
BennuFire Nov 29, 2022
7acb4bb
Master to dev Release (#259)
BennuFire Nov 10, 2022
7d7aff7
Added prettier (config based on neo4j/nx repository)
Oct 19, 2022
a3e829f
Added eslint and husky (config based on neo4j/nx repository)
Oct 28, 2022
53dbbed
Updated eslint config to be as light as possible with Typescript
Nov 4, 2022
2aa7662
Updated all files with prettier and linter, refactored files to avoid…
Nov 4, 2022
fafcfb4
Added Eslint check step in Github workflows
Nov 14, 2022
c3797a9
Updated all files with prettier and linter after rebase on Develop br…
Nov 15, 2022
ce03556
Merge pull request #247 from neo4j-labs/chore/prettier
bastienhubert Dec 9, 2022
8754cdd
Squash Security Bumbs (#281)
BennuFire Dec 14, 2022
193f624
Bump loader-utils from 2.0.2 to 2.0.4 in /gallery (#264)
dependabot[bot] Dec 14, 2022
bb78a13
Fixes #160 (#269)
nlmenezes Dec 14, 2022
0c317ce
Fix : Replace parameter in iFrame URLs (#276)
mariusconjeaud Dec 14, 2022
b0b78ef
Bump loader-utils from 2.0.2 to 2.0.4 in /gallery (#290)
dependabot[bot] Dec 15, 2022
6fb8a7b
Crash on Boolean options parameter selection (#285)
BennuFire Dec 15, 2022
d91f753
Hotfix for Neo4j container issues with 5.3 (#293)
nielsdejong Dec 16, 2022
6395948
Updated deployment scripts to use minimal build without source maps (…
nielsdejong Dec 16, 2022
d4b90db
Changing card image download logic (#273)
alfredorubin96 Dec 16, 2022
e261fda
Dynamic Card titles (#270)
BennuFire Dec 16, 2022
2aee49a
Docs on custom map provider (#282)
BennuFire Dec 16, 2022
395b224
Merge branch 'master' into develop
nielsdejong Dec 16, 2022
f916f5e
Added release notes, bumped version number
nielsdejong Dec 16, 2022
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
170 changes: 170 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "react"],
"extends": ["eslint:recommended", "prettier", "plugin:@typescript-eslint/recommended"], // this is optional
"env": {
"browser": true,
"node": true
},
"settings": {
"react": {
"version": "detect"
}
},
"ignorePatterns": ["node_modules/**", "packages/**/dist/**", "packages/**/coverage/**"],
"rules": {
"@typescript-eslint/no-explicit-any": "off", // Off for v1
"@typescript-eslint/ban-ts-comment": "off", // Off for v1
"@typescript-eslint/no-empty-function": "off", // Off for v1
"@typescript-eslint/no-unused-vars": [
"error",
{ "vars": "all", "varsIgnorePattern": "^_*", "args": "after-used", "argsIgnorePattern": "^_" }
],
"array-callback-return": "off", // Off for v1
"arrow-body-style": "off",
"block-scoped-var": "error",
"camelcase": "off", // Off for v1
"consistent-return": "off", // Off for v1
"consistent-this": ["error", "self"],
"constructor-super": "error",
"curly": ["error", "all"],
"default-case": "error",
"default-param-last": "off", // Off for v1
"dot-notation": "error",
"eqeqeq": "off", // Off for v1
"func-names": "error",
"func-style": [
"error",
"declaration",
{
"allowArrowFunctions": true
}
],
"grouped-accessor-pairs": "error",
"line-comment-position": "off", // Off for v1
"lines-between-class-members": "error",
"max-depth": "error",
"max-len": [
"off", // Off for v1
{
"code": 120,
"comments": 120,
"ignoreUrls": true,
"ignoreTemplateLiterals": true
}
],
"max-lines-per-function": ["off"],
"max-nested-callbacks": ["error", 5],
"max-statements": ["off"],
"max-statements-per-line": "error",
"no-alert": "off", // Off for v1
"no-array-constructor": "error",
"no-await-in-loop": "off", // Off for v1
"no-buffer-constructor": "error",
"no-caller": "error",
"no-confusing-arrow": "error",
"no-console": "warn",
"no-constructor-return": "error",
"no-constant-condition": "error",
"no-debugger": "warn",
"no-dupe-else-if": "error",
"no-else-return": "error",
"no-empty-function": [
"off", // Off for v1
{
"allow": ["constructors"]
}
],
"no-eq-null": "off", // Off for V1
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-import-assign": "error",
"no-invalid-this": "off",
"no-iterator": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-loop-func": "error",
"no-magic-numbers": "off",
"no-multi-assign": "error",
"no-multi-str": "error",
"no-nested-ternary": "off", // Off for v1
"no-new": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-new-wrappers": "error",
"no-octal-escape": "error",
"no-param-reassign": "off", // Off for v1
"no-path-concat": "error",
"no-plusplus": [
"error",
{
"allowForLoopAfterthoughts": true
}
],
"no-proto": "off", // Off for v1
"no-restricted-globals": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-setter-return": "error",
"no-sync": "error",
"no-tabs": "error",
"no-template-curly-in-string": "error",
"no-underscore-dangle": "off", // Off for v1
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": "error",
"no-unreachable": "error",
"no-unused-expressions": "off", // Off for v1
"no-useless-call": "error",
"no-useless-computed-key": "error",
"no-useless-concat": "off", // Off for v1
"no-useless-rename": "error",
"no-useless-return": "error",
"no-var": "error",
"no-void": ["error", { "allowAsStatement": true }],
"one-var": ["error", "never"],
"operator-assignment": "error",
"padding-line-between-statements": "error",
"prefer-arrow-callback": "warn",
"prefer-const": "off", // Off for v1
"prefer-destructuring": [
// Off for v1
"warn",
{
"VariableDeclarator": {
"array": true,
"object": true
},
"AssignmentExpression": {
"array": false,
"object": false
}
}
],
"prefer-numeric-literals": "warn",
"prefer-promise-reject-errors": "warn",
"prefer-rest-params": "warn",
"prefer-spread": "warn",
"prefer-template": "warn",
"radix": "off", // Off for v1
"require-atomic-updates": "error",
"require-await": "warn", // Warn for v1
"sort-keys": "off",
"spaced-comment": [
"warn",
"always",
{
"markers": ["/"]
}
],
"symbol-description": "error",
"yoda": "error"
}
}
8 changes: 5 additions & 3 deletions .github/workflows/develop-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Test/Deploy Develop

on:
push:
branches: [ develop ]

jobs:
build-test:
runs-on: ubuntu-latest
Expand All @@ -25,6 +25,8 @@ jobs:
./scripts/docker-neo4j-initializer/start-movies-db.sh
- run: rm -rf docs
- run: yarn install
- name: Eslint check
run: yarn run lint
- name: Cypress run
uses: cypress-io/github-action@v2
with:
Expand All @@ -44,7 +46,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: yarn install
- run: PRODUCTION=true && yarn run build
- run: yarn run build-minimal
- name: Set AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/develop-test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Test Develop

on:
pull_request:
branches: [ develop ]



jobs:
build-test:
runs-on: ubuntu-latest
Expand All @@ -25,6 +24,8 @@ jobs:
chmod +x ./scripts/docker-neo4j-initializer/start-movies-db.sh
./scripts/docker-neo4j-initializer/start-movies-db.sh
- run: yarn install
- name: Eslint check
run: yarn run lint
- name: Cypress run
uses: cypress-io/github-action@v2
with:
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/master-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Test/Deploy Master

on:
push:
branches: [ master ]



jobs:
build-test:
runs-on: ubuntu-latest
Expand All @@ -26,6 +25,8 @@ jobs:
./scripts/docker-neo4j-initializer/start-movies-db.sh
- run: rm -rf docs
- run: yarn install
- name: Eslint check
run: yarn run lint
- name: Cypress run
uses: cypress-io/github-action@v2
with:
Expand All @@ -46,7 +47,7 @@ jobs:
# node-version: ${{ matrix.node-version }}
# - run: rm -rf docs
# - run: yarn install
# - run: yarn run build
# - run: yarn run build-minimal
# - name: Set AWS credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
Expand Down Expand Up @@ -78,7 +79,7 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.2.0
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.2.1
# build-npm:
# needs: build-test
# runs-on: ubuntu-latest
Expand All @@ -92,8 +93,8 @@ jobs:
# with:
# node-version: ${{ matrix.node-version }}
# - run: rm -rf docs
# - run: yarn install
# - run: yarn run build
# - run: yarn install-minimal
# - run: yarn run build-minimal
# - run: curl ${{ secrets.INDEX_HTML_DEPLOYMENT_URL }} > dist/index.html
# - run: npm pack
# - run: rm -rf target
Expand Down Expand Up @@ -128,7 +129,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: cd gallery && yarn install
- run: cd gallery && CI=false yarn run build
- run: cd gallery && yarn run build
- name: Set AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/master-test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Test Master

on:
pull_request:
branches: [ master ]



jobs:
build-test:
runs-on: ubuntu-latest
Expand All @@ -25,6 +24,8 @@ jobs:
chmod +x ./scripts/docker-neo4j-initializer/start-movies-db.sh
./scripts/docker-neo4j-initializer/start-movies-db.sh
- run: yarn install
- name: Eslint check
run: yarn run lint
- name: Cypress run
uses: cypress-io/github-action@v2
with:
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn run lint-staged
6 changes: 6 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"*.ts": ["prettier --write", "eslint --fix"],
"*.tsx": ["prettier --write", "eslint --fix"],
"*.json": ["prettier --write"],
"*.js": ["prettier --write"]
}
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
coverage
dist
node_modules
docs
12 changes: 12 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"printWidth": 120,
"semi": true,
"singleQuote": true,
"jsxSingleQuote": true,
"useTabs": false,
"tabWidth": 2,
"arrowParens": "always",
"trailingComma": "es5",
"bracketSpacing": true,
"endOfLine": "lf"
}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ COPY ./package.json /usr/local/src/neodash/package.json

RUN yarn install
COPY ./ /usr/local/src/neodash
RUN PRODUCTION=true && yarn run build
RUN yarn run build-minimal

# production stage
FROM nginx:alpine AS neodash
Expand All @@ -38,4 +38,4 @@ RUN chown -R nginx:nginx /usr/share/nginx/html/
USER nginx
EXPOSE 5005
HEALTHCHECK cmd curl --fail http://localhost:5005 || exit 1
LABEL version="2.2.0"
LABEL version="2.2.1"
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

## NeoDash - Neo4j Dashboard Builder
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.
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.

![screenshot](public/screenshot.png)

Expand All @@ -22,6 +22,23 @@ docker run -it --rm -p 5005:5005 nielsdejong/neodash

See the [Developer Guide](https://neo4j.com/labs/neodash/2.1/developer-guide/) for more on installing, building, and running the application.

## Coding practices
In order to improve the code quality, we added a Prettier and a Linter to this repository.

### Behavior
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.

There is also a dedicated linting step in the Github project pipeline in order to catch each potential inconsistency.

**Don't hesitate to setup your IDE formatting feature to use the Prettier module and our defined rules (.prettierrc.json).**

### Manual execution
If you want to **manually prettify all the project .ts and .tsx files**, you can run `yarn run format`.

If you wan to **manually run linting of all your .ts and .tsx files**, you can run `yarn run lint`.

If you wan to **manually run linting of all your .ts and .tsx staged files**, you can run `yarn run lint-staged`.

## User Guide
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](
https://neo4j.com/labs/neodash/2.1/user-guide/).
Expand Down
Loading