feat: 初始化项目并完成基础功能开发
- 完成项目初始化
- 实现用户注册、登录功能
- 完成用户管理与权限管理模块
- 开发后端 Tracker 服务器项目管理接口
- 实现日志管理接口
Change-Id: Ia4bde1c9ff600352a7ff0caca0cc50b02cad1af7
diff --git a/react-ui/.github/FUNDING.yml b/react-ui/.github/FUNDING.yml
new file mode 100644
index 0000000..26b00e2
--- /dev/null
+++ b/react-ui/.github/FUNDING.yml
@@ -0,0 +1,12 @@
+# These are supported funding model platforms
+
+github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
+patreon: # Replace with a single Patreon username
+open_collective: ant-design
+ko_fi: # Replace with a single Ko-fi username
+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
+liberapay: # Replace with a single Liberapay username
+issuehunt: # Replace with a single IssueHunt username
+otechie: # Replace with a single Otechie username
+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
diff --git a/react-ui/.github/ISSUE_TEMPLATE/bug_report.md b/react-ui/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..5cb2692
--- /dev/null
+++ b/react-ui/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,48 @@
+---
+name: '报告 Bug | Report bug 🐛'
+about: 报告 Ant Design Pro 的 bug
+title: '🐛 [BUG]'
+labels: '🐛 bug'
+assignees: ''
+---
+
+### 🐛 bug 描述
+
+<!--
+详细地描述 bug,让大家都能理解
+Describe the bug in detail so that everyone can understand it
+-->
+
+### 📷 复现步骤 | Recurrence steps
+
+<!--
+清晰描述复现步骤,让别人也能看到问题
+Clearly describe the recurrence steps so that others can see the problem
+-->
+
+### 🏞 期望结果 | Expected results
+
+<!--
+描述你原本期望看到的结果
+Describe what you expected to see
+-->
+
+### 💻 复现代码 | Recurrence code
+
+<!--
+提供可复现的代码,仓库,或线上示例
+Provide reproducible code, warehouse, or online examples
+-->
+
+### © 版本信息
+
+- Ant Design Pro 版本: [e.g. 4.0.0]
+- umi 版本
+- 浏览器环境
+- 开发环境 [e.g. mac OS]
+
+### 🚑 其他信息
+
+<!--
+如截图等其他信息可以贴在这里
+-->
diff --git a/react-ui/.github/ISSUE_TEMPLATE/feature_request.md b/react-ui/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..b2b866a
--- /dev/null
+++ b/react-ui/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,28 @@
+---
+name: '功能需求 | Feature Requirements ✨'
+about: 对 Ant Design Pro 的需求或建议
+title: '👑 [需求 | Feature]'
+labels: '👑 Feature Request'
+assignees: ''
+---
+
+### 🥰 需求描述 | Requirements description
+
+<!--
+详细地描述需求,让大家都能理解
+Describe the requirements in detail so that everyone can understand them
+-->
+
+### 🧐 解决方案 | Solution
+
+<!--
+如果你有解决方案,在这里清晰地阐述
+If you have a solution, explain it clearly here
+-->
+
+### 🚑 其他信息 | Other information
+
+<!--
+如截图等其他信息可以贴在这里
+Other information such as screenshots can be posted here
+-->
diff --git a/react-ui/.github/ISSUE_TEMPLATE/question.md b/react-ui/.github/ISSUE_TEMPLATE/question.md
new file mode 100644
index 0000000..f0fbe7d
--- /dev/null
+++ b/react-ui/.github/ISSUE_TEMPLATE/question.md
@@ -0,0 +1,34 @@
+---
+name: '疑问或需要帮助 | Questions or need help ❓'
+about: 对 Ant Design Pro 使用的疑问或需要帮助
+title: '🧐[问题 | question]'
+labels: '🧐 question'
+assignees: ''
+---
+
+### 🧐 问题描述 | Problem description
+
+<!--
+详细地描述问题,让大家都能理解
+Describe the problem in detail so that everyone can understand it
+-->
+
+### 💻 示例代码 | Sample code
+
+<!--
+一个最小可重现的代码,让开发者可以快速的定位问题
+A minimal reproducible code that allows developers to quickly locate problems
+-->
+
+### 🚑 其他信息 | Other information
+
+<!--
+如截图等其他信息可以贴在这里
+Other information such as screenshots can be posted here
+-->
+
+OS:
+
+Node:
+
+浏览器 | browser:
diff --git a/react-ui/.github/workflows/ci.yml b/react-ui/.github/workflows/ci.yml
new file mode 100644
index 0000000..d6f5693
--- /dev/null
+++ b/react-ui/.github/workflows/ci.yml
@@ -0,0 +1,30 @@
+name: Node CI
+
+on: [push, pull_request]
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ node_version: [16.x, 14.x]
+ os: [ubuntu-latest, windows-latest, macOS-latest]
+ steps:
+ - uses: actions/checkout@v1
+ - name: Use Node.js ${{ matrix.node_version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node_version }}
+ - run: echo ${{github.ref}}
+ - run: npm install
+ - run: yarn run lint
+ - run: yarn run tsc
+ - run: yarn run build
+ env:
+ CI: true
+ PROGRESS: none
+ NODE_ENV: test
+ NODE_OPTIONS: --max_old_space_size=4096
diff --git a/react-ui/.github/workflows/codeql.yml b/react-ui/.github/workflows/codeql.yml
new file mode 100644
index 0000000..705b30e
--- /dev/null
+++ b/react-ui/.github/workflows/codeql.yml
@@ -0,0 +1,41 @@
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ "master" ]
+ pull_request:
+ branches: [ "master" ]
+ schedule:
+ - cron: "48 12 * * 2"
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ javascript ]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: ${{ matrix.language }}
+ queries: +security-and-quality
+
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v2
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2
+ with:
+ category: "/language:${{ matrix.language }}"
diff --git a/react-ui/.github/workflows/coverage.yml b/react-ui/.github/workflows/coverage.yml
new file mode 100644
index 0000000..d145753
--- /dev/null
+++ b/react-ui/.github/workflows/coverage.yml
@@ -0,0 +1,27 @@
+name: coverage CI
+
+on: [push, pull_request]
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v1
+ - name: Use Node.js 16.x
+ uses: actions/setup-node@v1
+ with:
+ node-version: 16.x
+ - run: echo ${{github.ref}}
+ - run: curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7
+ - run: pnpm config set store-dir ~/.pnpm-store
+ - run: pnpm install --strict-peer-dependencies=false
+ - run: yarn run test:coverage
+ env:
+ CI: true
+ PROGRESS: none
+ NODE_ENV: test
+ NODE_OPTIONS: --max_old_space_size=4096
+ - run: bash <(curl -s https://codecov.io/bash)
diff --git a/react-ui/.github/workflows/emoji-helper.yml b/react-ui/.github/workflows/emoji-helper.yml
new file mode 100644
index 0000000..8965a1a
--- /dev/null
+++ b/react-ui/.github/workflows/emoji-helper.yml
@@ -0,0 +1,14 @@
+name: Emoji Helper
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ emoji:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions-cool/emoji-helper@v1.0.0
+ with:
+ type: 'release'
+ emoji: '+1, laugh, heart, hooray, rocket, eyes'
diff --git a/react-ui/.github/workflows/issue-labeled.yml b/react-ui/.github/workflows/issue-labeled.yml
new file mode 100644
index 0000000..a3e8b5f
--- /dev/null
+++ b/react-ui/.github/workflows/issue-labeled.yml
@@ -0,0 +1,37 @@
+name: Issue labeled
+
+on:
+ issues:
+ types: [labeled]
+
+jobs:
+ reply-helper:
+ runs-on: ubuntu-latest
+ steps:
+ - name: help wanted
+ if: github.event.label.name == '❤️ help wanted' || github.event.label.name == '🤝Welcome PR'
+ uses: actions-cool/issues-helper@v1.11
+ with:
+ actions: 'create-comment'
+ token: ${{ secrets.GITHUB_TOKEN }}
+ issue-number: ${{ github.event.issue.number }}
+ body: |
+ Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome to [send us a Pull Request](https://help.github.com/en/articles/creating-a-pull-request) for it. Please provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!
+
+ 你好 @${{ github.event.issue.user.login }},我们完全同意你的提议/反馈,欢迎直接在此仓库 [创建一个 Pull Request](https://help.github.com/en/articles/creating-a-pull-request) 来解决这个问题。请务必提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。
+
+ 
+
+ - name: Need Reproduce
+ if: github.event.label.name == '🤔 Need Reproduce'
+ uses: actions-cool/issues-helper@v1.11
+ with:
+ actions: 'create-comment'
+ token: ${{ secrets.GITHUB_TOKEN }}
+ issue-number: ${{ github.event.issue.number }}
+ body: |
+ Hello @${{ github.event.issue.user.login }}. Please provide a online reproduction by forking this link https://codesandbox.io/ or a minimal GitHub repository.
+
+ 你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 [此处](https://codesandbox.io/) 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。
+
+ 
diff --git a/react-ui/.github/workflows/issue-open-check.yml b/react-ui/.github/workflows/issue-open-check.yml
new file mode 100644
index 0000000..3644213
--- /dev/null
+++ b/react-ui/.github/workflows/issue-open-check.yml
@@ -0,0 +1,34 @@
+name: Issue Open Check
+
+on:
+ issues:
+ types: [opened, edited]
+
+jobs:
+ check-issue:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions-cool/issues-helper@v2.2.0
+ id: check
+ with:
+ actions: 'check-issue'
+ issue-number: ${{ github.event.issue.number }}
+ title-excludes: '🐛 [BUG], 👑 [需求 | Feature], 🧐[问题 | question]'
+
+ - if: steps.check.outputs.check-result == 'false' && github.event.issue.state == 'open'
+ uses: actions-cool/issues-helper@v2.2.0
+ with:
+ actions: 'create-comment, close-issue'
+ issue-number: ${{ github.event.issue.number }}
+ body: |
+ 当前 Issue 未检测到标题,请规范填写,谢谢!
+
+ The title of the current issue is not detected, please fill in according to the specifications, thank you!
+
+ - if: steps.check.outputs.check-result == 'true'
+ uses: actions-cool/issues-similarity-analysis@v1
+ with:
+ filter-threshold: 0.8
+ title-excludes: '🐛[BUG], 👑 [需求 | Feature], 🧐[问题 | question]'
+ comment-title: '### 以下的 Issues 可能会帮助到你 / The following issues may help you'
+ show-footer: false
diff --git a/react-ui/.github/workflows/pnpm.yml b/react-ui/.github/workflows/pnpm.yml
new file mode 100644
index 0000000..63bb2e4
--- /dev/null
+++ b/react-ui/.github/workflows/pnpm.yml
@@ -0,0 +1,33 @@
+name: Node pnpm CI
+
+on: [push, pull_request]
+
+permissions:
+ contents: read
+
+jobs:
+ build:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ node_version: [16.x]
+ os: [ubuntu-latest, windows-latest, macOS-latest]
+ steps:
+ - uses: actions/checkout@v1
+ - name: Use Node.js ${{ matrix.node_version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node_version }}
+ - run: echo ${{github.ref}}
+ - run: curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7
+ - run: pnpm config set store-dir ~/.pnpm-store
+ - run: pnpm install --strict-peer-dependencies=false
+ - run: pnpm run lint
+ - run: pnpm run tsc
+ - run: pnpm run build
+ - run: pnpm run test
+ env:
+ CI: true
+ PROGRESS: none
+ NODE_ENV: test
+ NODE_OPTIONS: --max_old_space_size=4096
diff --git a/react-ui/.github/workflows/preview-build.yml b/react-ui/.github/workflows/preview-build.yml
new file mode 100644
index 0000000..d8667a5
--- /dev/null
+++ b/react-ui/.github/workflows/preview-build.yml
@@ -0,0 +1,41 @@
+name: Preview Build
+
+on:
+ pull_request:
+ types: [opened, synchronize, reopened]
+
+permissions:
+ contents: read
+
+jobs:
+ build-preview:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ ref: ${{ github.event.pull_request.head.sha }}
+
+ - name: build
+ run: |
+ yarn
+ yarn add umi-plugin-pro --save
+ yarn build
+
+ - name: upload dist artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: dist
+ path: dist/
+ retention-days: 5
+
+ - name: Save PR number
+ if: ${{ always() }}
+ run: echo ${{ github.event.number }} > ./pr-id.txt
+
+ - name: Upload PR number
+ if: ${{ always() }}
+ uses: actions/upload-artifact@v2
+ with:
+ name: pr
+ path: ./pr-id.txt
diff --git a/react-ui/.github/workflows/preview-deploy.yml b/react-ui/.github/workflows/preview-deploy.yml
new file mode 100644
index 0000000..e9a699f
--- /dev/null
+++ b/react-ui/.github/workflows/preview-deploy.yml
@@ -0,0 +1,100 @@
+name: Preview Deploy
+
+on:
+ workflow_run:
+ workflows: ['Preview Build']
+ types:
+ - completed
+
+permissions:
+ contents: read
+
+jobs:
+ success:
+ permissions:
+ actions: read # for dawidd6/action-download-artifact to query and download artifacts
+ issues: write # for actions-cool/maintain-one-comment to modify or create issue comments
+ pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments
+ runs-on: ubuntu-latest
+ if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
+ steps:
+ - name: download pr artifact
+ uses: dawidd6/action-download-artifact@v2
+ with:
+ workflow: ${{ github.event.workflow_run.workflow_id }}
+ name: pr
+
+ - name: save PR id
+ id: pr
+ run: echo "::set-output name=id::$(<pr-id.txt)"
+
+ - name: download dist artifact
+ uses: dawidd6/action-download-artifact@v2
+ with:
+ workflow: ${{ github.event.workflow_run.workflow_id }}
+ workflow_conclusion: success
+ name: dist
+
+ - name: upload surge service
+ id: deploy
+ run: |
+ export DEPLOY_DOMAIN=https://ant-design-pro-preview-pr-${{ steps.pr.outputs.id }}.surge.sh
+ npx surge --project ./ --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }}
+
+ - name: update status comment
+ uses: actions-cool/maintain-one-comment@v1.2.1
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ body: |
+ 🎊 PR Preview has been successfully built and deployed to https://ant-design-pro-preview-pr-${{ steps.pr.outputs.id }}.surge.sh
+
+ <img width="300" src="https://user-images.githubusercontent.com/507615/90250366-88233900-de6e-11ea-95a5-84f0762ffd39.png">
+
+ <!-- Sticky Pull Request Comment -->
+ body-include: '<!-- Sticky Pull Request Comment -->'
+ number: ${{ steps.pr.outputs.id }}
+
+ - name: The job failed
+ if: ${{ failure() }}
+ uses: actions-cool/maintain-one-comment@v1.2.1
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ body: |
+ 😭 Deploy PR Preview failed.
+
+ <img width="300" src="https://user-images.githubusercontent.com/507615/90250824-4e066700-de6f-11ea-8230-600ecc3d6a6b.png">
+
+ <!-- Sticky Pull Request Comment -->
+ body-include: '<!-- Sticky Pull Request Comment -->'
+ number: ${{ steps.pr.outputs.id }}
+
+ failed:
+ permissions:
+ actions: read # for dawidd6/action-download-artifact to query and download artifacts
+ issues: write # for actions-cool/maintain-one-comment to modify or create issue comments
+ pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments
+ runs-on: ubuntu-latest
+ if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'failure'
+ steps:
+ - name: download pr artifact
+ uses: dawidd6/action-download-artifact@v2
+ with:
+ workflow: ${{ github.event.workflow_run.workflow_id }}
+ name: pr
+
+ - name: save PR id
+ id: pr
+ run: echo "::set-output name=id::$(<pr-id.txt)"
+
+ - name: The job failed
+ uses: actions-cool/maintain-one-comment@v1.2.1
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ body: |
+ 😭 Deploy PR Preview failed.
+
+ <img width="300" src="https://user-images.githubusercontent.com/507615/90250824-4e066700-de6f-11ea-8230-600ecc3d6a6b.png">
+
+ <!-- Sticky Pull Request Comment -->
+ body-include: '<!-- Sticky Pull Request Comment -->'
+ number: ${{ steps.pr.outputs.id }}
diff --git a/react-ui/.github/workflows/preview-start.yml b/react-ui/.github/workflows/preview-start.yml
new file mode 100644
index 0000000..39f561d
--- /dev/null
+++ b/react-ui/.github/workflows/preview-start.yml
@@ -0,0 +1,24 @@
+name: Preview Start
+
+on: pull_request_target
+
+permissions:
+ contents: read
+
+jobs:
+ preview:
+ permissions:
+ issues: write # for actions-cool/maintain-one-comment to modify or create issue comments
+ pull-requests: write # for actions-cool/maintain-one-comment to modify or create PR comments
+ runs-on: ubuntu-latest
+ steps:
+ - name: create
+ uses: actions-cool/maintain-one-comment@v1.2.1
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ body: |
+ ⚡️ Deploying PR Preview...
+ <img src="https://user-images.githubusercontent.com/507615/90240294-8d2abd00-de5b-11ea-8140-4840a0b2d571.gif" width="300" />
+
+ <!-- Sticky Pull Request Comment -->
+ body-include: '<!-- Sticky Pull Request Comment -->'