diff --git a/.all-contributorsrc b/.all-contributorsrc index ec1ac3214a..871bcf4553 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -612,6 +612,15 @@ "contributions": [ "code" ] + }, + { + "login": "LancerComet", + "name": "LancerComet", + "avatar_url": "https://avatars.githubusercontent.com/u/10321350?v=4", + "profile": "https://github.com/LancerComet", + "contributions": [ + "code" + ] } ], "contributorsPerLine": 7, diff --git a/.github/ISSUE_TEMPLATE/I18n_translations.md b/.github/ISSUE_TEMPLATE/I18n_translations.md new file mode 100644 index 0000000000..b8e2e6fc26 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/I18n_translations.md @@ -0,0 +1,23 @@ +# i18n translation request + +**Please enter the following details** + +1. Select applicalbe +- [ ] **New language support request** +- [ ] **Existing language translation corrections request** +Verify if language support already exists in NocoDB i18n master spreadsheet [here](https://docs.google.com/spreadsheets/d/1kGp92yLwhs1l7lwwgeor3oN1dFl7JZWuQOa4WSeZ0TE/edit#gid=2076107172) + +2. Associated language code (pick from [here](https://developers.google.com/admin-sdk/directory/v1/languages)): + +3. Google spreadsheet +- Procedure to share google spread sheet can be found [here](https://support.google.com/docs/answer/2494822?hl=en&co=GENIE.Platform%3DDesktop#zippy=%2Cshare-a-file-publicly) + - When requested, select public sharable link. +- Alternatively, you can download & attach spreadsheet here along with the issue as well. +- [ ] **Attached** +- [ ] **Shared link**: + +4. Summary of the changes made +- You can highlight modified items in Spreadsheet attached/shared, to help us quickly identify change set + +5. Any specific message to be conveyed to moderators? +- Help us simplify process if you find something hard about it diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 3ecd2ab26e..45ca2e2ddc 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Feature request about: Suggest an idea for this project title: "[Feature] " -labels: Feature +labels: '' assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/i18n-translation-request.md b/.github/ISSUE_TEMPLATE/i18n-translation-request.md new file mode 100644 index 0000000000..388183100d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/i18n-translation-request.md @@ -0,0 +1,32 @@ +--- +name: i18n translation request +about: translation & localisation support +title: "[i18n] Language support extension- " +labels: i18n translation +assignees: dstala + +--- + +# i18n translation request + +**Please enter the following details** + +1. Select applicalbe +- [ ] **New language support request** +- [ ] **Existing language translation corrections request** +Verify if language support already exists in the NocoDB i18n master spreadsheet [here](https://docs.google.com/spreadsheets/d/1kGp92yLwhs1l7lwwgeor3oN1dFl7JZWuQOa4WSeZ0TE/edit#gid=2076107172) + +2. Associated language code (pick from [here](https://developers.google.com/admin-sdk/directory/v1/languages)): + +3. Google spreadsheet +- Procedure to share google spreadsheet can be found [here](https://support.google.com/docs/answer/2494822?hl=en&co=GENIE.Platform%3DDesktop#zippy=%2Cshare-a-file-publicly) + - When requested, select public sharable link. +- Alternatively, you can download & attach a spreadsheet here along with the issue as well. +- [ ] **Attached** +- [ ] **Shared link**: + +4. Summary of the changes made +- You can highlight modified items in the Spreadsheet attached/shared, to help us quickly identify changeset + +5. Any specific message to be conveyed to moderators? +- Help us simplify the process if you find something hard about it diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 1f6f5b6c21..702d421e61 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -4,13 +4,15 @@ name: "CI/CD" on: push: + branches-ignore: + - master paths: - "packages/nc-gui/**" - "scripts/cypress/**" - "packages/nocodb/**" - ".github/workflows/ci-cd.yml" pull_request: - branches: [master, develop] + branches: [develop] paths: - "packages/nc-gui/**" - "scripts/cypress/**" @@ -18,6 +20,178 @@ on: - ".github/workflows/ci-cd.yml" jobs: + cypress-pg-restTableOps-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:api + npm run start:web + docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d + spec: "./scripts/cypress/integration/test/pg-restTableOps.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: restTableOps-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-pg-restViews-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:api + npm run start:web + docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d + spec: "./scripts/cypress/integration/test/pg-restViews.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: restTableOps-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-pg-restRoles-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:api + npm run start:web + docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d + spec: "./scripts/cypress/integration/test/pg-restRoles.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: restTableOps-snapshots + path: scripts/cypress/screenshots + retention-days: 2 + cypress-pg-restMisc-run: + runs-on: ubuntu-20.04 + steps: + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Set env + run: echo "NODE_ENV=test" >> $GITHUB_ENV + - name: Cypress run + uses: cypress-io/github-action@v2 + with: + start: | + npm run start:api + npm run start:web + docker-compose -f ./scripts/cypress/docker-compose-pg.yml up -d + spec: "./scripts/cypress/integration/test/pg-restMisc.js" + wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" + wait-on-timeout: 1200 + config-file: scripts/cypress/cypress.json + - name: Upload screenshots + uses: actions/upload-artifact@v2 + with: + name: restTableOps-snapshots + path: scripts/cypress/screenshots + retention-days: 2 cypress-restTableOps-run: runs-on: ubuntu-20.04 steps: @@ -225,7 +399,6 @@ jobs: start: | npm run start:xcdb-api npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d spec: "./scripts/cypress/integration/test/xcdb-restTableOps.js" wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 @@ -269,7 +442,6 @@ jobs: start: | npm run start:xcdb-api npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d spec: "./scripts/cypress/integration/test/xcdb-restViews.js" wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 @@ -313,7 +485,6 @@ jobs: start: | npm run start:xcdb-api npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d spec: "./scripts/cypress/integration/test/xcdb-restRoles.js" wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 @@ -357,7 +528,6 @@ jobs: start: | npm run start:xcdb-api npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d spec: "./scripts/cypress/integration/test/xcdb-restMisc.js" wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 @@ -577,7 +747,6 @@ jobs: start: | npm run start:xcdb-api npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d spec: "./scripts/cypress/integration/test/xcdb-gqlTableOps.js" wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 @@ -621,7 +790,6 @@ jobs: start: | npm run start:xcdb-api npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d spec: "./scripts/cypress/integration/test/xcdb-gqlViews.js" wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 @@ -665,7 +833,6 @@ jobs: start: | npm run start:xcdb-api npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d spec: "./scripts/cypress/integration/test/xcdb-gqlRoles.js" wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 @@ -709,7 +876,6 @@ jobs: start: | npm run start:xcdb-api npm run start:web - docker-compose -f ./scripts/docker-compose-cypress.yml up -d spec: "./scripts/cypress/integration/test/xcdb-gqlMisc.js" wait-on: "http://localhost:8080, http://localhost:3000/_nuxt/runtime.js" wait-on-timeout: 1200 diff --git a/.github/workflows/release-close-issue.yml b/.github/workflows/release-close-issue.yml new file mode 100644 index 0000000000..b8e3c438a7 --- /dev/null +++ b/.github/workflows/release-close-issue.yml @@ -0,0 +1,34 @@ +name: 'Close Issues with Labels' + +on: + # Triggered manually + workflow_dispatch: + inputs: + issue_label: + description: "All issues with such label will be closed" + required: true + version: + description: "Which version is this issue fixed in" + required: true + # Triggered by release-nocodb.yml + workflow_call: + inputs: + issue_label: + description: "All issues with such label will be closed" + required: true + type: string + version: + description: "Which version is this issue fixed in" + required: true + type: string +jobs: + close-issues: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: close-resolved-issues + uses: wingkwong/close-issues-based-on-label@master + env: + LABEL: ${{ github.event.inputs.issue_label || inputs.issue_label }} + VERSION: ${{ github.event.inputs.version || inputs.version }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml index c8e094a8f8..1efc14d9ba 100644 --- a/.github/workflows/release-docker.yml +++ b/.github/workflows/release-docker.yml @@ -1,11 +1,19 @@ name: "Release : Docker" on: + # Triggered manually workflow_dispatch: inputs: tag: description: "Docker image tag" required: true + # Triggered by release-nocodb.yml + workflow_call: + inputs: + tag: + description: "Docker image tag" + required: true + type: string jobs: buildx: @@ -59,13 +67,13 @@ jobs: uses: docker/build-push-action@v2 with: context: ${{ env.working-directory }} - build-args: NC_VERSION=${{ github.event.inputs.tag }} + build-args: NC_VERSION=${{ github.event.inputs.tag || inputs.tag }} platforms: linux/amd64,linux/arm64,linux/arm/v7 cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new push: true tags: | - nocodb/nocodb:${{ github.event.inputs.tag }} + nocodb/nocodb:${{ github.event.inputs.tag || inputs.tag }} nocodb/nocodb:latest # Temp fix diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml index dc57ee6389..8f0228b615 100644 --- a/.github/workflows/release-draft.yml +++ b/.github/workflows/release-draft.yml @@ -1,6 +1,7 @@ name: "Release : Draft Notes" on: + # Triggered manually workflow_dispatch: inputs: tag: @@ -9,6 +10,17 @@ on: prev_tag: description: "Previous Tag" required: true + # Triggered by release-nocodb.yml + workflow_call: + inputs: + tag: + description: "Tag" + required: true + type: string + prev_tag: + description: "Previous Tag" + required: true + type: string jobs: build: @@ -22,7 +34,7 @@ jobs: github.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, - ref: "refs/tags/${{ github.event.inputs.tag }}", + ref: "refs/tags/${{ github.event.inputs.tag || inputs.tag }} ", sha: context.sha }) @@ -33,4 +45,4 @@ jobs: - uses: actions/setup-node@v2 with: node-version: 14 - - run: "npx github-release-notes@0.17.2 release --token ${{ secrets.GH_TOKEN }} --draft --tags ${{ github.event.inputs.tag }}..${{ github.event.inputs.prev_tag }}" + - run: "npx github-release-notes@0.17.2 release --token ${{ secrets.GH_TOKEN }} --draft --tags ${{ github.event.inputs.tag || inputs.tag }}..${{ github.event.inputs.prev_tag || inputs.prev_tag }} " diff --git a/.github/workflows/release-nocodb.yml b/.github/workflows/release-nocodb.yml new file mode 100644 index 0000000000..5f427fb0a5 --- /dev/null +++ b/.github/workflows/release-nocodb.yml @@ -0,0 +1,52 @@ +name: 'NocoDB Release' + +on: + # Triggered manually + workflow_dispatch: + inputs: + tag: + description: "Target Tag" + required: true + prev_tag: + description: "Previous Tag" + required: true +jobs: + # Close all issues with target tags 'Fixed' & 'Resolved' + close-fixed-issues: + needs: release-npm + uses: ./.github/workflows/release-close-issue.yml + with: + issue_label: 'Fixed' + version: ${{ github.event.inputs.tag }} + close-resolved-issues: + needs: close-fixed-issues + uses: ./.github/workflows/release-close-issue.yml + with: + issue_label: 'Resolved' + version: ${{ github.event.inputs.tag }} + + # Build, install, publish frontend and backend to npm + release-npm: + uses: ./.github/workflows/release-npm.yml + with: + tag: ${{ github.event.inputs.tag }} + + # Draft Release Note + release-draft-note: + needs: close-issues + uses: ./.github/workflows/release-draft.yml + with: + tag: ${{ github.event.inputs.tag }} + prev_tag: ${{ github.event.inputs.prev_tag }} + + # Build docker image and push to docker hub + release-docker: + needs: release-draft-note + uses: ./.github/workflows/release-docker.yml + with: + tag: ${{ github.event.inputs.tag }} + + # Sync changes to develop + sync-to-develop: + needs: release-docker + uses: ./.github/workflows/sync-to-develop.yml \ No newline at end of file diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml index 200b7e5782..6a9646791a 100644 --- a/.github/workflows/release-npm.yml +++ b/.github/workflows/release-npm.yml @@ -1,15 +1,19 @@ name: "Release : NPM packages" on: + # Triggered manually workflow_dispatch: inputs: tag: description: "Tag" required: true - prev_tag: - description: "Previous Tag" + type: string + # Triggered by release-nocodb.yml + workflow_call: + inputs: + tag: + description: "Tag" required: true - jobs: release: runs-on: ubuntu-latest @@ -31,7 +35,7 @@ jobs: npm run build:copy:jsdeliver cd ../.. npm install - VERSION=${{github.event.inputs.tag}} node scripts/upgradeNcGui.js node scripts/upgradeNcGui.js && cd packages/nocodb && npm run obfuscate:build:publish + VERSION=${{ github.event.inputs.tag || inputs.tag }} node scripts/upgradeNcGui.js node scripts/upgradeNcGui.js && cd packages/nocodb && npm run obfuscate:build:publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: Create Pull Request @@ -44,113 +48,17 @@ jobs: # committer: GitHub # author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> signoff: true - branch: release-patches + branch: 'release/${{ github.event.inputs.tag || inputs.tag }}' delete-branch: true - title: 'Release ${{github.event.inputs.tag}}' + title: 'Release ${{ github.event.inputs.tag || inputs.tag }}' labels: | - automerge - + Bot: Automated PR - name: Check outputs run: | echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" - - - name: automerge - uses: "pascalgn/automerge-action@v0.14.3" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - PULL_REQUEST: "${{ steps.cpr.outputs.pull-request-number }}" - buildx: - runs-on: ubuntu-latest - needs: [release] - env: - working-directory: ./packages/nocodb - strategy: - matrix: - node-version: [ 12 ] - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 - with: - node-version: ${{ matrix.node-version }} - - - uses: bahmutov/npm-install@v1 - with: - working-directory: ${{ env.working-directory }} - - - name: Build nocodb and docker files - run: | - npm run build - npm run docker:build - working-directory: ${{ env.working-directory }} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v1 - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v2 - with: - context: ${{ env.working-directory }} - build-args: NC_VERSION=${{ github.event.inputs.tag }} - platforms: linux/amd64,linux/arm64,linux/arm/v7 - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new - push: true - tags: | - nocodb/nocodb:${{ github.event.inputs.tag }} - nocodb/nocodb:latest - - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - draft: - runs-on: ubuntu-latest - needs: [release] - steps: - - name: Create tag - uses: actions/github-script@v3 - with: - github-token: ${{ secrets.GH_TOKEN }} - script: | - github.git.createRef({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: "refs/tags/${{ github.event.inputs.tag }}", - sha: context.sha - }) - - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - uses: actions/setup-node@v2 - with: - node-version: 14 - - run: "npx github-release-notes@0.17.2 release --token ${{ secrets.GH_TOKEN }} --draft --tags ${{ github.event.inputs.tag }}..${{ github.event.inputs.prev_tag }}" - - + - name: automerge + uses: "pascalgn/automerge-action@v0.14.3" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + PULL_REQUEST: "${{ steps.cpr.outputs.pull-request-number }}" \ No newline at end of file diff --git a/.github/workflows/sync-to-develop.yml b/.github/workflows/sync-to-develop.yml new file mode 100644 index 0000000000..93407111cf --- /dev/null +++ b/.github/workflows/sync-to-develop.yml @@ -0,0 +1,23 @@ +name: 'Sync changes back to develop branch from master' + +on: + # Triggered manually + workflow_dispatch: + # Triggered by release-nocodb.yml + workflow_call: +jobs: + close-issues: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Merge from master to develop + uses: robotology/gh-action-nightly-merge@v1.3.1 + with: + stable_branch: 'master' + development_branch: 'develop' + allow_ff: true + allow_forks: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 80af87ea84..0989a020e5 100644 --- a/.gitignore +++ b/.gitignore @@ -83,3 +83,4 @@ mongod # Cypress #========= shared.json +/scripts/Cypress/screenshots \ No newline at end of file diff --git a/README.md b/README.md index 864265aaab..5a16a55af5 100644 --- a/README.md +++ b/README.md @@ -389,6 +389,7 @@ Our mission is to provide the most powerful no-code interface for databases whic
诗人的咸鱼

