| @@ -0,0 +1,16 @@ | |||
| # http://editorconfig.org | |||
| root = true | |||
| [*] | |||
| indent_style = space | |||
| indent_size = 2 | |||
| end_of_line = lf | |||
| charset = utf-8 | |||
| trim_trailing_whitespace = true | |||
| insert_final_newline = true | |||
| [*.md] | |||
| trim_trailing_whitespace = false | |||
| [Makefile] | |||
| indent_style = tab | |||
| @@ -0,0 +1,9 @@ | |||
| /lambda/ | |||
| /scripts | |||
| /config | |||
| .history | |||
| public | |||
| dist | |||
| .umi | |||
| mock | |||
| /src/iconfont/ | |||
| @@ -0,0 +1,16 @@ | |||
| module.exports = { | |||
| extends: [ | |||
| require.resolve('@umijs/lint/dist/config/eslint'), | |||
| 'plugin:react/recommended', | |||
| 'plugin:react-hooks/recommended', | |||
| ], | |||
| globals: { | |||
| page: true, | |||
| REACT_APP_ENV: true, | |||
| }, | |||
| rules: { | |||
| '@typescript-eslint/no-use-before-define': 'off', | |||
| 'react/react-in-jsx-scope': 'off', | |||
| 'react/display-name': 'off', | |||
| }, | |||
| }; | |||
| @@ -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'] | |||
| @@ -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] | |||
| ### 🚑 其他信息 | |||
| <!-- | |||
| 如截图等其他信息可以贴在这里 | |||
| --> | |||
| @@ -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 | |||
| --> | |||
| @@ -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: | |||
| @@ -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 | |||
| @@ -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 }}" | |||
| @@ -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) | |||
| @@ -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' | |||
| @@ -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 仓库。 | |||
|  | |||
| @@ -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 | |||
| @@ -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 | |||
| @@ -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 | |||
| @@ -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 }} | |||
| @@ -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 -->' | |||
| @@ -0,0 +1,45 @@ | |||
| # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | |||
| # dependencies | |||
| **/node_modules | |||
| # roadhog-api-doc ignore | |||
| /src/utils/request-temp.js | |||
| _roadhog-api-doc | |||
| # production | |||
| /dist | |||
| # misc | |||
| .DS_Store | |||
| npm-debug.log* | |||
| yarn-error.log | |||
| /coverage | |||
| .idea | |||
| yarn.lock | |||
| package-lock.json | |||
| *bak | |||
| .vscode | |||
| # visual studio code | |||
| .history | |||
| *.log | |||
| functions/* | |||
| .temp/** | |||
| # umi | |||
| .umi | |||
| .umi-production | |||
| .umi-test | |||
| # screenshot | |||
| screenshot | |||
| .firebase | |||
| .eslintcache | |||
| build | |||
| pnpm-lock.yaml | |||
| *storybook.log | |||
| @@ -0,0 +1,7 @@ | |||
| #!/bin/sh | |||
| . "$(dirname "$0")/_/husky.sh" | |||
| # Export Git hook params | |||
| export GIT_PARAMS=$* | |||
| # npx --no-install fabric verify-commit | |||
| @@ -0,0 +1,4 @@ | |||
| #!/bin/sh | |||
| . "$(dirname "$0")/_/husky.sh" | |||
| # npx --no-install lint-staged | |||
| @@ -0,0 +1 @@ | |||
| save-prefix=~ | |||
| @@ -0,0 +1 @@ | |||
| v18.20.7 | |||
| @@ -0,0 +1,23 @@ | |||
| **/*.svg | |||
| .umi | |||
| .umi-production | |||
| /dist | |||
| .dockerignore | |||
| .DS_Store | |||
| .eslintignore | |||
| *.png | |||
| *.toml | |||
| docker | |||
| .editorconfig | |||
| Dockerfile* | |||
| .gitignore | |||
| .prettierignore | |||
| LICENSE | |||
| .eslintcache | |||
| *.lock | |||
| yarn-error.log | |||
| .history | |||
| CNAME | |||
| /build | |||
| /public | |||
| /src/iconfont/ | |||
| @@ -0,0 +1,21 @@ | |||
| module.exports = { | |||
| singleQuote: true, | |||
| trailingComma: 'all', | |||
| printWidth: 100, | |||
| proseWrap: 'never', | |||
| endOfLine: 'lf', | |||
| overrides: [ | |||
| { | |||
| files: '.prettierrc', | |||
| options: { | |||
| parser: 'json', | |||
| }, | |||
| }, | |||
| { | |||
| files: 'document.ejs', | |||
| options: { | |||
| parser: 'html', | |||
| }, | |||
| }, | |||
| ], | |||
| }; | |||
| @@ -0,0 +1,15 @@ | |||
| export default function (babel) { | |||
| const { types: t } = babel; | |||
| return { | |||
| visitor: { | |||
| ImportDeclaration(path) { | |||
| const source = path.node.source.value; | |||
| if (source.endsWith('.less')) { | |||
| if (path.node.specifiers.length > 0) { | |||
| path.node.source.value += '?modules'; | |||
| } | |||
| } | |||
| }, | |||
| }, | |||
| }; | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| import { Of, useOf } from '@storybook/blocks'; | |||
| /** | |||
| * A block that displays the story name or title from the of prop | |||
| * - if a story reference is passed, it renders the story name | |||
| * - if a meta reference is passed, it renders the stories' title | |||
| * - if nothing is passed, it defaults to the primary story | |||
| */ | |||
| export const StoryName = ({ of }: { of?: Of }) => { | |||
| const resolvedOf = useOf(of || 'story', ['story', 'meta']); | |||
| switch (resolvedOf.type) { | |||
| case 'story': { | |||
| return <h3 className="css-wzniqs">{resolvedOf.story.name}</h3>; | |||
| } | |||
| case 'meta': { | |||
| return <h3 className="css-wzniqs">{resolvedOf.preparedMeta.title}</h3>; | |||
| } | |||
| } | |||
| }; | |||
| @@ -0,0 +1,121 @@ | |||
| import type { StorybookConfig } from '@storybook/react-webpack5'; | |||
| import path from 'path'; | |||
| import webpack from 'webpack'; | |||
| const config: StorybookConfig = { | |||
| stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'], | |||
| addons: [ | |||
| // '@storybook/addon-webpack5-compiler-swc', | |||
| '@storybook/addon-webpack5-compiler-babel', | |||
| '@storybook/addon-onboarding', | |||
| '@storybook/addon-essentials', | |||
| '@chromatic-com/storybook', | |||
| '@storybook/addon-interactions', | |||
| ], | |||
| framework: { | |||
| name: '@storybook/react-webpack5', | |||
| options: {}, | |||
| }, | |||
| staticDirs: [ | |||
| '../public', | |||
| { from: '../docs', to: '/docs' }, | |||
| { from: '../docs/index.html', to: '/docs/index.html' }, | |||
| ], | |||
| docs: { | |||
| defaultName: 'Documentation', | |||
| }, | |||
| webpackFinal: async (config) => { | |||
| if (config.resolve) { | |||
| config.resolve.alias = { | |||
| ...config.resolve.alias, | |||
| '@': path.resolve(__dirname, '../src'), | |||
| '@umijs/max$': path.resolve(__dirname, './mock/umijs.mock.tsx'), | |||
| }; | |||
| } | |||
| if (config.module && config.module.rules) { | |||
| config.module.rules.push( | |||
| { | |||
| test: /\.less$/, | |||
| oneOf: [ | |||
| { | |||
| resourceQuery: /modules/, | |||
| use: [ | |||
| 'style-loader', | |||
| { | |||
| loader: 'css-loader', | |||
| options: { | |||
| importLoaders: 1, | |||
| import: true, | |||
| esModule: true, | |||
| modules: { | |||
| localIdentName: '[local]___[hash:base64:5]', | |||
| }, | |||
| }, | |||
| }, | |||
| { | |||
| loader: 'less-loader', | |||
| options: { | |||
| lessOptions: { | |||
| javascriptEnabled: true, // 如果需要支持 Ant Design 的 Less 变量,开启此项 | |||
| modifyVars: { | |||
| hack: 'true; @import "@/styles/theme.less";', | |||
| }, | |||
| }, | |||
| }, | |||
| }, | |||
| ], | |||
| include: path.resolve(__dirname, '../src'), // 限制范围,避免处理 node_modules | |||
| }, | |||
| { | |||
| use: [ | |||
| 'style-loader', | |||
| 'css-loader', | |||
| { | |||
| loader: 'less-loader', | |||
| options: { | |||
| lessOptions: { | |||
| javascriptEnabled: true, // 如果需要支持 Ant Design 的 Less 变量,开启此项 | |||
| modifyVars: { | |||
| hack: 'true; @import "@/styles/theme.less";', | |||
| }, | |||
| }, | |||
| }, | |||
| }, | |||
| ], | |||
| include: path.resolve(__dirname, '../src'), // 限制范围,避免处理 node_modules | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| test: /\.(tsx?|jsx?)$/, | |||
| loader: 'ts-loader', | |||
| options: { | |||
| transpileOnly: true, | |||
| }, | |||
| include: [ | |||
| path.resolve(__dirname, '../src'), // 限制范围,避免处理 node_modules | |||
| path.resolve(__dirname, './'), | |||
| ], | |||
| }, | |||
| ); | |||
| } | |||
| if (config.plugins) { | |||
| config.plugins.push( | |||
| new webpack.ProvidePlugin({ | |||
| React: 'react', // 全局注入 React | |||
| }), | |||
| ); | |||
| } | |||
| return config; | |||
| }, | |||
| babel: async (config: any) => { | |||
| if (!config.plugins) { | |||
| config.plugins = []; | |||
| } | |||
| config.plugins.push(path.resolve(__dirname, './babel-plugin-auto-css-modules.js')); | |||
| return config; | |||
| }, | |||
| }; | |||
| export default config; | |||
| @@ -0,0 +1,6 @@ | |||
| import { addons } from '@storybook/manager-api'; | |||
| import theme from './theme'; | |||
| addons.setConfig({ | |||
| theme: theme, | |||
| }); | |||
| @@ -0,0 +1,19 @@ | |||
| export const Link = ({ to, children, ...props }: any) => ( | |||
| <a href={typeof to === 'string' ? to : '#'} {...props}> | |||
| {children} | |||
| </a> | |||
| ); | |||
| export const request = (url: string, options: any) => { | |||
| return fetch(url, options) | |||
| .then((res) => { | |||
| if (!res.ok) { | |||
| throw new Error(res.statusText); | |||
| } | |||
| return res; | |||
| }) | |||
| .then((res) => res.json()); | |||
| }; | |||
| export { useNavigate, useParams, useSearchParams } from 'react-router-dom'; | |||
| export const history = window.history; | |||
| @@ -0,0 +1,92 @@ | |||
| export const createWebSocketMock = () => { | |||
| class WebSocketMock { | |||
| constructor(url) { | |||
| this.url = url; | |||
| this.readyState = WebSocket.OPEN; | |||
| this.listeners = {}; | |||
| this.count = 0; | |||
| console.log('Mock WebSocket connected to:', url); | |||
| // 模拟服务器推送消息 | |||
| this.intervalId = setInterval(() => { | |||
| this.count += 1; | |||
| if (this.count > 5) { | |||
| this.count = 0; | |||
| clearInterval(this.intervalId); | |||
| return; | |||
| } | |||
| this.sendMessage(JSON.stringify(logStreamData)); | |||
| }, 3000); | |||
| } | |||
| sendMessage(data) { | |||
| if (this.listeners['message']) { | |||
| this.listeners['message'].forEach((callback) => callback({ data })); | |||
| } | |||
| } | |||
| addEventListener(event, callback) { | |||
| if (!this.listeners[event]) { | |||
| this.listeners[event] = []; | |||
| } | |||
| this.listeners[event].push(callback); | |||
| } | |||
| removeEventListener(event, callback) { | |||
| if (this.listeners[event]) { | |||
| this.listeners[event] = this.listeners[event].filter((cb) => cb !== callback); | |||
| } | |||
| } | |||
| close() { | |||
| this.readyState = WebSocket.CLOSED; | |||
| console.log('Mock WebSocket closed'); | |||
| } | |||
| } | |||
| return WebSocketMock; | |||
| }; | |||
| export const logStreamData = { | |||
| streams: [ | |||
| { | |||
| stream: { | |||
| workflows_argoproj_io_completed: 'false', | |||
| workflows_argoproj_io_workflow: 'workflow-p2ddj', | |||
| container: 'init', | |||
| filename: | |||
| '/var/log/pods/argo_workflow-p2ddj-git-clone-f33abcda-3988047653_e31cf6be-e013-4885-9eb6-ec84f83b9ba9/init/0.log', | |||
| job: 'argo/workflow-p2ddj-git-clone-f33abcda-3988047653', | |||
| namespace: 'argo', | |||
| pod: 'workflow-p2ddj-git-clone-f33abcda-3988047653', | |||
| stream: 'stderr', | |||
| }, | |||
| values: [ | |||
| [ | |||
| '1742179591969785990', | |||
| 'time="2025-03-17T02:46:31.969Z" level=info msg="Starting Workflow Executor" version=v3.5.10\n', | |||
| ], | |||
| ], | |||
| }, | |||
| { | |||
| stream: { | |||
| filename: | |||
| '/var/log/pods/argo_workflow-p2ddj-git-clone-f33abcda-3988047653_e31cf6be-e013-4885-9eb6-ec84f83b9ba9/init/0.log', | |||
| job: 'argo/workflow-p2ddj-git-clone-f33abcda-3988047653', | |||
| namespace: 'argo', | |||
| pod: 'workflow-p2ddj-git-clone-f33abcda-3988047653', | |||
| stream: 'stderr', | |||
| workflows_argoproj_io_completed: 'false', | |||
| workflows_argoproj_io_workflow: 'workflow-p2ddj', | |||
| container: 'init', | |||
| }, | |||
| values: [ | |||
| [ | |||
| '1742179591973414064', | |||
| 'time="2025-03-17T02:46:31.973Z" level=info msg="Using executor retry strategy" Duration=1s Factor=1.6 Jitter=0.5 Steps=5\n', | |||
| ], | |||
| ], | |||
| }, | |||
| ], | |||
| }; | |||
| @@ -0,0 +1,112 @@ | |||
| import '@/global.less'; | |||
| import '@/overrides.less'; | |||
| import themes from '@/styles/theme.less'; | |||
| import type { Preview } from '@storybook/react'; | |||
| import { App, ConfigProvider } from 'antd'; | |||
| import zhCN from 'antd/locale/zh_CN'; | |||
| import { initialize, mswLoader } from 'msw-storybook-addon'; | |||
| import { createWebSocketMock } from './mock/websocket.mock'; | |||
| import './storybook.css'; | |||
| /* | |||
| * Initializes MSW | |||
| * See https://github.com/mswjs/msw-storybook-addon#configuring-msw | |||
| * to learn how to customize it | |||
| */ | |||
| initialize(); | |||
| // 替换全局 WebSocket 为 Mock 版本 | |||
| // @ts-ignore | |||
| global.WebSocket = createWebSocketMock(); | |||
| const preview: Preview = { | |||
| parameters: { | |||
| controls: { | |||
| expanded: true, | |||
| sort: 'requiredFirst', | |||
| matchers: { | |||
| color: /(background|color)$/i, | |||
| date: /Date$/i, | |||
| }, | |||
| }, | |||
| backgrounds: { | |||
| values: [ | |||
| { name: 'Dark', value: '#000' }, | |||
| { name: 'Gray', value: '#f9fafb' }, | |||
| { name: 'Light', value: '#FFF' }, | |||
| ], | |||
| default: 'Light', | |||
| }, | |||
| options: { | |||
| storySort: { | |||
| method: 'alphabetical', | |||
| order: ['Documentation', 'Components'], | |||
| }, | |||
| }, | |||
| }, | |||
| decorators: [ | |||
| (Story) => ( | |||
| <ConfigProvider | |||
| locale={zhCN} | |||
| theme={{ | |||
| cssVar: true, | |||
| token: { | |||
| colorPrimary: themes['primaryColor'], | |||
| colorSuccess: themes['successColor'], | |||
| colorError: themes['errorColor'], | |||
| colorWarning: themes['warningColor'], | |||
| colorLink: themes['primaryColor'], | |||
| colorText: themes['textColor'], | |||
| controlHeightLG: 46, | |||
| }, | |||
| components: { | |||
| Button: { | |||
| defaultBg: 'rgba(22, 100, 255, 0.06)', | |||
| defaultBorderColor: 'rgba(22, 100, 255, 0.11)', | |||
| defaultColor: themes['textColor'], | |||
| defaultHoverBg: 'rgba(22, 100, 255, 0.06)', | |||
| defaultHoverBorderColor: 'rgba(22, 100, 255, 0.5)', | |||
| defaultHoverColor: '#3F7FFF ', | |||
| defaultActiveBg: 'rgba(22, 100, 255, 0.12)', | |||
| defaultActiveBorderColor: 'rgba(22, 100, 255, 0.75)', | |||
| defaultActiveColor: themes['primaryColor'], | |||
| contentFontSize: parseInt(themes['fontSize']), | |||
| }, | |||
| Input: { | |||
| inputFontSize: parseInt(themes['fontSizeInput']), | |||
| inputFontSizeLG: parseInt(themes['fontSizeInputLg']), | |||
| paddingBlockLG: 10, | |||
| }, | |||
| Select: { | |||
| singleItemHeightLG: 46, | |||
| optionSelectedColor: themes['primaryColor'], | |||
| }, | |||
| Table: { | |||
| headerBg: 'rgba(242, 244, 247, 0.36)', | |||
| headerBorderRadius: 4, | |||
| rowSelectedBg: 'rgba(22, 100, 255, 0.05)', | |||
| }, | |||
| Tabs: { | |||
| titleFontSize: 16, | |||
| }, | |||
| Form: { | |||
| labelColor: 'rgba(29, 29, 32, 0.8);', | |||
| }, | |||
| Breadcrumb: { | |||
| iconFontSize: parseInt(themes['fontSize']), | |||
| linkColor: 'rgba(29, 29, 32, 0.7)', | |||
| separatorColor: 'rgba(29, 29, 32, 0.7)', | |||
| }, | |||
| }, | |||
| }} | |||
| > | |||
| <App message={{ maxCount: 3 }}> | |||
| <Story /> | |||
| </App> | |||
| </ConfigProvider> | |||
| ), | |||
| ], | |||
| loaders: [mswLoader], // 👈 Add the MSW loader to all stories | |||
| }; | |||
| export default preview; | |||
| @@ -0,0 +1,19 @@ | |||
| html, | |||
| body, | |||
| #root { | |||
| min-width: unset; | |||
| height: 100%; | |||
| margin: 0; | |||
| padding: 0; | |||
| overflow-y: visible; | |||
| } | |||
| .ant-input-search-large .ant-input-affix-wrapper, .ant-input-search-large .ant-input-search-button { | |||
| height: 46px; | |||
| } | |||
| *, | |||
| *::before, | |||
| *::after { | |||
| box-sizing: border-box; | |||
| } | |||
| @@ -0,0 +1,7 @@ | |||
| import { create } from '@storybook/theming'; | |||
| export default create({ | |||
| base: 'light', | |||
| brandTitle: '组件库文档', | |||
| brandUrl: 'https://storybook.js.org/docs', | |||
| brandTarget: '_blank', | |||
| }); | |||
| @@ -0,0 +1,27 @@ | |||
| { | |||
| "compilerOptions": { | |||
| "target": "esnext", // 指定ECMAScript目标版本 | |||
| "lib": ["dom", "dom.iterable", "esnext"], // 要包含在编译中的库文件列表 | |||
| "allowJs": true, // 允许编译JavaScript文件 | |||
| "skipLibCheck": true, // 跳过所有声明文件的类型检查 | |||
| "esModuleInterop": true, // 禁用命名空间导入(import * as fs from "fs"),并启用CJS/AMD/UMD样式的导入(import fs from "fs") | |||
| "allowSyntheticDefaultImports": true, // 允许从没有默认导出的模块进行默认导入 | |||
| "strict": true, // 启用所有严格类型检查选项 | |||
| "forceConsistentCasingInFileNames": false, // 允许对同一文件的引用使用不一致的大小写 | |||
| "module": "esnext", // 指定模块代码生成 | |||
| "moduleResolution": "bundler", // 使用bundlers样式解析模块 | |||
| "isolatedModules": true, // 无条件地为未解析的文件发出导入 | |||
| "resolveJsonModule": true, // 包含.json扩展名的模块 | |||
| "noEmit": true, // 不发出输出(即不编译代码,只进行类型检查) | |||
| "jsx": "react-jsx", // 在.tsx文件中支持JSX | |||
| "sourceMap": true, // 生成相应的.map文件 | |||
| "declaration": true, // 生成相应的.d.ts文件 | |||
| "noUnusedLocals": true, // 报告未使用的局部变量错误 | |||
| "noUnusedParameters": true, // 报告未使用的参数错误 | |||
| "incremental": true, // 通过读写磁盘上的文件来启用增量编译 | |||
| "noFallthroughCasesInSwitch": true, // 报告switch语句中的fallthrough案例错误 | |||
| "strictNullChecks": true, // 启用严格的null检查 | |||
| "importHelpers": true, | |||
| "baseUrl": "./" | |||
| } | |||
| } | |||
| @@ -0,0 +1,20 @@ | |||
| declare module 'slash2'; | |||
| declare module '*.css'; | |||
| declare module '*.less'; | |||
| declare module '*.scss'; | |||
| declare module '*.sass'; | |||
| declare module '*.svg'; | |||
| declare module '*.png'; | |||
| declare module '*.jpg'; | |||
| declare module '*.jpeg'; | |||
| declare module '*.gif'; | |||
| declare module '*.bmp'; | |||
| declare module '*.tiff'; | |||
| declare module 'omit.js'; | |||
| declare module 'numeral'; | |||
| declare module '@antv/data-set'; | |||
| declare module 'mockjs'; | |||
| declare module 'react-fittext'; | |||
| declare module 'bizcharts-plugin-slider'; | |||
| declare const REACT_APP_ENV: 'test' | 'dev' | 'pre' | false; | |||
| @@ -0,0 +1,46 @@ | |||
| # Contributor Covenant Code of Conduct | |||
| ## Our Pledge | |||
| In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. | |||
| ## Our Standards | |||
| Examples of behavior that contributes to creating a positive environment include: | |||
| - Using welcoming and inclusive language | |||
| - Being respectful of differing viewpoints and experiences | |||
| - Gracefully accepting constructive criticism | |||
| - Focusing on what is best for the community | |||
| - Showing empathy towards other community members | |||
| Examples of unacceptable behavior by participants include: | |||
| - The use of sexualized language or imagery and unwelcome sexual attention or advances | |||
| - Trolling, insulting/derogatory comments, and personal or political attacks | |||
| - Public or private harassment | |||
| - Publishing others' private information, such as a physical or electronic address, without explicit permission | |||
| - Other conduct which could reasonably be considered inappropriate in a professional setting | |||
| ## Our Responsibilities | |||
| Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. | |||
| Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | |||
| ## Scope | |||
| This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. | |||
| ## Enforcement | |||
| Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at afc163@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. | |||
| Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. | |||
| ## Attribution | |||
| This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] | |||
| [homepage]: http://contributor-covenant.org | |||
| [version]: http://contributor-covenant.org/version/1/4/ | |||
| @@ -0,0 +1,3 @@ | |||
| # Dockerfile | |||
| FROM nginx:alpine | |||
| COPY storybook-static/ /usr/share/nginx/html | |||
| @@ -0,0 +1,21 @@ | |||
| MIT License | |||
| Copyright (c) 2019-present Alipay.inc | |||
| Permission is hereby granted, free of charge, to any person obtaining a copy | |||
| of this software and associated documentation files (the "Software"), to deal | |||
| in the Software without restriction, including without limitation the rights | |||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |||
| copies of the Software, and to permit persons to whom the Software is | |||
| furnished to do so, subject to the following conditions: | |||
| The above copyright notice and this permission notice shall be included in all | |||
| copies or substantial portions of the Software. | |||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |||
| SOFTWARE. | |||
| @@ -0,0 +1 @@ | |||
| # Documentation | |||
| @@ -0,0 +1,177 @@ | |||
| // https://umijs.org/config/ | |||
| import { defineConfig } from '@umijs/max'; | |||
| import defaultSettings from './defaultSettings'; | |||
| import proxy from './proxy'; | |||
| import routes from './routes'; | |||
| const { REACT_APP_ENV = 'dev' } = process.env; | |||
| export default defineConfig({ | |||
| /** | |||
| * @name 开启 hash 模式 | |||
| * @description 让 build 之后的产物包含 hash 后缀。通常用于增量发布和避免浏览器加载缓存。 | |||
| * @doc https://umijs.org/docs/api/config#hash | |||
| */ | |||
| hash: true, | |||
| /** | |||
| * @name 兼容性设置 | |||
| * @description 设置 ie11 不一定完美兼容,需要检查自己使用的所有依赖 | |||
| * @doc https://umijs.org/docs/api/config#targets | |||
| */ | |||
| // targets: { | |||
| // ie: 11, | |||
| // }, | |||
| /** | |||
| * @name 路由的配置,不在路由中引入的文件不会编译 | |||
| * @description 只支持 path,component,routes,redirect,wrappers,title 的配置 | |||
| * @doc https://umijs.org/docs/guides/routes | |||
| */ | |||
| // umi routes: https://umijs.org/docs/routing | |||
| routes, | |||
| /** | |||
| * @name 主题的配置 | |||
| * @description 虽然叫主题,但是其实只是 less 的变量设置 | |||
| * @doc antd的主题设置 https://ant.design/docs/react/customize-theme-cn | |||
| * @doc umi 的theme 配置 https://umijs.org/docs/api/config#theme | |||
| */ | |||
| theme: { | |||
| // 如果不想要 configProvide 动态设置主题需要把这个设置为 default | |||
| // 只有设置为 variable, 才能使用 configProvide 动态设置主色调 | |||
| // 'root-entry-name': 'variable', | |||
| }, | |||
| /** | |||
| * @name moment 的国际化配置 | |||
| * @description 如果对国际化没有要求,打开之后能减少js的包大小 | |||
| * @doc https://umijs.org/docs/api/config#ignoremomentlocale | |||
| */ | |||
| ignoreMomentLocale: true, | |||
| /** | |||
| * @name 代理配置 | |||
| * @description 可以让你的本地服务器代理到你的服务器上,这样你就可以访问服务器的数据了 | |||
| * @see 要注意以下 代理只能在本地开发时使用,build 之后就无法使用了。 | |||
| * @doc 代理介绍 https://umijs.org/docs/guides/proxy | |||
| * @doc 代理配置 https://umijs.org/docs/api/config#proxy | |||
| */ | |||
| proxy: proxy[REACT_APP_ENV as keyof typeof proxy], | |||
| /** | |||
| * @name 快速热更新配置 | |||
| * @description 一个不错的热更新组件,更新时可以保留 state | |||
| */ | |||
| fastRefresh: true, | |||
| //============== 以下都是max的插件配置 =============== | |||
| /** | |||
| * @name 数据流插件 | |||
| * @@doc https://umijs.org/docs/max/data-flow | |||
| */ | |||
| model: {}, | |||
| /** | |||
| * 一个全局的初始数据流,可以用它在插件之间共享数据 | |||
| * @description 可以用来存放一些全局的数据,比如用户信息,或者一些全局的状态,全局初始状态在整个 Umi 项目的最开始创建。 | |||
| * @doc https://umijs.org/docs/max/data-flow#%E5%85%A8%E5%B1%80%E5%88%9D%E5%A7%8B%E7%8A%B6%E6%80%81 | |||
| */ | |||
| initialState: {}, | |||
| /** | |||
| * @name layout 插件 | |||
| * @doc https://umijs.org/docs/max/layout-menu | |||
| */ | |||
| title: '智能材料科研平台', | |||
| layout: { | |||
| ...defaultSettings, | |||
| }, | |||
| // keepalive: [/./], | |||
| // tabsLayout: {}, | |||
| /** | |||
| * @name moment2dayjs 插件 | |||
| * @description 将项目中的 moment 替换为 dayjs | |||
| * @doc https://umijs.org/docs/max/moment2dayjs | |||
| */ | |||
| moment2dayjs: { | |||
| preset: 'antd', | |||
| plugins: ['duration'], | |||
| }, | |||
| /** | |||
| * @name 国际化插件 | |||
| * @doc https://umijs.org/docs/max/i18n | |||
| */ | |||
| locale: { | |||
| default: 'zh-CN', | |||
| antd: true, | |||
| baseNavigator: true, | |||
| }, | |||
| /** | |||
| * @name antd 插件 | |||
| * @description 内置了 babel import 插件 | |||
| * @doc https://umijs.org/docs/max/antd#antd | |||
| */ | |||
| antd: { | |||
| configProvider: {}, | |||
| appConfig: {}, | |||
| }, | |||
| /** | |||
| * @name 网络请求配置 | |||
| * @description 它基于 axios 和 ahooks 的 useRequest 提供了一套统一的网络请求和错误处理方案。 | |||
| * @doc https://umijs.org/docs/max/request | |||
| */ | |||
| request: {}, | |||
| /** | |||
| * @name 权限插件 | |||
| * @description 基于 initialState 的权限插件,必须先打开 initialState | |||
| * @doc https://umijs.org/docs/max/access | |||
| */ | |||
| access: {}, | |||
| /** | |||
| * @name <head> 中额外的 script | |||
| * @description 配置 <head> 中额外的 script | |||
| */ | |||
| headScripts: [ | |||
| // 解决首次加载时白屏的问题 | |||
| { src: '/scripts/loading.js', async: true }, | |||
| { src: '/scripts/resize.js', async: true }, | |||
| // { src: '/scripts/resize-breakpoint.js', async: true }, | |||
| ], | |||
| // links: [ | |||
| // { | |||
| // href: '/fonts/ALIBABA-PUHUITI-MEDIUM.TTF', | |||
| // rel: 'preload', | |||
| // as: 'font', | |||
| // type: 'font/woff2', | |||
| // crossOrigin: 'anonymous', | |||
| // }, | |||
| // ], | |||
| //================ pro 插件配置 ================= | |||
| presets: ['umi-presets-pro'], | |||
| /** | |||
| * @name openAPI 插件的配置 | |||
| * @description 基于 openapi 的规范生成serve 和mock,能减少很多样板代码 | |||
| * @doc https://pro.ant.design/zh-cn/docs/openapi/ | |||
| */ | |||
| // openAPI: [], | |||
| // mfsu: { | |||
| // strategy: 'normal', | |||
| // }, | |||
| requestRecord: {}, | |||
| icons: {}, | |||
| lessLoader: { | |||
| modifyVars: { | |||
| hack: 'true; @import "@/styles/theme.less";', | |||
| }, | |||
| javascriptEnabled: true, | |||
| }, | |||
| valtio: {}, | |||
| qiankun: { | |||
| master: { | |||
| sandbox: true, | |||
| apps: [ | |||
| { | |||
| name: 'app1', | |||
| entry: '//localhost:7001', | |||
| }, | |||
| { | |||
| name: 'app2', | |||
| entry: '//localhost:3000', | |||
| }, | |||
| ], | |||
| }, | |||
| }, | |||
| }); | |||
| @@ -0,0 +1,27 @@ | |||
| import { ProLayoutProps } from '@ant-design/pro-components'; | |||
| /** | |||
| * @name | |||
| */ | |||
| const Settings: ProLayoutProps & { | |||
| pwa?: boolean; | |||
| logo?: string; | |||
| } = { | |||
| locale: 'zh-CN', | |||
| navTheme: 'light', | |||
| colorPrimary: '#514cf9', | |||
| layout: 'mix', | |||
| contentWidth: 'Fluid', | |||
| fixedHeader: false, | |||
| fixSiderbar: false, | |||
| splitMenus: false, | |||
| colorWeak: false, | |||
| title: '智能材料科研平台', | |||
| pwa: true, | |||
| token: { | |||
| // 参见ts声明,demo 见文档,通过token 修改样式 | |||
| //https://procomponents.ant.design/components/layout#%E9%80%9A%E8%BF%87-token-%E4%BF%AE%E6%94%B9%E6%A0%B7%E5%BC%8F | |||
| }, | |||
| }; | |||
| export default Settings; | |||
| @@ -0,0 +1,57 @@ | |||
| /* | |||
| * @Author: 赵伟 | |||
| * @Date: 2024-04-17 08:48:09 | |||
| * @Description: | |||
| */ | |||
| /** | |||
| * @name 代理的配置 | |||
| * @see 在生产环境 代理是无法生效的,所以这里没有生产环境的配置 | |||
| * ------------------------------- | |||
| * The agent cannot take effect in the production environment | |||
| * so there is no configuration of the production environment | |||
| * For details, please see | |||
| * https://pro.ant.design/docs/deploy | |||
| * | |||
| * @doc https://umijs.org/docs/guides/proxy | |||
| */ | |||
| export default { | |||
| // 如果需要自定义本地开发服务器 请取消注释按需调整 | |||
| dev: { | |||
| // localhost:8000/api/** -> https://preview.pro.ant.design/api/** | |||
| '/api/': { | |||
| // 要代理的地址 | |||
| target: 'http://172.20.32.197:31213', // 开发环境 | |||
| // target: 'http://172.20.32.235:31213', // 测试环境 | |||
| // target: 'http://172.20.32.127:8082', | |||
| // target: 'http://172.20.32.164:8082', | |||
| // 配置了这个可以从 http 代理到 https | |||
| // 依赖 origin 的功能可能需要这个,比如 cookie | |||
| changeOrigin: true, | |||
| // pathRewrite: { '^/api': '' }, | |||
| }, | |||
| '/profile/avatar/': { | |||
| target: 'http://172.20.32.235:31213', | |||
| changeOrigin: true, | |||
| }, | |||
| }, | |||
| /** | |||
| * @name 详细的代理配置 | |||
| * @doc https://github.com/chimurai/http-proxy-middleware | |||
| */ | |||
| test: { | |||
| // localhost:8000/api/** -> https://preview.pro.ant.design/api/** | |||
| '/api/': { | |||
| target: 'https://proapi.azurewebsites.net', | |||
| changeOrigin: true, | |||
| pathRewrite: { '^': '' }, | |||
| }, | |||
| }, | |||
| pre: { | |||
| '/api/': { | |||
| target: 'your pre url', | |||
| changeOrigin: true, | |||
| pathRewrite: { '^': '' }, | |||
| }, | |||
| }, | |||
| }; | |||
| @@ -0,0 +1,651 @@ | |||
| /** | |||
| * @name umi 的路由配置 | |||
| * @description 只支持 path,component,routes,redirect,wrappers,name,icon 的配置 | |||
| * @param path path 只支持两种占位符配置,第一种是动态参数 :id 的形式,第二种是 * 通配符,通配符只能出现路由字符串的最后。 | |||
| * @param component 配置 location 和 path 匹配后用于渲染的 React 组件路径。可以是绝对路径,也可以是相对路径,如果是相对路径,会从 src/pages 开始找起。 | |||
| * @param routes 配置子路由,通常在需要为多个路径增加 layout 组件时使用。 | |||
| * @param redirect 配置路由跳转 | |||
| * @param wrappers 配置路由组件的包装组件,通过包装组件可以为当前的路由组件组合进更多的功能。 比如,可以用于路由级别的权限校验 | |||
| * @param name 配置路由的标题,默认读取国际化文件 menu.ts 中 menu.xxxx 的值,如配置 name 为 login,则读取 menu.ts 中 menu.login 的取值作为标题 | |||
| * @param icon 配置路由的图标,取值参考 https://ant.design/components/icon-cn, 注意去除风格后缀和大小写,如想要配置图标为 <StepBackwardOutlined /> 则取值应为 stepBackward 或 StepBackward,如想要配置图标为 <UserOutlined /> 则取值应为 user 或者 User | |||
| * @doc https://umijs.org/docs/guides/routes | |||
| */ | |||
| export default [ | |||
| { | |||
| path: '/', | |||
| redirect: '/home', | |||
| }, | |||
| { | |||
| name: '首页', | |||
| path: '/home', | |||
| layout: false, | |||
| routes: [ | |||
| { | |||
| name: '首页', | |||
| path: '', | |||
| key: 'home', | |||
| component: './Home/index', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '工作空间', | |||
| path: '/workspace', | |||
| routes: [ | |||
| { | |||
| name: '工作空间', | |||
| path: '', | |||
| key: 'workspace', | |||
| component: './Workspace/index', | |||
| }, | |||
| { | |||
| name: '消息中心', | |||
| path: 'message', | |||
| key: 'message', | |||
| component: './Message/index', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| path: '/authorize', | |||
| layout: false, | |||
| component: './Authorize/index', | |||
| }, | |||
| { | |||
| path: '/gitlink', | |||
| layout: true, | |||
| component: './GitLink/index', | |||
| }, | |||
| { | |||
| path: '/user', | |||
| layout: false, | |||
| routes: [ | |||
| { | |||
| name: 'login', | |||
| path: '/user/login', | |||
| component: process.env.NO_SSO ? './User/Login/login' : './User/Login', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| path: '/account', | |||
| name: '用户中心', | |||
| routes: [ | |||
| { | |||
| name: '用户中心', | |||
| path: '/account/center', | |||
| component: './User/Center', | |||
| }, | |||
| { | |||
| name: '用户设置', | |||
| path: '/account/settings', | |||
| component: './User/Settings', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '数据准备', | |||
| path: '/datasetPreparation', | |||
| routes: [ | |||
| { | |||
| path: '', | |||
| redirect: '/datasetPreparation/datasetAnnotation', | |||
| }, | |||
| { | |||
| name: '数据标注', | |||
| path: 'datasetAnnotation', | |||
| component: './DatasetPreparation/DatasetAnnotation/index', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '开发环境', | |||
| path: '/developmentEnvironment', | |||
| routes: [ | |||
| { | |||
| name: '开发环境', | |||
| path: '', | |||
| component: './DevelopmentEnvironment/List', | |||
| }, | |||
| { | |||
| name: '创建开发环境', | |||
| path: 'create', | |||
| component: './DevelopmentEnvironment/Create', | |||
| }, | |||
| { | |||
| name: '开发环境详情', | |||
| path: 'editor', | |||
| component: './DevelopmentEnvironment/Editor', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '流水线', | |||
| path: '/pipeline', | |||
| routes: [ | |||
| { | |||
| path: '', | |||
| redirect: '/pipeline/template', | |||
| }, | |||
| { | |||
| name: '流水线模板', | |||
| path: '/pipeline/template', | |||
| routes: [ | |||
| { | |||
| name: '流水线模板', | |||
| path: '', | |||
| component: './Pipeline/index', | |||
| }, | |||
| { | |||
| name: '流水线详情', | |||
| path: 'info/:id', | |||
| component: './Pipeline/Info/index', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '实验', | |||
| path: 'experiment', | |||
| routes: [ | |||
| { | |||
| name: '实验', | |||
| path: '', | |||
| component: './Experiment/index', | |||
| }, | |||
| { | |||
| name: '实验实例', | |||
| path: 'instance/:workflowId/:id', | |||
| component: './Experiment/Info/index', | |||
| }, | |||
| { | |||
| name: '实验对比', | |||
| path: 'compare', | |||
| routes: [ | |||
| { | |||
| name: '实验对比', | |||
| path: '', | |||
| component: './Experiment/Comparison/index', | |||
| }, | |||
| { | |||
| name: '可视化对比', | |||
| path: 'compare-visual', | |||
| component: './Experiment/Aim/index', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '可视化', | |||
| path: 'visual', | |||
| component: './Experiment/Tensorboard/index', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '自动机器学习', | |||
| path: 'automl', | |||
| routes: [ | |||
| { | |||
| name: '自动机器学习', | |||
| path: '', | |||
| component: './AutoML/List/index', | |||
| }, | |||
| { | |||
| name: '实验详情', | |||
| path: 'info/:id', | |||
| component: './AutoML/Info/index', | |||
| }, | |||
| { | |||
| name: '创建实验', | |||
| path: 'create', | |||
| component: './AutoML/Create/index', | |||
| }, | |||
| { | |||
| name: '编辑实验', | |||
| path: 'edit/:id', | |||
| component: './AutoML/Create/index', | |||
| }, | |||
| { | |||
| name: '复制实验', | |||
| path: 'copy/:id', | |||
| component: './AutoML/Create/index', | |||
| }, | |||
| { | |||
| name: '实验实例详情', | |||
| path: 'instance/:experimentId/:id', | |||
| component: './AutoML/Instance/index', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '超参数自动寻优', | |||
| path: 'hyperparameter', | |||
| routes: [ | |||
| { | |||
| name: '超参数寻优', | |||
| path: '', | |||
| component: './HyperParameter/List/index', | |||
| }, | |||
| { | |||
| name: '实验详情', | |||
| path: 'info/:id', | |||
| component: './HyperParameter/Info/index', | |||
| }, | |||
| { | |||
| name: '创建实验', | |||
| path: 'create', | |||
| component: './HyperParameter/Create/index', | |||
| }, | |||
| { | |||
| name: '编辑实验', | |||
| path: 'edit/:id', | |||
| component: './HyperParameter/Create/index', | |||
| }, | |||
| { | |||
| name: '复制实验', | |||
| path: 'copy/:id', | |||
| component: './HyperParameter/Create/index', | |||
| }, | |||
| { | |||
| name: '实验实例详情', | |||
| path: 'instance/:experimentId/:id', | |||
| routes: [ | |||
| { | |||
| name: '实验实例详情', | |||
| path: '', | |||
| component: './HyperParameter/Instance/index', | |||
| }, | |||
| { | |||
| name: '可视化对比', | |||
| path: 'compare-visual', | |||
| component: './HyperParameter/Aim/index', | |||
| }, | |||
| ], | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '主动学习', | |||
| path: 'active-learn', | |||
| routes: [ | |||
| { | |||
| name: '超参数寻优', | |||
| path: '', | |||
| component: './ActiveLearn/List/index', | |||
| }, | |||
| { | |||
| name: '实验详情', | |||
| path: 'info/:id', | |||
| component: './ActiveLearn/Info/index', | |||
| }, | |||
| { | |||
| name: '创建实验', | |||
| path: 'create', | |||
| component: './ActiveLearn/Create/index', | |||
| }, | |||
| { | |||
| name: '编辑实验', | |||
| path: 'edit/:id', | |||
| component: './ActiveLearn/Create/index', | |||
| }, | |||
| { | |||
| name: '复制实验', | |||
| path: 'copy/:id', | |||
| component: './ActiveLearn/Create/index', | |||
| }, | |||
| { | |||
| name: '实验实例详情', | |||
| path: 'instance/:experimentId/:id', | |||
| component: './ActiveLearn/Instance/index', | |||
| }, | |||
| ], | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: 'AI资产', | |||
| path: '/dataset', | |||
| routes: [ | |||
| { | |||
| path: '', | |||
| redirect: '/dataset/dataset', | |||
| }, | |||
| { | |||
| name: '数据集', | |||
| path: 'dataset', | |||
| routes: [ | |||
| { | |||
| name: '数据集', | |||
| path: '', | |||
| component: './Dataset/index', | |||
| }, | |||
| { | |||
| name: '数据集简介', | |||
| path: 'info/:id', | |||
| component: './Dataset/intro', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '模型', | |||
| path: 'model', | |||
| routes: [ | |||
| { | |||
| name: '模型', | |||
| path: '', | |||
| component: './Model/index', | |||
| }, | |||
| { | |||
| name: '模型简介', | |||
| path: 'info/:id', | |||
| component: './Model/intro', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '镜像', | |||
| path: 'mirror', | |||
| routes: [ | |||
| { | |||
| name: '镜像', | |||
| path: '', | |||
| component: './Mirror/List', | |||
| }, | |||
| { | |||
| name: '镜像详情', | |||
| path: 'info/:id', | |||
| routes: [ | |||
| { | |||
| name: '镜像详情', | |||
| path: '', | |||
| component: './Mirror/Info', | |||
| }, | |||
| { | |||
| name: '新增镜像版本', | |||
| path: 'add-version', | |||
| component: './Mirror/Create', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '创建镜像', | |||
| path: 'create', | |||
| component: './Mirror/Create', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '代码配置', | |||
| path: 'codeConfig', | |||
| routes: [ | |||
| { | |||
| name: '代码配置', | |||
| path: '', | |||
| component: './CodeConfig/List', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '模型部署', | |||
| path: 'modelDeployment', | |||
| routes: [ | |||
| { | |||
| name: '模型部署', | |||
| path: '', | |||
| component: './ModelDeployment/List', | |||
| }, | |||
| { | |||
| name: '创建推理服务', | |||
| path: 'createService', | |||
| component: './ModelDeployment/CreateService', | |||
| }, | |||
| { | |||
| name: '编辑推理服务', | |||
| path: 'editService/:serviceId', | |||
| component: './ModelDeployment/CreateService', | |||
| }, | |||
| { | |||
| name: '服务详情', | |||
| path: 'serviceInfo/:serviceId', | |||
| routes: [ | |||
| { | |||
| name: '服务详情', | |||
| path: '', | |||
| component: './ModelDeployment/ServiceInfo', | |||
| }, | |||
| { | |||
| name: '新增服务版本', | |||
| path: 'createVersion', | |||
| component: './ModelDeployment/CreateVersion', | |||
| }, | |||
| { | |||
| name: '更新服务版本', | |||
| path: 'updateVersion', | |||
| component: './ModelDeployment/CreateVersion', | |||
| }, | |||
| { | |||
| name: '重启服务版本', | |||
| path: 'restartVersion', | |||
| component: './ModelDeployment/CreateVersion', | |||
| }, | |||
| { | |||
| name: '服务版本详情', | |||
| path: 'versionInfo/:id', | |||
| component: './ModelDeployment/VersionInfo', | |||
| }, | |||
| ], | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '知识图谱', | |||
| path: 'knowledge', | |||
| routes: [ | |||
| { | |||
| name: '知识图谱', | |||
| path: '', | |||
| key: 'knowledge', | |||
| component: './Knowledge/index', | |||
| }, | |||
| ], | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '应用开发', | |||
| path: '/appsDeployment', | |||
| routes: [ | |||
| { | |||
| name: '应用开发', | |||
| path: '', | |||
| key: 'appsDeployment', | |||
| component: './Application', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '监控运维', | |||
| path: '/see', | |||
| routes: [ | |||
| { | |||
| name: '监控运维', | |||
| path: '', | |||
| key: 'see', | |||
| component: './missingPage.jsx', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '资源', | |||
| path: '/readad', | |||
| routes: [ | |||
| { | |||
| name: '资源', | |||
| path: '', | |||
| key: 'readad', | |||
| component: './missingPage.jsx', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '组件', | |||
| path: '/compent', | |||
| routes: [ | |||
| { | |||
| name: '组件', | |||
| path: '', | |||
| key: 'compent', | |||
| component: './missingPage.jsx', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: 'monitor', | |||
| path: '/monitor', | |||
| routes: [ | |||
| { | |||
| name: '任务日志', | |||
| path: '/monitor/job-log/index/:id', | |||
| component: './Monitor/JobLog', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: 'tool', | |||
| path: '/tool', | |||
| routes: [ | |||
| { | |||
| name: '导入表', | |||
| path: '/tool/gen/import', | |||
| component: './Tool/Gen/import', | |||
| }, | |||
| { | |||
| name: '编辑表', | |||
| path: '/tool/gen/edit', | |||
| component: './Tool/Gen/edit', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '系统管理', | |||
| path: '/system', | |||
| routes: [ | |||
| { | |||
| path: '', | |||
| redirect: '/system/user', | |||
| }, | |||
| { | |||
| name: '用户管理', | |||
| path: 'user', | |||
| component: './System/User', | |||
| }, | |||
| { | |||
| name: '角色管理', | |||
| path: 'role', | |||
| component: './System/Role', | |||
| }, | |||
| { | |||
| name: '定时任务', | |||
| path: 'job', | |||
| component: './Monitor/Job', | |||
| }, | |||
| { | |||
| name: '菜单管理', | |||
| path: 'menu', | |||
| component: './System/Menu', | |||
| }, | |||
| { | |||
| name: '部门管理', | |||
| path: 'dept', | |||
| component: './System/Dept', | |||
| }, | |||
| { | |||
| name: '岗位管理', | |||
| path: 'post', | |||
| component: './System/Post', | |||
| }, | |||
| { | |||
| name: '字典管理', | |||
| path: 'dict', | |||
| component: './System/Dict', | |||
| }, | |||
| { | |||
| name: '字典数据', | |||
| path: 'dict-data/index/:id', | |||
| component: './System/DictData', | |||
| }, | |||
| { | |||
| name: '分配用户', | |||
| path: 'role-auth/user/:id', | |||
| component: './System/Role/authUser', | |||
| }, | |||
| { | |||
| name: '日志', | |||
| path: 'log', | |||
| routes: [ | |||
| { | |||
| path: '', | |||
| redirect: '/system/log/operlog', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '审核管理', | |||
| path: 'approval', | |||
| component: './System/Approval', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: 'docs', | |||
| path: '/docs', | |||
| routes: [ | |||
| { | |||
| name: '使用指南', | |||
| path: '', | |||
| key: 'docs', | |||
| component: './Docs/index', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: 'mixed', | |||
| path: '/mixed', | |||
| routes: [ | |||
| { | |||
| name: '父子页面混合', | |||
| path: '', | |||
| key: 'mixed', | |||
| component: './Mixed/index', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| name: '算力积分', | |||
| path: '/points', | |||
| routes: [ | |||
| { | |||
| name: '算力积分', | |||
| path: '', | |||
| key: 'points', | |||
| component: './Points/index', | |||
| }, | |||
| ], | |||
| }, | |||
| { | |||
| path: '/app1/*', | |||
| name: '子应用1', | |||
| microApp: 'app1', | |||
| layout: true, | |||
| }, | |||
| { | |||
| path: '/app2/*', | |||
| name: '子应用2', | |||
| microApp: 'app2', | |||
| layout: true, | |||
| }, | |||
| { | |||
| path: '*', | |||
| layout: false, | |||
| component: './404', | |||
| }, | |||
| ]; | |||
| @@ -0,0 +1,21 @@ | |||
| import { configUmiAlias, createConfig } from '@umijs/max/test'; | |||
| export default async () => { | |||
| const config = await configUmiAlias({ | |||
| ...createConfig({ | |||
| target: 'browser', | |||
| }), | |||
| }); | |||
| return { | |||
| ...config, | |||
| testEnvironmentOptions: { | |||
| ...(config?.testEnvironmentOptions || {}), | |||
| url: 'http://localhost:8000', | |||
| }, | |||
| setupFiles: [...(config.setupFiles || []), './tests/setupTests.jsx'], | |||
| globals: { | |||
| ...config.globals, | |||
| localStorage: null, | |||
| }, | |||
| }; | |||
| }; | |||
| @@ -0,0 +1,600 @@ | |||
| import { defineMock } from 'umi'; | |||
| export default defineMock({ | |||
| 'GET /api/mmp/workspace/getPublicDatasets': { | |||
| msg: '操作成功', | |||
| code: 200, | |||
| data: { | |||
| content: [ | |||
| { | |||
| name: 'R1蒸馏模型数学推理能力测试集', | |||
| identifier: 'public_dataset_20250519163052', | |||
| description: | |||
| '共728道数学推理题目,包括:\nMATH-500:一组具有挑战性的高中数学竞赛问题数据集,涵盖七个科目(如初等代数、代数、数论)共500道题。\nGPQA-Diamond:该数据集包含物理、化学和生物学子领域的硕士水平多项选择题,共198道题。\nAIME-2024:美国邀请数学竞赛的数据集,包含30道数学题。', | |||
| is_public: true, | |||
| time_ago: '2个月前', | |||
| full_last_update_time: '2025-06-23T14:36:48.000+08:00', | |||
| id: 91, | |||
| visits: 1, | |||
| praises_count: 1, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: '有机化学VLM', | |||
| identifier: 'public_dataset_20250527113008', | |||
| description: 'Dataset Card for "Chemistry_text_to_image"', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:06:32.000+08:00', | |||
| id: 134, | |||
| visits: 2, | |||
| praises_count: 1, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: 'OQMD 开源量子材料数据集', | |||
| identifier: 'public_dataset_20250527141950', | |||
| description: | |||
| 'QMD 包含了通过密度泛函理论 (DFT) 计算得到的超过 1,226,781 种材料的热力学和结构性质。数据库中的数据来源于无机晶体结构数据库 (ICSD),包括了近 300,000 种化合物的 DFT 总能量计算以及常见晶体结构的修饰', | |||
| is_public: true, | |||
| time_ago: '2个月前', | |||
| full_last_update_time: '2025-06-23T14:38:43.000+08:00', | |||
| id: 136, | |||
| visits: 5, | |||
| praises_count: 1, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: '不可降解和可生物降解的材料数据集', | |||
| identifier: 'public_dataset_20250527142930', | |||
| description: | |||
| '此数据集包含大约 256K 图像(156K 原始数据),代表两类:可生物降解和不可生物降解。\n可生物降解,包含可被微生物自然分解的材料,如食物、植物、水果等。这种材料的废物可以加工成堆肥。\n不可生物降解,包含无法自然分解的材料,例如塑料、金属、无机元素等。这种材料的废料将被回收成新材料。', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:06:11.000+08:00', | |||
| id: 137, | |||
| visits: 2, | |||
| praises_count: 1, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: '金属有机框架材料预测', | |||
| identifier: 'public_dataset_20250527143028', | |||
| description: | |||
| '金属有机框架 (MOF) 是一类通过金属离子(或金属簇)和有机配体之间的配位键连接的结晶材料。MOF 材料具有多孔结构、高度可调和巨大的比表面积,使其在吸附、储气、分离、催化等领域具有广泛的应用潜力。预测合成是指通过计算机模拟和机器学习方法对新型 MOF 材料的合成路线和条件进行预测和设计。\n', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:06:01.000+08:00', | |||
| id: 138, | |||
| visits: 2, | |||
| praises_count: 1, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: '纤维增强复合材料的弹性特性', | |||
| identifier: 'public_dataset_20250527144649', | |||
| description: | |||
| '纤维增强复合材料弹性特性数据集主要包含其力学性能参数,如弹性模量(纵向、横向)、剪切模量、泊松比以及应力-应变关系等。数据通常通过实验测试(拉伸、压缩、弯曲试验)或计算模拟(有限元分析、细观力学模型)获得,涵盖不同纤维类型(碳纤维、玻璃纤维、芳纶等)、基体材料(环氧树脂、热塑性塑料等)及铺层方式(单向、编织、多轴向)的组合。', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:05:24.000+08:00', | |||
| id: 142, | |||
| visits: 2, | |||
| praises_count: 1, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: 'OCR 合成材料', | |||
| identifier: 'public_dataset_20250527144821', | |||
| description: | |||
| 'OCR(光学字符识别)合成材料数据集是用于训练和评估文本识别模型的专用数据集,主要包含人工生成的文本图像,模拟真实场景中的材料标签、说明书、包装文字等。这类数据集通常涵盖多种字体、背景、光照条件、扭曲变形及噪声干扰,以提高模型鲁棒性。数据可能包含金属、塑料、复合材料等工业材料的名称、参数(如成分、规格、批次号)及安全标识', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:05:18.000+08:00', | |||
| id: 143, | |||
| visits: 2, | |||
| praises_count: 1, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: '钙钛矿稳定性', | |||
| identifier: 'public_dataset_20250527145953', | |||
| description: | |||
| '这个钙钛矿稳定性数据集给出了潜在钙钛矿材料成分相对于用 DFT 计算的凸包的能量。钙钛矿数据集还包括包含钙钛矿结构中 A 位点、B 位点和 X 位点信息的列,以便对数据进行更高级的分组。', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:04:30.000+08:00', | |||
| id: 148, | |||
| visits: 2, | |||
| praises_count: 1, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: '纳米颗粒毒性数据集', | |||
| identifier: 'public_dataset_20250527150856', | |||
| description: | |||
| '该数据集是一个毒性数据集,由几列组成,捕获了纳米颗粒 (NPs) 的各种属性及其毒理学影响。该数据集包含与纳米颗粒 (NPs) 及其特性相关的各种特征,这些特征可能与毒性分类有关', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:04:41.000+08:00', | |||
| id: 149, | |||
| visits: 2, | |||
| praises_count: 1, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: '3D多模态医疗数据集-分割-fanshuai', | |||
| identifier: 'public_dataset_20250519151852', | |||
| description: '大规模通用 3D 医疗图像分割数据集 (M3D-Seg)', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-22T10:20:52.000+08:00', | |||
| id: 82, | |||
| visits: 0, | |||
| praises_count: 0, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: '中文基于满血DeepSeek-R1蒸馏数据集', | |||
| identifier: 'public_dataset_20250519161406', | |||
| description: | |||
| '注意:提供了直接SFT使用的版本。将数据中的思考和答案整合成output字段,大部分SFT代码框架均可直接直接加载训练。\n本数据集为中文开源蒸馏满血R1的数据集,数据集中不仅包含math数据,还包括大量的通用类型数据,总数量为110K。\n为什么开源这个数据?\nR1的效果十分强大,并且基于R1蒸馏数据SFT的小模型也展现出了强大的效果,但检索发现,大部分开源的R1蒸馏数据集均为英文数', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-19T16:14:06.000+08:00', | |||
| id: 88, | |||
| visits: 0, | |||
| praises_count: 0, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: '中文Text2SQL数据集', | |||
| identifier: 'public_dataset_20250519165142', | |||
| description: | |||
| '同时包含用于训练和测试表格问答预训练模型的数据,数据集包含500条训练数据和100条测试数据。\n表格问答预训练模型的训练和测试数据,支持中文,支持通用领域的表格问答。另外,也可以从本model card中,点击数据集文件panel,然后点击数据文件选项,即可下载trian.zip和test.zip文件', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-19T16:51:43.000+08:00', | |||
| id: 93, | |||
| visits: 0, | |||
| praises_count: 0, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: 'MatPES', | |||
| identifier: 'public_dataset_20250521090336', | |||
| description: | |||
| '使用元素周期表几乎完全覆盖的势能面数据集来训练基础 电位 (FP),即机器学习原子间电位 (MLIP),几乎完全覆盖了周期性 桌子。MatPES 是材料虚拟实验室和材料项目的一项倡议,旨在解决此类材料 PES 数据集中的关键缺陷。', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:10:21.000+08:00', | |||
| id: 100, | |||
| visits: 2, | |||
| praises_count: 0, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: 'innovation_contest/innov202305100905418', | |||
| identifier: 'public_dataset_20250526093119', | |||
| description: | |||
| '1. 赛题解读PPT;2.根据流动状态分开的数据集,方便选手测试自己模型的变状态泛化性能\n新的数据中输入输出与均在一个文件夹中\n新的数据集中,模型文件简称对应的状态如下:\nCBFS 曲线后台阶 雷诺数Re=13700\nCDN 收缩扩张管道 Re=12600\nduct 方管 Re在文件名中包含,比如duct_Re1100.csv代表Re=1100\nperhill 周期山 Re=5600,文件名后面', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:08:27.000+08:00', | |||
| id: 122, | |||
| visits: 3, | |||
| praises_count: 0, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: 'WIDERFace', | |||
| identifier: 'public_dataset_20250526094839', | |||
| description: | |||
| '32,203张图像,并对393,703张像样本图像中所描述的在尺度、姿势和遮挡方面具有高度可变性的面孔进行标记。较宽的人脸数据集基于61个事件类进行组织。', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:08:18.000+08:00', | |||
| id: 123, | |||
| visits: 2, | |||
| praises_count: 0, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: 'StanfordSentimentTreebank', | |||
| identifier: 'public_dataset_20250526095521', | |||
| description: | |||
| '用于情感分析的数据集,其中包含11855个句子的语法分析树中215154个短语的细粒度情感标签,并为情感组成提出了新挑战。', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:08:12.000+08:00', | |||
| id: 124, | |||
| visits: 2, | |||
| praises_count: 0, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: 'COCO', | |||
| identifier: 'public_dataset_20250526100341', | |||
| description: | |||
| 'COCO是大规模的对象检测,分割和字幕数据集。 它包含:330K图像(标为> 200K),150万个对象实例,80个对象类别。', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:07:56.000+08:00', | |||
| id: 125, | |||
| visits: 2, | |||
| praises_count: 0, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: 'BillionWords', | |||
| identifier: 'public_dataset_20250526101006', | |||
| description: '该项目的目的是为语言建模实验提供标准的培训和测试设置,包含10亿字。', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:07:47.000+08:00', | |||
| id: 126, | |||
| visits: 2, | |||
| praises_count: 0, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: 'car_ims', | |||
| identifier: 'public_dataset_20250527084401', | |||
| description: | |||
| '斯坦福汽车数据集包含196类汽车的16,185张图像。数据被分为8,144个训练图像和8,041个测试图像,其中每个类别已大致分为50-50个分割。', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:07:20.000+08:00', | |||
| id: 128, | |||
| visits: 2, | |||
| praises_count: 0, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| { | |||
| name: 'IU-xrays', | |||
| identifier: 'public_dataset_20250527093542', | |||
| description: '放射图像', | |||
| is_public: true, | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:07:12.000+08:00', | |||
| id: 129, | |||
| visits: 2, | |||
| praises_count: 0, | |||
| create_by: 'fanshuai', | |||
| owner: 'fanshuai', | |||
| }, | |||
| ], | |||
| pageable: { | |||
| sort: { | |||
| sorted: false, | |||
| unsorted: true, | |||
| empty: true, | |||
| }, | |||
| pageNumber: 0, | |||
| pageSize: 20, | |||
| offset: 0, | |||
| unpaged: false, | |||
| paged: true, | |||
| }, | |||
| last: false, | |||
| totalElements: 39, | |||
| totalPages: 2, | |||
| first: true, | |||
| number: 0, | |||
| sort: { | |||
| sorted: false, | |||
| unsorted: true, | |||
| empty: true, | |||
| }, | |||
| numberOfElements: 20, | |||
| size: 20, | |||
| empty: false, | |||
| }, | |||
| }, | |||
| 'GET /api/mmp/workspace/getPublicModels': { | |||
| msg: '操作成功', | |||
| code: 200, | |||
| data: { | |||
| content: [ | |||
| { | |||
| id: 109, | |||
| name: '介电', | |||
| create_by: 'ceshi', | |||
| description: '介电材料模型', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:09:54.000+08:00', | |||
| owner: 'ceshi', | |||
| identifier: 'public_model_20250522110231', | |||
| is_public: true, | |||
| praises_count: 2, | |||
| }, | |||
| { | |||
| id: 156, | |||
| name: 'ChatGLM2-6B', | |||
| create_by: 'fanshuai', | |||
| description: | |||
| 'ChatGLM2-6B 是开源中英双语对话模型 ChatGLM-6B 的第二代版本,在保留了初代模型对话流畅、部署门槛较低等众多优秀特性的基础之上', | |||
| time_ago: '2个月前', | |||
| full_last_update_time: '2025-06-20T16:09:02.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250528093916', | |||
| is_public: true, | |||
| praises_count: 1, | |||
| }, | |||
| { | |||
| id: 155, | |||
| name: '鹏城·脑海(原鹏城·盘古)α-2.6B-CPU', | |||
| create_by: 'fanshuai', | |||
| description: | |||
| '「鹏城·盘古α」由以鹏城实验室为首的技术团队联合攻关,首次基于“鹏城云脑Ⅱ”和国产MindSpore框架的自动混合并行模式实现在2048卡算力集群上的大规模分布式训练,训练出业界首个2000亿参数以中文为核心的预训练生成语言模型。鹏城·盘古α预训练模型支持丰富的场景应用,在知识问答、知识检索、知识推理、阅读理解等文本生成领域表现突出,具备很强的小样本学习能力。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:03:36.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250528093254', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 157, | |||
| name: 'ernie-3.0-base-zh', | |||
| create_by: 'fanshuai', | |||
| description: '大规模知识增强预训练,用于语言理解和生成', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:03:08.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250528094825', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 158, | |||
| name: 'FastChat-T5', | |||
| create_by: 'fanshuai', | |||
| description: | |||
| 'FastChat-T5是一款开源聊天机器人,通过微调Flan-t5-xl (3B参数)并基于从ShareGPT.收集的用户共享对话进行训练。它基于编码器-解码器变压器架构,能够自回归生成对用户输入的响应。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:03:19.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250528101831', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 159, | |||
| name: 'Kolors-IP-Adapter-Plus', | |||
| create_by: 'fanshuai', | |||
| description: '基于Kolors-Basemodel提供了IP-Adapter-Plus的权重和推理代码', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:03:01.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250528102217', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 160, | |||
| name: 'Florence-2-base', | |||
| create_by: 'fanshuai', | |||
| description: | |||
| 'Florence-2是一款先进的视觉基础模型,采用提示式方法处理广泛的视觉和视觉-语言任务。Florence-2能够通过简单的文本提示来执行诸如字幕生成、物体检测和分割等任务。该模型利用了包含54亿个注释的FLD-5B数据集,这些注释覆盖了1.26亿张图像,从而掌握了多任务学习。模型的序列到序列架构使其在零样本和微调设置中表现出色,证明了其作为竞争性视觉基础模型的实力。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:02:55.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250528102750', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 161, | |||
| name: 'E5-base', | |||
| create_by: 'fanshuai', | |||
| description: '弱监督对比预训练的文本嵌入。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:02:48.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250528103059', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 162, | |||
| name: 'Mini-InternVL-Chat', | |||
| create_by: 'fanshuai', | |||
| description: | |||
| '使用了与InternVL 1相同的数据来训练这个较小的模型。此外,由于较小模型的训练成本较低,我们在训练时采用了8K的上下文长度。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:02:39.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250528105945', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 163, | |||
| name: 'Verdict-Classifier', | |||
| create_by: 'fanshuai', | |||
| description: | |||
| '该模型是基于xlm-roberta-base的微调版本,基于谷歌事实核查工具API提供的2,500条去重多语言判决,并通过谷歌云翻译API转换成65种语言', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:02:27.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250528110545', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 164, | |||
| name: 'Text2Vec-Base-Multilingual', | |||
| create_by: 'fanshuai', | |||
| description: | |||
| '这是一个CoSENT(余弦句子)模型,它将句子映射到一个384维的密集向量空间,并可用于任务,例如句子嵌入、文本匹配或语义搜索。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:02:19.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250528110858', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 167, | |||
| name: 'Latex-OCR', | |||
| create_by: 'fanshuai', | |||
| description: '识别图像中的数学公式并转换为Latex源码。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T18:02:09.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250528112153', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 169, | |||
| name: 'XLNet', | |||
| create_by: 'fanshuai', | |||
| description: | |||
| 'XLNet是一种基于新型广义置换语言建模目标的新型无监督语言表示学习方法。此外,XLNet采用Transformer-XL作为骨干模型,在处理长上下文的语言任务中表现出色。总体而言,XLNet在包括问答、自然语言推理、情感分析和文档排序在内的多种下游语言任务中取得了最先进的(SOTA)成果。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-28T17:29:05.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250528172905', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 173, | |||
| name: ' GTE-base', | |||
| create_by: 'fanshuai', | |||
| description: | |||
| 'GTE模型由阿里巴巴达摩学院训练。这些模型主要基于BERT框架,目前提供三种不同规模的版本,分别是GTE-large、GTE-base和GTE-small。GTE模型在大规模的相关文本对语料库上进行训练,涵盖了广泛的领域和场景。这使得GTE模型能够应用于文本嵌入的多种下游任务,如信息检索、语义文本相似性分析、文本重排序等。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-29T09:14:15.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250529091415', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 174, | |||
| name: 'Tiny-lm', | |||
| create_by: 'fanshuai', | |||
| description: | |||
| '此仓库提供了一个小型的1600万参数语言模型,该模型基于英文和日文维基百科数据训练。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-29T09:18:57.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250529091857', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 175, | |||
| name: "Snowflake's Arctic-embed-s", | |||
| create_by: 'fanshuai', | |||
| description: | |||
| 'snowflake-arctic-embed是一套文本嵌入模型,专注于创建高性能的高质量检索模型。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-29T09:23:58.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250529092358', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 176, | |||
| name: 'ViTMatte model', | |||
| create_by: 'fanshuai', | |||
| description: | |||
| 'ViTMatte是一种简单的图像抠图方法,旨在准确估计图像中的前景物体。该模型由一个Vision Transformer(ViT)和一个轻量级头部组成。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-29T09:41:07.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250529094107', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 177, | |||
| name: 'Wartortle', | |||
| create_by: 'fanshuai', | |||
| description: '此模型专为语义自动补全功能而设计。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-29T09:44:43.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250529094443', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 179, | |||
| name: 'Cerebras-GPT', | |||
| create_by: 'fanshuai', | |||
| description: | |||
| 'Cerebras-GPT系列的发布旨在通过开放架构和数据集促进对大型语言模型(LLM)扩展规律的研究,并展示在Cerebras软硬件栈上训练LLM的简便性和可扩展性。所有Cerebras-GPT模型均可在Hugging Face.上获取。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-29T10:01:52.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250529100152', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| { | |||
| id: 180, | |||
| name: 'Qwen2-1.5B-Instruct-AWQ', | |||
| create_by: 'fanshuai', | |||
| description: | |||
| 'Qwen2是Qwen大语言模型系列的最新成员。我们为Qwen2推出了多个基础语言模型和指令调优语言模型,参数规模从0.5亿到72亿不等,其中包括一个专家混合模型。本仓库包含1.5亿参数的指令调优Qwen2模型。', | |||
| time_ago: '3个月前', | |||
| full_last_update_time: '2025-05-29T10:13:53.000+08:00', | |||
| owner: 'fanshuai', | |||
| identifier: 'public_model_20250529101353', | |||
| is_public: true, | |||
| praises_count: 0, | |||
| }, | |||
| ], | |||
| pageable: { | |||
| sort: { | |||
| sorted: false, | |||
| unsorted: true, | |||
| empty: true, | |||
| }, | |||
| pageNumber: 0, | |||
| pageSize: 20, | |||
| offset: 0, | |||
| unpaged: false, | |||
| paged: true, | |||
| }, | |||
| last: false, | |||
| totalElements: 28, | |||
| totalPages: 2, | |||
| first: true, | |||
| number: 0, | |||
| sort: { | |||
| sorted: false, | |||
| unsorted: true, | |||
| empty: true, | |||
| }, | |||
| numberOfElements: 20, | |||
| size: 20, | |||
| empty: false, | |||
| }, | |||
| }, | |||
| }); | |||
| @@ -0,0 +1,490 @@ | |||
| import { defineMock } from 'umi'; | |||
| export default defineMock({ | |||
| 'POST /api/mmp/modelDependency/queryModelAtlas': { | |||
| code: 200, | |||
| msg: '操作成功', | |||
| data: { | |||
| current_model_id: 29, | |||
| exp_ins_id: 229, | |||
| version: 'v0.2.0', | |||
| ref_item: null, | |||
| train_task: { | |||
| name: '模型训练测试导出0529', | |||
| ins_id: 229, | |||
| task_id: 'model-train-5d76f002', | |||
| }, | |||
| train_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| train_params: ['256', '2'], | |||
| train_image: '172.20.32.187/machine-learning/pytorch:pytorch_1.9.1_cuda11.1_detection_aim', | |||
| test_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| project_dependency: { | |||
| url: 'https://openi.pcl.ac.cn/somunslotus/somun202304241505581.git', | |||
| name: 'somun202304241505581', | |||
| branch: 'train_ci_test', | |||
| }, | |||
| parent_models_map: [ | |||
| { | |||
| model_id: 29, | |||
| model_version: 'v0.1.0', | |||
| model_name: 'mnist模型演化', | |||
| }, | |||
| ], | |||
| parent_models: [ | |||
| { | |||
| current_model_id: 29, | |||
| exp_ins_id: null, | |||
| version: 'v0.1.0', | |||
| ref_item: null, | |||
| train_task: { | |||
| name: '模型训练测试导出0529', | |||
| ins_id: 229, | |||
| task_id: 'model-train-5d76f002', | |||
| }, | |||
| train_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| train_params: ['256', '2'], | |||
| train_image: | |||
| '172.20.32.187/machine-learning/pytorch:pytorch_1.9.1_cuda11.1_detection_aim', | |||
| test_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| project_dependency: { | |||
| url: 'https://openi.pcl.ac.cn/somunslotus/somun202304241505581.git', | |||
| name: 'somun202304241505581', | |||
| branch: 'train_ci_test', | |||
| }, | |||
| parent_models_map: [], | |||
| parent_models: [], | |||
| children_models: null, | |||
| workflow_id: null, | |||
| model_version_dependcy_vo: { | |||
| name: 'mnist模型演化', | |||
| description: '手写体识别模型演化', | |||
| available_range: 0, | |||
| model_type: '37', | |||
| model_tag: '46', | |||
| model_type_name: 'PyTorch', | |||
| model_tag_name: '图像转文本', | |||
| url: 'models/admin/1718172558449/mnist_epoch1_0.00.pkl', | |||
| file_name: 'mnist_epoch1_0.00.pkl', | |||
| file_size: '176.63 KB', | |||
| create_by: 'admin', | |||
| create_time: '2024-06-12T06:09:56.000+00:00', | |||
| }, | |||
| }, | |||
| ], | |||
| children_models: [ | |||
| { | |||
| current_model_id: 29, | |||
| exp_ins_id: null, | |||
| version: 'v0.3.0', | |||
| ref_item: null, | |||
| train_task: { | |||
| name: '模型训练测试导出0529', | |||
| ins_id: 229, | |||
| task_id: 'model-train-5d76f002', | |||
| }, | |||
| train_dataset: [ | |||
| { | |||
| dataset_id: 120, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| train_params: ['256', '2'], | |||
| train_image: | |||
| '172.20.32.187/machine-learning/pytorch:pytorch_1.9.1_cuda11.1_detection_aim', | |||
| test_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| project_dependency: { | |||
| url: 'https://openi.pcl.ac.cn/somunslotus/somun202304241505581.git', | |||
| name: 'somun202304241505581', | |||
| branch: 'train_ci_test', | |||
| }, | |||
| parent_models_map: [], | |||
| parent_models: [], | |||
| children_models: [], | |||
| workflow_id: null, | |||
| model_version_dependcy_vo: { | |||
| name: 'mnist模型演化', | |||
| description: '手写体识别模型演化', | |||
| available_range: 0, | |||
| model_type: '37', | |||
| model_tag: '46', | |||
| model_type_name: 'PyTorch', | |||
| model_tag_name: '图像转文本', | |||
| url: 'models/admin/1718172558449/mnist_epoch1_0.00.pkl', | |||
| file_name: 'mnist_epoch1_0.00.pkl', | |||
| file_size: '176.63 KB', | |||
| create_by: 'admin', | |||
| create_time: '2024-06-12T06:09:56.000+00:00', | |||
| }, | |||
| }, | |||
| { | |||
| current_model_id: 29, | |||
| exp_ins_id: null, | |||
| version: 'v0.31.0', | |||
| ref_item: null, | |||
| train_task: { | |||
| name: '模型训练测试导出0529', | |||
| ins_id: 229, | |||
| task_id: 'model-train-5d76f002', | |||
| }, | |||
| train_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| train_params: ['256', '2'], | |||
| train_image: | |||
| '172.20.32.187/machine-learning/pytorch:pytorch_1.9.1_cuda11.1_detection_aim', | |||
| test_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| project_dependency: { | |||
| url: 'https://openi.pcl.ac.cn/somunslotus/somun202304241505581.git', | |||
| name: 'somun202304241505581', | |||
| branch: 'train_ci_test', | |||
| }, | |||
| parent_models_map: [], | |||
| parent_models: [], | |||
| children_models: [], | |||
| workflow_id: null, | |||
| model_version_dependcy_vo: { | |||
| name: 'mnist模型演化', | |||
| description: '手写体识别模型演化', | |||
| available_range: 0, | |||
| model_type: '37', | |||
| model_tag: '46', | |||
| model_type_name: 'PyTorch', | |||
| model_tag_name: '图像转文本', | |||
| url: 'models/admin/1718172558449/mnist_epoch1_0.00.pkl', | |||
| file_name: 'mnist_epoch1_0.00.pkl', | |||
| file_size: '176.63 KB', | |||
| create_by: 'admin', | |||
| create_time: '2024-06-12T06:09:56.000+00:00', | |||
| }, | |||
| }, | |||
| { | |||
| current_model_id: 29, | |||
| exp_ins_id: null, | |||
| version: 'v0.4.0', | |||
| ref_item: null, | |||
| train_task: { | |||
| name: '模型训练测试导出0529', | |||
| ins_id: 229, | |||
| task_id: 'model-train-5d76f002', | |||
| }, | |||
| train_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| train_params: ['256', '2'], | |||
| train_image: | |||
| '172.20.32.187/machine-learning/pytorch:pytorch_1.9.1_cuda11.1_detection_aim', | |||
| test_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| project_dependency: { | |||
| url: 'https://openi.pcl.ac.cn/somunslotus/somun202304241505581.git', | |||
| name: 'somun202304241505581', | |||
| branch: 'train_ci_test', | |||
| }, | |||
| parent_models_map: [], | |||
| parent_models: [], | |||
| children_models: [ | |||
| { | |||
| current_model_id: 29, | |||
| exp_ins_id: null, | |||
| version: 'v0.6.0', | |||
| ref_item: null, | |||
| train_task: { | |||
| name: '模型训练测试导出0529', | |||
| ins_id: 229, | |||
| task_id: 'model-train-5d76f002', | |||
| }, | |||
| train_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| train_params: ['256', '2'], | |||
| train_image: | |||
| '172.20.32.187/machine-learning/pytorch:pytorch_1.9.1_cuda11.1_detection_aim', | |||
| test_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| project_dependency: { | |||
| url: 'https://openi.pcl.ac.cn/somunslotus/somun202304241505581.git', | |||
| name: 'somun202304241505581', | |||
| branch: 'train_ci_test', | |||
| }, | |||
| parent_models_map: [], | |||
| parent_models: [], | |||
| children_models: [], | |||
| workflow_id: null, | |||
| model_version_dependcy_vo: { | |||
| name: 'mnist模型演化', | |||
| description: '手写体识别模型演化', | |||
| available_range: 0, | |||
| model_type: '37', | |||
| model_tag: '46', | |||
| model_type_name: 'PyTorch', | |||
| model_tag_name: '图像转文本', | |||
| url: 'models/admin/1718172558449/mnist_epoch1_0.00.pkl', | |||
| file_name: 'mnist_epoch1_0.00.pkl', | |||
| file_size: '176.63 KB', | |||
| create_by: 'admin', | |||
| create_time: '2024-06-12T06:09:56.000+00:00', | |||
| }, | |||
| }, | |||
| { | |||
| current_model_id: 29, | |||
| exp_ins_id: null, | |||
| version: 'v0.7.0', | |||
| ref_item: null, | |||
| train_task: {}, | |||
| train_dataset: [], | |||
| train_params: [], | |||
| train_image: null, | |||
| test_dataset: [], | |||
| project_dependency: {}, | |||
| parent_models_map: [], | |||
| parent_models: [], | |||
| children_models: [], | |||
| workflow_id: null, | |||
| model_version_dependcy_vo: { | |||
| name: 'mnist模型演化', | |||
| description: '手写体识别模型演化', | |||
| available_range: 0, | |||
| model_type: '37', | |||
| model_tag: '46', | |||
| model_type_name: 'PyTorch', | |||
| model_tag_name: '图像转文本', | |||
| url: 'models/admin/1718172558449/mnist_epoch1_0.00.pkl', | |||
| file_name: 'mnist_epoch1_0.00.pkl', | |||
| file_size: '176.63 KB', | |||
| create_by: 'admin', | |||
| create_time: '2024-06-12T06:09:56.000+00:00', | |||
| }, | |||
| }, | |||
| ], | |||
| workflow_id: null, | |||
| model_version_dependcy_vo: { | |||
| name: 'mnist模型演化', | |||
| description: '手写体识别模型演化', | |||
| available_range: 0, | |||
| model_type: '37', | |||
| model_tag: '46', | |||
| model_type_name: 'PyTorch', | |||
| model_tag_name: '图像转文本', | |||
| url: 'models/admin/1718172558449/mnist_epoch1_0.00.pkl', | |||
| file_name: 'mnist_epoch1_0.00.pkl', | |||
| file_size: '176.63 KB', | |||
| create_by: 'admin', | |||
| create_time: '2024-06-12T06:09:56.000+00:00', | |||
| }, | |||
| }, | |||
| { | |||
| current_model_id: 29, | |||
| exp_ins_id: null, | |||
| version: 'v0.5.0', | |||
| ref_item: null, | |||
| train_task: { | |||
| name: '模型训练测试导出0529', | |||
| ins_id: 229, | |||
| task_id: 'model-train-5d76f002', | |||
| }, | |||
| train_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| train_params: ['256', '2'], | |||
| train_image: | |||
| '172.20.32.187/machine-learning/pytorch:pytorch_1.9.1_cuda11.1_detection_aim', | |||
| test_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| project_dependency: { | |||
| url: 'https://openi.pcl.ac.cn/somunslotus/somun202304241505581.git', | |||
| name: 'somun202304241505581', | |||
| branch: 'train_ci_test', | |||
| }, | |||
| parent_models_map: [], | |||
| parent_models: [], | |||
| children_models: [ | |||
| { | |||
| current_model_id: 29, | |||
| exp_ins_id: null, | |||
| version: 'v0.10.0', | |||
| ref_item: null, | |||
| train_task: {}, | |||
| train_dataset: [], | |||
| train_params: [], | |||
| train_image: null, | |||
| test_dataset: [], | |||
| project_dependency: {}, | |||
| parent_models_map: [], | |||
| parent_models: [], | |||
| children_models: [], | |||
| workflow_id: null, | |||
| model_version_dependcy_vo: { | |||
| name: 'mnist模型演化', | |||
| description: '手写体识别模型演化', | |||
| available_range: 0, | |||
| model_type: '37', | |||
| model_tag: '46', | |||
| model_type_name: 'PyTorch', | |||
| model_tag_name: '图像转文本', | |||
| url: 'models/admin/1718172558449/mnist_epoch1_0.00.pkl', | |||
| file_name: 'mnist_epoch1_0.00.pkl', | |||
| file_size: '176.63 KB', | |||
| create_by: 'admin', | |||
| create_time: '2024-06-12T06:09:56.000+00:00', | |||
| }, | |||
| }, | |||
| { | |||
| current_model_id: 29, | |||
| exp_ins_id: null, | |||
| version: 'v0.11.0', | |||
| ref_item: null, | |||
| train_task: { | |||
| name: '模型训练测试导出0529', | |||
| ins_id: 229, | |||
| task_id: 'model-train-5d76f002', | |||
| }, | |||
| train_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| train_params: ['256', '2'], | |||
| train_image: | |||
| '172.20.32.187/machine-learning/pytorch:pytorch_1.9.1_cuda11.1_detection_aim', | |||
| test_dataset: [ | |||
| { | |||
| dataset_id: 20, | |||
| dataset_version: 'v0.1.0', | |||
| dataset_name: '手写体识别模型依赖测试训练数据集', | |||
| }, | |||
| ], | |||
| project_dependency: { | |||
| url: 'https://openi.pcl.ac.cn/somunslotus/somun202304241505581.git', | |||
| name: 'somun202304241505581', | |||
| branch: 'train_ci_test', | |||
| }, | |||
| parent_models_map: [], | |||
| parent_models: [], | |||
| children_models: [], | |||
| workflow_id: null, | |||
| model_version_dependcy_vo: { | |||
| name: 'mnist模型演化', | |||
| description: '手写体识别模型演化', | |||
| available_range: 0, | |||
| model_type: '37', | |||
| model_tag: '46', | |||
| model_type_name: 'PyTorch', | |||
| model_tag_name: '图像转文本', | |||
| url: 'models/admin/1718172558449/mnist_epoch1_0.00.pkl', | |||
| file_name: 'mnist_epoch1_0.00.pkl', | |||
| file_size: '176.63 KB', | |||
| create_by: 'admin', | |||
| create_time: '2024-06-12T06:09:56.000+00:00', | |||
| }, | |||
| }, | |||
| ], | |||
| workflow_id: null, | |||
| model_version_dependcy_vo: { | |||
| name: 'mnist模型演化', | |||
| description: '手写体识别模型演化', | |||
| available_range: 0, | |||
| model_type: '37', | |||
| model_tag: '46', | |||
| model_type_name: 'PyTorch', | |||
| model_tag_name: '图像转文本', | |||
| url: 'models/admin/1718172558449/mnist_epoch1_0.00.pkl', | |||
| file_name: 'mnist_epoch1_0.00.pkl', | |||
| file_size: '176.63 KB', | |||
| create_by: 'admin', | |||
| create_time: '2024-06-12T06:09:56.000+00:00', | |||
| }, | |||
| }, | |||
| ], | |||
| workflow_id: 144, | |||
| model_version_dependcy_vo: { | |||
| name: 'mnist模型演化', | |||
| description: '手写体识别模型演化', | |||
| available_range: 0, | |||
| model_type: '37', | |||
| model_tag: '46', | |||
| model_type_name: 'PyTorch', | |||
| model_tag_name: '图像转文本', | |||
| url: 'models/admin/1718172760650/mnist_cnn.pt', | |||
| file_name: 'mnist_cnn.pt', | |||
| file_size: '176.76 KB', | |||
| create_by: 'admin', | |||
| create_time: '2024-06-12T06:12:42.000+00:00', | |||
| }, | |||
| }, | |||
| }, | |||
| }); | |||
| @@ -0,0 +1,5 @@ | |||
| export default { | |||
| '/api/auth_routes': { | |||
| '/form/advanced-form': { authority: ['admin', 'user'] }, | |||
| }, | |||
| }; | |||
| @@ -0,0 +1,184 @@ | |||
| { | |||
| "name": "ci4s", | |||
| "version": "1.0.0", | |||
| "private": true, | |||
| "description": "", | |||
| "scripts": { | |||
| "analyze": "cross-env ANALYZE=1 max build", | |||
| "build": "max build", | |||
| "deploy": "npm run build && npm run gh-pages", | |||
| "dev": "npm run start:dev", | |||
| "dev-no-sso": "cross-env NO_SSO=true npm run start:mock", | |||
| "docker-hub:build": "docker build -f Dockerfile.hub -t ant-design-pro ./", | |||
| "docker-prod:build": "docker-compose -f ./docker/docker-compose.yml build", | |||
| "docker-prod:dev": "docker-compose -f ./docker/docker-compose.yml up", | |||
| "docker:build": "docker-compose -f ./docker/docker-compose.dev.yml build", | |||
| "docker:dev": "docker-compose -f ./docker/docker-compose.dev.yml up", | |||
| "docker:push": "npm run docker-hub:build && npm run docker:tag && docker push antdesign/ant-design-pro", | |||
| "docker:tag": "docker tag ant-design-pro antdesign/ant-design-pro", | |||
| "docs": "typedoc", | |||
| "gh-pages": "gh-pages -d dist", | |||
| "i18n-remove": "pro i18n-remove --locale=zh-CN --write", | |||
| "postinstall": "max setup", | |||
| "jest": "jest", | |||
| "lint": "npm run lint:js && npm run lint:prettier && npm run tsc", | |||
| "lint-staged": "lint-staged", | |||
| "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ", | |||
| "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src ", | |||
| "lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src", | |||
| "lint:prettier": "prettier -c --write \"**/**.{js,jsx,tsx,ts,less,md,json}\" --end-of-line auto", | |||
| "openapi": "max openapi", | |||
| "prepare": "cd .. && husky install", | |||
| "prettier": "prettier -c --write \"**/**.{js,jsx,tsx,ts,less,md,json}\"", | |||
| "preview": "npm run build && max preview --port 8000", | |||
| "record": "cross-env NODE_ENV=development REACT_APP_ENV=test max record --scene=login", | |||
| "serve": "umi-serve", | |||
| "start": "cross-env UMI_ENV=dev max dev", | |||
| "start:dev": "cross-env REACT_APP_ENV=dev MOCK=none UMI_ENV=dev UMI_DEV_SERVER_COMPRESS=none max dev", | |||
| "start:mock": "cross-env REACT_APP_ENV=dev UMI_ENV=dev UMI_DEV_SERVER_COMPRESS=none max dev", | |||
| "start:pre": "cross-env REACT_APP_ENV=pre UMI_ENV=dev max dev", | |||
| "start:test": "cross-env REACT_APP_ENV=test MOCK=none UMI_ENV=dev max dev", | |||
| "storybook": "storybook dev -p 6006", | |||
| "storybook-build": "storybook build", | |||
| "storybook-deploy": "./.storybook/scripts/upload-deploy.sh", | |||
| "storybook-docs": "storybook dev --docs", | |||
| "storybook-docs-build": "storybook build --docs", | |||
| "test": "jest", | |||
| "test:coverage": "npm run jest -- --coverage", | |||
| "test:update": "npm run jest -- -u", | |||
| "tsc": "tsc --noEmit" | |||
| }, | |||
| "lint-staged": { | |||
| "**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js", | |||
| "**/*.{js,jsx,tsx,ts,less,md,json}": [ | |||
| "prettier --write" | |||
| ] | |||
| }, | |||
| "browserslist": [ | |||
| "> 1%", | |||
| "last 2 versions", | |||
| "not ie <= 10" | |||
| ], | |||
| "dependencies": { | |||
| "@ant-design/colors": "~7.2.1", | |||
| "@ant-design/icons": "^5.0.0", | |||
| "@ant-design/pro-components": "^2.4.4", | |||
| "@ant-design/use-emotion-css": "1.0.4", | |||
| "@antv/g6": "^4.8.24", | |||
| "@antv/hierarchy": "^0.6.12", | |||
| "@ctrl/tinycolor": "~4.1.0", | |||
| "@types/crypto-js": "^4.2.2", | |||
| "@umijs/route-utils": "^4.0.1", | |||
| "antd": "~5.21.4", | |||
| "antd-style": "~3.7.1", | |||
| "caniuse-lite": "~1.0.30001707", | |||
| "classnames": "^2.3.2", | |||
| "crypto-js": "^4.2.0", | |||
| "echarts": "^5.5.0", | |||
| "fabric": "^5.3.0", | |||
| "highlight.js": "^11.7.0", | |||
| "lodash": "^4.17.21", | |||
| "motion": "~12.23.12", | |||
| "omit.js": "^2.0.2", | |||
| "pnpm": "^8.9.0", | |||
| "query-string": "^8.1.0", | |||
| "rc-menu": "^9.8.4", | |||
| "rc-util": "^5.30.0", | |||
| "react": "^18.2.0", | |||
| "react-activation": "^0.12.4", | |||
| "react-countup": "~6.5.3", | |||
| "react-cropper": "^2.3.3", | |||
| "react-dev-inspector": "^1.8.1", | |||
| "react-dom": "^18.2.0", | |||
| "react-draggable": "^4.4.6", | |||
| "react-helmet-async": "^1.3.0", | |||
| "react-highlight": "^0.15.0" | |||
| }, | |||
| "devDependencies": { | |||
| "@ant-design/pro-cli": "^3.1.0", | |||
| "@chromatic-com/storybook": "~3.2.4", | |||
| "@storybook/addon-essentials": "~8.5.3", | |||
| "@storybook/addon-interactions": "~8.5.3", | |||
| "@storybook/addon-onboarding": "~8.5.3", | |||
| "@storybook/addon-styling-webpack": "~1.0.1", | |||
| "@storybook/addon-webpack5-compiler-babel": "~3.0.5", | |||
| "@storybook/addon-webpack5-compiler-swc": "~2.0.0", | |||
| "@storybook/blocks": "~8.5.3", | |||
| "@storybook/manager-api": "~8.6.0", | |||
| "@storybook/react": "~8.5.3", | |||
| "@storybook/react-webpack5": "~8.5.3", | |||
| "@storybook/test": "~8.5.3", | |||
| "@storybook/theming": "~8.6.0", | |||
| "@testing-library/react": "^14.0.0", | |||
| "@types/antd": "^1.0.0", | |||
| "@types/express": "^4.17.14", | |||
| "@types/jest": "^29.5.1", | |||
| "@types/lodash": "^4.14.194", | |||
| "@types/react": "^18.0.38", | |||
| "@types/react-dom": "^18.0.11", | |||
| "@types/react-helmet": "^6.1.5", | |||
| "@types/react-highlight": "^0.12.5", | |||
| "@umijs/lint": "^4.0.66", | |||
| "@umijs/max": "^4.0.66", | |||
| "cross-env": "^7.0.3", | |||
| "eslint": "^8.39.0", | |||
| "eslint-plugin-react-hooks": "~5.2.0", | |||
| "eslint-plugin-storybook": "~0.11.2", | |||
| "express": "^4.18.2", | |||
| "gh-pages": "^5.0.0", | |||
| "husky": "^8.0.3", | |||
| "jest": "^29.5.0", | |||
| "jest-environment-jsdom": "^29.5.0", | |||
| "less": "~4.2.2", | |||
| "less-loader": "~12.2.0", | |||
| "lint-staged": "^13.2.0", | |||
| "mockjs": "^1.1.0", | |||
| "msw": "~2.7.0", | |||
| "msw-storybook-addon": "~2.0.4", | |||
| "prettier": "^2.8.1", | |||
| "storybook": "~8.5.3", | |||
| "swagger-ui-dist": "^4.18.2", | |||
| "ts-loader": "~9.5.2", | |||
| "ts-node": "^10.9.1", | |||
| "typedoc": "~0.28.1", | |||
| "typescript": "^5.0.4", | |||
| "umi-presets-pro": "^2.0.0" | |||
| }, | |||
| "engines": { | |||
| "node": ">=18.18.0" | |||
| }, | |||
| "create-umi": { | |||
| "ignoreScript": [ | |||
| "docker*", | |||
| "functions*", | |||
| "site", | |||
| "generateMock" | |||
| ], | |||
| "ignoreDependencies": [ | |||
| "netlify*", | |||
| "serverless" | |||
| ], | |||
| "ignore": [ | |||
| ".dockerignore", | |||
| ".git", | |||
| ".github", | |||
| ".gitpod.yml", | |||
| "CODE_OF_CONDUCT.md", | |||
| "Dockerfile", | |||
| "Dockerfile.*", | |||
| "lambda", | |||
| "LICENSE", | |||
| "netlify.toml", | |||
| "README.*.md", | |||
| "azure-pipelines.yml", | |||
| "docker", | |||
| "CNAME", | |||
| "create-umi" | |||
| ] | |||
| }, | |||
| "msw": { | |||
| "workerDirectory": [ | |||
| "public" | |||
| ] | |||
| } | |||
| } | |||