diff --git a/bigtop-manager-ui/.env.development b/bigtop-manager-ui/.env.development index c968a936a..abcc75b91 100644 --- a/bigtop-manager-ui/.env.development +++ b/bigtop-manager-ui/.env.development @@ -18,5 +18,5 @@ NODE_ENV=development VITE_APP_BASE='/' VITE_APP_BASE_URL='http://localhost:8080' VITE_APP_BASE_API='/api' -VITE_GITHUB_URL='https://github.com/apache/bigtop-manager' -VITE_BIGTOP_MANAGER_DOC_URL='https://github.com/apache/bigtop-manager/tree/main/docs' + + diff --git a/bigtop-manager-ui/.env.production b/bigtop-manager-ui/.env.production index e96d4d88c..7fba695f6 100644 --- a/bigtop-manager-ui/.env.production +++ b/bigtop-manager-ui/.env.production @@ -18,5 +18,3 @@ NODE_ENV=production VITE_APP_BASE='/ui/' VITE_APP_BASE_URL='' VITE_APP_BASE_API='/api' -VITE_GITHUB_URL='https://github.com/apache/bigtop-manager' -VITE_BIGTOP_MANAGER_DOC_URL='https://github.com/apache/bigtop-manager/tree/main/docs' diff --git a/bigtop-manager-ui/README.md b/bigtop-manager-ui/README.md index 70f775d2d..cdbc0b3fa 100644 --- a/bigtop-manager-ui/README.md +++ b/bigtop-manager-ui/README.md @@ -57,6 +57,8 @@ Bigtop Manager UI is the front-end UI of the Manager platform, which stores code │ ├── utils/ # Utility functions │ ├── App.vue # Root component │ └── main.ts # Project entry point +├── plugins/ # Vite plugins +├── cli/ # CLI scripts ├── tests/ # Unit and integration tests ├── index.html # HTML template ├── package.json # Project metadata and dependencies diff --git a/bigtop-manager-ui/README.zh.md b/bigtop-manager-ui/README.zh.md index cac951494..3f7f252d8 100644 --- a/bigtop-manager-ui/README.zh.md +++ b/bigtop-manager-ui/README.zh.md @@ -57,6 +57,8 @@ Bigtop Manager UI 是 Manager 平台的前端 UI,存放有关平台与用户 │ ├── utils/ # 工具函数 │ ├── App.vue # 根组件 │ └── main.ts # 项目入口文件 +├── plugins/ # Vite 插件 +├── cli/ # 手动执行的命令行脚本 ├── tests/ # 单元测试或集成测试用例 ├── index.html # HTML 模板文件 ├── package.json # 包管理与脚本配置文件 diff --git a/bigtop-manager-ui/cli/generate-img-map.ts b/bigtop-manager-ui/cli/generate-img-map.ts new file mode 100644 index 000000000..ae342f7b3 --- /dev/null +++ b/bigtop-manager-ui/cli/generate-img-map.ts @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { generateMetaMap } from '../plugins/unplugin-image-manifest/generate' + +generateMetaMap().catch((err) => { + console.error(err) + process.exit(1) +}) diff --git a/bigtop-manager-ui/package.json b/bigtop-manager-ui/package.json index 58b99865a..3f81c13cc 100644 --- a/bigtop-manager-ui/package.json +++ b/bigtop-manager-ui/package.json @@ -3,13 +3,14 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "vite --open --mode development", - "build": "vite build && vue-tsc --noEmit", + "dev": "pnpm img-map && vite --open --mode development", + "build": "pnpm img-map && vite build && vue-tsc --noEmit", "preview": "vite preview", "lint": "eslint src --ext .ts,.tsx,.vue", "prettier": "prettier --write \"src/**/*.{vue,ts,tsx}\"", "test": "vitest", - "test:run": "vitest run" + "test:run": "vitest run", + "img-map": "tsx cli/generate-img-map.ts" }, "dependencies": { "@ant-design/icons-vue": "^6.1.0", @@ -36,6 +37,7 @@ "devDependencies": { "@testing-library/vue": "^8.1.0", "@types/lodash-es": "^4.17.12", + "@types/micromatch": "^4.0.9", "@types/node": "^20.5.3", "@types/node-forge": "^1.3.11", "@typescript-eslint/eslint-plugin": "^6.4.1", @@ -48,11 +50,14 @@ "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-vue": "^9.17.0", + "fast-glob": "^3.3.3", "happy-dom": "^18.0.1", + "micromatch": "^4.0.8", "postcss": "^8.4.41", "prettier": "^3.0.2", "sass": "^1.66.1", "sass-loader": "^13.3.2", + "tsx": "^4.20.3", "typescript": "^5.8.3", "unplugin-auto-import": "^19.3.0", "unplugin-icons": "^22.1.0", diff --git a/bigtop-manager-ui/plugins/unplugin-image-manifest/generate.ts b/bigtop-manager-ui/plugins/unplugin-image-manifest/generate.ts new file mode 100644 index 000000000..4c3059b2c --- /dev/null +++ b/bigtop-manager-ui/plugins/unplugin-image-manifest/generate.ts @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import fs from 'node:fs/promises' +import path from 'node:path' +import process from 'node:process' +import fg from 'fast-glob' +import prettier from 'prettier' + +async function formatCode(code: string) { + const options = await prettier.resolveConfig(process.cwd()) + return prettier.format(code, { ...options, parser: 'typescript' }) +} + +export async function generateMetaMap() { + const entries = await fg('src/assets/images/**/*.png') + + const lines = entries.map((filePath) => { + const relativePath = path.relative('src', filePath).replace(/\\/g, '') + const fileName = path.basename(filePath, '.png') + return ` '${fileName}': new URL('../${relativePath}', import.meta.url).href,` + }) + + const rawContent = `/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */\n +const imgMap = {\n${lines.join('\n')}\n}\n\nexport default imgMap\n` + + const formatted = formatCode(rawContent) + await fs.writeFile('src/utils/img-map.ts', await formatted, 'utf-8') +} diff --git a/bigtop-manager-ui/plugins/unplugin-image-manifest/index.ts b/bigtop-manager-ui/plugins/unplugin-image-manifest/index.ts new file mode 100644 index 000000000..20640b3ce --- /dev/null +++ b/bigtop-manager-ui/plugins/unplugin-image-manifest/index.ts @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import type { Plugin } from 'vite' +import path from 'node:path' +import micromatch from 'micromatch' +import { generateMetaMap } from './generate' + +interface PluginPayload { + matchPath: string // watch target path +} + +export default function imageManifestPlugin(pluginPayload: PluginPayload): Plugin { + return { + name: 'image-manifest', + + configureServer(server) { + server.watcher.on('add', (filePath) => onAdd(filePath, pluginPayload)) + server.watcher.on('change', (filePath) => onChange(filePath, pluginPayload)) + server.watcher.on('unlink', (filePath) => onUnlink(filePath, pluginPayload)) + } + } +} + +export function isTargetMarkdown(filePath: string, matchPath: string): boolean { + const relative = path.relative(process.cwd(), filePath) + return micromatch.isMatch(relative, matchPath) +} + +// --------------- watcher actions ----------------- + +function onAdd(filePath: string, payload: PluginPayload) { + if (isTargetMarkdown(filePath, payload.matchPath)) { + updateNoteMeta() + } +} + +function onUnlink(filePath: string, payload: PluginPayload) { + if (isTargetMarkdown(filePath, payload.matchPath)) { + updateNoteMeta() + } +} + +async function onChange(filePath: string, payload: PluginPayload) { + if (isTargetMarkdown(filePath, payload.matchPath)) { + updateNoteMeta() + } +} + +function updateNoteMeta() { + generateMetaMap().catch((err: any) => { + console.error(err) + process.exit(1) + }) +} diff --git a/bigtop-manager-ui/pnpm-lock.yaml b/bigtop-manager-ui/pnpm-lock.yaml index 59c847aac..5605dcfd8 100644 --- a/bigtop-manager-ui/pnpm-lock.yaml +++ b/bigtop-manager-ui/pnpm-lock.yaml @@ -76,6 +76,9 @@ devDependencies: '@types/lodash-es': specifier: ^4.17.12 version: 4.17.12 + '@types/micromatch': + specifier: ^4.0.9 + version: 4.0.9 '@types/node': specifier: ^20.5.3 version: 20.5.3 @@ -112,9 +115,15 @@ devDependencies: eslint-plugin-vue: specifier: ^9.17.0 version: 9.17.0(eslint@8.47.0) + fast-glob: + specifier: ^3.3.3 + version: 3.3.3 happy-dom: specifier: ^18.0.1 version: 18.0.1 + micromatch: + specifier: ^4.0.8 + version: 4.0.8 postcss: specifier: ^8.4.41 version: 8.4.41 @@ -127,6 +136,9 @@ devDependencies: sass-loader: specifier: ^13.3.2 version: 13.3.2(sass@1.66.1)(webpack@5.100.2) + tsx: + specifier: ^4.20.3 + version: 4.20.3 typescript: specifier: ^5.8.3 version: 5.8.3 @@ -265,6 +277,15 @@ packages: dev: true optional: true + /@esbuild/aix-ppc64@0.25.8: + resolution: {integrity: sha512-urAvrUedIqEiFR3FYSLTWQgLu5tb+m0qZw0NBEasUeo6wuqatkMDaRT+1uABiGXEu5vqgPd7FGE1BhsAIy9QVA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm64@0.21.5: resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} engines: {node: '>=12'} @@ -274,6 +295,15 @@ packages: dev: true optional: true + /@esbuild/android-arm64@0.25.8: + resolution: {integrity: sha512-OD3p7LYzWpLhZEyATcTSJ67qB5D+20vbtr6vHlHWSQYhKtzUYrETuWThmzFpZtFsBIxRvhO07+UgVA9m0i/O1w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-arm@0.21.5: resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} engines: {node: '>=12'} @@ -283,6 +313,15 @@ packages: dev: true optional: true + /@esbuild/android-arm@0.25.8: + resolution: {integrity: sha512-RONsAvGCz5oWyePVnLdZY/HHwA++nxYWIX1atInlaW6SEkwq6XkP3+cb825EUcRs5Vss/lGh/2YxAb5xqc07Uw==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/android-x64@0.21.5: resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} engines: {node: '>=12'} @@ -292,6 +331,15 @@ packages: dev: true optional: true + /@esbuild/android-x64@0.25.8: + resolution: {integrity: sha512-yJAVPklM5+4+9dTeKwHOaA+LQkmrKFX96BM0A/2zQrbS6ENCmxc4OVoBs5dPkCCak2roAD+jKCdnmOqKszPkjA==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-arm64@0.21.5: resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} engines: {node: '>=12'} @@ -301,6 +349,15 @@ packages: dev: true optional: true + /@esbuild/darwin-arm64@0.25.8: + resolution: {integrity: sha512-Jw0mxgIaYX6R8ODrdkLLPwBqHTtYHJSmzzd+QeytSugzQ0Vg4c5rDky5VgkoowbZQahCbsv1rT1KW72MPIkevw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/darwin-x64@0.21.5: resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} engines: {node: '>=12'} @@ -310,6 +367,15 @@ packages: dev: true optional: true + /@esbuild/darwin-x64@0.25.8: + resolution: {integrity: sha512-Vh2gLxxHnuoQ+GjPNvDSDRpoBCUzY4Pu0kBqMBDlK4fuWbKgGtmDIeEC081xi26PPjn+1tct+Bh8FjyLlw1Zlg==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-arm64@0.21.5: resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} engines: {node: '>=12'} @@ -319,6 +385,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-arm64@0.25.8: + resolution: {integrity: sha512-YPJ7hDQ9DnNe5vxOm6jaie9QsTwcKedPvizTVlqWG9GBSq+BuyWEDazlGaDTC5NGU4QJd666V0yqCBL2oWKPfA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/freebsd-x64@0.21.5: resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} engines: {node: '>=12'} @@ -328,6 +403,15 @@ packages: dev: true optional: true + /@esbuild/freebsd-x64@0.25.8: + resolution: {integrity: sha512-MmaEXxQRdXNFsRN/KcIimLnSJrk2r5H8v+WVafRWz5xdSVmWLoITZQXcgehI2ZE6gioE6HirAEToM/RvFBeuhw==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm64@0.21.5: resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} engines: {node: '>=12'} @@ -337,6 +421,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm64@0.25.8: + resolution: {integrity: sha512-WIgg00ARWv/uYLU7lsuDK00d/hHSfES5BzdWAdAig1ioV5kaFNrtK8EqGcUBJhYqotlUByUKz5Qo6u8tt7iD/w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-arm@0.21.5: resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} engines: {node: '>=12'} @@ -346,6 +439,15 @@ packages: dev: true optional: true + /@esbuild/linux-arm@0.25.8: + resolution: {integrity: sha512-FuzEP9BixzZohl1kLf76KEVOsxtIBFwCaLupVuk4eFVnOZfU+Wsn+x5Ryam7nILV2pkq2TqQM9EZPsOBuMC+kg==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ia32@0.21.5: resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} engines: {node: '>=12'} @@ -355,6 +457,15 @@ packages: dev: true optional: true + /@esbuild/linux-ia32@0.25.8: + resolution: {integrity: sha512-A1D9YzRX1i+1AJZuFFUMP1E9fMaYY+GnSQil9Tlw05utlE86EKTUA7RjwHDkEitmLYiFsRd9HwKBPEftNdBfjg==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-loong64@0.21.5: resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} engines: {node: '>=12'} @@ -364,6 +475,15 @@ packages: dev: true optional: true + /@esbuild/linux-loong64@0.25.8: + resolution: {integrity: sha512-O7k1J/dwHkY1RMVvglFHl1HzutGEFFZ3kNiDMSOyUrB7WcoHGf96Sh+64nTRT26l3GMbCW01Ekh/ThKM5iI7hQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-mips64el@0.21.5: resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} engines: {node: '>=12'} @@ -373,6 +493,15 @@ packages: dev: true optional: true + /@esbuild/linux-mips64el@0.25.8: + resolution: {integrity: sha512-uv+dqfRazte3BzfMp8PAQXmdGHQt2oC/y2ovwpTteqrMx2lwaksiFZ/bdkXJC19ttTvNXBuWH53zy/aTj1FgGw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-ppc64@0.21.5: resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} engines: {node: '>=12'} @@ -382,6 +511,15 @@ packages: dev: true optional: true + /@esbuild/linux-ppc64@0.25.8: + resolution: {integrity: sha512-GyG0KcMi1GBavP5JgAkkstMGyMholMDybAf8wF5A70CALlDM2p/f7YFE7H92eDeH/VBtFJA5MT4nRPDGg4JuzQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-riscv64@0.21.5: resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} engines: {node: '>=12'} @@ -391,6 +529,15 @@ packages: dev: true optional: true + /@esbuild/linux-riscv64@0.25.8: + resolution: {integrity: sha512-rAqDYFv3yzMrq7GIcen3XP7TUEG/4LK86LUPMIz6RT8A6pRIDn0sDcvjudVZBiiTcZCY9y2SgYX2lgK3AF+1eg==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-s390x@0.21.5: resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} engines: {node: '>=12'} @@ -400,6 +547,15 @@ packages: dev: true optional: true + /@esbuild/linux-s390x@0.25.8: + resolution: {integrity: sha512-Xutvh6VjlbcHpsIIbwY8GVRbwoviWT19tFhgdA7DlenLGC/mbc3lBoVb7jxj9Z+eyGqvcnSyIltYUrkKzWqSvg==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + /@esbuild/linux-x64@0.21.5: resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} engines: {node: '>=12'} @@ -409,6 +565,24 @@ packages: dev: true optional: true + /@esbuild/linux-x64@0.25.8: + resolution: {integrity: sha512-ASFQhgY4ElXh3nDcOMTkQero4b1lgubskNlhIfJrsH5OKZXDpUAKBlNS0Kx81jwOBp+HCeZqmoJuihTv57/jvQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-arm64@0.25.8: + resolution: {integrity: sha512-d1KfruIeohqAi6SA+gENMuObDbEjn22olAR7egqnkCD9DGBG0wsEARotkLgXDu6c4ncgWTZJtN5vcgxzWRMzcw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/netbsd-x64@0.21.5: resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} engines: {node: '>=12'} @@ -418,6 +592,24 @@ packages: dev: true optional: true + /@esbuild/netbsd-x64@0.25.8: + resolution: {integrity: sha512-nVDCkrvx2ua+XQNyfrujIG38+YGyuy2Ru9kKVNyh5jAys6n+l44tTtToqHjino2My8VAY6Lw9H7RI73XFi66Cg==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-arm64@0.25.8: + resolution: {integrity: sha512-j8HgrDuSJFAujkivSMSfPQSAa5Fxbvk4rgNAS5i3K+r8s1X0p1uOO2Hl2xNsGFppOeHOLAVgYwDVlmxhq5h+SQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + /@esbuild/openbsd-x64@0.21.5: resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} engines: {node: '>=12'} @@ -427,6 +619,24 @@ packages: dev: true optional: true + /@esbuild/openbsd-x64@0.25.8: + resolution: {integrity: sha512-1h8MUAwa0VhNCDp6Af0HToI2TJFAn1uqT9Al6DJVzdIBAd21m/G0Yfc77KDM3uF3T/YaOgQq3qTJHPbTOInaIQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openharmony-arm64@0.25.8: + resolution: {integrity: sha512-r2nVa5SIK9tSWd0kJd9HCffnDHKchTGikb//9c7HX+r+wHYCpQrSgxhlY6KWV1nFo1l4KFbsMlHk+L6fekLsUg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + requiresBuild: true + dev: true + optional: true + /@esbuild/sunos-x64@0.21.5: resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} @@ -436,6 +646,15 @@ packages: dev: true optional: true + /@esbuild/sunos-x64@0.25.8: + resolution: {integrity: sha512-zUlaP2S12YhQ2UzUfcCuMDHQFJyKABkAjvO5YSndMiIkMimPmxA+BYSBikWgsRpvyxuRnow4nS5NPnf9fpv41w==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-arm64@0.21.5: resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} engines: {node: '>=12'} @@ -445,6 +664,15 @@ packages: dev: true optional: true + /@esbuild/win32-arm64@0.25.8: + resolution: {integrity: sha512-YEGFFWESlPva8hGL+zvj2z/SaK+pH0SwOM0Nc/d+rVnW7GSTFlLBGzZkuSU9kFIGIo8q9X3ucpZhu8PDN5A2sQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-ia32@0.21.5: resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} engines: {node: '>=12'} @@ -454,6 +682,15 @@ packages: dev: true optional: true + /@esbuild/win32-ia32@0.25.8: + resolution: {integrity: sha512-hiGgGC6KZ5LZz58OL/+qVVoZiuZlUYlYHNAmczOm7bs2oE1XriPFi5ZHHrS8ACpV5EjySrnoCKmcbQMN+ojnHg==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@esbuild/win32-x64@0.21.5: resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} engines: {node: '>=12'} @@ -463,6 +700,15 @@ packages: dev: true optional: true + /@esbuild/win32-x64@0.25.8: + resolution: {integrity: sha512-cn3Yr7+OaaZq1c+2pe+8yxC8E144SReCQjN6/2ynubzYjvyqZjTXfQJpAcQpsdJq3My7XADANiYGHoFC69pLQw==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@eslint-community/eslint-utils@4.7.0(eslint@8.47.0): resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -850,6 +1096,10 @@ packages: resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} dev: true + /@types/braces@3.0.5: + resolution: {integrity: sha512-SQFof9H+LXeWNz8wDe7oN5zu7ket0qwMu5vZubW4GCJ8Kkeh6nBWUz87+KTz/G3Kqsrp0j/W253XJb3KMEeg3w==} + dev: true + /@types/chai@5.2.2: resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} dependencies: @@ -896,6 +1146,12 @@ packages: resolution: {integrity: sha512-H3MHACvFUEiujabxhaI/ImO6gUrd8oOurg7LQtS7mbwIXA/cUqWrvBsaeJ23aZEPk1TAYkurjfMbSELfoCXlGA==} dev: true + /@types/micromatch@4.0.9: + resolution: {integrity: sha512-7V+8ncr22h4UoYRLnLXSpTxjQrNUXtWHGeMPRJt1nULXI57G9bIcpyrHlmrQ7QK24EyyuXvYcSSWAM8GA9nqCg==} + dependencies: + '@types/braces': 3.0.5 + dev: true + /@types/node-forge@1.3.11: resolution: {integrity: sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==} dependencies: @@ -2251,6 +2507,40 @@ packages: '@esbuild/win32-x64': 0.21.5 dev: true + /esbuild@0.25.8: + resolution: {integrity: sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q==} + engines: {node: '>=18'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/aix-ppc64': 0.25.8 + '@esbuild/android-arm': 0.25.8 + '@esbuild/android-arm64': 0.25.8 + '@esbuild/android-x64': 0.25.8 + '@esbuild/darwin-arm64': 0.25.8 + '@esbuild/darwin-x64': 0.25.8 + '@esbuild/freebsd-arm64': 0.25.8 + '@esbuild/freebsd-x64': 0.25.8 + '@esbuild/linux-arm': 0.25.8 + '@esbuild/linux-arm64': 0.25.8 + '@esbuild/linux-ia32': 0.25.8 + '@esbuild/linux-loong64': 0.25.8 + '@esbuild/linux-mips64el': 0.25.8 + '@esbuild/linux-ppc64': 0.25.8 + '@esbuild/linux-riscv64': 0.25.8 + '@esbuild/linux-s390x': 0.25.8 + '@esbuild/linux-x64': 0.25.8 + '@esbuild/netbsd-arm64': 0.25.8 + '@esbuild/netbsd-x64': 0.25.8 + '@esbuild/openbsd-arm64': 0.25.8 + '@esbuild/openbsd-x64': 0.25.8 + '@esbuild/openharmony-arm64': 0.25.8 + '@esbuild/sunos-x64': 0.25.8 + '@esbuild/win32-arm64': 0.25.8 + '@esbuild/win32-ia32': 0.25.8 + '@esbuild/win32-x64': 0.25.8 + dev: true + /escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -2606,6 +2896,12 @@ packages: dunder-proto: 1.0.1 es-object-atoms: 1.1.1 + /get-tsconfig@4.10.1: + resolution: {integrity: sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==} + dependencies: + resolve-pkg-maps: 1.0.0 + dev: true + /github-markdown-css@5.6.1: resolution: {integrity: sha512-DItLFgHd+s7HQmk63YN4/TdvLeRqk1QP7pPKTTPrDTYoI5x7f/luJWSOZxesmuxBI2srHp8RDyoZd+9WF+WK8Q==} engines: {node: '>=10'} @@ -3840,6 +4136,10 @@ packages: engines: {node: '>=4'} dev: true + /resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + dev: true + /reusify@1.1.0: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -4301,6 +4601,17 @@ packages: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} dev: true + /tsx@4.20.3: + resolution: {integrity: sha512-qjbnuR9Tr+FJOMBqJCW5ehvIo/buZq7vH7qD7JziU98h6l3qGy0a/yPFjwO+y0/T7GFpNgNAvEcPPVfyT8rrPQ==} + engines: {node: '>=18.0.0'} + hasBin: true + dependencies: + esbuild: 0.25.8 + get-tsconfig: 4.10.1 + optionalDependencies: + fsevents: 2.3.3 + dev: true + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} diff --git a/bigtop-manager-ui/src/assets/images/logo.png b/bigtop-manager-ui/src/assets/images/logo.png new file mode 100644 index 000000000..23402dc4b Binary files /dev/null and b/bigtop-manager-ui/src/assets/images/logo.png differ diff --git a/bigtop-manager-ui/src/assets/images/svg/bottom-activated.svg b/bigtop-manager-ui/src/assets/images/svg/bottom-activated.svg deleted file mode 100644 index 46a1a50d8..000000000 --- a/bigtop-manager-ui/src/assets/images/svg/bottom-activated.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/bottom.svg b/bigtop-manager-ui/src/assets/images/svg/bottom.svg index edc1e747f..6b36761e3 100644 --- a/bigtop-manager-ui/src/assets/images/svg/bottom.svg +++ b/bigtop-manager-ui/src/assets/images/svg/bottom.svg @@ -17,9 +17,8 @@ ~ specific language governing permissions and limitations ~ under the License. --> - - + \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/clusters-activated.svg b/bigtop-manager-ui/src/assets/images/svg/clusters-activated.svg deleted file mode 100644 index e554fc584..000000000 --- a/bigtop-manager-ui/src/assets/images/svg/clusters-activated.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/clusters.svg b/bigtop-manager-ui/src/assets/images/svg/clusters.svg index e2b987438..36984ddef 100644 --- a/bigtop-manager-ui/src/assets/images/svg/clusters.svg +++ b/bigtop-manager-ui/src/assets/images/svg/clusters.svg @@ -20,25 +20,25 @@ + stroke="currentColor" stroke-width="1.3333333333333333" stroke-linejoin="round"> + stroke="currentColor" stroke-width="1.3333333333333333" stroke-linejoin="round"> + fill="currentColor"> + fill="currentColor"> + fill="currentColor"> + fill="currentColor"> \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/components-activated.svg b/bigtop-manager-ui/src/assets/images/svg/components-activated.svg deleted file mode 100644 index 9e5e54dac..000000000 --- a/bigtop-manager-ui/src/assets/images/svg/components-activated.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/components.svg b/bigtop-manager-ui/src/assets/images/svg/components.svg index bb215143b..323637d40 100644 --- a/bigtop-manager-ui/src/assets/images/svg/components.svg +++ b/bigtop-manager-ui/src/assets/images/svg/components.svg @@ -21,6 +21,6 @@ viewBox="0 0 16 16" fill="none"> + stroke="currentColor" stroke-width="1.3333333333333333" stroke-linejoin="round"> \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/filter-activated.svg b/bigtop-manager-ui/src/assets/images/svg/filter-activated.svg deleted file mode 100644 index af28467f9..000000000 --- a/bigtop-manager-ui/src/assets/images/svg/filter-activated.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/filter.svg b/bigtop-manager-ui/src/assets/images/svg/filter.svg index 22f0cceff..cdd4506e9 100644 --- a/bigtop-manager-ui/src/assets/images/svg/filter.svg +++ b/bigtop-manager-ui/src/assets/images/svg/filter.svg @@ -19,7 +19,7 @@ --> - \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/hosts-activated.svg b/bigtop-manager-ui/src/assets/images/svg/hosts-activated.svg deleted file mode 100644 index 503b72c4a..000000000 --- a/bigtop-manager-ui/src/assets/images/svg/hosts-activated.svg +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/hosts.svg b/bigtop-manager-ui/src/assets/images/svg/hosts.svg index 3f0a9e83d..ea2576a24 100644 --- a/bigtop-manager-ui/src/assets/images/svg/hosts.svg +++ b/bigtop-manager-ui/src/assets/images/svg/hosts.svg @@ -19,13 +19,13 @@ --> - - - \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/infrastructures-activated.svg b/bigtop-manager-ui/src/assets/images/svg/infrastructures-activated.svg deleted file mode 100644 index 040fb6a2f..000000000 --- a/bigtop-manager-ui/src/assets/images/svg/infrastructures-activated.svg +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/infrastructures.svg b/bigtop-manager-ui/src/assets/images/svg/infrastructures.svg index 78a64da5f..65a8da4e7 100644 --- a/bigtop-manager-ui/src/assets/images/svg/infrastructures.svg +++ b/bigtop-manager-ui/src/assets/images/svg/infrastructures.svg @@ -21,18 +21,18 @@ viewBox="0 0 16 16" fill="none"> + stroke="currentColor" stroke-width="1.3333333333333333" stroke-linejoin="round"> + stroke="currentColor" stroke-width="1.3333333333333333" stroke-linejoin="round"> + stroke="currentColor" stroke-width="1.3333333333333333"> + stroke="currentColor" stroke-width="1.3333333333333333"> \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/llm-config-activated.svg b/bigtop-manager-ui/src/assets/images/svg/llm-config-activated.svg deleted file mode 100644 index fee86d73d..000000000 --- a/bigtop-manager-ui/src/assets/images/svg/llm-config-activated.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/llm-config.svg b/bigtop-manager-ui/src/assets/images/svg/llm-config.svg index 85dc0a51a..db89a2f39 100644 --- a/bigtop-manager-ui/src/assets/images/svg/llm-config.svg +++ b/bigtop-manager-ui/src/assets/images/svg/llm-config.svg @@ -21,24 +21,24 @@ viewBox="0 0 16 16" fill="none"> + stroke="currentColor" stroke-width="1.3333333333333333" stroke-linejoin="round" stroke-linecap="round"> - - - - - - \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/plus-dark.svg b/bigtop-manager-ui/src/assets/images/svg/plus-dark.svg deleted file mode 100644 index abadafc7d..000000000 --- a/bigtop-manager-ui/src/assets/images/svg/plus-dark.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/plus-gray.svg b/bigtop-manager-ui/src/assets/images/svg/plus-gray.svg deleted file mode 100644 index 29d96ac89..000000000 --- a/bigtop-manager-ui/src/assets/images/svg/plus-gray.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/plus.svg b/bigtop-manager-ui/src/assets/images/svg/plus.svg index 1b1561e40..5e610a0c6 100644 --- a/bigtop-manager-ui/src/assets/images/svg/plus.svg +++ b/bigtop-manager-ui/src/assets/images/svg/plus.svg @@ -19,10 +19,10 @@ --> - - \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/search-activated.svg b/bigtop-manager-ui/src/assets/images/svg/search-activated.svg deleted file mode 100644 index 4f830254a..000000000 --- a/bigtop-manager-ui/src/assets/images/svg/search-activated.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/bigtop-manager-ui/src/assets/images/svg/search.svg b/bigtop-manager-ui/src/assets/images/svg/search.svg index cbaaf37f2..108b910c1 100644 --- a/bigtop-manager-ui/src/assets/images/svg/search.svg +++ b/bigtop-manager-ui/src/assets/images/svg/search.svg @@ -19,19 +19,19 @@ --> - - - + + stroke="currentColor" stroke-width="1.3333333333333333"> - \ No newline at end of file diff --git a/bigtop-manager-ui/src/components/base/svg-icon/index.vue b/bigtop-manager-ui/src/components/base/svg-icon/index.vue index 2bc6ab1fe..faf232c47 100644 --- a/bigtop-manager-ui/src/components/base/svg-icon/index.vue +++ b/bigtop-manager-ui/src/components/base/svg-icon/index.vue @@ -22,46 +22,36 @@ avatar: IconSvgAvatar, 'bm-logo': IconSvgBmLogo, book: IconSvgBook, - 'bottom-activated': IconSvgBottomActivated, bottom: IconSvgBottom, canceled: IconSvgCanceled, 'chat-avatar': IconSvgChatAvatar, chatbot: IconSvgChatbot, close: IconSvgClose, - 'clusters-activated': IconSvgClustersActivated, clusters: IconSvgClusters, communication: IconSvgCommunication, - 'components-activated': IconSvgComponentsActivated, components: IconSvgComponents, copy: IconSvgCopy, download: IconSvgDownload, error: IconSvgError, 'exit-screen': IconSvgExitScreen, failed: IconSvgFailed, - 'filter-activated': IconSvgFilterActivated, filter: IconSvgFilter, 'full-screen': IconSvgFullScreen, github: IconSvgGithub, history: IconSvgHistory, - 'hosts-activated': IconSvgHostsActivated, hosts: IconSvgHosts, - 'infrastructures-activated': IconSvgInfrastructuresActivated, infrastructures: IconSvgInfrastructures, installing: IconSvgInstalling, language: IconSvgLanguage, - 'llm-config-activated': IconSvgLlmConfigActivated, 'llm-config': IconSvgLlmConfig, 'more-line': IconSvgMoreLine, more: IconSvgMore, - 'plus-dark': IconSvgPlusDark, - 'plus-gray': IconSvgPlusGray, plus: IconSvgPlus, processing: IconSvgProcessing, question: IconSvgQuestion, remove: IconSvgRemove, restart: IconSvgRestart, retry: IconSvgRetry, - 'search-activated': IconSvgSearchActivated, search: IconSvgSearch, send: IconSvgSend, start: IconSvgStart, @@ -70,12 +60,29 @@ unknown: IconSvgUnknown, 'carbon-language': IconSvgCarbonLanguage, warn: IconSvgWarn + } as const + + type SvgNameType = keyof typeof icons + + interface Props { + name: SvgNameType | undefined | string + color?: string + highlight?: boolean + highlightColor?: string } - const props = defineProps<{ name: string | undefined }>() - const isIcon = computed(() => props.name && icons[props.name]) + const props = withDefaults(defineProps(), { + name: 'bm-logo', + color: '#333', + highlight: false, + highlightColor: '#1677ff' + }) + + const svgComp = computed(() => props.name && icons[props.name]) + + diff --git a/bigtop-manager-ui/src/components/common/form-filter/index.vue b/bigtop-manager-ui/src/components/common/form-filter/index.vue index 59fa65bed..761d58086 100644 --- a/bigtop-manager-ui/src/components/common/form-filter/index.vue +++ b/bigtop-manager-ui/src/components/common/form-filter/index.vue @@ -86,7 +86,8 @@ {{ item.label }} diff --git a/bigtop-manager-ui/src/features/ai-assistant/index.vue b/bigtop-manager-ui/src/features/ai-assistant/index.vue index 7c1e414f0..6a9561fed 100644 --- a/bigtop-manager-ui/src/features/ai-assistant/index.vue +++ b/bigtop-manager-ui/src/features/ai-assistant/index.vue @@ -68,12 +68,12 @@ ? filterActions(['EXITSCREEN', 'CLOSE']) : filterActions(['ADD', 'RECORDS', 'FULLSCREEN', 'CLOSE']) }) - const addIcon = computed(() => (threads.value.length >= 10 ? 'plus-gray' : 'plus')) + const addLimit = computed(() => threads.value.length >= 10) const addState = computed(() => threads.value.length >= 10 || loadingChatRecords.value || !hasActivePlatform.value) const actionGroup = computed((): GroupItem[] => [ { tip: 'new_chat', - icon: addIcon.value, + icon: 'plus', action: 'ADD', clickEvent: () => aiChatStore.createChatThread(), disabled: addState.value @@ -172,7 +172,10 @@ diff --git a/bigtop-manager-ui/src/features/create-cluster/components/host-manage.vue b/bigtop-manager-ui/src/features/create-cluster/components/host-manage.vue index f7cf51f2c..5f0e47832 100644 --- a/bigtop-manager-ui/src/features/create-cluster/components/host-manage.vue +++ b/bigtop-manager-ui/src/features/create-cluster/components/host-manage.vue @@ -250,7 +250,7 @@