💻
bitbytejoy

💻
pan93412

💻 +
LancerComet

💻 diff --git a/package-lock.json b/package-lock.json index cbb33b9fbb..942733a13a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2656,6 +2656,11 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, + "buffer-writer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", + "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==" + }, "builtins": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", @@ -7654,6 +7659,11 @@ "p-reduce": "^1.0.0" } }, + "packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==" + }, "parallel-transform": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", @@ -7779,6 +7789,67 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "pg": { + "version": "8.7.3", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.7.3.tgz", + "integrity": "sha512-HPmH4GH4H3AOprDJOazoIcpI49XFsHCe8xlrjHkWiapdbHK+HLtbm/GQzXYAZwmPju/kzKhjaSfMACG+8cgJcw==", + "requires": { + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.5.0", + "pg-pool": "^3.5.1", + "pg-protocol": "^1.5.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + } + }, + "pg-connection-string": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", + "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==" + }, + "pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==" + }, + "pg-pool": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.5.1.tgz", + "integrity": "sha512-6iCR0wVrro6OOHFsyavV+i6KYL4lVNyYAB9RD18w66xSzN+d8b66HiwuP30Gp1SH5O9T82fckkzsRjlrhD0ioQ==" + }, + "pg-protocol": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.5.0.tgz", + "integrity": "sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ==" + }, + "pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "requires": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + } + }, + "pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "requires": { + "split2": "^4.1.0" + }, + "dependencies": { + "split2": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.1.0.tgz", + "integrity": "sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ==" + } + } + }, "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", @@ -7815,6 +7886,29 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", "dev": true }, + "postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==" + }, + "postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=" + }, + "postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==" + }, + "postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "requires": { + "xtend": "^4.0.0" + } + }, "pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", @@ -10030,8 +10124,7 @@ "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, "y18n": { "version": "4.0.3", diff --git a/package.json b/package.json index 374cfe0f36..b1e7d09111 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ }, "dependencies": { "mysql2": "^2.3.3", + "pg": "^8.7.3", "sqlite3": "^5.0.2" } } diff --git a/packages/nc-cli/package-lock.json b/packages/nc-cli/package-lock.json index ff004c3ae4..f26165b088 100644 --- a/packages/nc-cli/package-lock.json +++ b/packages/nc-cli/package-lock.json @@ -6610,9 +6610,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.14.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz", - "integrity": "sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==", + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==", "funding": [ { "type": "individual", @@ -21377,9 +21377,9 @@ "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==" }, "follow-redirects": { - "version": "1.14.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz", - "integrity": "sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A==" + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==" }, "for-in": { "version": "1.0.2", diff --git a/packages/nc-common/package-lock.json b/packages/nc-common/package-lock.json index fb0c9c1716..b3dd362845 100644 --- a/packages/nc-common/package-lock.json +++ b/packages/nc-common/package-lock.json @@ -5208,9 +5208,9 @@ "dev": true }, "handlebars": { - "version": "4.7.6", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", - "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", "dev": true, "requires": { "minimist": "^1.2.5", diff --git a/packages/nc-gui/components/auth/roles.vue b/packages/nc-gui/components/auth/roles.vue index 92fb74678b..f1b2d69b3c 100644 --- a/packages/nc-gui/components/auth/roles.vue +++ b/packages/nc-gui/components/auth/roles.vue @@ -23,11 +23,11 @@ - + refresh - Reload + {{ $t('general.reload')}} + refresh - Reload + + {{ $t('general.reload')}} + mdi-plus - New User + + {{ $t('activity.newUser')}} @@ -91,17 +95,20 @@ mdi-email-outline - Email + + {{ $t('labels.email')}} mdi-drama-masks - Roles + + {{ $t('objects.roles')}} - Actions + + {{ $t('labels.actions')}} @@ -145,9 +152,10 @@ + mdi-pencil-outline - - - mdi-plus - + + + mdi-plus + + + + mdi-delete-outline - + + + +
mdi-plus - New User + + {{ $t('activity.newUser') }}
@@ -296,7 +318,7 @@ @@ -304,7 +326,7 @@ - Share : {{ $store.getters['project/GtrProjectName'] }} + {{ $t('activity.share') }} : {{ $store.getters['project/GtrProjectName'] }} + {{ $t('activity.inviteTeam') }}
@@ -357,9 +380,10 @@

- Looks like you have not configured mailer yet!
Please copy above - invite - link and send it to + {{ $t('msg.info.userInviteNoSMTP') }} + + + {{ invite_token && (invite_token.email || invite_token.emails && invite_token.emails.join(', ')) }}.

@@ -398,7 +422,10 @@ @input="edited=true" > @@ -433,6 +460,8 @@ + +
{{ selectedUser.id ? 'save' : 'mdi-send' }} - {{ selectedUser.id ? 'Save' : 'Invite' }} + {{ selectedUser.id ? $t('general.save') : $t('activity.invite') }}
@@ -497,7 +526,8 @@ export default { } ], userList: [], - roleDescriptions: {} + roleDescriptions: {}, + deleteUserType: '' // [DELETE_FROM_PROJECT, DELETE_FROM_NOCODB] }), computed: { roleNames() { @@ -530,6 +560,12 @@ export default { set(i) { this.selectedUser = this.users[i] } + }, + dialogMessage() { + let msg = 'Do you want to remove the user' + if (this.deleteUserType === 'DELETE_FROM_PROJECT') { msg += ' from Project' } else if (this.deleteUserType === 'DELETE_FROM_NOCODB') { msg += ' from NocoDB' } + msg += '?' + return msg } }, watch: { @@ -669,30 +705,30 @@ export default { console.log(e) } }, - async deleteUser(id) { + async deleteUser(id, type) { try { await this.$axios.delete('/admin/' + id, { params: { project_id: this.$route.params.project_id, - email: this.deleteItem.email + email: this.deleteItem.email, + type }, headers: { 'xc-auth': this.$store.state.users.token } }) - this.$toast.success('Successfully removed the user from project').goAway(3000) + this.$toast.success(`Successfully removed the user from ${type === 'DELETE_FROM_PROJECT' ? 'project' : 'NocoDB'}`).goAway(3000) await this.loadUsers() } catch (e) { this.$toast.error(e.response.data.msg).goAway(3000) } }, - async confirmDelete(hideDialog) { if (hideDialog) { this.showConfirmDlg = false return } - await this.deleteUser(this.deleteId) + await this.deleteUser(this.deleteId, this.deleteUserType) this.showConfirmDlg = false }, addUser() { @@ -832,6 +868,7 @@ export default { * * @author Naveen MR * @author Pranav C Balan + * @author Wing-Kam Wong * * @license GNU AGPL version 3 or any later version * diff --git a/packages/nc-gui/components/base/shareBase.vue b/packages/nc-gui/components/base/shareBase.vue index 088ca49716..19466797cc 100644 --- a/packages/nc-gui/components/base/shareBase.vue +++ b/packages/nc-gui/components/base/shareBase.vue @@ -3,23 +3,46 @@ mdi-open-in-new - Shared base link + + + {{ $t('activity.shareBase.link') }} +
{{ url }} - + + + mdi-reload - + + + mdi-content-copy - + + + mdi-open-in-new - + + + mdi-xml
@@ -31,8 +54,14 @@