From 847f5c7c907db310e31be5c2ed2b79d2beeff2ad Mon Sep 17 00:00:00 2001 From: "meilin.huang" <954537473@qq.com> Date: Wed, 13 May 2026 20:01:05 +0800 Subject: [PATCH] feat: v1.11.0 --- Dockerfile.sourcebuild | 6 +- README.md | 2 +- README_EN.md | 2 +- build_release.sh | 451 +++++---- frontend/package.json | 42 +- frontend/src/i18n/en/machine.ts | 1 + frontend/src/i18n/zh-cn/machine.ts | 1 + frontend/src/views/ai/AiAssistant.vue | 33 +- frontend/src/views/ai/AiChat.vue | 958 ++---------------- frontend/src/views/ai/hooks/index.ts | 2 + .../src/views/ai/hooks/useAiChatMessages.ts | 744 ++++++++++++++ .../src/views/ai/hooks/useAiChatWebSocket.ts | 160 +++ .../views/login/component/AccountLogin.vue | 13 +- .../src/views/ops/component/ResourceTags.vue | 34 - .../src/views/ops/component/TagCodePath.vue | 135 ++- frontend/src/views/ops/component/TagInfo.vue | 62 -- .../src/views/ops/component/TagPathItem.vue | 45 + .../src/views/ops/component/TagTreeCheck.vue | 5 +- .../src/views/ops/component/TagTreeSelect.vue | 39 +- frontend/src/views/ops/db/DbList.vue | 24 +- frontend/src/views/ops/db/InstanceEdit.vue | 3 +- frontend/src/views/ops/db/InstanceList.vue | 32 +- .../src/views/ops/db/component/DbDetail.vue | 2 - .../views/ops/docker/ContainerConfList.vue | 26 +- .../src/views/ops/docker/CotainerConfEdit.vue | 3 +- .../ops/docker/container/ContainerList.vue | 4 +- frontend/src/views/ops/es/EsInstanceEdit.vue | 23 +- frontend/src/views/ops/es/EsInstanceList.vue | 28 +- .../src/views/ops/machine/MachineEdit.vue | 4 +- .../src/views/ops/machine/MachineList.vue | 48 +- .../ops/machine/component/MachineDetail.vue | 6 +- .../views/ops/machine/file/FileConfList.vue | 20 +- .../views/ops/machine/resource/MachineOp.vue | 173 ++-- frontend/src/views/ops/milvus/MilvusEdit.vue | 3 +- frontend/src/views/ops/milvus/MilvusList.vue | 24 +- frontend/src/views/ops/mongo/MongoEdit.vue | 3 +- frontend/src/views/ops/mongo/MongoList.vue | 22 +- frontend/src/views/ops/mq/kafka/KafkaEdit.vue | 15 +- frontend/src/views/ops/mq/kafka/KafkaList.vue | 20 +- frontend/src/views/ops/redis/RedisEdit.vue | 3 +- frontend/src/views/ops/redis/RedisList.vue | 30 +- .../src/views/ops/resource/ResourceOp.vue | 2 +- frontend/src/views/ops/tag/TagTreeList.vue | 7 +- frontend/src/views/ops/tag/api.ts | 1 + server/go.mod | 10 +- server/internal/ai/imsg/en.go | 2 +- server/internal/ai/imsg/zh_cn.go | 2 +- server/internal/ai/tools/dbtool/query_data.go | 64 +- .../ai/tools/machinetool/command_exec.go | 267 ++--- .../ai/tools/machinetool/command_exec_test.go | 229 ++--- server/internal/db/api/db_instance.go | 6 - server/internal/db/api/vo/instance.go | 1 - .../db/dbm/dbi/metasql/oracle_meta.sql | 42 +- server/internal/db/dbm/oracle/metadata.go | 11 +- server/internal/docker/api/container_conf.go | 5 - server/internal/docker/api/vo/container.go | 2 - server/internal/es/api/es_instance.go | 6 - server/internal/es/api/vo/instance.go | 1 - server/internal/machine/api/machine.go | 6 - server/internal/machine/api/vo/vo.go | 3 +- .../internal/machine/application/machine.go | 2 +- server/internal/milvus/api/milvus.go | 8 - server/internal/milvus/api/vo/milvus.go | 2 - server/internal/mongo/api/mongo.go | 7 - server/internal/mongo/api/vo/mongo.go | 2 - server/internal/mq/kafka/api/kafka.go | 7 - server/internal/mq/kafka/api/vo/kafka.go | 2 - server/internal/redis/api/redis.go | 7 - server/internal/redis/api/vo/redis.go | 2 - server/internal/tag/api/tag_tree.go | 8 + server/internal/tag/application/tag_tree.go | 52 +- server/internal/tag/imsg/en.go | 2 - server/internal/tag/imsg/imsg.go | 2 - server/internal/tag/imsg/zh_cn.go | 2 - server/readme.txt | 12 +- server/readme_en.txt | 12 +- server/resources/script/README.md | 205 ++++ server/resources/script/mayfly-go.sh | 186 ++++ server/resources/script/shutdown.sh | 13 - server/resources/script/startup.sh | 17 - 80 files changed, 2507 insertions(+), 1961 deletions(-) create mode 100644 frontend/src/views/ai/hooks/index.ts create mode 100644 frontend/src/views/ai/hooks/useAiChatMessages.ts create mode 100644 frontend/src/views/ai/hooks/useAiChatWebSocket.ts delete mode 100644 frontend/src/views/ops/component/ResourceTags.vue delete mode 100644 frontend/src/views/ops/component/TagInfo.vue create mode 100644 frontend/src/views/ops/component/TagPathItem.vue create mode 100644 server/resources/script/README.md create mode 100755 server/resources/script/mayfly-go.sh delete mode 100755 server/resources/script/shutdown.sh delete mode 100755 server/resources/script/startup.sh diff --git a/Dockerfile.sourcebuild b/Dockerfile.sourcebuild index 4468cd95..d7bce83c 100644 --- a/Dockerfile.sourcebuild +++ b/Dockerfile.sourcebuild @@ -5,9 +5,9 @@ WORKDIR /mayfly COPY frontend . -RUN yarn config set registry 'https://registry.npmmirror.com' && \ - yarn install && \ - yarn build +RUN npm config set registry 'https://registry.npmmirror.com' && \ + npm install && \ + npm run build # 构建后端资源 FROM m.daocloud.io/docker.io/golang:1.26 AS be-builder diff --git a/README.md b/README.md index 1c0a9731..d8162e25 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ ## 前言 -Web 版 **统一管理操作平台**,集成了对 Linux 系统的全面操作支持(包括终端管理[终端回放、命令过滤]、文件管理、脚本执行、进程监控及计划任务设置),同时提供了多种数据库(如 MySQL、PostgreSQL、Oracle、SQL Server、达梦、高斯、SQLite 等)的数据操作、数据同步与数据迁移功能。此外,还支持 Redis(单机、哨兵、集群模式)、 MongoDB 、Es 、Kafka的操作管理,并结合工单流程审批功能,为企业提供一站式的运维与管理解决方案。 +Web 版 **统一管理操作平台**,集成了对 Linux 系统的全面操作支持(包括终端管理[终端回放、命令过滤]、文件管理、脚本执行、进程监控及计划任务设置),同时提供了多种数据库(如 MySQL、PostgreSQL、Oracle、SQL Server、达梦、高斯、SQLite、ClickHouse 等)的数据操作、数据同步与数据迁移功能。此外,还支持 Redis(单机、哨兵、集群模式)、MongoDB、Elasticsearch、Kafka、Milvus 的操作管理,并结合工单流程审批功能,为企业提供一站式的运维与管理解决方案。 ## 开发语言与主要框架 diff --git a/README_EN.md b/README_EN.md index 8619f235..819a1d1a 100644 --- a/README_EN.md +++ b/README_EN.md @@ -28,7 +28,7 @@ ## Preface -Web-based **Unified Management and Operation Platform**, integrating comprehensive operation support for Linux systems (including terminal management [terminal playback, command filtering], file management, script execution, process monitoring, and cronjob settings). It also provides data operation, data synchronization, and data migration for multiple databases (such as MySQL, PostgreSQL, Oracle, SQL Server, Dameng, Gauss, SQLite, etc.). Additionally, it supports Redis operations (standalone, sentinel, and cluster modes) and MongoDB、Es、Kafka management, combined with work order process approval functionality to offer enterprises an all-in-one solution for operations and management. +Web-based **Unified Management and Operation Platform**, integrating comprehensive operation support for Linux systems (including terminal management [terminal playback, command filtering], file management, script execution, process monitoring, and cronjob settings). It also provides data operation, data synchronization, and data migration for multiple databases (such as MySQL, PostgreSQL, Oracle, SQL Server, Dameng, Gauss, SQLite, ClickHouse, etc.). Additionally, it supports Redis operations (standalone, sentinel, and cluster modes) and MongoDB, Elasticsearch, Kafka, Milvus management, combined with work order process approval functionality to offer enterprises an all-in-one solution for operations and management. ## Development languages and major frameworks diff --git a/build_release.sh b/build_release.sh index d2a233e4..632a7161 100755 --- a/build_release.sh +++ b/build_release.sh @@ -1,201 +1,312 @@ -#bin/bash +#!/bin/bash + +#============================================== +# Mayfly-Go Release Build Tool +# 前后端打包编译至指定目录,快速制作发行版 +#============================================== + +set -e # 遇到错误立即退出 #---------------------------------------------- -# 前后端打包编译至指定目录,即快速制作发行版 +# 全局配置 #---------------------------------------------- +PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SERVER_DIR="${PROJECT_ROOT}/server" +FRONTEND_DIR="${PROJECT_ROOT}/frontend" +BINARY_NAME="mayfly-go" -project_path=`pwd` -# 构建后的二进制执行文件名 -exec_file_name="mayfly-go" -# web项目目录 -web_folder="${project_path}/frontend" -# server目录 -server_folder="${project_path}/server" +# 构建目标配置:名称|操作系统|架构 +BUILD_TARGETS=( + "linux-amd64|linux|amd64" + "linux-arm64|linux|arm64" + "windows|windows|amd64" + "mac|darwin|amd64" +) -function echo_red() { - echo -e "\033[1;31m$1\033[0m" -} - -function echo_green() { - echo -e "\033[1;32m$1\033[0m" -} - -function echo_yellow() { +#---------------------------------------------- +# 工具函数 +#---------------------------------------------- +print_header() { echo -e "\033[1;33m$1\033[0m" } -function buildWeb() { - cd ${web_folder} - copy2Server=$1 - - echo_yellow "-------------------Start bundling frontends-------------------" - yarn run build - if [ "${copy2Server}" == "2" ] ; then - echo_green 'Copy the packaged static files to server/static/static' - rm -rf ${server_folder}/static/static && mkdir -p ${server_folder}/static/static && cp -r ${web_folder}/dist/* ${server_folder}/static/static - fi - echo_yellow ">>>>>>>>>>>>>>>>>>>End of packaging frontend<<<<<<<<<<<<<<<<<<<<\n" +print_success() { + echo -e "\033[1;32m$1\033[0m" } -function build() { - cd ${project_path} +print_error() { + echo -e "\033[1;31m$1\033[0m" >&2 +} - # 打包产物的输出目录 - toFolder=$1 - os=$2 - arch=$3 - copyDocScript=$4 +print_info() { + echo -e "\033[1;34m$1\033[0m" +} - echo_yellow "-------------------Start a bundle build - ${os}-${arch}-------------------" +to_lower() { + echo "$1" | tr '[:upper:]' '[:lower:]' +} - cd ${server_folder} - echo_green "Package build executables..." +#---------------------------------------------- +# 构建函数 +#---------------------------------------------- +build_frontend() { + print_header "\n>>> Building frontend..." + + cd "${FRONTEND_DIR}" + npm run build + + # 拷贝到 server 静态目录 + print_success ">>> Copying frontend assets to server/static/static" + rm -rf "${SERVER_DIR}/static/static" + mkdir -p "${SERVER_DIR}/static/static" + cp -r "${FRONTEND_DIR}/dist/"* "${SERVER_DIR}/static/static/" + + cd "${PROJECT_ROOT}" +} - execFileName=${exec_file_name} - # 如果是windows系统,可执行文件需要添加.exe结尾 - if [ "${os}" == "windows" ];then - execFileName="${execFileName}.exe" +build_backend() { + local output_dir="$1" + local os_name="$2" + local arch="$3" + local copy_resources="$4" + + local binary_file="${BINARY_NAME}" + local target_name="${os_name}-${arch}" + + print_header "\n>>> Building backend: ${target_name}" + + # Windows 需要 .exe 后缀 + if [ "${os_name}" = "windows" ]; then + binary_file="${BINARY_NAME}.exe" fi + + # 编译 + cd "${SERVER_DIR}" go mod tidy - CGO_ENABLE=0 GOOS=${os} GOARCH=${arch} go build -trimpath -ldflags=-w -o ${execFileName} main.go - - if [ -d ${toFolder} ] ; then - echo_green "The desired folder already exists. Clear the folder" - sudo rm -rf ${toFolder} + CGO_ENABLED=0 GOOS="${os_name}" GOARCH="${arch}" \ + go build -trimpath -ldflags="-w" -o "${binary_file}" main.go + + # 准备输出目录 + local bin_dir="${output_dir}/bin" + if [ -d "${output_dir}" ]; then + print_info " Output directory exists, cleaning..." + rm -rf "${output_dir}" fi - echo_green "Create '${toFolder}' Directory" - mkdir ${toFolder} - - echo_green "Move binary to '${toFolder}'" - mv ${server_folder}/${execFileName} ${toFolder} - - # if [ "${copy2Server}" == "1" ] ; then - # echo_green "拷贝前端静态页面至'${toFolder}/static'" - # mkdir -p ${toFolder}/static && cp -r ${web_folder}/dist/* ${toFolder}/static - # fi - - if [ "${copyDocScript}" == "1" ] ; then - echo_green "Copy resources such as scripts [config.yml.example、readme.txt、startup.sh、shutdown.sh]" - cp ${server_folder}/config.yml.example ${toFolder} - mv ${toFolder}/config.yml.example ${toFolder}/config.yml - cp ${server_folder}/readme.txt ${toFolder} - cp ${server_folder}/readme_en.txt ${toFolder} - cp ${server_folder}/resources/script/startup.sh ${toFolder} - cp ${server_folder}/resources/script/shutdown.sh ${toFolder} + mkdir -p "${bin_dir}" + + # 移动二进制文件到 bin 目录 + mv "${SERVER_DIR}/${binary_file}" "${bin_dir}/" + + # 拷贝资源文件 + if [ "${copy_resources}" = "1" ]; then + print_info " Copying config and scripts..." + cp "${SERVER_DIR}/config.yml.example" "${output_dir}/config.yml" + cp "${SERVER_DIR}/readme.txt" "${output_dir}/" + cp "${SERVER_DIR}/readme_en.txt" "${output_dir}/" + cp "${SERVER_DIR}/resources/script/mayfly-go.sh" "${output_dir}/" + chmod +x "${output_dir}/mayfly-go.sh" fi - - echo_yellow ">>>>>>>>>>>>>>>>>>> ${os}-${arch} - Bundle build complete <<<<<<<<<<<<<<<<<<<<\n" + + print_success ">>> Build complete: ${target_name}" + cd "${PROJECT_ROOT}" } -function buildLinuxAmd64() { - build "$1/mayfly-go-linux-amd64" "linux" "amd64" $2 -} - -function buildLinuxArm64() { - build "$1/mayfly-go-linux-arm64" "linux" "arm64" $2 -} - -function buildWindows() { - build "$1/mayfly-go-windows" "windows" "amd64" $2 -} - -function buildMac() { - build "$1/mayfly-go-mac" "darwin" "amd64" $2 -} - -function buildDocker() { - echo_yellow "-------------------Start building the docker image-------------------" - imageVersion=$1 - imageName="mayfly/mayfly-go:${imageVersion}" - docker build --no-cache --platform linux/amd64 --build-arg MAYFLY_GO_VERSION="${imageVersion}" -t "${imageName}" . - echo_green "The docker image is built -> [${imageName}]" - echo_yellow "-------------------Finished building the docker image-------------------" -} - -function buildxDocker() { - echo_yellow "-------------------The docker buildx build image starts-------------------" - imageVersion=$1 - imageName="ccr.ccs.tencentyun.com/mayfly/mayfly-go:${imageVersion}" - docker buildx build --no-cache --push --platform linux/amd64,linux/arm64 --build-arg MAYFLY_GO_VERSION="${imageVersion}" -t "${imageName}" . - echo_green "The docker multi-architecture version image is built -> [${imageName}]" - echo_yellow "-------------------The docker buildx image is finished-------------------" -} - -function runBuild() { - read -p "Select build version [0 | Other->Other than docker image 1->linux-amd64 2->linux-arm64 3->windows 4->mac 5->docker 6->docker buildx]: " buildType - - toPath="." - imageVersion="latest" - copyDocScript="1" - - if [[ "${buildType}" != "5" ]] && [[ "${buildType}" != "6" ]] ; then - # 构建结果的目的路径 - read -p "Please enter the build product output directory [default current path]: " toPath - if [ ! -d ${toPath} ] ; then - echo_red "Build product output directory does not exist!" - exit; - fi - if [ "${toPath}" == "" ] ; then - toPath="." - fi - - read -p "Whether to copy documents & Scripts [0-> No 1-> Yes][Default yes]: " copyDocScript - if [ "${copyDocScript}" == "" ] ; then - copyDocScript="1" - fi - - # 进入目标路径,并赋值全路径 - cd ${toPath} - toPath=`pwd` - - # read -p "是否构建前端[0|其他->否 1->是 2->构建并拷贝至server/static/static]: " runBuildWeb - runBuildWeb="2" - # 编译web前端 - buildWeb ${runBuildWeb} +build_docker() { + local version="$1" + local use_buildx="$2" + local image_name + local build_cmd + + if [ "${use_buildx}" = "1" ]; then + image_name="ccr.ccs.tencentyun.com/mayfly/mayfly-go:${version}" + build_cmd="docker buildx build --no-cache --push --platform linux/amd64,linux/arm64" + print_header "\n>>> Building Docker image (multi-arch): ${image_name}" + else + image_name="mayfly/mayfly-go:${version}" + build_cmd="docker build --no-cache --platform linux/amd64" + print_header "\n>>> Building Docker image: ${image_name}" fi + + ${build_cmd} --build-arg MAYFLY_GO_VERSION="${version}" -t "${image_name}" "${PROJECT_ROOT}" + print_success ">>> Docker image built: ${image_name}" +} - if [[ "${buildType}" == "5" ]] || [[ "${buildType}" == "6" ]] ; then - read -p "Please enter the docker image version (default latest) : " imageVersion +cleanup_frontend() { + print_info "\n>>> Cleaning up temporary frontend assets..." + rm -rf "${SERVER_DIR}/static/static/"{assets,config.js,index.html} + print_success ">>> Cleanup complete" +} - if [ "${imageVersion}" == "" ] ; then - imageVersion="latest" - fi +compress_package() { + local source_dir="$1" + local output_dir="$2" + local package_name + + package_name="$(basename "${source_dir}")" + + print_header "\n>>> Compressing package: ${package_name}" + + cd "${output_dir}" + + # 统一使用 zip 格式,跨平台兼容性最好 + zip -r "${package_name}.zip" "${package_name}"/ + rm -rf "${package_name}" + print_success ">>> Compressed: ${package_name}.zip" + + cd "${PROJECT_ROOT}" +} + +#---------------------------------------------- +# 主流程 +#---------------------------------------------- +main() { + # 显示菜单 + print_header "========================================" + print_header " Mayfly-Go Release Build Tool" + print_header "========================================" + echo "" + echo "Build Options:" + echo " [0] All Platforms (linux-amd64, linux-arm64, windows, mac)" + echo " [1] Linux AMD64" + echo " [2] Linux ARM64" + echo " [3] Windows" + echo " [4] macOS" + echo " [5] Docker Image" + echo " [6] Docker Multi-arch (buildx)" + echo "" + + read -p "Select build option [0-6] (default: 0): " build_type + build_type=${build_type:-0} + + # 验证输入 + if ! [[ "${build_type}" =~ ^[0-6]$ ]]; then + print_error "Error: Invalid option. Please enter a number between 0 and 6." + exit 1 fi - - case ${buildType} in - "1") - buildLinuxAmd64 ${toPath} ${copyDocScript} - ;; - "2") - buildLinuxArm64 ${toPath} ${copyDocScript} - ;; - "3") - buildWindows ${toPath} ${copyDocScript} - ;; - "4") - buildMac ${toPath} ${copyDocScript} - ;; + + # 初始化配置 + local output_dir="." + local docker_version="latest" + local copy_resources="1" + local compress_output="0" + local is_docker=0 + + # Docker 构建 + if [[ "${build_type}" == "5" || "${build_type}" == "6" ]]; then + is_docker=1 + echo "" + read -p "Enter Docker image version (default: latest): " docker_version + docker_version=${docker_version:-latest} + else + # 二进制构建 + echo "" + read -p "Enter output directory (default: current): " output_dir + output_dir=${output_dir:-.} + + # 验证并获取绝对路径 + if [ "${output_dir}" != "." ] && [ ! -d "${output_dir}" ]; then + print_error "Error: Directory '${output_dir}' does not exist." + exit 1 + fi + output_dir="$(cd "${output_dir}" && pwd)" + + echo "" + read -p "Copy config & scripts? [Y/n] (default: Y): " copy_input + if [ "$(to_lower "${copy_input}")" = "n" ]; then + copy_resources="0" + fi + + echo "" + read -p "Compress package? [y/N] (default: N): " compress_input + if [ "$(to_lower "${compress_input}")" = "y" ]; then + compress_output="1" + fi + + # 构建前端 + echo "" + build_frontend + fi + + # 显示配置摘要 + echo "" + print_header "Build Configuration:" + + # 获取构建类型名称 + local type_names=("All Platforms" "Linux AMD64" "Linux ARM64" "Windows" "macOS" "Docker Image" "Docker Multi-arch") + echo " Type: ${type_names[${build_type}]}" + + if [ "${is_docker}" = "1" ]; then + echo " Version: ${docker_version}" + else + echo " Output: ${output_dir}" + echo " Resources: $([ "${copy_resources}" = "1" ] && echo "Yes" || echo "No")" + echo " Compress: $([ "${compress_output}" = "1" ] && echo "Yes" || echo "No")" + fi + echo "" + + # 确认构建 + read -p "Continue? [Y/n] (default: Y): " confirm + if [ "$(to_lower "${confirm}")" = "n" ]; then + print_info "Build cancelled." + exit 0 + fi + + # 执行构建 + echo "" + print_header "Starting build..." + + case "${build_type}" in + "1"|"2"|"3"|"4") + # 单个平台构建 + local target="${BUILD_TARGETS[$((build_type-1))]}" + IFS='|' read -r name os arch <<< "${target}" + build_backend "${output_dir}/mayfly-go-${name}" "${os}" "${arch}" "${copy_resources}" + ;; "5") - buildDocker ${imageVersion} - ;; + build_docker "${docker_version}" "0" + ;; "6") - buildxDocker ${imageVersion} - ;; + build_docker "${docker_version}" "1" + ;; *) - buildLinuxAmd64 ${toPath} ${copyDocScript} - buildLinuxArm64 ${toPath} ${copyDocScript} - buildWindows ${toPath} ${copyDocScript} - buildMac ${toPath} ${copyDocScript} - ;; + # 构建所有平台 + print_info "Building all platforms..." + for target in "${BUILD_TARGETS[@]}"; do + IFS='|' read -r name os arch <<< "${target}" + build_backend "${output_dir}/mayfly-go-${name}" "${os}" "${arch}" "${copy_resources}" + done + ;; esac - - if [[ "${buildType}" != "5" ]] && [[ "${buildType}" != "6" ]] ; then - echo_green "Delete static assets under ['${server_folder}/static/static']." - # 删除静态资源文件,保留一个favicon.ico,否则后端启动会报错 - rm -rf ${server_folder}/static/static/assets - rm -rf ${server_folder}/static/static/config.js - rm -rf ${server_folder}/static/static/index.html + + # 清理临时文件 + if [ "${is_docker}" = "0" ]; then + cleanup_frontend fi + + # 压缩输出 + if [ "${compress_output}" = "1" ] && [ "${is_docker}" = "0" ]; then + case "${build_type}" in + "1"|"2"|"3"|"4") + local target="${BUILD_TARGETS[$((build_type-1))]}" + IFS='|' read -r name os arch <<< "${target}" + compress_package "${output_dir}/mayfly-go-${name}" "${output_dir}" + ;; + *) + print_info "Compressing all packages..." + for target in "${BUILD_TARGETS[@]}"; do + IFS='|' read -r name os arch <<< "${target}" + compress_package "${output_dir}/mayfly-go-${name}" "${output_dir}" + done + ;; + esac + fi + + # 完成 + echo "" + print_success "========================================" + print_success " Build Completed Successfully!" + print_success "========================================" } -runBuild +# 执行主函数 +main diff --git a/frontend/package.json b/frontend/package.json index bc088e8a..b440875a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -19,16 +19,16 @@ "@xterm/addon-web-links": "^0.12.0", "@xterm/xterm": "^6.0.0", "asciinema-player": "^3.15.1", - "axios": "^1.6.2", + "axios": "^1.16.0", "clipboard": "^2.0.11", "crypto-js": "^4.2.0", "dayjs": "^1.11.20", "echarts": "^6.0.0", - "element-plus": "^2.13.7", + "element-plus": "^2.14.0", "js-base64": "^3.7.8", "jsencrypt": "^3.5.4", - "mermaid": "^11.14.0", "json-bigint": "^1.0.0", + "mermaid": "^11.15.0", "monaco-editor": "^0.55.1", "monaco-sql-languages": "^1.0.0", "nprogress": "^0.2.0", @@ -40,10 +40,10 @@ "sortablejs": "^1.15.7", "sql-formatter": "^15.7.3", "trzsz": "^1.1.6", - "uuid": "^13.0.0", - "vue": "^v3.6.0-beta.8", - "vue-element-plus-x": "^2.0.1", - "vue-i18n": "^11.4.0", + "uuid": "^13.0.2", + "vue": "3.6.0-beta.11", + "vue-element-plus-x": "^2.0.2", + "vue-i18n": "^11.4.2", "vue-router": "^5.0.6", "vuedraggable": "^4.1.0", "x-markdown-vue": "0.0.200", @@ -51,26 +51,26 @@ }, "devDependencies": { "@eslint/js": "^10.0.1", - "@tailwindcss/vite": "^4.2.2", + "@tailwindcss/vite": "^4.3.0", "@types/crypto-js": "^4.2.2", - "@types/node": "^22.13.14", - "@types/nprogress": "^0.2.0", - "@types/sortablejs": "^1.15.8", - "@typescript-eslint/eslint-plugin": "^8.58.2", - "@typescript-eslint/parser": "^8.58.2", + "@types/node": "^22.19.18", + "@types/nprogress": "^0.2.3", + "@types/sortablejs": "^1.15.9", + "@typescript-eslint/eslint-plugin": "^8.59.2", + "@typescript-eslint/parser": "^8.59.2", "@vitejs/plugin-vue": "^6.0.6", - "@vue/compiler-sfc": "^3.5.32", - "autoprefixer": "^10.4.21", + "@vue/compiler-sfc": "^3.5.34", + "autoprefixer": "^10.5.0", "code-inspector-plugin": "^1.5.1", - "eslint": "^10.2.0", - "eslint-plugin-vue": "^10.8.0", - "postcss": "^8.5.8", + "eslint": "^10.3.0", + "eslint-plugin-vue": "^10.9.1", + "postcss": "^8.5.14", "prettier": "^3.8.3", "sass": "^1.99.0", - "tailwindcss": "^4.2.4", + "tailwindcss": "^4.3.0", "typescript": "^6.0.3", - "typescript-eslint": "^8.58.2", - "vite": "^8.0.11", + "typescript-eslint": "^8.59.2", + "vite": "^8.0.12", "vite-plugin-progress": "0.0.7", "vue-eslint-parser": "^10.4.0" }, diff --git a/frontend/src/i18n/en/machine.ts b/frontend/src/i18n/en/machine.ts index 8111c2a1..9248837c 100644 --- a/frontend/src/i18n/en/machine.ts +++ b/frontend/src/i18n/en/machine.ts @@ -23,6 +23,7 @@ export default { openTerminal: 'Open Terminal', newTabOpenTerminal: 'Open Terminal(New TAB)', fileManage: 'File Manage', + fileTabPrefix: 'File-', scriptManage: 'Script Manage', machineState: 'Machine State', remoteFileDesktopManage: 'Remote desktop file management', // Remote desktop file management diff --git a/frontend/src/i18n/zh-cn/machine.ts b/frontend/src/i18n/zh-cn/machine.ts index 1fe07ab7..85e50843 100644 --- a/frontend/src/i18n/zh-cn/machine.ts +++ b/frontend/src/i18n/zh-cn/machine.ts @@ -24,6 +24,7 @@ export default { openTerminal: '打开终端', newTabOpenTerminal: '打开终端(新窗口)', fileManage: '文件管理', + fileTabPrefix: '文件-', scriptManage: '脚本管理', machineState: '机器状态', remoteFileDesktopManage: '远程桌面文件管理', // Remote desktop file management diff --git a/frontend/src/views/ai/AiAssistant.vue b/frontend/src/views/ai/AiAssistant.vue index c3664dee..1b89af75 100644 --- a/frontend/src/views/ai/AiAssistant.vue +++ b/frontend/src/views/ai/AiAssistant.vue @@ -1,5 +1,5 @@