From 5c6799d386115115a8be1b80c1b1602c6f06c8f4 Mon Sep 17 00:00:00 2001 From: lidongjie Date: Mon, 14 Oct 2024 17:51:28 +0800 Subject: [PATCH 01/91] =?UTF-8?q?add:=E6=B7=BB=E5=8A=A0GroqCloud=E4=BE=9B?= =?UTF-8?q?=E5=BA=94=E5=95=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ai-provider/model-runtime/model-providers/groq/groq.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ai-provider/model-runtime/model-providers/groq/groq.yaml b/ai-provider/model-runtime/model-providers/groq/groq.yaml index 3c707267..b2ce06f8 100644 --- a/ai-provider/model-runtime/model-providers/groq/groq.yaml +++ b/ai-provider/model-runtime/model-providers/groq/groq.yaml @@ -30,4 +30,4 @@ provider_credential_schema: placeholder: zh_Hans: 在此输入您的 API Key en_US: Enter your API Key -address: https://api.openai.com \ No newline at end of file +address: https://api.groq.com \ No newline at end of file From 4348ad1c3ec762e6b0580ef0991f8e2f5fa430b7 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 15:07:02 +0800 Subject: [PATCH 02/91] API Market Service Interface add service_kind Field --- module/catalogue/dto/output.go | 1 + module/catalogue/iml.go | 1 + 2 files changed, 2 insertions(+) diff --git a/module/catalogue/dto/output.go b/module/catalogue/dto/output.go index 13e62524..5ff509df 100644 --- a/module/catalogue/dto/output.go +++ b/module/catalogue/dto/output.go @@ -39,6 +39,7 @@ type ServiceBasic struct { UpdateTime auto.TimeLabel `json:"update_time"` Logo string `json:"logo"` ApprovalType string `json:"approval_type"` + ServiceKind string `json:"service_kind"` InvokeAddress string `json:"invoke_address"` } diff --git a/module/catalogue/iml.go b/module/catalogue/iml.go index 77fa3067..b41a100f 100644 --- a/module/catalogue/iml.go +++ b/module/catalogue/iml.go @@ -299,6 +299,7 @@ func (i *imlCatalogueModule) ServiceDetail(ctx context.Context, sid string) (*ca UpdateTime: auto.TimeLabel(r.CreateAt), Logo: s.Logo, ApprovalType: s.ApprovalType.String(), + ServiceKind: s.Kind.String(), InvokeAddress: invokeAddress, }, APIDoc: apiDoc, From c2f9526c6b853cbebf70f36aed225bbe2fc02c53 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 15:48:01 +0800 Subject: [PATCH 03/91] Update ao-account dependency version --- go.mod | 2 +- go.sum | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index ecc2981b..03187bb3 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21 //toolchain go1.21.1 require ( - github.com/eolinker/ap-account v1.0.12 + github.com/eolinker/ap-account v1.0.13 github.com/eolinker/eosc v0.17.3 github.com/eolinker/go-common v1.1.0 github.com/gabriel-vasile/mimetype v1.4.4 diff --git a/go.sum b/go.sum index ad8b4e19..13e39a7e 100644 --- a/go.sum +++ b/go.sum @@ -27,7 +27,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eolinker/ap-account v1.0.11/go.mod h1:5lsZwkQfnHO5YJ3Cu6X1PZwZ0gbmJBUcix0hxG8aEsY= +github.com/eolinker/ap-account v1.0.13 h1:6iWdyxLAIkJfgw9JvkHEq0t2m8Levpg30kSx5pTK2wY= +github.com/eolinker/ap-account v1.0.13/go.mod h1:qLKg4xervGHTNBWaGckfPkQb+FZT0XfhwPEdNpzvsjE= github.com/eolinker/eosc v0.17.3 h1:sr2yT+v/AsqEdciRaaZZj0zL9pTufR5RvDW6+65hraQ= github.com/eolinker/eosc v0.17.3/go.mod h1:xgq816hpanlMXFtZw7Ztdctb1eEk9UPHchY4NfFO6Cw= github.com/eolinker/go-common v1.1.0 h1:n/XXK7yVRen3jhNG/SfZGXJA+KNnaYf0XTDfMeviaBw= From 533ec2b0f806601a3e97dfa0a3e2f61b9af58da6 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 15:51:15 +0800 Subject: [PATCH 04/91] Fix code errors caused by rebase --- gateway/apinto/entity/router.go | 2 +- module/publish/iml.go | 4 ++-- stores/universally/commit/wtype.go | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gateway/apinto/entity/router.go b/gateway/apinto/entity/router.go index 66fb1144..45406b28 100644 --- a/gateway/apinto/entity/router.go +++ b/gateway/apinto/entity/router.go @@ -171,7 +171,7 @@ func ToRouter(r *gateway.ApiRelease, version string, matches map[string]string) Matches: matches, }, Host: hosts, - Method: r.Method, + Method: r.Methods, Location: r.Path, Rules: rules, Service: fmt.Sprintf("%s@service", r.Service), diff --git a/module/publish/iml.go b/module/publish/iml.go index d4bc10dd..c1feb4bd 100644 --- a/module/publish/iml.go +++ b/module/publish/iml.go @@ -128,7 +128,7 @@ func (m *imlPublishModule) getProjectRelease(ctx context.Context, projectID stri Version: version, }, Path: a.Path, - Method: a.Methods, + Methods: a.Methods, Service: a.Service, } proxy, ok := proxyCommitMap[a.UUID] @@ -216,7 +216,7 @@ func (m *imlPublishModule) getReleaseInfo(ctx context.Context, projectID, releas Version: version, }, Path: a.Path, - Method: a.Methods, + Methods: a.Methods, Service: a.Upstream, } proxy, ok := proxyCommitMap[a.UUID] diff --git a/stores/universally/commit/wtype.go b/stores/universally/commit/wtype.go index 90c1c1c6..116ef1b8 100644 --- a/stores/universally/commit/wtype.go +++ b/stores/universally/commit/wtype.go @@ -25,7 +25,6 @@ func NewCommitWithKey[H any](name, key string) *StoreWidthType[H] { name: name, latestTableName: name + "_latest", commitTableName: name + "_commit", - name: name, }, key: key, } From adb15b2cae0df4c9253abf55b384c2340e428b48 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 16:16:46 +0800 Subject: [PATCH 05/91] test frontend dir change --- frontend/frontend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/frontend.go b/frontend/frontend.go index fb85f8ce..56541905 100644 --- a/frontend/frontend.go +++ b/frontend/frontend.go @@ -29,7 +29,7 @@ var ( indexHtml []byte ) var ( - expires = time.Hour * 24 * 7 + expires = time.Hour * 24 * 3 cacheControl = fmt.Sprintf("public, max-age=%d", 3600*24*7) ) From b5447a6a41c78b4c39ec3f91bf4854b35114e1d2 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 16:58:17 +0800 Subject: [PATCH 06/91] Gitlab automatically compiles and submits --- .gitlab-ci.yml | 88 ++++++++++++++++++++++++++++++++++++++++++++ frontend/frontend.go | 2 +- 2 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..36e7b488 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,88 @@ +variables: + PATH: /opt/go-1.21/go/bin/:/opt/node/node/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin + GOROOT: /opt/go-1.21/go + GOPROXY: https://goproxy.cn + VERSION: $CI_COMMIT_SHORT_SHA + APP: apipark + APP_PRE: ${APP}_${VERSION} + BUILD_DIR: ${APP}-build + DEPLOY_DESC: "DEV 环境" + VIEW_ADDR: http://172.18.166.219:8288 + SAVE_DIR: /opt/${APP} + NODE_OPTIONS: --max_old_space_size=8192 + +stages: + - notice + - prefix + - build + - publish + - webhook + +feishu-informer: # 飞书回调 + stage: notice + variables: + DIFF_URL: "$CI_MERGE_REQUEST_PROJECT_URL/-/merge_requests/$CI_MERGE_REQUEST_IID/diffs" + rules: + - if: $CI_PIPELINE_SOURCE=="merge_request_event" && $CI_COMMIT_BRANCH =~ "main" + script: + - echo "merge request" + - | + curl -X POST -H "Content-Type: application/json" \ + -d "{\"msg_type\":\"text\",\"content\":{\"text\":\"项目:${CI_PROJECT_NAME}\\n提交人:${GITLAB_USER_NAME}\\n提交信息:${CI_MERGE_REQUEST_TITLE}\\n合并分支信息:${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} -> ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}\\n差异性地址:${DIFF_URL}\\n请及时review代码\"}}" \ + https://open.feishu.cn/open-apis/bot/v2/hook/1c334752-2874-41a1-8f1b-3060f2d46b6c + +prebuild: + stage: prefix + rules: + - if: $CI_COMMIT_BRANCH =~ "main" + script: + - echo "prebuild" + - chmod +x ./scripts/prefix.sh + - ./scripts/prefix.sh + +builder: + stage: build + rules: + - if: $CI_COMMIT_BRANCH =~ "main" + script: + - go mod tidy + - mv ../artifacts/dist frontend/dist + - | + if [ -n "$(git diff --name-status HEAD~1 HEAD -- frontend)" ]; then + ./scripts/build.sh $BUILD_DIR ${VERSION} all "" + rm -rf ../artifacts/dist + cp -r frontend/dist ../artifacts/dist + else + ./scripts/build.sh $BUILD_DIR ${VERSION} + fi + cp $BUILD_DIR/${APP_PRE}_linux_amd64.tar.gz ${SAVE_DIR} + +deployer: + stage: deploy + variables: + APIPARK_GUEST_MODE: allow + APIPARK_GUEST_ID: dklejrfbhjqwdh + script: + - cp artifacts/${APP_PRE}_linux_amd64.tar.gz ${SAVE_DIR} + - cd ${SAVE_DIR};mkdir -p ${APP_PRE};tar -zxvf ${APP_PRE}_linux_amd64.tar.gz -C ${APP_PRE};cd ${APP_PRE};./install.sh ${SAVE_DIR};./run.sh restart;cd ${SAVE_DIR} && ./clean.sh ${APP_PRE} + when: on_success +success: + stage: webhook + rules: + - if: $CI_COMMIT_BRANCH =~ "main" + script: + - | + curl -X POST -H "Content-Type: application/json" \ + -d "{\"msg_type\":\"text\",\"content\":{\"text\":\"最近一次提交:${CI_COMMIT_TITLE}\\n提交人:${GITLAB_USER_NAME}\\n项目:${CI_PROJECT_NAME}\\n环境:${DEPLOY_DESC}\\n更新部署完成.\\n访问地址:${VIEW_ADDR}\\n工作流地址:${CI_PIPELINE_URL}\"}}" \ + https://open.feishu.cn/open-apis/bot/v2/hook/c3672932-4dfa-4989-8023-0128bae59338 + when: on_success +failure: + stage: webhook + rules: + - if: $CI_COMMIT_BRANCH =~ "main" + script: + - | + curl -X POST -H "Content-Type: application/json" \ + -d "{\"msg_type\":\"text\",\"content\":{\"text\":\"最近一次提交:${CI_COMMIT_TITLE}\\n提交人:${GITLAB_USER_NAME}\\n项目:${CI_PROJECT_NAME}\\n环境:${DEPLOY_DESC}\\n更新部署失败,请及时到gitlab上查看\\n工作流地址:${CI_PIPELINE_URL}\"}}" \ + https://open.feishu.cn/open-apis/bot/v2/hook/c3672932-4dfa-4989-8023-0128bae59338 + when: on_failure diff --git a/frontend/frontend.go b/frontend/frontend.go index 56541905..fb85f8ce 100644 --- a/frontend/frontend.go +++ b/frontend/frontend.go @@ -29,7 +29,7 @@ var ( indexHtml []byte ) var ( - expires = time.Hour * 24 * 3 + expires = time.Hour * 24 * 7 cacheControl = fmt.Sprintf("public, max-age=%d", 3600*24*7) ) From 7bc60c0574c9b5b0cb72373e88c0522209649aea Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 17:04:57 +0800 Subject: [PATCH 07/91] update stage --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 36e7b488..358bdbe4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,7 +15,7 @@ stages: - notice - prefix - build - - publish + - deploy - webhook feishu-informer: # 飞书回调 From aab47ec0c6672fe3e213b9c41db883827acafd6f Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 17:06:52 +0800 Subject: [PATCH 08/91] update run auto deploy condition --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 358bdbe4..9b2d0afe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,6 +59,8 @@ builder: deployer: stage: deploy + rules: + - if: $CI_COMMIT_BRANCH =~ "main" variables: APIPARK_GUEST_MODE: allow APIPARK_GUEST_ID: dklejrfbhjqwdh @@ -69,7 +71,7 @@ deployer: success: stage: webhook rules: - - if: $CI_COMMIT_BRANCH =~ "main" + - if: $CI_COMMIT_BRANCH =~ "main" script: - | curl -X POST -H "Content-Type: application/json" \ @@ -79,7 +81,7 @@ success: failure: stage: webhook rules: - - if: $CI_COMMIT_BRANCH =~ "main" + - if: $CI_COMMIT_BRANCH =~ "main" script: - | curl -X POST -H "Content-Type: application/json" \ From 601ff0571bc9b6d8337da27f30198ae1f0b89f0f Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Mon, 21 Oct 2024 17:45:31 +0800 Subject: [PATCH 09/91] fix: service type field changes --- frontend/packages/market/src/const/serviceHub/type.ts | 2 +- .../packages/market/src/pages/serviceHub/ServiceHubDetail.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/packages/market/src/const/serviceHub/type.ts b/frontend/packages/market/src/const/serviceHub/type.ts index 970c7fe8..a6b080f5 100644 --- a/frontend/packages/market/src/const/serviceHub/type.ts +++ b/frontend/packages/market/src/const/serviceHub/type.ts @@ -17,7 +17,7 @@ export type ServiceBasicInfoType = { logo?:string invokeAddress:string approvalType:'auto'|'manual' - serviceType:'ai'|'rest' + serviceKind:'ai'|'rest' } export type ServiceDetailType = { diff --git a/frontend/packages/market/src/pages/serviceHub/ServiceHubDetail.tsx b/frontend/packages/market/src/pages/serviceHub/ServiceHubDetail.tsx index 89a5c476..ec880466 100644 --- a/frontend/packages/market/src/pages/serviceHub/ServiceHubDetail.tsx +++ b/frontend/packages/market/src/pages/serviceHub/ServiceHubDetail.tsx @@ -35,7 +35,7 @@ const ServiceHubDetail = ()=>{ const navigate = useNavigate(); const getServiceBasicInfo = ()=>{ - fetchData>('catalogue/service',{method:'GET',eoParams:{service:serviceId}, eoTransformKeys:['app_num','api_num','update_time','api_doc','invoke_address','approval_type','service_type']}).then(response=>{ + fetchData>('catalogue/service',{method:'GET',eoParams:{service:serviceId}, eoTransformKeys:['app_num','api_num','update_time','api_doc','invoke_address','approval_type','service_kind']}).then(response=>{ const {code,data,msg} = response if(code === STATUS_CODE.SUCCESS){ setService(data.service) @@ -113,7 +113,7 @@ const ServiceHubDetail = ()=>{ { key: 'api-document', label: $t('API 文档'), - children:
, + children:
, icon: } ] From 3d86672b524ec27c6eccce4d418317736250bae4 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 17:46:26 +0800 Subject: [PATCH 10/91] =?UTF-8?q?=E6=96=B0=E5=BB=BAprefix.sh=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/prefix.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 scripts/prefix.sh diff --git a/scripts/prefix.sh b/scripts/prefix.sh new file mode 100755 index 00000000..800e9117 --- /dev/null +++ b/scripts/prefix.sh @@ -0,0 +1,32 @@ +#!/bin/sh +# =========================================================================== +# File: build.sh +# Description: usage: ./prefix.sh +# =========================================================================== +cd "$(dirname "$0")" +cd ../../ +BASEPATH="$(pwd)" + +set -e + + +# ========================================================================= +# 更新 aoaccount +# ========================================================================= +echo "更新 eosc" +cd "${BASEPATH}/" +if [ ! -d "./eosc" ]; then + git clone http://gitlab.eolink.com/goku/eosc.git +fi +cd "./eosc" && git pull + +# ========================================================================= +# 更新 aoaccount +# ========================================================================= +echo "更新 aoaccount" +cd "${BASEPATH}/" +if [ ! -d "./aoaccount" ]; then + git clone http://gitlab.eolink.com/apinto/aoaccount.git +fi +cd "./aoaccount" && git pull + From 76f418d3dfa5487b51dec84ee6e0035b49ca3136 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 17:56:50 +0800 Subject: [PATCH 11/91] fix builder exec script --- .gitlab-ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9b2d0afe..d6c9eab7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,11 +46,14 @@ builder: - if: $CI_COMMIT_BRANCH =~ "main" script: - go mod tidy - - mv ../artifacts/dist frontend/dist + - | + if [ -d "../artifacts/dist" ]; then + cp -r ../artifacts/dist frontend/dist + fi - | if [ -n "$(git diff --name-status HEAD~1 HEAD -- frontend)" ]; then ./scripts/build.sh $BUILD_DIR ${VERSION} all "" - rm -rf ../artifacts/dist + rm -fr ../artifacts/dist cp -r frontend/dist ../artifacts/dist else ./scripts/build.sh $BUILD_DIR ${VERSION} From ddd5db032ed22772bb7398408fbe670ae355012a Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 18:00:20 +0800 Subject: [PATCH 12/91] update deploy exec script --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d6c9eab7..2e0de137 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,7 +68,6 @@ deployer: APIPARK_GUEST_MODE: allow APIPARK_GUEST_ID: dklejrfbhjqwdh script: - - cp artifacts/${APP_PRE}_linux_amd64.tar.gz ${SAVE_DIR} - cd ${SAVE_DIR};mkdir -p ${APP_PRE};tar -zxvf ${APP_PRE}_linux_amd64.tar.gz -C ${APP_PRE};cd ${APP_PRE};./install.sh ${SAVE_DIR};./run.sh restart;cd ${SAVE_DIR} && ./clean.sh ${APP_PRE} when: on_success success: From 0d8f5c4eb52dd06efa7e09aaa00ae978e083930a Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 18:01:47 +0800 Subject: [PATCH 13/91] update gitlab runner exec rule --- .gitlab-ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2e0de137..4a29bba7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ feishu-informer: # 飞书回调 variables: DIFF_URL: "$CI_MERGE_REQUEST_PROJECT_URL/-/merge_requests/$CI_MERGE_REQUEST_IID/diffs" rules: - - if: $CI_PIPELINE_SOURCE=="merge_request_event" && $CI_COMMIT_BRANCH =~ "main" + - if: $CI_PIPELINE_SOURCE=="merge_request_event" && $CI_COMMIT_BRANCH == "main" script: - echo "merge request" - | @@ -34,7 +34,7 @@ feishu-informer: # 飞书回调 prebuild: stage: prefix rules: - - if: $CI_COMMIT_BRANCH =~ "main" + - if: $CI_COMMIT_BRANCH == "main" script: - echo "prebuild" - chmod +x ./scripts/prefix.sh @@ -43,7 +43,7 @@ prebuild: builder: stage: build rules: - - if: $CI_COMMIT_BRANCH =~ "main" + - if: $CI_COMMIT_BRANCH == "main" script: - go mod tidy - | @@ -63,7 +63,7 @@ builder: deployer: stage: deploy rules: - - if: $CI_COMMIT_BRANCH =~ "main" + - if: $CI_COMMIT_BRANCH == "main" variables: APIPARK_GUEST_MODE: allow APIPARK_GUEST_ID: dklejrfbhjqwdh @@ -73,7 +73,7 @@ deployer: success: stage: webhook rules: - - if: $CI_COMMIT_BRANCH =~ "main" + - if: $CI_COMMIT_BRANCH == "main" script: - | curl -X POST -H "Content-Type: application/json" \ @@ -83,7 +83,7 @@ success: failure: stage: webhook rules: - - if: $CI_COMMIT_BRANCH =~ "main" + - if: $CI_COMMIT_BRANCH == "main" script: - | curl -X POST -H "Content-Type: application/json" \ From 2fd3a78cf85d7089a25279de2681d3a51bb457ec Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Mon, 21 Oct 2024 18:07:10 +0800 Subject: [PATCH 14/91] frontend: delete comment --- .../packages/market/src/pages/serviceHub/ServiceHubDetail.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/packages/market/src/pages/serviceHub/ServiceHubDetail.tsx b/frontend/packages/market/src/pages/serviceHub/ServiceHubDetail.tsx index ec880466..d7747c32 100644 --- a/frontend/packages/market/src/pages/serviceHub/ServiceHubDetail.tsx +++ b/frontend/packages/market/src/pages/serviceHub/ServiceHubDetail.tsx @@ -42,9 +42,7 @@ const ServiceHubDetail = ()=>{ setServiceBasicInfo(data.service.basic) setServiceName(data.service.name) setServiceDesc(data.service.description) - // setApplied(data.service.applied) setServiceDoc(DOMPurify.sanitize(data.service.document)) - // setActiveKey(data.service.apis.map((x)=>x.id)) }else{ message.error(msg || $t(RESPONSE_TIPS.error)) } From f877363158f3249c23c36139a4e036d4e60a4f16 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 18:12:44 +0800 Subject: [PATCH 15/91] update feishu informer rule --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4a29bba7..e7007aba 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ feishu-informer: # 飞书回调 variables: DIFF_URL: "$CI_MERGE_REQUEST_PROJECT_URL/-/merge_requests/$CI_MERGE_REQUEST_IID/diffs" rules: - - if: $CI_PIPELINE_SOURCE=="merge_request_event" && $CI_COMMIT_BRANCH == "main" + - if: $CI_PIPELINE_SOURCE=="merge_request_event" && $CI_COMMIT_BRANCH ~= "main" script: - echo "merge request" - | From 064c3bc02fc4013b0232395124d9fc16857b6764 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 18:17:11 +0800 Subject: [PATCH 16/91] update feishu informer rule --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e7007aba..7edee971 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ feishu-informer: # 飞书回调 variables: DIFF_URL: "$CI_MERGE_REQUEST_PROJECT_URL/-/merge_requests/$CI_MERGE_REQUEST_IID/diffs" rules: - - if: $CI_PIPELINE_SOURCE=="merge_request_event" && $CI_COMMIT_BRANCH ~= "main" + - if: $CI_PIPELINE_SOURCE=="merge_request_event" && $CI_COMMIT_BRANCH ~= "main" script: - echo "merge request" - | From f507fbc1115124fd55745567130a7fc12ff4988c Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 18:19:30 +0800 Subject: [PATCH 17/91] update feishu informer rule --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7edee971..689d28d1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,7 +23,7 @@ feishu-informer: # 飞书回调 variables: DIFF_URL: "$CI_MERGE_REQUEST_PROJECT_URL/-/merge_requests/$CI_MERGE_REQUEST_IID/diffs" rules: - - if: $CI_PIPELINE_SOURCE=="merge_request_event" && $CI_COMMIT_BRANCH ~= "main" + - if: $CI_PIPELINE_SOURCE=="merge_request_event" && $CI_COMMIT_BRANCH =~ "main" script: - echo "merge request" - | From d026f13a0631a5b99e757441fb912fa14b740299 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 18:28:26 +0800 Subject: [PATCH 18/91] update builder script --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 689d28d1..a20f1f8a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,6 +47,9 @@ builder: script: - go mod tidy - | + if [ -d "../artifacts" ]; then + mkdir -p ../artifacts + fi if [ -d "../artifacts/dist" ]; then cp -r ../artifacts/dist frontend/dist fi From 4ead565142afdc69131cd11a27835f62c8d30c49 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 18:36:19 +0800 Subject: [PATCH 19/91] update builder script --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a20f1f8a..c5830077 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,9 +45,9 @@ builder: rules: - if: $CI_COMMIT_BRANCH == "main" script: - - go mod tidy + - set -e - | - if [ -d "../artifacts" ]; then + if [ ! -d "../artifacts" ]; then mkdir -p ../artifacts fi if [ -d "../artifacts/dist" ]; then From a4bae6d826659e6379c152cf4c94f8ddd7ceec6f Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 18:43:06 +0800 Subject: [PATCH 20/91] print frontend dir --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c5830077..b65ab85a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -56,8 +56,11 @@ builder: - | if [ -n "$(git diff --name-status HEAD~1 HEAD -- frontend)" ]; then ./scripts/build.sh $BUILD_DIR ${VERSION} all "" + echo "" + ll -a frontend rm -fr ../artifacts/dist cp -r frontend/dist ../artifacts/dist + ll -a ../artifacts else ./scripts/build.sh $BUILD_DIR ${VERSION} fi From e9bfcef1654ea7edb803fae6a7d9be23cb1cebc0 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 18:47:54 +0800 Subject: [PATCH 21/91] print frontend dir --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b65ab85a..f0a9f42c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -56,10 +56,11 @@ builder: - | if [ -n "$(git diff --name-status HEAD~1 HEAD -- frontend)" ]; then ./scripts/build.sh $BUILD_DIR ${VERSION} all "" - echo "" + echo "print frontend dir file:" ll -a frontend rm -fr ../artifacts/dist cp -r frontend/dist ../artifacts/dist + echo "print artifacts dir file:" ll -a ../artifacts else ./scripts/build.sh $BUILD_DIR ${VERSION} From 58a870449c61ed962c3afb4db0a326ccbe88521c Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 18:53:28 +0800 Subject: [PATCH 22/91] copy frontend/dist to artifacts/dist --- .gitlab-ci.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f0a9f42c..df0d9946 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -56,15 +56,14 @@ builder: - | if [ -n "$(git diff --name-status HEAD~1 HEAD -- frontend)" ]; then ./scripts/build.sh $BUILD_DIR ${VERSION} all "" - echo "print frontend dir file:" - ll -a frontend - rm -fr ../artifacts/dist - cp -r frontend/dist ../artifacts/dist - echo "print artifacts dir file:" - ll -a ../artifacts else ./scripts/build.sh $BUILD_DIR ${VERSION} fi + if [ -d "frontend/dist" ]; then + echo "copy frontend/dist to artifacts/dist" + rm -fr ../artifacts/dist + cp -r frontend/dist ../artifacts/dist + fi cp $BUILD_DIR/${APP_PRE}_linux_amd64.tar.gz ${SAVE_DIR} deployer: From cfa1f2e9e65f5f2baa47c7db3e437d8f58bd3d47 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 21 Oct 2024 18:59:24 +0800 Subject: [PATCH 23/91] test frontend change --- frontend/frontend.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/frontend.go b/frontend/frontend.go index fb85f8ce..56541905 100644 --- a/frontend/frontend.go +++ b/frontend/frontend.go @@ -29,7 +29,7 @@ var ( indexHtml []byte ) var ( - expires = time.Hour * 24 * 7 + expires = time.Hour * 24 * 3 cacheControl = fmt.Sprintf("public, max-age=%d", 3600*24*7) ) From 0ea7467a4ea2396ca358b7dacac99a2f278368fe Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Tue, 22 Oct 2024 10:28:14 +0800 Subject: [PATCH 24/91] fix: Modify peer address to use array format --- frontend/packages/core/src/const/partitions/types.ts | 2 +- .../core/src/pages/partitions/PartitionInsideCluster.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/packages/core/src/const/partitions/types.ts b/frontend/packages/core/src/const/partitions/types.ts index fb721e33..2e7cc222 100644 --- a/frontend/packages/core/src/const/partitions/types.ts +++ b/frontend/packages/core/src/const/partitions/types.ts @@ -67,7 +67,7 @@ export type PartitionClusterNodeTableListItem = { name: string; managerAddress:string[]; serviceAddress:string[]; - peerAddress:string; + peerAddress:string[]; status:0|1; }; diff --git a/frontend/packages/core/src/pages/partitions/PartitionInsideCluster.tsx b/frontend/packages/core/src/pages/partitions/PartitionInsideCluster.tsx index 00280bd4..8fc68d8c 100644 --- a/frontend/packages/core/src/pages/partitions/PartitionInsideCluster.tsx +++ b/frontend/packages/core/src/pages/partitions/PartitionInsideCluster.tsx @@ -103,8 +103,8 @@ export function ClusterConfigPreview (x:PartitionClusterNodeTableListItem){

{m}

))} {$t('服务地址')}:{x.serviceAddress.map(m=>(

{m}

))}
- {$t('同步地址')}: -

{x.peerAddress}

+ {$t('同步地址')}:{x.peerAddress.map(m=>( +

{m}

))}
} export default PartitionInsideCluster \ No newline at end of file From bdea9ad4f287fe14c372e2eb20d835387ca2f390 Mon Sep 17 00:00:00 2001 From: HaoZhen Liu Date: Tue, 22 Oct 2024 12:31:51 +0800 Subject: [PATCH 25/91] update translation --- .../common/src/locales/scan/en-US.json | 12 ++-- .../common/src/locales/scan/ja-JP.json | 2 +- .../src/locales/scan/newJson/en-US.json | 5 -- .../src/locales/scan/newJson/ja-JP.json | 72 ------------------- .../src/locales/scan/newJson/zh-CN.json | 72 ------------------- .../src/locales/scan/newJson/zh-TW.json | 72 ------------------- .../src/locales/scan/oldJson/en-US.json | 3 - .../src/locales/scan/oldJson/ja-JP.json | 3 - .../src/locales/scan/oldJson/zh-CN.json | 3 - .../src/locales/scan/oldJson/zh-TW.json | 3 - .../common/src/locales/scan/zh-CN.json | 2 +- .../common/src/locales/scan/zh-TW.json | 2 +- 12 files changed, 9 insertions(+), 242 deletions(-) delete mode 100644 frontend/packages/common/src/locales/scan/newJson/en-US.json delete mode 100644 frontend/packages/common/src/locales/scan/newJson/ja-JP.json delete mode 100644 frontend/packages/common/src/locales/scan/newJson/zh-CN.json delete mode 100644 frontend/packages/common/src/locales/scan/newJson/zh-TW.json delete mode 100644 frontend/packages/common/src/locales/scan/oldJson/en-US.json delete mode 100644 frontend/packages/common/src/locales/scan/oldJson/ja-JP.json delete mode 100644 frontend/packages/common/src/locales/scan/oldJson/zh-CN.json delete mode 100644 frontend/packages/common/src/locales/scan/oldJson/zh-TW.json diff --git a/frontend/packages/common/src/locales/scan/en-US.json b/frontend/packages/common/src/locales/scan/en-US.json index 597a3792..0df052f5 100644 --- a/frontend/packages/common/src/locales/scan/en-US.json +++ b/frontend/packages/common/src/locales/scan/en-US.json @@ -5,7 +5,7 @@ "Kb58e0c3f": "Service", "Kc9e489f5": "Team", "K61c89f5f": "API Marketplace", - "K16d71239": "Dashboard", + "K16d71239": "Analysis", "K714c192d": "Call Statistics", "Kd57dfe97": "Topology", "K3fe97dcc": "System Settings", @@ -24,7 +24,7 @@ "K631d646f": "Open API", "K6535ff9c": "Account Settings", "Kf15499b4": "Log Out", - "Kabbd6e6": "Documentation", + "Kabbd6e6": "Docs", "K1196b104": "APIPark", "K1f42de3": "HTTP Status Code", "K4770dff4": "System Status Code", @@ -59,7 +59,7 @@ "Kdeed8399": "Static Upstream Server", "K4ee62e8": "This API lacks (0)(1)(2), please provide.", "K385591f3": "Forwarding Info,", - "K68415c14": "Documentation Info,", + "K68415c14": "Docs Info,", "K133b75e9": "Upstream Info,", "K43fcaf94": "Success", "Kc71c6a9": "Online Failed", @@ -88,8 +88,8 @@ "K597435c5": "Monitor", "Ke66a17dd": "Required", "K28b68036": "Illegal Character, Only English Supported", - "K6206e4ad": "Upload OpenAPI Document (.json/.yaml)", - "Kfba46e6d": "Replace OpenAPI Document (.json/.yaml)", + "K6206e4ad": "Upload OpenAPI File (.json/.yaml)", + "Kfba46e6d": "Replace OpenAPI File (.json/.yaml)", "Kdac8ce7e": "Open OpenAPI YAML Editor", "Kffd7e274": "No Review: All applications are allowed to subscribe to this service", "K8a8b13e4": "Manual Review: Only reviewed and approved applications can subscribe to this service", @@ -190,7 +190,7 @@ "K6ebca204": "Update Time", "Kabfe9512": "Save", "K51d1eb5d": "API", - "Ka2b6d281": "API Documentation", + "Ka2b6d281": "API Docs", "Kdefa9caa": "Usage Instructions", "K36856e71": "Publish", "K6382bbfd": "Subscription", diff --git a/frontend/packages/common/src/locales/scan/ja-JP.json b/frontend/packages/common/src/locales/scan/ja-JP.json index c0cb897f..52b8a03c 100644 --- a/frontend/packages/common/src/locales/scan/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/ja-JP.json @@ -5,7 +5,7 @@ "Kb58e0c3f": "Service", "Kc9e489f5": "Team", "K61c89f5f": "API マーケット", - "K16d71239": "ダッシュボード", + "K16d71239": "解析", "K714c192d": "呼び出し統計", "Kd57dfe97": "トポロジー図", "K3fe97dcc": "システム設定", diff --git a/frontend/packages/common/src/locales/scan/newJson/en-US.json b/frontend/packages/common/src/locales/scan/newJson/en-US.json deleted file mode 100644 index 8dc51f34..00000000 --- a/frontend/packages/common/src/locales/scan/newJson/en-US.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Kac172626": "拒绝申请时,请填写拒绝理由", - "Ke1b1865": "私有", - "K4786c57c": "公共" -} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json deleted file mode 100644 index 1dd5aafd..00000000 --- a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "Kefaf9956": "创建时间", - "Kad1c674c": "协议", - "Kad01bc3e": "方法", - "Ka29b346f": "地址(IP 端口或域名)", - "K63b1e0dc": "权重(0-999)", - "Ka7f8266f": "带权轮询", - "K9d7e880a": "发布版本", - "Kea996156": "发布申请记录", - "K855135f": "创建版本时间", - "Kcbf39b82": "版本状态", - "K339d15b5": "创建人", - "K7194cea2": "审核时间", - "K831aa6c0": "申请方-应用", - "K7ad449bc": "审核状态", - "K3b3a98ce": "审核人", - "K61b62ace": "来源", - "K442937c4": "订阅时间", - "K442cfba1": "请输入", - "K3bb646e4": "请选择", - "Ka9481f95": "创建者", - "K2472615e": "服务数量", - "Kf7200cd9": "负责人", - "Kd7d84192": "姓名", - "Kc88e03b6": "团队角色", - "Ke08ff808": "添加日期", - "K19a3ebe0": "请求成功数", - "Kcaa8259": "转发成功数", - "K17f93984": "API 名称", - "K888f038f": "失败状态码数", - "Ke792d01c": "所属服务", - "K42d2bef2": "平均响应时间(ms)", - "K9197c994": "最大响应时间(ms)", - "K7c2f3fee": "最小响应时间(ms)", - "K3d85ea54": "平均请求流量(KB)", - "Keec09d32": "最大请求流量(KB)", - "K3786b48": "最小请求流量(KB)", - "Kdf35c48c": "所有成员", - "K759fb403": "状态", - "K5c123bad": "角色名称", - "K2c5882be": "绑定域名", - "K1cc07937": "过期日期", - "K39686a7f": "支持字母开头、英文数字中横线下划线组合", - "Ka4ecfa40": "英文数字下划线任意一种,首字母必须为英文", - "K37318b68": "无法连接集群,请检查集群地址是否正确或防火墙配置", - "Kac172626": "选择拒绝时,审核意见为必填", - "K7f0c746d": "操作成功", - "K6a365d01": "操作失败", - "K978062b6": "正在操作", - "Kca7bd6d4": "正在加载数据", - "K3c93b77e": "获取数据失败", - "Ke108c369": "登录成功", - "K9168d3e": "退出成功,将跳转至登录页", - "K2f8a7ab7": "未填写审核意见", - "Kb858d78a": "复制成功", - "K26e85d15": "复制失败,请手动复制", - "Kd60d204": "服务所属团队", - "K823bfe63": "在线", - "Kc9315fa1": "已拒绝", - "K3fbe7511": "发布异常", - "Ke64e695c": "发布中", - "K1f89176d": "申请方所属团队", - "K69827c60": "发布状态", - "K8f7abcab": " 次", - "K28cf9613": "每分钟", - "K18f25019": "每5分钟", - "Kf00f01ca": "每小时", - "Kfcda87fc": "每天", - "K29ec75dc": "每周", - "Ke1b1865": "私有网络", - "K4786c57c": "公共网络" -} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json deleted file mode 100644 index ea843a14..00000000 --- a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "Kefaf9956": "创建时间", - "Kad1c674c": "协议", - "Kad01bc3e": "方法", - "Ka29b346f": "地址(IP 端口或域名)", - "K63b1e0dc": "权重(0-999)", - "Ka7f8266f": "带权轮询", - "K9d7e880a": "发布版本", - "Kea996156": "发布申请记录", - "K855135f": "创建版本时间", - "Kcbf39b82": "版本状态", - "K339d15b5": "创建人", - "K7194cea2": "审核时间", - "K831aa6c0": "申请方-应用", - "K7ad449bc": "审核状态", - "K3b3a98ce": "审核人", - "K61b62ace": "来源", - "K442937c4": "订阅时间", - "K442cfba1": "请输入", - "K3bb646e4": "请选择", - "Ka9481f95": "创建者", - "K2472615e": "服务数量", - "Kf7200cd9": "负责人", - "Kd7d84192": "姓名", - "Kc88e03b6": "团队角色", - "Ke08ff808": "添加日期", - "K19a3ebe0": "请求成功", - "Kcaa8259": "转发成功", - "K17f93984": "API 名称", - "K888f038f": "失败状态码", - "Ke792d01c": "所属服务", - "K42d2bef2": "平均响应时间(ms)", - "K9197c994": "最大响应时间(ms)", - "K7c2f3fee": "最小响应时间(ms)", - "K3d85ea54": "平均请求流量(KB)", - "Keec09d32": "最大请求流量(KB)", - "K3786b48": "最小请求流量(KB)", - "Kdf35c48c": "所有成员", - "K759fb403": "状态", - "K5c123bad": "角色名称", - "K2c5882be": "绑定域名", - "K1cc07937": "过期日期", - "K39686a7f": "支持字母开头、英文数字中横线下划线组合", - "Ka4ecfa40": "英文数字下划线任意一种,首字母必须为英文", - "K37318b68": "无法连接集群,请检查集群地址是否正确或防火墙配置", - "Kac172626": "拒绝申请时,请填写拒绝理由", - "K7f0c746d": "成功", - "K6a365d01": "失败", - "K978062b6": "正在操作", - "Kca7bd6d4": "正在加载数据", - "K3c93b77e": "获取数据失败", - "Ke108c369": "登录成功", - "K9168d3e": "退出成功,将跳转至登录页", - "K2f8a7ab7": "未填写审核意见", - "Kb858d78a": "复制成功", - "K26e85d15": "复制失败,请手动复制", - "Kd60d204": "服务所属团队", - "K823bfe63": "在线", - "Kc9315fa1": "已拒绝", - "K3fbe7511": "发布异常", - "Ke64e695c": "发布中", - "K1f89176d": "申请方所属团队", - "K69827c60": "发布状态", - "K8f7abcab": "次", - "K28cf9613": "每分钟", - "K18f25019": "每5分钟", - "Kf00f01ca": "每小时", - "Kfcda87fc": "每天", - "K29ec75dc": "每周", - "Ke1b1865": "私有", - "K4786c57c": "公共" -} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json deleted file mode 100644 index 1dd5aafd..00000000 --- a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "Kefaf9956": "创建时间", - "Kad1c674c": "协议", - "Kad01bc3e": "方法", - "Ka29b346f": "地址(IP 端口或域名)", - "K63b1e0dc": "权重(0-999)", - "Ka7f8266f": "带权轮询", - "K9d7e880a": "发布版本", - "Kea996156": "发布申请记录", - "K855135f": "创建版本时间", - "Kcbf39b82": "版本状态", - "K339d15b5": "创建人", - "K7194cea2": "审核时间", - "K831aa6c0": "申请方-应用", - "K7ad449bc": "审核状态", - "K3b3a98ce": "审核人", - "K61b62ace": "来源", - "K442937c4": "订阅时间", - "K442cfba1": "请输入", - "K3bb646e4": "请选择", - "Ka9481f95": "创建者", - "K2472615e": "服务数量", - "Kf7200cd9": "负责人", - "Kd7d84192": "姓名", - "Kc88e03b6": "团队角色", - "Ke08ff808": "添加日期", - "K19a3ebe0": "请求成功数", - "Kcaa8259": "转发成功数", - "K17f93984": "API 名称", - "K888f038f": "失败状态码数", - "Ke792d01c": "所属服务", - "K42d2bef2": "平均响应时间(ms)", - "K9197c994": "最大响应时间(ms)", - "K7c2f3fee": "最小响应时间(ms)", - "K3d85ea54": "平均请求流量(KB)", - "Keec09d32": "最大请求流量(KB)", - "K3786b48": "最小请求流量(KB)", - "Kdf35c48c": "所有成员", - "K759fb403": "状态", - "K5c123bad": "角色名称", - "K2c5882be": "绑定域名", - "K1cc07937": "过期日期", - "K39686a7f": "支持字母开头、英文数字中横线下划线组合", - "Ka4ecfa40": "英文数字下划线任意一种,首字母必须为英文", - "K37318b68": "无法连接集群,请检查集群地址是否正确或防火墙配置", - "Kac172626": "选择拒绝时,审核意见为必填", - "K7f0c746d": "操作成功", - "K6a365d01": "操作失败", - "K978062b6": "正在操作", - "Kca7bd6d4": "正在加载数据", - "K3c93b77e": "获取数据失败", - "Ke108c369": "登录成功", - "K9168d3e": "退出成功,将跳转至登录页", - "K2f8a7ab7": "未填写审核意见", - "Kb858d78a": "复制成功", - "K26e85d15": "复制失败,请手动复制", - "Kd60d204": "服务所属团队", - "K823bfe63": "在线", - "Kc9315fa1": "已拒绝", - "K3fbe7511": "发布异常", - "Ke64e695c": "发布中", - "K1f89176d": "申请方所属团队", - "K69827c60": "发布状态", - "K8f7abcab": " 次", - "K28cf9613": "每分钟", - "K18f25019": "每5分钟", - "Kf00f01ca": "每小时", - "Kfcda87fc": "每天", - "K29ec75dc": "每周", - "Ke1b1865": "私有网络", - "K4786c57c": "公共网络" -} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/oldJson/en-US.json b/frontend/packages/common/src/locales/scan/oldJson/en-US.json deleted file mode 100644 index 3ec14af5..00000000 --- a/frontend/packages/common/src/locales/scan/oldJson/en-US.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Kd55c6887": "Review" -} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/oldJson/ja-JP.json b/frontend/packages/common/src/locales/scan/oldJson/ja-JP.json deleted file mode 100644 index c8660395..00000000 --- a/frontend/packages/common/src/locales/scan/oldJson/ja-JP.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Kd55c6887": "レビュー" -} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/oldJson/zh-CN.json b/frontend/packages/common/src/locales/scan/oldJson/zh-CN.json deleted file mode 100644 index 32e7815f..00000000 --- a/frontend/packages/common/src/locales/scan/oldJson/zh-CN.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Kd55c6887": "审核" -} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/oldJson/zh-TW.json b/frontend/packages/common/src/locales/scan/oldJson/zh-TW.json deleted file mode 100644 index 95a68019..00000000 --- a/frontend/packages/common/src/locales/scan/oldJson/zh-TW.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Kd55c6887": "審核" -} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/zh-CN.json b/frontend/packages/common/src/locales/scan/zh-CN.json index 85b8c200..41ee376a 100644 --- a/frontend/packages/common/src/locales/scan/zh-CN.json +++ b/frontend/packages/common/src/locales/scan/zh-CN.json @@ -5,7 +5,7 @@ "Kb58e0c3f": "服务", "Kc9e489f5": "团队", "K61c89f5f": "API 市场", - "K16d71239": "仪表盘", + "K16d71239": "分析报告", "K714c192d": "调用统计", "Kd57dfe97": "拓扑图", "K3fe97dcc": "系统设置", diff --git a/frontend/packages/common/src/locales/scan/zh-TW.json b/frontend/packages/common/src/locales/scan/zh-TW.json index 73f32c9b..0cf359f4 100644 --- a/frontend/packages/common/src/locales/scan/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/zh-TW.json @@ -5,7 +5,7 @@ "Kb58e0c3f": "服務", "Kc9e489f5": "團隊", "K61c89f5f": "API 市場", - "K16d71239": "儀表板", + "K16d71239": "分析報告", "K714c192d": "調用統計", "Kd57dfe97": "拓撲圖", "K3fe97dcc": "系統設置", From 1b9980c980dfb24c04b3d72b4987768a4a3a4def Mon Sep 17 00:00:00 2001 From: JackLiu Date: Tue, 22 Oct 2024 14:13:35 +0800 Subject: [PATCH 26/91] Update feature_request.yml --- .github/ISSUE_TEMPLATE/feature_request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index d08cecf9..f77ece13 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,5 +1,5 @@ name: "Feature Request" -description: Suggest an enhancement to APINTO. +description: Suggest an enhancement to APIPark. title: "feat: As a user, I want to ..., so that ..." body: - type: markdown @@ -20,4 +20,4 @@ body: placeholder: | As a user, I want to ..., so that... validations: - required: true \ No newline at end of file + required: true From ae0c77ea0e4002e162180cd1e33df59d7a4dca82 Mon Sep 17 00:00:00 2001 From: JackLiu Date: Tue, 22 Oct 2024 15:40:14 +0800 Subject: [PATCH 27/91] Update README.md --- README.md | 108 +++++++++++++++++++++++++----------------------------- 1 file changed, 49 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index 575832f0..03e4b799 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![image]( https://github.com/user-attachments/assets/96e36db5-2733-49c8-8e1e-ecbcc60a3943 ) +![image](https://apipark.com/wp-content/uploads/2024/10/AI-Gateway-After.png)

English @@ -61,104 +61,94 @@ curl -sSO https://download.apipark.com/install/quick-start.sh ; bash quick-sta + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + From 002db4bbf677902e64c169d30dec76e877d4eebc Mon Sep 17 00:00:00 2001 From: JackLiu Date: Tue, 22 Oct 2024 15:45:20 +0800 Subject: [PATCH 28/91] Update readme-zh-cn.md --- readme/readme-zh-cn.md | 108 +++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 59 deletions(-) diff --git a/readme/readme-zh-cn.md b/readme/readme-zh-cn.md index db1070dd..42b2f876 100644 --- a/readme/readme-zh-cn.md +++ b/readme/readme-zh-cn.md @@ -1,4 +1,4 @@ -![image](https://github.com/user-attachments/assets/96e36db5-2733-49c8-8e1e-ecbcc60a3943) +![image](https://apipark.com/wp-content/uploads/2024/10/AI-Gateway-After.png)

English @@ -62,104 +62,94 @@ curl -sSO https://download.apipark.com/install/quick-start.sh; bash quick-start.

- Connect to 100+ major models from all mainstream AI Companies + Connect to 100+ AI models - Standardize all AI API call formats, with no additional adaptation work required + Unified API to use all AI
- - The API Service Plaza is one of APIPark’s core features, aiming to solve the problem of fragmented and chaotic internal API management in enterprises. Through the API Service Plaza, enterprises can showcase all API services on a unified platform, allowing different departments and teams to easily find and use the required API services. + + + +
+ Transform AI & Prompt to REST API + + API Developer Portal +
+ + + +
+ High Performance + + Manage API lifecycle +
+ - The full API lifecycle management feature helps enterprises standardize the API management process, manage API traffic forwarding and load balancing, and oversee all API versions published externally. This improves API quality and maintainability, enabling efficient development and stable operation to support rapid business growth and innovation. -
- Combine AI models and prompt templates to form new AI APIs - - Switching AI models or modifying prompts won’t affect your APP or microservices -
- - The API Service Plaza is one of APIPark’s core features, aiming to solve the problem of fragmented and chaotic internal API management in enterprises. Through the API Service Plaza, enterprises can showcase all API services on a unified platform, allowing different departments and teams to easily find and use the required API services. - - - The full API lifecycle management feature helps enterprises standardize the API management process, manage API traffic forwarding and load balancing, and oversee all API versions published externally. This improves API quality and maintainability, enabling efficient development and stable operation to support rapid business growth and innovation. -
- Centrally manage and display all AI / REST APIs - - Cover the entire API lifecycle from design, release, operation, to deprecation -
- - The API Service Plaza is one of APIPark’s core features, aiming to solve the problem of fragmented and chaotic internal API management in enterprises. Through the API Service Plaza, enterprises can showcase all API services on a unified platform, allowing different departments and teams to easily find and use the required API services. - - - The full API lifecycle management feature helps enterprises standardize the API management process, manage API traffic forwarding and load balancing, and oversee all API versions published externally. This improves API quality and maintainability, enabling efficient development and stable operation to support rapid business growth and innovation.
- Manage multiple tenants, ensuring data isolation and security + Review subscription before allowing API requests - API resources require approval before usage + Manage subscriber
- - The multi-tenant management feature allows enterprises to manage multiple tenants on the same platform. Each tenant can have independent resources, users, and permission settings, ensuring data and operation isolation, improving resource utilization efficiency, and simplifying management. - - APIPark provides a process approval feature for all API resources, preventing violations or unauthorized API usage. Callers must apply for API resources and wait for the service provider's approval before officially using the API. + +
- Use detailed call logs to trace API access at any time + Logging - Comprehensive statistical reports* + Analysis
- The API call log feature provides enterprises with comprehensive logging capabilities, recording all relevant information for each API call. These logs allow enterprises to quickly trace and troubleshoot API call issues, ensuring system stability and data security. - Through historical call data analysis, APIPark can display long-term API call trends and performance changes, helping enterprises perform preventative maintenance before problems arise.
+ + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + From 1d4ea6559a71596f26c547b92914aa3fcb79ca89 Mon Sep 17 00:00:00 2001 From: JackLiu Date: Tue, 22 Oct 2024 15:49:41 +0800 Subject: [PATCH 29/91] Update readme-jp.md --- readme/readme-jp.md | 107 ++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 58 deletions(-) diff --git a/readme/readme-jp.md b/readme/readme-jp.md index cfded906..47abe82f 100644 --- a/readme/readme-jp.md +++ b/readme/readme-jp.md @@ -61,109 +61,100 @@ curl -sSO https://download.apipark.com/install/quick-start.sh; bash quick-start.
- 接入所有主流AI供应商的 100+ 大模型 + 快速接入 100+ AI 模型 - 统一所有 AI API 的调用格式,没有额外的适配工作 + 通过统一的 API 格式来调用所有 AI
- - API 服务广场是 APIPark 的核心功能之一,旨在解决企业内部 API 分散、管理混乱的问题。通过 API 服务广场,企业可以将所有的 API 服务集中展示在一个统一的平台上,使得不同部门和团队能够轻松找到并使用所需的 API 服务。 + + + +
+ 一键将 Prompt 提示词封装成 REST API + + 在团队内快速共享 API 服务 +
+ + + +
+ 比肩 Nginx 的强大性能 + + 一站式完成 API 设计、发布、调用、下线 +
+ - API 全生命周期管理功能帮助企业规范 API 的管理流程,管理 API 的流量转发和负载均衡,并管理所有 API 对外发布的版本。提升 API 的质量和可维护性。通过这个功能,企业可以实现 API 的高效开发和稳定运营,从而支持业务的快速发展和创新。 -
- 组合 AI 模型和 Prompt 提示词,形成新的 AI API - - 切换 AI 模型或者修改 Prompt 不会影响你的 APP 应用或者微服务 -
- - API 服务广场是 APIPark 的核心功能之一,旨在解决企业内部 API 分散、管理混乱的问题。通过 API 服务广场,企业可以将所有的 API 服务集中展示在一个统一的平台上,使得不同部门和团队能够轻松找到并使用所需的 API 服务。 - - - API 全生命周期管理功能帮助企业规范 API 的管理流程,管理 API 的流量转发和负载均衡,并管理所有 API 对外发布的版本。提升 API 的质量和可维护性。通过这个功能,企业可以实现 API 的高效开发和稳定运营,从而支持业务的快速发展和创新。 -
- 集中管理与展示所有 AI / REST API - - 覆盖 API 从设计、发布、运行、下线的全过程 -
- - API 服务广场是 APIPark 的核心功能之一,旨在解决企业内部 API 分散、管理混乱的问题。通过 API 服务广场,企业可以将所有的 API 服务集中展示在一个统一的平台上,使得不同部门和团队能够轻松找到并使用所需的 API 服务。 - - - API 全生命周期管理功能帮助企业规范 API 的管理流程,管理 API 的流量转发和负载均衡,并管理所有 API 对外发布的版本。提升 API 的质量和可维护性。通过这个功能,企业可以实现 API 的高效开发和稳定运营,从而支持业务的快速发展和创新。
- 管理多个租户,确保数据隔离和安全 + 审核租户的API的调用申请 - API资源需要先申请并等待审核通过才能调用 + 多租户管理
- - 多租户管理功能为企业提供了在同一平台上管理多个租户的能力,每个租户可以拥有独立的资源、用户和权限设置,确保数据和操作的隔离,帮助提升资源利用效率和管理便捷性。 - - APIPark 对所有 API 资源提供流程审核功能,避免违规或避开平台来调用API,调用方需要先申请API资源,并等待服务方审核通过后才能正式调用API。 + +
- 通过详细的调用日志,帮助排查API在任意时刻的访问情况 + 详细记录所有 API 的调用日志 - 丰富的统计报表* + 强大的数据分析
- API 调用日志功能为企业提供了全面的日志记录能力,详细记录每一次 API 调用的所有相关信息。通过这些日志,企业可以快速追踪和排查 API 调用中的问题,确保系统的稳定运行和数据安全。 - 通过对历史调用数据的分析,APIPark 能够展示 API 长期的调用趋势和性能变化,帮助企业在问题发生前进行预防性维护。
+ + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - +
- 主要なAIプロバイダの100以上の大規模モデルに接続 + 100以上のAIモデルに迅速に接続 - すべてのAI APIの呼び出しフォーマットを統一し、追加の適応作業は不要 + 統一されたAPIフォーマットで全てのAIを呼び出し
- - APIサービスプラザはAPIParkの中心機能の1つであり、企業内部のAPIが分散し、管理が混乱している問題を解決することを目指しています。APIサービスプラザを通じて、企業はすべてのAPIサービスを統一されたプラットフォームで集中表示し、異なる部門やチームが必要なAPIサービスを簡単に見つけて使用できるようにします。 + + + +
+ プロンプトテンプレートをREST APIにワンクリックで変換 + + チーム内でAPIサービスを迅速に共有 +
+ + + +
+ Nginxに匹敵する高性能 + + APIの設計、公開、呼び出し、停止までをワンストップで対応 +
+ - APIのライフサイクル管理機能は、APIの管理プロセスを標準化し、トラフィック転送や負荷分散を管理し、外部に公開されるすべてのAPIバージョンを管理します。これにより、APIの品質と保守性が向上し、企業は効率的なAPI開発と安定した運用を実現でき、ビジネスの急速な成長とイノベーションをサポートします。 -
- AIモデルとプロンプトを組み合わせ、新しいAI APIを作成 - - AIモデルを切り替えたり、プロンプトを変更しても、アプリやマイクロサービスに影響を与えない -
- - APIサービスプラザはAPIParkの中心機能の1つであり、企業内部のAPIが分散し、管理が混乱している問題を解決することを目指しています。APIサービスプラザを通じて、企業はすべてのAPIサービスを統一されたプラットフォームで集中表示し、異なる部門やチームが必要なAPIサービスを簡単に見つけて使用できるようにします。 - - - APIのライフサイクル管理機能は、APIの管理プロセスを標準化し、トラフィック転送や負荷分散を管理し、外部に公開されるすべてのAPIバージョンを管理します。これにより、APIの品質と保守性が向上し、企業は効率的なAPI開発と安定した運用を実現でき、ビジネスの急速な成長とイノベーションをサポートします。 -
- すべてのAI / REST APIを一元管理および表示 - - APIの設計、公開、運用、廃止までの全過程をカバー -
- - APIサービスプラザはAPIParkの中心機能の1つであり、企業内部のAPIが分散し、管理が混乱している問題を解決することを目指しています。APIサービスプラザを通じて、企業はすべてのAPIサービスを統一されたプラットフォームで集中表示し、異なる部門やチームが必要なAPIサービスを簡単に見つけて使用できるようにします。 - - - APIのライフサイクル管理機能は、APIの管理プロセスを標準化し、トラフィック転送や負荷分散を管理し、外部に公開されるすべてのAPIバージョンを管理します。これにより、APIの品質と保守性が向上し、企業は効率的なAPI開発と安定した運用を実現でき、ビジネスの急速な成長とイノベーションをサポートします。
- 複数のテナントを管理し、データの分離とセキュリティを確保 + テナントのAPI呼び出しリクエストを承認 - APIリソースの利用には申請と承認が必要 + マルチテナント管理
- - マルチテナント管理機能は、企業が1つのプラットフォームで複数のテナントを管理する能力を提供します。各テナントは独立したリソース、ユーザー、権限設定を持つことができ、データと操作の分離を確保し、リソース利用効率と管理の利便性を向上させます。 - - APIParkはすべてのAPIリソースにプロセス承認機能を提供し、違反やプラットフォームを回避したAPIの呼び出しを防ぎます。呼び出し元はAPIリソースを申請し、サービス提供者の承認後に正式にAPIを利用できます。 + +
- 詳細な呼び出しログを使用して、任意の時点でAPIアクセス状況を調査 + 全てのAPI呼び出しを詳細に記録 - 豊富な統計レポート* + 強力なデータ分析機能
- API呼び出しログ機能は、企業に包括的なログ記録機能を提供し、すべてのAPI呼び出しに関する関連情報を詳細に記録します。これらのログを使用して、企業はAPI呼び出しにおける問題を迅速に追跡し、トラブルシューティングを行い、システムの安定運用とデータセキュリティを確保します。 - 過去の呼び出しデータを分析することで、APIParkはAPIの長期的な呼び出しトレンドとパフォーマンスの変化を表示し、企業が問題が発生する前に予防的なメンテナンスを行うのに役立ちます。
+
# 🚀 使用ケース From 4cdba13c8c0a21af5f1effd66d44b320faa3f759 Mon Sep 17 00:00:00 2001 From: JackLiu Date: Tue, 22 Oct 2024 15:51:30 +0800 Subject: [PATCH 30/91] Update readme-zh-tw.md --- readme/readme-zh-tw.md | 106 +++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 58 deletions(-) diff --git a/readme/readme-zh-tw.md b/readme/readme-zh-tw.md index 347e4686..91bd4108 100644 --- a/readme/readme-zh-tw.md +++ b/readme/readme-zh-tw.md @@ -63,104 +63,94 @@ curl -sSO https://download.apipark.com/install/quick-start.sh; bash quick-start. + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + From 6621f93342bf2950a6c9c85f5ff7803259f40c50 Mon Sep 17 00:00:00 2001 From: JackLiu Date: Tue, 22 Oct 2024 15:53:10 +0800 Subject: [PATCH 31/91] Update readme-zh-cn.md --- readme/readme-zh-cn.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme/readme-zh-cn.md b/readme/readme-zh-cn.md index 42b2f876..d1af567f 100644 --- a/readme/readme-zh-cn.md +++ b/readme/readme-zh-cn.md @@ -1,7 +1,7 @@ -![image](https://apipark.com/wp-content/uploads/2024/10/AI-Gateway-After.png) +![image](https://github.com/user-attachments/assets/96e36db5-2733-49c8-8e1e-ecbcc60a3943)

- English + English | 日本語 | From d173d827145d721000388cd7bb0b76ed78768f56 Mon Sep 17 00:00:00 2001 From: JackLiu Date: Tue, 22 Oct 2024 15:53:27 +0800 Subject: [PATCH 32/91] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 03e4b799..f4801f89 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -![image](https://apipark.com/wp-content/uploads/2024/10/AI-Gateway-After.png) +![image](https://github.com/user-attachments/assets/96e36db5-2733-49c8-8e1e-ecbcc60a3943)

- English + English | 日本語 | From 91666efc94c322fab979d1cbab7101ed78ac5782 Mon Sep 17 00:00:00 2001 From: JackLiu Date: Tue, 22 Oct 2024 15:53:42 +0800 Subject: [PATCH 33/91] Update readme-zh-tw.md --- readme/readme-zh-tw.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme/readme-zh-tw.md b/readme/readme-zh-tw.md index 91bd4108..33b2cf35 100644 --- a/readme/readme-zh-tw.md +++ b/readme/readme-zh-tw.md @@ -1,7 +1,7 @@ ![image](https://github.com/user-attachments/assets/96e36db5-2733-49c8-8e1e-ecbcc60a3943)

- English + English | 日本語 | From 67549661c5bc3b12108ef6716e9197a77f08b137 Mon Sep 17 00:00:00 2001 From: JackLiu Date: Tue, 22 Oct 2024 15:53:56 +0800 Subject: [PATCH 34/91] Update readme-jp.md --- readme/readme-jp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme/readme-jp.md b/readme/readme-jp.md index 47abe82f..b46c9752 100644 --- a/readme/readme-jp.md +++ b/readme/readme-jp.md @@ -1,7 +1,7 @@ ![image](https://github.com/user-attachments/assets/96e36db5-2733-49c8-8e1e-ecbcc60a3943)

- English + English | 日本語 | From 97d2d0e250b5fb5cda3c7b96a89d00b377a35036 Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:05:40 +0800 Subject: [PATCH 35/91] fix: Modify Login Page styles and Api document path --- frontend/packages/core/src/App.css | 25 +++++++++- frontend/packages/core/src/pages/Login.tsx | 48 +++++++++++++++++-- .../src/pages/serviceHub/ServiceHubDetail.tsx | 22 ++++++++- 3 files changed, 87 insertions(+), 8 deletions(-) diff --git a/frontend/packages/core/src/App.css b/frontend/packages/core/src/App.css index 3b3d4e57..eee93cd3 100644 --- a/frontend/packages/core/src/App.css +++ b/frontend/packages/core/src/App.css @@ -248,4 +248,27 @@ a{ } .ai-service-api-preview .swagger-ui h3.opblock-tag{ display: none; -} \ No newline at end of file +} + + /* 整个背景容器设置 */ + .background-container { + background: radial-gradient(ellipse 80% 900px at top, rgb(255 255 255 / 10%) 0%, rgb(4 0 71) 30%, rgb(13 17 23) 100%); + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100vh; + overflow: hidden; + z-index: 1; + isolate: isolate; + } + + /* SVG背景图案 */ + .background-pattern { + position: absolute; + inset: 0; + width: 100%; + height: 100%; + stroke: rgba(255, 255, 255, 0.1); + mask-image: radial-gradient(100% 100% at top right, white, transparent); + } diff --git a/frontend/packages/core/src/pages/Login.tsx b/frontend/packages/core/src/pages/Login.tsx index 7055699f..1a872229 100644 --- a/frontend/packages/core/src/pages/Login.tsx +++ b/frontend/packages/core/src/pages/Login.tsx @@ -2,10 +2,10 @@ import {FC, useCallback, useEffect, useRef, useState} from "react"; import {App, Button, Divider, Form, FormInstance, Input, Tooltip} from "antd"; import {useGlobalContext} from "@common/contexts/GlobalStateContext.tsx"; import {useFetch} from "@common/hooks/http.ts"; -import {BasicResponse, RESPONSE_TIPS, STATUS_CODE} from "@common/const/const.tsx"; +import {BasicResponse, STATUS_CODE} from "@common/const/const.tsx"; import {useNavigate} from "react-router-dom"; // import {useCrypto} from "../hooks/crypto.ts"; -import Logo from '@common/assets/logo.png' +import Logo from '@common/assets/layout-logo.png' import { $t } from "@common/locales"; import { Icon } from "@iconify/react/dist/iconify.js"; import LanguageSetting from "@common/components/aoplatform/LanguageSetting"; @@ -100,9 +100,46 @@ const Login:FC = ()=> { }, []); return ( -

-
-
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {/*
*/} +
{

{$t('Version (0)-(1)',[state.version,state.updateDate])}

{$t(state.powered)}

+
diff --git a/frontend/packages/market/src/pages/serviceHub/ServiceHubDetail.tsx b/frontend/packages/market/src/pages/serviceHub/ServiceHubDetail.tsx index d7747c32..6e493606 100644 --- a/frontend/packages/market/src/pages/serviceHub/ServiceHubDetail.tsx +++ b/frontend/packages/market/src/pages/serviceHub/ServiceHubDetail.tsx @@ -1,7 +1,7 @@ import {Link, useNavigate, useParams} from "react-router-dom"; import {RouterParams} from "@core/components/aoplatform/RenderRoutes.tsx"; import { App, Avatar, Button, Descriptions, Divider, Tabs} from "antd"; -import { useEffect, useRef, useState} from "react"; +import { useEffect, useMemo, useRef, useState} from "react"; import {useBreadcrumb} from "@common/contexts/BreadcrumbContext.tsx"; import {BasicResponse, RESPONSE_TIPS, STATUS_CODE} from "@common/const/const.tsx"; import {useFetch} from "@common/hooks/http.ts"; @@ -34,11 +34,29 @@ const ServiceHubDetail = ()=>{ const [service, setService] = useState() const navigate = useNavigate(); + const modifyApiDoc = (apiDoc:string, apiPrefix:string)=>{ + if(!apiDoc) return '' + if(!apiPrefix) return apiDoc + try{ + const openApiSpec = JSON.parse(apiDoc); + // 遍历并修改 paths,给每个路径添加前缀 + const modifiedPaths:Record = {}; + for (const [path, pathItem] of Object.entries(openApiSpec.paths)) { + modifiedPaths[apiPrefix + path] = pathItem; + } + openApiSpec.paths = modifiedPaths; + return JSON.stringify(openApiSpec); + }catch(err){ + console.warn('拼接api前缀失败',err) + } + return apiDoc + } + const getServiceBasicInfo = ()=>{ fetchData>('catalogue/service',{method:'GET',eoParams:{service:serviceId}, eoTransformKeys:['app_num','api_num','update_time','api_doc','invoke_address','approval_type','service_kind']}).then(response=>{ const {code,data,msg} = response if(code === STATUS_CODE.SUCCESS){ - setService(data.service) + setService({...data.service,apiDoc:modifyApiDoc(data.service.apiDoc, data.service.basic?.invokeAddress)}) setServiceBasicInfo(data.service.basic) setServiceName(data.service.name) setServiceDesc(data.service.description) From ca06e100d35177591aa07e50840b42acf14d6650 Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:32:25 +0800 Subject: [PATCH 36/91] fix: Simplified Chinese not working --- .../common/src/components/aoplatform/LanguageSetting.tsx | 1 - frontend/packages/common/src/locales/index.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/packages/common/src/components/aoplatform/LanguageSetting.tsx b/frontend/packages/common/src/components/aoplatform/LanguageSetting.tsx index 025af3b5..b03f0a81 100644 --- a/frontend/packages/common/src/components/aoplatform/LanguageSetting.tsx +++ b/frontend/packages/common/src/components/aoplatform/LanguageSetting.tsx @@ -1,6 +1,5 @@ import { Dropdown, Row, Col, Button } from 'antd'; import i18n from '@common/locales'; -import { $t } from '@common/locales'; import { memo, useEffect, useMemo } from 'react'; import { useGlobalContext } from '@common/contexts/GlobalStateContext'; import { Icon } from '@iconify/react/dist/iconify.js'; diff --git a/frontend/packages/common/src/locales/index.ts b/frontend/packages/common/src/locales/index.ts index 00cb3708..d819368b 100644 --- a/frontend/packages/common/src/locales/index.ts +++ b/frontend/packages/common/src/locales/index.ts @@ -15,7 +15,7 @@ import localJa_JP from './scan/ja-JP.json'; // 本地翻译英文文件 // import config from '../../../../i18next-scanner.config.js'; const resources = { - 'zh-CH': { + 'zh-CN': { translation: localZh_CN, ...zhCN }, From 49138e87c1b0884ef6e98c489d95b14f7be26608 Mon Sep 17 00:00:00 2001 From: HaoZhen Liu Date: Tue, 22 Oct 2024 17:53:48 +0800 Subject: [PATCH 37/91] update translation --- frontend/packages/common/src/locales/scan/en-US.json | 2 +- frontend/packages/common/src/locales/scan/ja-JP.json | 4 ++-- frontend/packages/common/src/locales/scan/zh-CN.json | 8 ++++---- frontend/packages/common/src/locales/scan/zh-TW.json | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/frontend/packages/common/src/locales/scan/en-US.json b/frontend/packages/common/src/locales/scan/en-US.json index 0df052f5..7d753731 100644 --- a/frontend/packages/common/src/locales/scan/en-US.json +++ b/frontend/packages/common/src/locales/scan/en-US.json @@ -4,7 +4,7 @@ "Kfe93ef35": "Application", "Kb58e0c3f": "Service", "Kc9e489f5": "Team", - "K61c89f5f": "API Marketplace", + "K61c89f5f": "API Portal", "K16d71239": "Analysis", "K714c192d": "Call Statistics", "Kd57dfe97": "Topology", diff --git a/frontend/packages/common/src/locales/scan/ja-JP.json b/frontend/packages/common/src/locales/scan/ja-JP.json index 52b8a03c..3e60bcbf 100644 --- a/frontend/packages/common/src/locales/scan/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/ja-JP.json @@ -4,11 +4,11 @@ "Kfe93ef35": "Application", "Kb58e0c3f": "Service", "Kc9e489f5": "Team", - "K61c89f5f": "API マーケット", + "K61c89f5f": "API Portal", "K16d71239": "解析", "K714c192d": "呼び出し統計", "Kd57dfe97": "トポロジー図", - "K3fe97dcc": "システム設定", + "K3fe97dcc": "設定", "Kecbb0e45": "システム", "Ka358e23d": "一般", "K449058e9": "API ゲートウェイ", diff --git a/frontend/packages/common/src/locales/scan/zh-CN.json b/frontend/packages/common/src/locales/scan/zh-CN.json index 41ee376a..542ec514 100644 --- a/frontend/packages/common/src/locales/scan/zh-CN.json +++ b/frontend/packages/common/src/locales/scan/zh-CN.json @@ -4,7 +4,7 @@ "Kfe93ef35": "应用", "Kb58e0c3f": "服务", "Kc9e489f5": "团队", - "K61c89f5f": "API 市场", + "K61c89f5f": "API 门户", "K16d71239": "分析报告", "K714c192d": "调用统计", "Kd57dfe97": "拓扑图", @@ -29,7 +29,7 @@ "K1f42de3": "HTTP 状态码", "K4770dff4": "系统状态码", "Kf89e58f1": "描述", - "K9e53c664": "提交", + "K9e53c664": "保存", "Kf8e7294c": "上一步", "Ka0451c97": "取消", "Kb1dedda3": "关闭", @@ -155,7 +155,7 @@ "Ke54a14a3": "格式化", "K43934f6d": "搜索", "K741decac": "替代", - "Kd507abff": "确定", + "Kd507abff": "确认", "Kca2d1624": "(0) 不能为负数.", "K792b255a": "(0) 必须大于或等于 (1).", "Kf0bed26d": "枚举值", @@ -306,7 +306,7 @@ "K184d3473": "添加账号", "K1ecb35f2": "编辑成员信息", "Ke6f00b44": "加入部门", - "K501cb1e7": "此操作无法恢复,确定删除成员?", + "K501cb1e7": "此操作无法恢复,确认删除成员?", "Kf20863b5": "成员与部门", "K52c8a730": "启用", "K718c9310": "禁用", diff --git a/frontend/packages/common/src/locales/scan/zh-TW.json b/frontend/packages/common/src/locales/scan/zh-TW.json index 0cf359f4..d76510c6 100644 --- a/frontend/packages/common/src/locales/scan/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/zh-TW.json @@ -4,7 +4,7 @@ "Kfe93ef35": "應用程式", "Kb58e0c3f": "服務", "Kc9e489f5": "團隊", - "K61c89f5f": "API 市場", + "K61c89f5f": "API 門戶", "K16d71239": "分析報告", "K714c192d": "調用統計", "Kd57dfe97": "拓撲圖", From 9c044b232a5814d684283066eec9c52291b1c6b0 Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Wed, 23 Oct 2024 11:58:53 +0800 Subject: [PATCH 38/91] feat: Add path match type before api path & Modify Login Page --- frontend/packages/core/src/App.css | 13 ++++ .../packages/core/src/const/system/const.tsx | 5 ++ frontend/packages/core/src/pages/Login.tsx | 23 +++--- .../api/AiServiceInsideRouterCreate.tsx | 70 +++++++++++++++---- .../system/api/SystemInsideRouterCreate.tsx | 67 +++++++++++++----- 5 files changed, 135 insertions(+), 43 deletions(-) diff --git a/frontend/packages/core/src/App.css b/frontend/packages/core/src/App.css index eee93cd3..002fa800 100644 --- a/frontend/packages/core/src/App.css +++ b/frontend/packages/core/src/App.css @@ -272,3 +272,16 @@ a{ stroke: rgba(255, 255, 255, 0.1); mask-image: radial-gradient(100% 100% at top right, white, transparent); } + + .login-block{ + background-color: rgba(255, 255, 255, 0.1); + .login-input{ + color:#fff; + background-color: rgba(255, 255, 255, 0.1); + border: 1px solid rgba(255, 255, 255, 0.1); + &:hover, &:focus, &.ant-input-status-error, &.ant-input-status-error:hover, &.ant-input-status-error:focus-within{ + background-color: rgba(255, 255, 255, 0.2); + border: 1px solid rgba(255, 255, 255, 0.2); + } + } + } \ No newline at end of file diff --git a/frontend/packages/core/src/const/system/const.tsx b/frontend/packages/core/src/const/system/const.tsx index a1fb3204..ac9a79d7 100644 --- a/frontend/packages/core/src/const/system/const.tsx +++ b/frontend/packages/core/src/const/system/const.tsx @@ -69,6 +69,11 @@ export const API_PROTOCOL = [ {label:'HTTPS',value:'HTTPS'} ] +export const API_PATH_MATCH_RULES = [ + {label:'前缀匹配',value:'prefix'}, + {label:'全等匹配',value:'full'} +] + export const ALGORITHM_ITEM = [ {label:'HS256',value:'HS256'}, diff --git a/frontend/packages/core/src/pages/Login.tsx b/frontend/packages/core/src/pages/Login.tsx index 1a872229..dc59c5d8 100644 --- a/frontend/packages/core/src/pages/Login.tsx +++ b/frontend/packages/core/src/pages/Login.tsx @@ -139,7 +139,7 @@ const Login:FC = ()=> {
{/*
*/} -
+
{
-
+
-
-
- {$t('登录')} -
- -
+ { rules={[{ required: true, message: $t('请输入账号') ,whitespace:true }]} > { @@ -209,8 +205,9 @@ const Login:FC = ()=> {
-

{$t('Version (0)-(1)',[state.version,state.updateDate])}

-

{$t(state.powered)}

+

+ {$t('Version (0)-(1)',[state.version,state.updateDate])}, {$t(state.powered)} +

diff --git a/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterCreate.tsx b/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterCreate.tsx index 69f14b86..42984e29 100644 --- a/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterCreate.tsx +++ b/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterCreate.tsx @@ -1,4 +1,4 @@ -import {App, Button, Form, Input, InputNumber, Row, Spin, Tag} from "antd"; +import {App, Button, Form, Input, InputNumber, Row, Select, Space, Spin, Tag} from "antd"; import { MutableRefObject, useEffect, useRef, useState} from "react"; import {BasicResponse, PLACEHOLDER, RESPONSE_TIPS, STATUS_CODE} from "@common/const/const.tsx"; import {useFetch} from "@common/hooks/http.ts"; @@ -17,6 +17,8 @@ import { DrawerWithFooter } from "@common/components/aoplatform/DrawerWithFooter import AiServiceRouterModelConfig, { AiServiceRouterModelConfigHandle } from "./AiServiceInsideRouterModelConfig"; import { AiProviderDefaultConfig, AiProviderLlmsItems } from "@core/pages/aiSetting/AiSettingList"; import { EditableFormInstance } from "@ant-design/pro-components"; +import { validateUrlSlash } from "@common/utils/validate"; +import { API_PATH_MATCH_RULES } from "@core/const/system/const"; type AiServiceRouterField = { name:string @@ -62,8 +64,11 @@ const AiServiceInsideRouterCreate = () => { const onFinish = ()=>{ return variablesTableRef?.current?.validateFields().then(()=>{ return form.validateFields().then((formValue)=>{ - const {name, path, description, variables, prompt, timeout, retry} = formValue - const body = {name, path: prefixForce ? `${apiPrefix}/${path}`:path , description,timeout, retry,aiPrompt:{variables:variables, prompt:prompt},aiModel:{id:defaultLlm?.id, provider:defaultLlm?.provider, config:defaultLlm?.config}} + const {name, path, description, variables, prompt, timeout, retry,pathMatch} = formValue + const body = { + name, + path: `${prefixForce ? apiPrefix + '/' : ''}${path.trim()}${pathMatch === 'prefix' ? '/*' : ''}`, + description,timeout, retry,aiPrompt:{variables:variables, prompt:prompt},aiModel:{id:defaultLlm?.id, provider:defaultLlm?.provider, config:defaultLlm?.config}} return fetchData>('service/ai-router',{method: routeId ? 'PUT' : 'POST',eoBody:(body), eoParams: {service:serviceId,team:teamId, ...(routeId ? {router:routeId}: {})},eoTransformKeys:['aiPrompt','aiModel']}).then(response=>{ const {code,msg} = response if(code === STATUS_CODE.SUCCESS){ @@ -92,7 +97,20 @@ const AiServiceInsideRouterCreate = () => { const {code,data,msg} = response if(code === STATUS_CODE.SUCCESS){ const {path, aiPrompt,aiModel} = data.api - form.setFieldsValue({...data.api,...aiPrompt, path:prefixForce && path?.startsWith(apiPrefix + '/')? path.slice((apiPrefix?.length || 0) + 1) : path }) + let newPath = path + let pathMatch = 'full' + if(prefixForce && path?.startsWith(apiPrefix + '/')){ + newPath = path.slice((apiPrefix?.length || 0) + 1) + } + if(newPath.endsWith('/*')){ + newPath = newPath.slice(0,-2) + pathMatch = 'prefix' + } + form.setFieldsValue({ + ...data.api, + ...aiPrompt, + path:newPath, + pathMatch}) setVariablesTable(aiPrompt.variables as VariableItems[]) setDefaultLlm(prev => ({...prev, provider: aiModel?.provider, id:aiModel?.id, config:aiModel.config}) as (AiProviderDefaultConfig & { config: string; })) getDefaultModelConfig(aiModel?.provider) @@ -141,7 +159,8 @@ const AiServiceInsideRouterCreate = () => { variables:[{key:'Query',value:'',require:true}], prompt:'{{Query}}', retry:0, - timeout:300000 + timeout:300000, + pathMatch:'prefix' }) } return (form.setFieldsValue({})) @@ -230,15 +249,38 @@ const AiServiceInsideRouterCreate = () => { - - className="flex-1" - label={$t("请求路径")} - name="path" - rules={[{ required: true,whitespace:true }]} - > - - + + + + + { + if((e.target.value as string).endsWith('/*')){ + form.setFieldValue('path',e.target.value.slice(0,-2)) + form.setFieldValue('pathMatch','prefix') + } + }}/> + + + + diff --git a/frontend/packages/core/src/pages/system/api/SystemInsideRouterCreate.tsx b/frontend/packages/core/src/pages/system/api/SystemInsideRouterCreate.tsx index 62fd6c99..aa1bd0b1 100644 --- a/frontend/packages/core/src/pages/system/api/SystemInsideRouterCreate.tsx +++ b/frontend/packages/core/src/pages/system/api/SystemInsideRouterCreate.tsx @@ -1,10 +1,10 @@ -import {App, Button, Col, Form, Input, Row, Select, Spin, Switch} from "antd"; +import {App, Button, Col, Form, Input, Row, Select, Space, Spin, Switch} from "antd"; import {forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState} from "react"; import EditableTableWithModal from "@common/components/aoplatform/EditableTableWithModal.tsx"; import styles from "./SystemInsideApi.module.css" import {BasicResponse, PLACEHOLDER, RESPONSE_TIPS, STATUS_CODE} from "@common/const/const.tsx"; import {useFetch} from "@common/hooks/http.ts"; -import { API_PROTOCOL, HTTP_METHOD, MATCH_CONFIG, MatchPositionEnum, MatchTypeEnum } from "../../../const/system/const.tsx"; +import { API_PATH_MATCH_RULES, API_PROTOCOL, HTTP_METHOD, MATCH_CONFIG, MatchPositionEnum, MatchTypeEnum } from "../../../const/system/const.tsx"; import { SystemInsideRouterCreateHandle, SystemInsideRouterCreateProps, SystemApiProxyFieldType, SystemInsideApiProxyHandle } from "../../../const/system/type.ts"; import { MatchItem } from "@common/const/type.ts"; import { validateUrlSlash } from "@common/utils/validate.ts"; @@ -31,7 +31,7 @@ const SystemInsideRouterCreate = forwardRef{ return Promise.all([proxyRef.current?.validate?.(), form.validateFields()]).then(([,formValue])=>{ const body = {...formValue, - path: prefixForce? `${apiPrefix}/${formValue.path.trim()}` : formValue.path.trim(), + path: `${prefixForce ? apiPrefix + '/' : ''}${formValue.path.trim()}${formValue.pathMatch === 'prefix' ? '/*' : ''}`, proxy:{...formValue.proxy,path:formValue.proxy.path ? (formValue.proxy.path.startsWith('/')? formValue.proxy.path: '/'+ formValue.proxy.path) : undefined}} return fetchData>('service/router',{ method: routeId ? 'PUT' :'POST' ,eoBody:(body), eoParams: {service:serviceId,team:teamId, router:routeId },eoTransformKeys:['matchType','disable']}).then(response=>{ @@ -77,7 +77,24 @@ const SystemInsideRouterCreate = forwardRef - - - label={$t("请求路径")} - name="path" - rules={[{ required: true,whitespace:true }, - { - validator: validateUrlSlash, - }]} - className={styles['form-input-group']} - > - + + + + { + if((e.target.value as string).endsWith('/*')){ + form.setFieldValue('path',e.target.value.slice(0,-2)) + form.setFieldValue('pathMatch','prefix') + } + }}/> + + From 920588057a8e0148ec589653c4316fb20a2ee735 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Wed, 23 Oct 2024 13:38:16 +0800 Subject: [PATCH 39/91] update providers logo --- ai-provider/model-runtime/provider.go | 10 +++++----- stores/api/model.go | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ai-provider/model-runtime/provider.go b/ai-provider/model-runtime/provider.go index db19f849..226719eb 100644 --- a/ai-provider/model-runtime/provider.go +++ b/ai-provider/model-runtime/provider.go @@ -55,10 +55,10 @@ func NewProvider(providerData string, modelContents map[string]eosc.Untyped[stri } delete(modelContents, DirAssets) - providerLogo, ok := assetsFiles.Get(providerCfg.IconLarge[entity.LanguageEnglish]) - if !ok { - return nil, fmt.Errorf("provider logo not found:%s", providerCfg.Provider) - } + //providerLogo, ok := assetsFiles.Get(providerCfg.IconLarge[entity.LanguageEnglish]) + //if !ok { + // return nil, fmt.Errorf("provider logo not found:%s", providerCfg.Provider) + //} modelLogo, ok := assetsFiles.Get(providerCfg.IconSmall[entity.LanguageEnglish]) if !ok { return nil, fmt.Errorf("model logo not found:%s", providerCfg.Provider) @@ -66,7 +66,7 @@ func NewProvider(providerData string, modelContents map[string]eosc.Untyped[stri provider := &Provider{ id: providerCfg.Provider, name: providerCfg.Label[entity.LanguageEnglish], - logo: providerLogo, + logo: modelLogo, helpUrl: providerCfg.Help.URL[entity.LanguageEnglish], models: eosc.BuildUntyped[string, IModel](), defaultModels: eosc.BuildUntyped[string, IModel](), diff --git a/stores/api/model.go b/stores/api/model.go index 8ad0c610..0c81e9db 100644 --- a/stores/api/model.go +++ b/stores/api/model.go @@ -13,9 +13,9 @@ type API struct { Creator string `gorm:"size:36;not null;column:creator;comment:创建人;index:creator" aovalue:"creator"` // 创建人 CreateAt time.Time `gorm:"type:timestamp;NOT NULL;DEFAULT:CURRENT_TIMESTAMP;column:create_at;comment:创建时间"` IsDelete int `gorm:"type:tinyint(1);not null;column:is_delete;comment:是否删除 0:未删除 1:已删除"` - Method []string `gorm:"size:36;not null;column:method;comment:请求方法;serializer:json"` + Method []string `gorm:"size:255;not null;column:method;comment:请求方法;serializer:json"` Protocol []string `gorm:"type:text;not null;column:protocol;comment:协议;serializer:json"` - Path string `gorm:"size:512;not null;column:path;comment:请求路径"` + Path string `gorm:"size:255;not null;column:path;comment:请求路径"` } type Info struct { Id int64 `gorm:"column:id;type:BIGINT(20);NOT NULL;comment:id;primary_key;comment:主键ID;"` @@ -25,8 +25,8 @@ type Info struct { Service string `gorm:"size:36;not null;column:service;comment:服务;index:service"` Team string `gorm:"size:36;not null;column:team;comment:团队;index:team"` // 团队id Upstream string `gorm:"size:36;not null;column:upstream;comment:上游;index:upstream"` - Method []string `gorm:"size:36;not null;column:method;comment:请求方法;serializer:json" ` - Path string `gorm:"size:512;not null;column:path;comment:请求路径"` + Method []string `gorm:"size:255;not null;column:method;comment:请求方法;serializer:json" ` + Path string `gorm:"size:255;not null;column:path;comment:请求路径"` Protocol []string `gorm:"type:text;null;column:protocol;comment:协议;serializer:json"` Match string `gorm:"type:text;null;column:match;comment:匹配规则"` Creator string `gorm:"size:36;not null;column:creator;comment:创建人;index:creator" aovalue:"creator"` // 创建人 @@ -74,7 +74,7 @@ type AiAPIInfo struct { Uuid string `gorm:"type:varchar(36);not null;column:uuid;uniqueIndex:uuid;comment:UUID"` Name string `gorm:"type:varchar(100);not null;column:name;comment:name"` Service string `gorm:"size:36;not null;column:service;comment:服务;index:service"` - Path string `gorm:"size:512;not null;column:path;comment:请求路径"` + Path string `gorm:"size:255;not null;column:path;comment:请求路径"` Description string `gorm:"size:255;not null;column:description;comment:description"` Timeout int `gorm:"type:int(11);not null;column:timeout;comment:超时时间"` Retry int `gorm:"type:int(11);not null;column:retry;comment:重试次数"` From a0853fc621a0f211aa804081d2a8387c652af9fd Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Wed, 23 Oct 2024 14:22:44 +0800 Subject: [PATCH 40/91] update provider logo --- .../model-providers/deepseek/assets/icon_s_en.svg | 2 +- .../model-providers/fireworks/assets/icon_s_en.svg | 2 +- .../model-providers/mistralai/assets/icon_s_en.svg | 2 +- .../model-providers/moonshot/assets/icon_s_en.svg | 2 +- .../model-providers/novita/assets/icon_s_en.svg | 2 +- .../model-providers/nvidia/assets/icon_s_en.svg | 2 +- .../model-providers/perfxcloud/assets/icon_s_en.svg | 6 +++--- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ai-provider/model-runtime/model-providers/deepseek/assets/icon_s_en.svg b/ai-provider/model-runtime/model-providers/deepseek/assets/icon_s_en.svg index aa854a75..0e099fe1 100644 --- a/ai-provider/model-runtime/model-providers/deepseek/assets/icon_s_en.svg +++ b/ai-provider/model-runtime/model-providers/deepseek/assets/icon_s_en.svg @@ -1,3 +1,3 @@ - + diff --git a/ai-provider/model-runtime/model-providers/fireworks/assets/icon_s_en.svg b/ai-provider/model-runtime/model-providers/fireworks/assets/icon_s_en.svg index 86eeba66..aa695dca 100644 --- a/ai-provider/model-runtime/model-providers/fireworks/assets/icon_s_en.svg +++ b/ai-provider/model-runtime/model-providers/fireworks/assets/icon_s_en.svg @@ -1,4 +1,4 @@ - + diff --git a/ai-provider/model-runtime/model-providers/mistralai/assets/icon_s_en.svg b/ai-provider/model-runtime/model-providers/mistralai/assets/icon_s_en.svg index 7a3feba5..09449f16 100644 --- a/ai-provider/model-runtime/model-providers/mistralai/assets/icon_s_en.svg +++ b/ai-provider/model-runtime/model-providers/mistralai/assets/icon_s_en.svg @@ -1,6 +1,6 @@ - - diff --git a/ai-provider/model-runtime/model-providers/novita/assets/icon_s_en.svg b/ai-provider/model-runtime/model-providers/novita/assets/icon_s_en.svg index 798c1d63..97782cd7 100644 --- a/ai-provider/model-runtime/model-providers/novita/assets/icon_s_en.svg +++ b/ai-provider/model-runtime/model-providers/novita/assets/icon_s_en.svg @@ -1,4 +1,4 @@ - + diff --git a/ai-provider/model-runtime/model-providers/nvidia/assets/icon_s_en.svg b/ai-provider/model-runtime/model-providers/nvidia/assets/icon_s_en.svg index 562ce462..989e2e01 100644 --- a/ai-provider/model-runtime/model-providers/nvidia/assets/icon_s_en.svg +++ b/ai-provider/model-runtime/model-providers/nvidia/assets/icon_s_en.svg @@ -1,3 +1,3 @@ - + diff --git a/ai-provider/model-runtime/model-providers/perfxcloud/assets/icon_s_en.svg b/ai-provider/model-runtime/model-providers/perfxcloud/assets/icon_s_en.svg index be0c2eeb..060d9de3 100644 --- a/ai-provider/model-runtime/model-providers/perfxcloud/assets/icon_s_en.svg +++ b/ai-provider/model-runtime/model-providers/perfxcloud/assets/icon_s_en.svg @@ -1,8 +1,8 @@ - - + + - + From a606d0e8b116cf018279c8fd04674c0fbb82fa32 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Wed, 23 Oct 2024 16:29:18 +0800 Subject: [PATCH 41/91] update ai provider api --- ai-provider/model-runtime/entity/provider.go | 6 ++-- ai-provider/model-runtime/manager.go | 11 ++++++- .../model-providers/authropic/anthropic.yaml | 2 ++ .../model-providers/bedrock/bedrock.yaml | 6 ++-- .../model-providers/google/google.yaml | 6 ++-- .../model-providers/minimax/minimax.yaml | 4 ++- .../model-providers/moonshot/moonshot.yaml | 4 ++- .../model-providers/nvidia/nvidia.yaml | 2 +- .../model-providers/openAI/openai.yaml | 2 ++ .../model-providers/wenxin/wenxin.yaml | 6 ++-- .../zhinao/assets/icon_l_en.svg | 4 +-- .../zhinao/assets/icon_s_en.svg | 4 +-- ai-provider/model-runtime/provider.go | 14 ++++++++ module/ai/dto/input.go | 3 +- module/ai/dto/output.go | 4 ++- module/ai/iml.go | 33 +++++++++++++------ module/service/dto/output.go | 1 + module/service/iml.go | 18 +++++++--- service/application-authorization/iml.go | 20 +++++++---- service/application-authorization/service.go | 3 +- 20 files changed, 113 insertions(+), 40 deletions(-) diff --git a/ai-provider/model-runtime/entity/provider.go b/ai-provider/model-runtime/entity/provider.go index 195da52a..d9014560 100644 --- a/ai-provider/model-runtime/entity/provider.go +++ b/ai-provider/model-runtime/entity/provider.go @@ -21,8 +21,10 @@ type Provider struct { Help Help `json:"help" yaml:"help"` SupportedModelTypes []string `json:"supported_model_types" yaml:"supported_model_types"` ProviderCredentialSchema ProviderCredentialSchema `json:"provider_credential_schema" yaml:"provider_credential_schema"` - Default map[string]string `json:"default"` - Address string `json:"address"` + Default map[string]string `json:"default" yaml:"default"` + Address string `json:"address" yaml:"address"` + Recommend bool `json:"recommend" yaml:"recommend"` + Sort int `json:"sort" yaml:"sort"` } type ProviderCredentialSchema struct { diff --git a/ai-provider/model-runtime/manager.go b/ai-provider/model-runtime/manager.go index 382866e4..dbefea3e 100644 --- a/ai-provider/model-runtime/manager.go +++ b/ai-provider/model-runtime/manager.go @@ -1,6 +1,8 @@ package model_runtime -import "github.com/eolinker/eosc" +import ( + "github.com/eolinker/eosc" +) var ( defaultManager = NewManager() @@ -27,6 +29,13 @@ func (m *Manager) Del(name string) { } func (m *Manager) List() []IProvider { + //list := m.providers.List() + //sort.Slice(list, func(i, j int) bool { + // if list[i].Sort() == list[j].Sort() { + // return list[i].ID() < list[j].ID() + // } + // return list[i].Sort() < list[j].Sort() + //}) return m.providers.List() } diff --git a/ai-provider/model-runtime/model-providers/authropic/anthropic.yaml b/ai-provider/model-runtime/model-providers/authropic/anthropic.yaml index 10cad537..f44d3e18 100644 --- a/ai-provider/model-runtime/model-providers/authropic/anthropic.yaml +++ b/ai-provider/model-runtime/model-providers/authropic/anthropic.yaml @@ -38,3 +38,5 @@ provider_credential_schema: zh_Hans: 在此输入您的 API URL en_US: Enter your API URL address: https://api.anthropic.com +recommend: true +sort: 2 \ No newline at end of file diff --git a/ai-provider/model-runtime/model-providers/bedrock/bedrock.yaml b/ai-provider/model-runtime/model-providers/bedrock/bedrock.yaml index bda4cc38..b9f165c2 100644 --- a/ai-provider/model-runtime/model-providers/bedrock/bedrock.yaml +++ b/ai-provider/model-runtime/model-providers/bedrock/bedrock.yaml @@ -1,6 +1,6 @@ provider: bedrock label: - en_US: AWS + en_US: AWS Bedrock description: en_US: AWS Bedrock's models. icon_small: @@ -87,4 +87,6 @@ provider_credential_schema: placeholder: en_US: A model you have access to (e.g. amazon.titan-text-lite-v1) for validation. zh_Hans: 为了进行验证,请输入一个您可用的模型名称 (例如:amazon.titan-text-lite-v1) -address: https://bedrock-runtime.amazonaws.com \ No newline at end of file +address: https://bedrock-runtime.amazonaws.com +sort: 4 +recommend: true \ No newline at end of file diff --git a/ai-provider/model-runtime/model-providers/google/google.yaml b/ai-provider/model-runtime/model-providers/google/google.yaml index 1d45610f..e54c899f 100644 --- a/ai-provider/model-runtime/model-providers/google/google.yaml +++ b/ai-provider/model-runtime/model-providers/google/google.yaml @@ -1,6 +1,6 @@ provider: google label: - en_US: Google + en_US: Google Gemini description: en_US: Google's Gemini model. zh_Hans: 谷歌提供的 Gemini 模型. @@ -38,4 +38,6 @@ provider_credential_schema: placeholder: zh_Hans: 在此输入您的 API Base, 如:https://api.google.com en_US: Enter your API Base, e.g. https://api.google.com -address: https://generativelanguage.googleapis.com \ No newline at end of file +address: https://generativelanguage.googleapis.com +recommend: true +sort: 3 \ No newline at end of file diff --git a/ai-provider/model-runtime/model-providers/minimax/minimax.yaml b/ai-provider/model-runtime/model-providers/minimax/minimax.yaml index c4ce3c75..d6d82e8a 100644 --- a/ai-provider/model-runtime/model-providers/minimax/minimax.yaml +++ b/ai-provider/model-runtime/model-providers/minimax/minimax.yaml @@ -27,4 +27,6 @@ provider_credential_schema: placeholder: zh_Hans: 在此输入您的 API Key en_US: Enter your API Key -address: https://api.minimax.chat \ No newline at end of file +address: https://api.minimax.chat +recommend: true +sort: 5 \ No newline at end of file diff --git a/ai-provider/model-runtime/model-providers/moonshot/moonshot.yaml b/ai-provider/model-runtime/model-providers/moonshot/moonshot.yaml index 577bf26c..406213b3 100644 --- a/ai-provider/model-runtime/model-providers/moonshot/moonshot.yaml +++ b/ai-provider/model-runtime/model-providers/moonshot/moonshot.yaml @@ -31,4 +31,6 @@ provider_credential_schema: placeholder: zh_Hans: 在此输入您的 API Key en_US: Enter your API Key -address: https://api.moonshot.cn \ No newline at end of file +address: https://api.moonshot.cn +recommend: true +sort: 6 \ No newline at end of file diff --git a/ai-provider/model-runtime/model-providers/nvidia/nvidia.yaml b/ai-provider/model-runtime/model-providers/nvidia/nvidia.yaml index e2fd93c7..c2038512 100644 --- a/ai-provider/model-runtime/model-providers/nvidia/nvidia.yaml +++ b/ai-provider/model-runtime/model-providers/nvidia/nvidia.yaml @@ -1,6 +1,6 @@ provider: nvidia label: - en_US: API Catalog + en_US: Nvidia description: en_US: API Catalog zh_Hans: API Catalog diff --git a/ai-provider/model-runtime/model-providers/openAI/openai.yaml b/ai-provider/model-runtime/model-providers/openAI/openai.yaml index 8b04aaef..475a8700 100644 --- a/ai-provider/model-runtime/model-providers/openAI/openai.yaml +++ b/ai-provider/model-runtime/model-providers/openAI/openai.yaml @@ -88,3 +88,5 @@ provider_credential_schema: zh_Hans: 在此输入您的 API Base, 如:https://api.openai.com en_US: Enter your API Base, e.g. https://api.openai.com address: https://api.openai.com +recommend: true +sort: 1 \ No newline at end of file diff --git a/ai-provider/model-runtime/model-providers/wenxin/wenxin.yaml b/ai-provider/model-runtime/model-providers/wenxin/wenxin.yaml index f4fde100..e429ea11 100644 --- a/ai-provider/model-runtime/model-providers/wenxin/wenxin.yaml +++ b/ai-provider/model-runtime/model-providers/wenxin/wenxin.yaml @@ -1,6 +1,6 @@ provider: wenxin label: - en_US: WenXin + en_US: Wenxin YiYan zh_Hans: 文心一言 icon_small: en_US: icon_s_en.svg @@ -38,4 +38,6 @@ provider_credential_schema: placeholder: zh_Hans: 在此输入您的 Secret Key en_US: Enter your Secret Key -address: https://aip.baidubce.com \ No newline at end of file +address: https://aip.baidubce.com +recommend: true +sort: 7 \ No newline at end of file diff --git a/ai-provider/model-runtime/model-providers/zhinao/assets/icon_l_en.svg b/ai-provider/model-runtime/model-providers/zhinao/assets/icon_l_en.svg index b22b8694..651a133f 100644 --- a/ai-provider/model-runtime/model-providers/zhinao/assets/icon_l_en.svg +++ b/ai-provider/model-runtime/model-providers/zhinao/assets/icon_l_en.svg @@ -1,8 +1,8 @@ - + - + diff --git a/ai-provider/model-runtime/model-providers/zhinao/assets/icon_s_en.svg b/ai-provider/model-runtime/model-providers/zhinao/assets/icon_s_en.svg index 8fe72b7d..2590f3d9 100644 --- a/ai-provider/model-runtime/model-providers/zhinao/assets/icon_s_en.svg +++ b/ai-provider/model-runtime/model-providers/zhinao/assets/icon_s_en.svg @@ -1,8 +1,8 @@ - + - + diff --git a/ai-provider/model-runtime/provider.go b/ai-provider/model-runtime/provider.go index 226719eb..666fc11f 100644 --- a/ai-provider/model-runtime/provider.go +++ b/ai-provider/model-runtime/provider.go @@ -22,6 +22,8 @@ type IProvider interface { ModelsByType(modelType string) ([]IModel, bool) IConfig MaskConfig(cfg string) string + Sort() int + Recommend() bool } type IProviderURI interface { @@ -72,6 +74,8 @@ func NewProvider(providerData string, modelContents map[string]eosc.Untyped[stri defaultModels: eosc.BuildUntyped[string, IModel](), modelsByType: eosc.BuildUntyped[string, []IModel](), maskKeys: make([]string, 0), + recommend: providerCfg.Recommend, + sort: providerCfg.Sort, uri: uri, } defaultCfg := make(map[string]string) @@ -126,9 +130,19 @@ type Provider struct { modelsByType eosc.Untyped[string, []IModel] maskKeys []string uri IProviderURI + sort int + recommend bool IConfig } +func (p *Provider) Sort() int { + return p.sort +} + +func (p *Provider) Recommend() bool { + return p.recommend +} + func (p *Provider) URI() IProviderURI { return p.uri } diff --git a/module/ai/dto/input.go b/module/ai/dto/input.go index 894bfd94..8f1b4c48 100644 --- a/module/ai/dto/input.go +++ b/module/ai/dto/input.go @@ -5,5 +5,6 @@ type UpdateLLM struct { } type UpdateConfig struct { - Config string `json:"config"` + DefaultLLM string `json:"default_llm"` + Config string `json:"config"` } diff --git a/module/ai/dto/output.go b/module/ai/dto/output.go index 9c37fcb5..c21f7ceb 100644 --- a/module/ai/dto/output.go +++ b/module/ai/dto/output.go @@ -7,7 +7,7 @@ type Provider struct { Name string `json:"name"` Config string `json:"config"` GetAPIKeyUrl string `json:"get_apikey_url"` - DefaultLLM string `json:"-"` + DefaultLLM string `json:"defaultLLM"` DefaultLLMConfig string `json:"-"` } @@ -18,6 +18,8 @@ type ProviderItem struct { DefaultLLMLogo string `json:"default_llm_logo"` Logo string `json:"logo"` Configured bool `json:"configured"` + Recommend bool `json:"recommend"` + Sort int `json:"sort"` UpdateTime time.Time `json:"-"` } diff --git a/module/ai/iml.go b/module/ai/iml.go index ba65e8e4..c1547850 100644 --- a/module/ai/iml.go +++ b/module/ai/iml.go @@ -90,9 +90,11 @@ func (i *imlProviderModule) Providers(ctx context.Context) ([]*ai_dto.ProviderIt continue } item := &ai_dto.ProviderItem{ - Id: v.ID(), - Name: v.Name(), - Logo: v.Logo(), + Id: v.ID(), + Name: v.Name(), + Logo: v.Logo(), + Recommend: v.Recommend(), + Sort: v.Sort(), } if info, has := providerMap[v.ID()]; has { item.Configured = true @@ -103,8 +105,19 @@ func (i *imlProviderModule) Providers(ctx context.Context) ([]*ai_dto.ProviderIt items = append(items, item) } sort.Slice(items, func(i, j int) bool { - - return items[i].UpdateTime.After(items[j].UpdateTime) + if items[i].Configured == items[j].Configured && items[i].Configured { + return items[i].Name < items[j].Name + } + if items[i].Sort != items[j].Sort { + if items[i].Sort == 0 { + return false + } + if items[j].Sort == 0 { + return true + } + return items[i].Sort < items[j].Sort + } + return items[i].Name < items[j].Name }) return items, nil } @@ -262,14 +275,14 @@ func (i *imlProviderModule) UpdateProviderConfig(ctx context.Context, id string, if !errors.Is(err, gorm.ErrRecordNotFound) { return err } - defaultLLm, ok := p.DefaultModel(model_runtime.ModelTypeLLM) - if !ok { - return fmt.Errorf("ai provider default llm not found") - } + //defaultLLm, ok := p.DefaultModel(model_runtime.ModelTypeLLM) + //if !ok { + // return fmt.Errorf("ai provider default llm not found") + //} info = &ai.Provider{ Id: id, Name: p.Name(), - DefaultLLM: defaultLLm.ID(), + DefaultLLM: input.DefaultLLM, Config: input.Config, } } diff --git a/module/service/dto/output.go b/module/service/dto/output.go index 55a5c1a0..74b3ac36 100644 --- a/module/service/dto/output.go +++ b/module/service/dto/output.go @@ -24,6 +24,7 @@ type AppItem struct { Team auto.Label `json:"team" aolabel:"team"` SubscribeNum int64 `json:"subscribe_num"` SubscribeVerifyNum int64 `json:"subscribe_verify_num"` + AuthNum int64 `json:"auth_num"` Description string `json:"description"` CreateTime auto.TimeLabel `json:"create_time"` UpdateTime auto.TimeLabel `json:"update_time"` diff --git a/module/service/iml.go b/module/service/iml.go index 075521f0..9f3325ba 100644 --- a/module/service/iml.go +++ b/module/service/iml.go @@ -7,6 +7,8 @@ import ( "sort" "strings" + application_authorization "github.com/APIParkLab/APIPark/service/application-authorization" + api_doc "github.com/APIParkLab/APIPark/service/api-doc" service_tag "github.com/APIParkLab/APIPark/service/service-tag" @@ -532,11 +534,12 @@ var ( ) type imlAppModule struct { - teamService team.ITeamService `autowired:""` - serviceService service.IServiceService `autowired:""` - teamMemberService team_member.ITeamMemberService `autowired:""` - subscribeService subscribe.ISubscribeService `autowired:""` - transaction store.ITransaction `autowired:""` + teamService team.ITeamService `autowired:""` + serviceService service.IServiceService `autowired:""` + teamMemberService team_member.ITeamMemberService `autowired:""` + subscribeService subscribe.ISubscribeService `autowired:""` + authService application_authorization.IAuthorizationService `autowired:""` + transaction store.ITransaction `autowired:""` } func (i *imlAppModule) ExportAll(ctx context.Context) ([]*service_dto.ExportApp, error) { @@ -600,6 +603,10 @@ func (i *imlAppModule) Search(ctx context.Context, teamId string, keyword string } } + appMap, err := i.authService.CountByApp(ctx, serviceIds...) + if err != nil { + return nil, err + } items := make([]*service_dto.AppItem, 0, len(services)) for _, model := range services { subscribeNum := subscribeCount[model.Id] @@ -614,6 +621,7 @@ func (i *imlAppModule) Search(ctx context.Context, teamId string, keyword string SubscribeNum: subscribeNum, SubscribeVerifyNum: verifyNum, CanDelete: subscribeNum == 0, + AuthNum: appMap[model.Id], }) } sort.Slice(items, func(i, j int) bool { diff --git a/service/application-authorization/iml.go b/service/application-authorization/iml.go index 97feab6f..c8b228b8 100644 --- a/service/application-authorization/iml.go +++ b/service/application-authorization/iml.go @@ -3,11 +3,11 @@ package application_authorization import ( "context" "time" - + "github.com/eolinker/go-common/utils" - + "github.com/eolinker/go-common/auto" - + "github.com/APIParkLab/APIPark/service/universally" "github.com/APIParkLab/APIPark/stores/service" ) @@ -24,6 +24,14 @@ type imlAuthorizationService struct { universally.IServiceEdit[Edit] } +func (i *imlAuthorizationService) CountByApp(ctx context.Context, appId ...string) (map[string]int64, error) { + w := map[string]interface{}{} + if len(appId) > 0 { + w["application"] = appId + } + return i.store.CountByGroup(ctx, "", w, "application") +} + func (i *imlAuthorizationService) ListByApp(ctx context.Context, appId ...string) ([]*Authorization, error) { w := map[string]interface{}{} if len(appId) > 0 { @@ -51,11 +59,11 @@ func (i *imlAuthorizationService) GetLabels(ctx context.Context, ids ...string) func (i *imlAuthorizationService) OnComplete() { i.IServiceGet = universally.NewGet[Authorization, service.Authorization](i.store, FromEntity) - + i.IServiceDelete = universally.NewDelete[service.Authorization](i.store) - + i.IServiceCreate = universally.NewCreator[Create, service.Authorization](i.store, "project_authorization", createEntityHandler, uniquestHandler, labelHandler) - + i.IServiceEdit = universally.NewEdit[Edit, service.Authorization](i.store, updateHandler, labelHandler) auto.RegisterService("project_authorization", i) } diff --git a/service/application-authorization/service.go b/service/application-authorization/service.go index cb355bb9..fd0f683f 100644 --- a/service/application-authorization/service.go +++ b/service/application-authorization/service.go @@ -3,7 +3,7 @@ package application_authorization import ( "context" "reflect" - + "github.com/APIParkLab/APIPark/service/universally" "github.com/eolinker/go-common/autowire" ) @@ -14,6 +14,7 @@ type IAuthorizationService interface { universally.IServiceCreate[Create] universally.IServiceEdit[Edit] ListByApp(ctx context.Context, appId ...string) ([]*Authorization, error) + CountByApp(ctx context.Context, appId ...string) (map[string]int64, error) } func init() { From db1d24bf54a7071d1bc5f85065124203a474fdf2 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Wed, 23 Oct 2024 16:42:56 +0800 Subject: [PATCH 42/91] upadte app list api --- module/service/iml.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/module/service/iml.go b/module/service/iml.go index 9f3325ba..04d478a1 100644 --- a/module/service/iml.go +++ b/module/service/iml.go @@ -603,7 +603,7 @@ func (i *imlAppModule) Search(ctx context.Context, teamId string, keyword string } } - appMap, err := i.authService.CountByApp(ctx, serviceIds...) + authMap, err := i.authService.CountByApp(ctx, serviceIds...) if err != nil { return nil, err } @@ -621,7 +621,7 @@ func (i *imlAppModule) Search(ctx context.Context, teamId string, keyword string SubscribeNum: subscribeNum, SubscribeVerifyNum: verifyNum, CanDelete: subscribeNum == 0, - AuthNum: appMap[model.Id], + AuthNum: authMap[model.Id], }) } sort.Slice(items, func(i, j int) bool { @@ -728,6 +728,10 @@ func (i *imlAppModule) SearchMyApps(ctx context.Context, teamId string, keyword if err != nil { return nil, err } + authMap, err := i.authService.CountByApp(ctx, serviceIds...) + if err != nil { + return nil, err + } subscribeCount := map[string]int64{} subscribeVerifyCount := map[string]int64{} @@ -764,6 +768,7 @@ func (i *imlAppModule) SearchMyApps(ctx context.Context, teamId string, keyword SubscribeNum: subscribeNum, SubscribeVerifyNum: verifyNum, CanDelete: subscribeNum == 0, + AuthNum: authMap[model.Id], }) } sort.Slice(items, func(i, j int) bool { From 041f4463f6f3cd59c2e341a946ad1f45d0aadc64 Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Wed, 23 Oct 2024 16:49:09 +0800 Subject: [PATCH 43/91] feat: Rename 'application' to 'consumer' and optimize consumer module display --- .../components/aoplatform/RenderRoutes.tsx | 2 +- .../src/components/aoplatform/BasicLayout.tsx | 2 +- .../aoplatform/UnUsedWordForTranslate.tsx | 10 +- .../common/src/const/approval/const.tsx | 8 +- frontend/packages/common/src/const/const.tsx | 11 +- .../common/src/locales/keyHashMap.json | 42 ++-- .../common/src/locales/scan/zh-CN.json | 44 ++-- .../common/src/utils/systemRunning.ts | 4 +- .../components/aoplatform/RenderRoutes.tsx | 2 +- .../core/src/const/system-running/const.ts | 2 +- .../core/src/const/system-running/type.ts | 4 +- .../packages/core/src/const/system/const.tsx | 6 +- frontend/packages/core/src/main.tsx | 2 +- .../src/pages/aiSetting/AiSettingList.tsx | 5 +- .../packages/core/src/pages/guide/Guide.tsx | 8 +- .../core/src/pages/system/SystemList.tsx | 3 +- .../packages/core/src/pages/team/TeamList.tsx | 2 +- .../src/component/MonitorAppPage.tsx | 6 +- .../src/component/MonitorTotalPage.tsx | 2 +- .../packages/dashboard/src/const/const.tsx | 8 +- .../dashboard/src/pages/DashboardTabPage.tsx | 2 +- .../components/aoplatform/RenderRoutes.tsx | 2 +- .../market/src/const/serviceHub/const.tsx | 32 +-- .../pages/serviceHub/ApplyServiceModal.tsx | 4 +- .../src/pages/serviceHub/ServiceHubDetail.tsx | 2 +- .../src/pages/serviceHub/ServiceHubList.tsx | 80 +++---- .../management/ManagementAppSetting.tsx | 2 +- .../management/ManagementConfig.tsx | 10 +- .../management/ManagementInsidePage.tsx | 8 +- .../management/ServiceHubManagement.tsx | 218 ++++++++++++------ .../packages/openApi/src/consts/const.tsx | 4 +- .../openApi/src/pages/OpenApiConfig.tsx | 4 +- .../openApi/src/pages/OpenApiList.tsx | 2 +- 33 files changed, 320 insertions(+), 223 deletions(-) diff --git a/frontend/packages/businessEntry/src/components/aoplatform/RenderRoutes.tsx b/frontend/packages/businessEntry/src/components/aoplatform/RenderRoutes.tsx index 76e06bfd..dea284a8 100644 --- a/frontend/packages/businessEntry/src/components/aoplatform/RenderRoutes.tsx +++ b/frontend/packages/businessEntry/src/components/aoplatform/RenderRoutes.tsx @@ -253,7 +253,7 @@ const PUBLIC_ROUTES:RouteConfig[] = [ key:uuidv4(), }, { - path:'tenantManagement', + path:'consumer', component:, provider:TenantManagementProvider, key:uuidv4(), diff --git a/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx b/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx index 4bba087c..207996b8 100644 --- a/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx +++ b/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx @@ -48,8 +48,8 @@ const themeToken = { const TOTAL_MENU_ITEMS:MenuProps['items'] = useMemo(() => [ getNavItem($t('工作空间'), 'workspace','/guide/page',, [ getNavItem({$t('首页')}, 'guide','/guide/page',,undefined,undefined,'all'), - getNavItem({$t('应用')}, 'tenantManagement','/tenantManagement',,undefined,undefined,'all'), getNavItem({$t('服务')}, 'service','/service',,undefined,undefined,'all'), + getNavItem({$t('消费者')}, 'consumer','/consumer',,undefined,undefined,'all'), getNavItem({$t('团队')}, 'team','/team',,undefined,undefined,'all'), ]), getNavItem($t('API 市场'), 'serviceHub','/serviceHub',,undefined,undefined,'system.workspace.api_market.view'), diff --git a/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx b/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx index 9d08413e..769b33f8 100644 --- a/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx +++ b/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx @@ -17,8 +17,8 @@ export const TranslateWord = ()=>{ {$t('只读成员')} {$t('服务管理员')} {$t('服务开发者')} - {$t('应用开发者')} - {$t('应用管理员')} + {$t('消费者开发者')} + {$t('消费者管理员')} {$t('驱动名称')} {$t('请求失败数')} {$t('转发失败数')} @@ -53,8 +53,8 @@ export const TranslateWord = ()=>{ {$t('上传 OpenAPI 文档 (.json/.yaml)')} {$t('替换 OpenAPI 文档 (.json/.yaml)')} {$t('打开 OpenAPI YAML 编辑器')} - {$t('无需审核:允许任何应用调用该服务')} - {$t('人工审核:仅允许通过人工审核的应用调用该服务')} + {$t('无需审核:允许任何消费者调用该服务')} + {$t('人工审核:仅允许通过人工审核的消费者调用该服务')} {$t('永久')} {$t('否')} {$t('是')} @@ -72,7 +72,7 @@ export const TranslateWord = ()=>{ {$t('版本状态')} {$t('创建人')} {$t('审核时间')} - {$t('申请方-应用')} + {$t('申请方-消费者')} {$t('审核状态')} {$t('申请人')} {$t('审核人')} diff --git a/frontend/packages/common/src/const/approval/const.tsx b/frontend/packages/common/src/const/approval/const.tsx index 6d6c9741..905834d3 100644 --- a/frontend/packages/common/src/const/approval/const.tsx +++ b/frontend/packages/common/src/const/approval/const.tsx @@ -15,7 +15,7 @@ export const SUBSCRIBE_APPROVAL_TABLE_COLUMN : PageProColumns([ - ['workspace',['tenantManagement','service','team','guide']], - ['my',['tenantManagement','service','team']], + ['workspace',['consumer','service','team','guide']], + ['my',['consumer','service','team']], ['mainPage',['dashboard','systemrunning']], ['operationCenter',['member','user','role','common']], ['organization',['member','user','role']], @@ -68,4 +68,9 @@ export const routerKeyMap = new Map([ export const DELETE_TIPS = { default:('该数据删除后将无法找回,请确认是否删除?') - } \ No newline at end of file + } + + export const DATA_SHOW_TYPE_OPTIONS = [ + {label:'列表', value:'list'}, + {label:'块', value:'block'}, + ] \ No newline at end of file diff --git a/frontend/packages/common/src/locales/keyHashMap.json b/frontend/packages/common/src/locales/keyHashMap.json index 31e50cfd..e0f6def1 100644 --- a/frontend/packages/common/src/locales/keyHashMap.json +++ b/frontend/packages/common/src/locales/keyHashMap.json @@ -1,7 +1,7 @@ { "工作空间": "Kc0e5ef9f", "首页": "K4de11e23", - "应用": "Kfe93ef35", + "消费者": "Kfe93ef35", "服务": "Kb58e0c3f", "团队": "Kc9e489f5", "API 市场": "K61c89f5f", @@ -95,8 +95,8 @@ "只读成员": "Ke41d7451", "服务管理员": "Kf99e8b66", "服务开发者": "Kda8db57a", - "应用开发者": "K216a1ac7", - "应用管理员": "K27924db", + "消费者开发者": "K216a1ac7", + "消费者管理员": "K27924db", "驱动名称": "K8dc5c723", "请求失败数": "Kda249fe8", "转发失败数": "Kcf2df651", @@ -131,8 +131,8 @@ "上传 OpenAPI 文档 (.json/.yaml)": "K6206e4ad", "替换 OpenAPI 文档 (.json/.yaml)": "Kfba46e6d", "打开 OpenAPI YAML 编辑器": "Kdac8ce7e", - "无需审核:允许任何应用调用该服务": "Kffd7e274", - "人工审核:仅允许通过人工审核的应用调用该服务": "K8a8b13e4", + "无需审核:允许任何消费者调用该服务": "Kffd7e274", + "人工审核:仅允许通过人工审核的消费者调用该服务": "K8a8b13e4", "永久": "Kbfe02d7f", "否": "K1e9c479e", "是": "Kaddfcb6b", @@ -150,7 +150,7 @@ "版本状态": "Kcbf39b82", "创建人": "K339d15b5", "审核时间": "K7194cea2", - "申请方-应用": "K831aa6c0", + "申请方-消费者": "K831aa6c0", "审核状态": "K7ad449bc", "审核人": "K3b3a98ce", "来源": "K61b62ace", @@ -369,7 +369,7 @@ "创建 AI 服务和 API": "Kc057704a", "创建 AI 类型的服务,并且你可以将 Prompt 提示词设置为一个 API,简化使用 AI 的流程。": "K76bb4a09", "创建调用 Token": "K71b2c70f", - "为了安全地调用 API,你需要创建一个应用以及Token。": "K9bdd8403", + "为了安全地调用 API,你需要创建一个消费者以及Token。": "K9bdd8403", "调用": "Kc5738b6c", "现在你可以通过 Token 来调用这些 API。": "Kd6d7ca1f", "快速接入 REST API": "K86cf95f", @@ -379,13 +379,13 @@ "核心功能": "K2cdbb773", "账号与角色": "K3378c50d", "邀请你的团队成员加入 APIPark,共同管理和调用 API。": "Kda5bb930", - "团队中包含了人员、应用和服务,不同团队之间的应用和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。": "Kc8239422", + "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。": "Kc8239422", "服务内包含一组 API,并且可以发布到 API 市场被其他团队使用。": "Kd5be0cd7", "权限管理": "K62e89ee7", "订阅服务": "K8f7808e6", "如果需要调用某个服务的 API,需要先订阅该服务,并且等待提供服务的团队审核后才可发起 API 请求。": "Kf2410413", "审核订阅申请": "K6c2e44b8", - "提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的应用才可发起 API 请求。": "Ka0a8840a", + "提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。": "Ka0a8840a", "APIPark 提供详尽的 API 调用日志,帮助企业监控、分析和审计 API 的运行状况。": "K3453272", "Hello!欢迎使用 APIPark": "Kd518ba3e", "你能通过 APIPark 快速在企业内部构建 API 开放门户/市场,享受极致的转发性能、API 可观测、服务治理、多租户管理、订阅审核流程等诸多好处。": "K7e04ea16", @@ -518,7 +518,7 @@ "添加成员": "Kec46a57f", "输入姓名查找": "K48724410", "搜索用户名、邮箱": "Kb9052305", - "设置团队和成员,然后你可以在团队内创建服务和应用、订阅API,成员只能看到所属团队内的服务和应用。": "K5ece3bac", + "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。": "K5ece3bac", "添加团队": "K510cdd27", "输入名称、ID、负责人查找团队": "K9244ae14", "配置团队": "Kc7b24b4b", @@ -538,8 +538,8 @@ "导出": "Ka2c794a2", "退出全屏": "Kaf70c3b", "(0)调用详情": "Kd22841a4", - "应用调用统计": "K1512e983", - "请选择应用": "Kb4d2007f", + "消费者调用统计": "K1512e983", + "请选择消费者": "Kb4d2007f", "调用趋势": "K8c7f2d2e", "(0)-(1)调用趋势": "K657c3452", "调用量统计": "Kc04efb87", @@ -562,7 +562,7 @@ "请选择服务": "Kffcfe375", "调用详情": "Ka65f739c", "API 请求量 Top10": "K89b7ac79", - "应用调用量 Top10": "Kc0915603", + "消费者调用量 Top10": "Kc0915603", "服务被调用量 Top10": "Kf90b54", "暂无请求统计数据": "Kfb26388", "请求统计": "Kc8cbd8f8", @@ -585,9 +585,9 @@ "万": "Ke6a935d", "搜索分类或标签": "Kd59290a2", "暂无API数据": "K6b75bdbc", - "搜索或选择应用": "Kd8a7a689", + "搜索或选择消费者": "Kd8a7a689", "申请理由": "K4b15d6f5", - "应用管理": "Kb7e869a4", + "消费者管理": "Kb7e869a4", "鉴权类型": "Kb71b5a13", "Iss": "K4d1465ee", "签名算法": "K5dcd7ed8", @@ -600,9 +600,9 @@ "SK": "K31418470", "Apikey": "Kbfeb5297", "隐藏鉴权信息": "Ke64e43a", - "应用名称": "K5168eb63", - "应用 ID": "K546e46f", - "删除应用": "K95764d1d", + "消费者名称": "K5168eb63", + "消费者 ID": "K546e46f", + "删除消费者": "K95764d1d", "鉴权详情": "K217cb125", "添加鉴权": "K2bb63eca", "编辑鉴权": "Kd74d69b7", @@ -619,7 +619,7 @@ "请确认是否取消订阅申请?": "K1856c229", "搜索服务": "K66ea2f0", "审核中": "K8adf7f8b", - "添加应用": "K667bbbe7", + "添加消费者": "K667bbbe7", "暂无服务描述": "Ka4b45550", "订阅的服务数量:已通过 (0) 个,申请中 (1) 个": "K3c7b175f", "退出测试": "Kbe3e9335", @@ -630,14 +630,14 @@ "Base URL": "Kc29dabf2", "申请": "K4aa9ed2c", "服务信息": "K6c060779", - "接入应用": "K8723422e", + "接入消费者": "K8723422e", "供应方": "Kb97544cb", "分类": "Kb32f0afe", "版本": "K81634069", "更新时间": "Keefda53d", "无标签": "K96a2f1c8", "API 数量": "K72b0c0b3", - "接入应用数量": "K93d5a66e", + "接入消费者数量": "K93d5a66e", "关联标签": "K96059c69", "更新者": "K8b7c2592", "添加 Open Api": "K32263abd", diff --git a/frontend/packages/common/src/locales/scan/zh-CN.json b/frontend/packages/common/src/locales/scan/zh-CN.json index 542ec514..3a90e204 100644 --- a/frontend/packages/common/src/locales/scan/zh-CN.json +++ b/frontend/packages/common/src/locales/scan/zh-CN.json @@ -1,7 +1,7 @@ { "Kc0e5ef9f": "工作空间", "K4de11e23": "首页", - "Kfe93ef35": "应用", + "Kfe93ef35": "消费者", "Kb58e0c3f": "服务", "Kc9e489f5": "团队", "K61c89f5f": "API 门户", @@ -91,8 +91,8 @@ "K6206e4ad": "上传 OpenAPI 文档 (.json/.yaml)", "Kfba46e6d": "替换 OpenAPI 文档 (.json/.yaml)", "Kdac8ce7e": "打开 OpenAPI YAML 编辑器", - "Kffd7e274": "无审核:允许所有应用订阅该服务", - "K8a8b13e4": "人工审核:仅允许审核通过的应用订阅该服务", + "Kffd7e274": "无审核:允许所有消费者订阅该服务", + "K8a8b13e4": "人工审核:仅允许审核通过的消费者订阅该服务", "Kbfe02d7f": "永久", "K1e9c479e": "否", "Kaddfcb6b": "是", @@ -259,7 +259,7 @@ "Kc057704a": "创建 AI 服务和 API", "K76bb4a09": "创建 AI 类型的服务,并且你可以将 Prompt 提示词设置为一个 API,简化使用 AI 的流程。", "K71b2c70f": "创建调用 Token", - "K9bdd8403": "为了安全地调用 API,你需要创建一个应用以及Token。", + "K9bdd8403": "为了安全地调用 API,你需要创建一个消费者以及Token。", "Kc5738b6c": "调用", "Kd6d7ca1f": "现在你可以通过 Token 来调用这些 API。", "K86cf95f": "快速接入 REST API", @@ -269,16 +269,16 @@ "K2cdbb773": "核心功能", "K3378c50d": "账号与角色", "Kda5bb930": "邀请你的团队成员加入 APIPark,共同管理和调用 API。", - "Kc8239422": "团队中包含了人员、应用和服务,不同团队之间的应用和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。", + "Kc8239422": "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。", "Kd5be0cd7": "服务内包含一组 API,并且可以发布到 API 市场被其他团队使用。", "K62e89ee7": "权限管理", "K8f7808e6": "订阅服务", "Kf2410413": "如果需要调用某个服务的 API,需要先订阅该服务,并且等待提供服务的团队审核后才可发起 API 请求。", "K6c2e44b8": "审核订阅", - "Ka0a8840a": "审核其他应用的订阅申请,审核通过后的才可发起 API 请求。", + "Ka0a8840a": "审核其他消费者的订阅申请,审核通过后的才可发起 API 请求。", "K3453272": "APIPark 提供详尽的 API 调用日志,帮助企业监控、分析和审计 API 的运行状况。", "Kd518ba3e": "Hello!欢迎使用 APIPark", - "K7e04ea16": "🦄 APIPark 是开源的一站式 AI 网关和 API 开发者门户,帮助企业和开发者快速接入 100+ AI 模型,将 AI 模型和 Prompt 提示词组合成新的 API,并且统一所有 AI 的请求数据格式,避免切换 AI 模型或调整提示词时影响你的 APP 应用或者微服务。你还可以通过 APIPark 的开发者门户在团队内共享 API,管理调用的应用并保障你的 API 安全,通过清晰的图表来监控你的 AI API 使用情况。", + "K7e04ea16": "🦄 APIPark 是开源的一站式 AI 网关和 API 开发者门户,帮助企业和开发者快速接入 100+ AI 模型,将 AI 模型和 Prompt 提示词组合成新的 API,并且统一所有 AI 的请求数据格式,避免切换 AI 模型或调整提示词时影响你的 APP 消费者或者微服务。你还可以通过 APIPark 的开发者门户在团队内共享 API,管理调用的消费者并保障你的 API 安全,通过清晰的图表来监控你的 AI API 使用情况。", "Kedd41c18": "✨ 如果你喜欢 APIPark,欢迎在 Github 为我们 Star 或提供产品反馈意见。", "Kef02fd87": "快速入门", "K43a3b38d": "我们提供了一些任务来帮你快速了解 APIPark", @@ -405,7 +405,7 @@ "Kec46a57f": "添加成员", "K48724410": "输入姓名查找", "Kb9052305": "搜索用户名、邮箱", - "K5ece3bac": "设置团队和成员,然后你可以在团队内创建服务和应用、订阅API,成员只能看到所属团队内的服务和应用。", + "K5ece3bac": "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。", "K510cdd27": "添加团队", "K9244ae14": "输入名称、ID、负责人查找团队", "Kc7b24b4b": "设置团队", @@ -425,8 +425,8 @@ "Ka2c794a2": "导出", "Kaf70c3b": "退出全屏", "Kd22841a4": "(0)调用详情", - "K1512e983": "应用调用统计", - "Kb4d2007f": "请选择应用", + "K1512e983": "消费者调用统计", + "Kb4d2007f": "请选择消费者", "K8c7f2d2e": "调用趋势", "K657c3452": "(0)-(1)调用趋势", "Kc04efb87": "调用量统计", @@ -449,7 +449,7 @@ "Kffcfe375": "请选择服务", "Ka65f739c": "调用详情", "K89b7ac79": "API Top10", - "Kc0915603": "应用 Top10", + "Kc0915603": "消费者 Top10", "Kf90b54": "服务 Top10", "Kfb26388": "无请求数据", "Kc8cbd8f8": "请求统计", @@ -472,9 +472,9 @@ "Ke6a935d": "万", "Kd59290a2": "搜索分类或标签", "K6b75bdbc": "无API数据", - "Kd8a7a689": "搜索或选择应用", + "Kd8a7a689": "搜索或选择消费者", "K4b15d6f5": "申请理由", - "Kb7e869a4": "应用管理", + "Kb7e869a4": "消费者管理", "Kb71b5a13": "鉴权类型", "K4d1465ee": "ISS", "K5dcd7ed8": "签名算法", @@ -488,9 +488,9 @@ "Kbfeb5297": "API Key", "K1a78e6f0": "过期时间", "Ke64e43a": "隐藏认证信息", - "K5168eb63": "应用名称", - "K546e46f": "应用 ID", - "K95764d1d": "删除应用", + "K5168eb63": "消费者名称", + "K546e46f": "消费者 ID", + "K95764d1d": "删除消费者", "K217cb125": "鉴权详情", "K2bb63eca": "添加鉴权", "Kd74d69b7": "编辑鉴权", @@ -507,7 +507,7 @@ "K1856c229": "是否取消订阅申请?", "K66ea2f0": "搜索服务", "K8adf7f8b": "审核中", - "K667bbbe7": "添加应用", + "K667bbbe7": "添加消费者", "Ka4b45550": "无服务描述", "K3c7b175f": "订阅服务:已通过 (0) ,审核中 (1)", "Kbe3e9335": "退出测试", @@ -517,14 +517,14 @@ "K59cdbec3": "服务介绍", "K4aa9ed2c": "申请订阅", "K6c060779": "服务信息", - "K8723422e": "接入应用", + "K8723422e": "接入消费者", "Kb97544cb": "供应方", "Kb32f0afe": "分类", "K81634069": "版本", "Keefda53d": "更新时间", "K96a2f1c8": "无标签", "K72b0c0b3": "API 数量", - "K93d5a66e": "接入应用数量", + "K93d5a66e": "接入消费者数量", "K96059c69": "关联标签", "K8b7c2592": "更新者", "K32263abd": "添加 Open Api", @@ -546,8 +546,8 @@ "Ke41d7451": "只读成员", "Kf99e8b66": "服务管理员", "Kda8db57a": "服务开发者", - "K216a1ac7": "应用开发者", - "K27924db": "应用管理员", + "K216a1ac7": "消费者开发者", + "K27924db": "消费者管理员", "K8dc5c723": "驱动名称", "Kda249fe8": "失败", "Kcf2df651": "失败", @@ -589,7 +589,7 @@ "Kcbf39b82": "版本状态", "K339d15b5": "创建人", "K7194cea2": "审核时间", - "K831aa6c0": "申请方-应用", + "K831aa6c0": "申请方-消费者", "K7ad449bc": "审核状态", "K3b3a98ce": "审核人", "K61b62ace": "来源", diff --git a/frontend/packages/common/src/utils/systemRunning.ts b/frontend/packages/common/src/utils/systemRunning.ts index 34e3304c..06d18004 100644 --- a/frontend/packages/common/src/utils/systemRunning.ts +++ b/frontend/packages/common/src/utils/systemRunning.ts @@ -1,6 +1,6 @@ /** - * @description 获取全局应用关系视图(即空间下所有项目组的 api 关联关系) + * @description 获取全局消费者关系视图(即空间下所有项目组的 api 关联关系) * @param request * @returns */ @@ -22,7 +22,7 @@ import { NodeData } from "@core/const/system-running/type" import { TopologyProjectItem, TopologyServiceItem } from "@core/pages/systemRunning/SystemRunning" /** - * @description 获取全局应用关系视图(即空间下所有项目组的 api 关联关系) + * @description 获取全局消费者关系视图(即空间下所有项目组的 api 关联关系) * @param request * @returns */ diff --git a/frontend/packages/core/src/components/aoplatform/RenderRoutes.tsx b/frontend/packages/core/src/components/aoplatform/RenderRoutes.tsx index 4cf2c011..ad5635b1 100644 --- a/frontend/packages/core/src/components/aoplatform/RenderRoutes.tsx +++ b/frontend/packages/core/src/components/aoplatform/RenderRoutes.tsx @@ -366,7 +366,7 @@ const PUBLIC_ROUTES:RouteConfig[] = [ key:uuidv4(), }, { - path:'tenantManagement', + path:'consumer', component:, provider:TenantManagementProvider, key:uuidv4(), diff --git a/frontend/packages/core/src/const/system-running/const.ts b/frontend/packages/core/src/const/system-running/const.ts index 151beda9..92031046 100644 --- a/frontend/packages/core/src/const/system-running/const.ts +++ b/frontend/packages/core/src/const/system-running/const.ts @@ -1,7 +1,7 @@ export const BASE_GROUP_ORDER = JSON.stringify({}) /** - * 应用关系图节点字体大小 + * 消费者关系图节点字体大小 */ export const RELATIVE_PICTURE_NODE_FONTSIZE = 14 diff --git a/frontend/packages/core/src/const/system-running/type.ts b/frontend/packages/core/src/const/system-running/type.ts index 58673fb0..0bc19424 100644 --- a/frontend/packages/core/src/const/system-running/type.ts +++ b/frontend/packages/core/src/const/system-running/type.ts @@ -49,14 +49,14 @@ export interface GetProjectGroupRelativeRequest { } /** - * 获取空间应用(项目组)关联关系请求体 + * 获取空间消费者(项目组)关联关系请求体 */ export interface GetSpaceProjectGroupRelativeRequest { spaceId: string } /** - * 获取空间应用(项目组)关联关系返回体 + * 获取空间消费者(项目组)关联关系返回体 */ export interface GetSpaceProjectGroupRelativeResponse { success: boolean diff --git a/frontend/packages/core/src/const/system/const.tsx b/frontend/packages/core/src/const/system/const.tsx index ac9a79d7..19d329a2 100644 --- a/frontend/packages/core/src/const/system/const.tsx +++ b/frontend/packages/core/src/const/system/const.tsx @@ -355,12 +355,12 @@ export const PROXY_HEADER_CONFIG:ConfigField[] = [ export const SERVICE_VISUALIZATION_OPTIONS = [ {label:('内部服务:可通过网关访问,但不展示在服务广场'),value:'inner'}, - {label:('公开服务:可通过网关访问,展示在服务广场,可被其他应用订阅'),value:'public'}]; + {label:('公开服务:可通过网关访问,展示在服务广场,可被其他消费者订阅'),value:'public'}]; export const SERVICE_APPROVAL_OPTIONS = [ - {label:('无需审核:允许任何应用调用该服务'),value:'auto'}, - {label:('人工审核:仅允许通过人工审核的应用调用该服务'),value:'manual'}]; + {label:('无需审核:允许任何消费者调用该服务'),value:'auto'}, + {label:('人工审核:仅允许通过人工审核的消费者调用该服务'),value:'manual'}]; export const SERVICE_KIND_OPTIONS = [ {label:('REST'),value:'rest'}, {label:('AI'),value:'ai'}]; diff --git a/frontend/packages/core/src/main.tsx b/frontend/packages/core/src/main.tsx index 4b3f3e92..7d71bc81 100644 --- a/frontend/packages/core/src/main.tsx +++ b/frontend/packages/core/src/main.tsx @@ -10,7 +10,7 @@ async function initializeApp() { // 初始化行为 // await fetchInitialConfig(); // 示例:获取初始配置 - // 异步操作完成后,渲染React应用 + // 异步操作完成后,渲染React消费者 ReactDOM.createRoot(document.getElementById('root')!).render( diff --git a/frontend/packages/core/src/pages/aiSetting/AiSettingList.tsx b/frontend/packages/core/src/pages/aiSetting/AiSettingList.tsx index 5bcf9bef..a4c8591d 100644 --- a/frontend/packages/core/src/pages/aiSetting/AiSettingList.tsx +++ b/frontend/packages/core/src/pages/aiSetting/AiSettingList.tsx @@ -164,7 +164,10 @@ const AiSettingList = ()=>{ return ( -
+
+ + {provider.name} +
{provider.configured ? $t('已配置') : $t('未配置')} diff --git a/frontend/packages/core/src/pages/guide/Guide.tsx b/frontend/packages/core/src/pages/guide/Guide.tsx index 8e478c84..ef3045ed 100644 --- a/frontend/packages/core/src/pages/guide/Guide.tsx +++ b/frontend/packages/core/src/pages/guide/Guide.tsx @@ -30,7 +30,7 @@ export default function Guide(){ }, { title: $t("创建调用 Token"), - description: $t('为了安全地调用 API,你需要创建一个应用以及Token。'), + description: $t('为了安全地调用 API,你需要创建一个消费者以及Token。'), link: 'https://docs.apipark.com/docs/quick/suberscriber/application' }, { @@ -50,7 +50,7 @@ export default function Guide(){ }, { title: $t("创建调用 Token"), - description: $t('为了安全地调用 API,你需要创建一个应用以及Token。'), + description: $t('为了安全地调用 API,你需要创建一个消费者以及Token。'), link: 'https://docs.apipark.com/docs/quick/suberscriber/subscribe' }, { @@ -82,7 +82,7 @@ export default function Guide(){ }, { title: $t("团队"), - description: $t('团队中包含了人员、应用和服务,不同团队之间的应用和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。'), + description: $t('团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。'), link: 'https://docs.apipark.com/docs/quick/provider/service' }, { @@ -102,7 +102,7 @@ export default function Guide(){ }, { title: $t("审核订阅申请"), - description: $t('提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的应用才可发起 API 请求。'), + description: $t('提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。'), link: 'https://docs.apipark.com/docs/quick/suberscriber/subscribe' } ] diff --git a/frontend/packages/core/src/pages/system/SystemList.tsx b/frontend/packages/core/src/pages/system/SystemList.tsx index 5a4776ef..8f53ae96 100644 --- a/frontend/packages/core/src/pages/system/SystemList.tsx +++ b/frontend/packages/core/src/pages/system/SystemList.tsx @@ -14,7 +14,6 @@ import { DrawerWithFooter } from "@common/components/aoplatform/DrawerWithFooter import SystemConfig from "./SystemConfig.tsx"; import { useGlobalContext } from "@common/contexts/GlobalStateContext.tsx"; import { $t } from "@common/locales/index.ts"; -import Joyride from "react-joyride"; import InsidePage from "@common/components/aoplatform/InsidePage.tsx"; const SystemList:FC = ()=>{ @@ -37,7 +36,7 @@ const SystemList:FC = ()=>{ getGlobalAccessData()?.then?.(()=>{ getSystemList() }) - return + return Promise.resolve({data:[], success:false}) } if(!tableHttpReload){ setTableHttpReload(true) diff --git a/frontend/packages/core/src/pages/team/TeamList.tsx b/frontend/packages/core/src/pages/team/TeamList.tsx index 1fba9241..b7d87645 100644 --- a/frontend/packages/core/src/pages/team/TeamList.tsx +++ b/frontend/packages/core/src/pages/team/TeamList.tsx @@ -165,7 +165,7 @@ const TeamList:FC = ()=>{ return ( diff --git a/frontend/packages/dashboard/src/component/MonitorAppPage.tsx b/frontend/packages/dashboard/src/component/MonitorAppPage.tsx index b76bcfbc..1d3e45aa 100644 --- a/frontend/packages/dashboard/src/component/MonitorAppPage.tsx +++ b/frontend/packages/dashboard/src/component/MonitorAppPage.tsx @@ -99,7 +99,7 @@ export default function MonitorAppPage(props:MonitorAppPageProps){ fetchTableData(data).then((resp) => { const {code,data,msg} = resp if(code === STATUS_CODE.SUCCESS){ - exportExcel($t('应用调用统计'), [query!.start!, query!.end!], $t('应用调用统计'), 'dashboard_application', APPLICATION_TABLE_GLOBAL_COLUMNS_CONFIG, data.statistics) + exportExcel($t('消费者调用统计'), [query!.start!, query!.end!], $t('消费者调用统计'), 'dashboard_application', APPLICATION_TABLE_GLOBAL_COLUMNS_CONFIG, data.statistics) }else{ message.error(msg || $t(RESPONSE_TIPS.dataError)) } @@ -144,13 +144,13 @@ export default function MonitorAppPage(props:MonitorAppPageProps){ onTimeRangeChange={handleTimeRangeChange}/>
- + x.value !== entity.id)}/> + + + setShowAI(value === 'ai')}> - + {setShowAI(e.target.value === 'ai')}} > + +
+ + {$t('AI 服务')}
+
+ +
+ + {$t('REST 服务')}
+
+
} {showAI && From 26b52b1ab093ef08370b48941da9bc7ad0da639e Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Thu, 24 Oct 2024 11:40:14 +0800 Subject: [PATCH 47/91] fix: Modify Ai setting --- .../src/pages/aiSetting/AiSettingList.tsx | 64 ++-------- .../src/pages/aiSetting/AiSettingModal.tsx | 109 ++++++++++++++---- 2 files changed, 97 insertions(+), 76 deletions(-) diff --git a/frontend/packages/core/src/pages/aiSetting/AiSettingList.tsx b/frontend/packages/core/src/pages/aiSetting/AiSettingList.tsx index a4c8591d..b09ce4c5 100644 --- a/frontend/packages/core/src/pages/aiSetting/AiSettingList.tsx +++ b/frontend/packages/core/src/pages/aiSetting/AiSettingList.tsx @@ -4,12 +4,11 @@ import { BasicResponse, STATUS_CODE, RESPONSE_TIPS } from "@common/const/const"; import { useFetch } from "@common/hooks/http"; import { $t } from "@common/locales"; import { Icon } from "@iconify/react/dist/iconify.js"; -import { App, Spin, Card, Tag, Select, Button, Empty, Divider } from "antd"; +import { App, Spin, Card, Tag, Button, Empty, Divider } from "antd"; import { memo, useEffect, useRef, useState } from "react"; import AiSettingModalContent, { AiSettingModalContentHandle } from "./AiSettingModal"; import WithPermission from "@common/components/aoplatform/WithPermission"; import { useGlobalContext } from "@common/contexts/GlobalStateContext"; -import { DefaultOptionType } from "antd/es/select"; import { checkAccess } from "@common/utils/permission"; export type AiSettingListItem = { @@ -90,7 +89,7 @@ const AiSettingList = ()=>{ } modal.confirm({ title:$t('模型配置'), - content:, + content:, onOk:()=>{ return modalRef.current?.save().then((res)=>{if(res === true) setAiConfigFlushed(true) @@ -125,48 +124,12 @@ const AiSettingList = ()=>{ }, []); const CardBox = memo(({provider}:{provider:AiSettingListItem})=>{ - const [options, setOptions] = useState([]) - const [loading, setLoading] = useState(false) - const [defaultLlm, setDefaultLlm] = useState(provider.defaultLlm) - - const getLlmList = ()=>{ - if(options.length > 0) return - setLoading(true) - fetchData>(`ai/provider/llms`,{method:'GET',eoParams:{provider:provider.id}}).then(response=>{ - const {code,data,msg} = response - if(code === STATUS_CODE.SUCCESS){ - setOptions(data.llms?.map((x:AiProviderLlmsItems)=>({ - label:{x.id}, - value:x.id}))) - }else{ - message.error(msg || $t(RESPONSE_TIPS.error)) - } - }).finally(()=>{ - setLoading(false) - }) - } - - - const changeDefaultModel = (value: string, entity:AiSettingListItem) => { - setLoading(true) - return fetchData>(`ai/provider/default-llm`,{method:'PUT', eoBody:{llm:value}, eoParams:{provider:entity.id}}).then(response=>{ - const {code,msg} = response - if(code === STATUS_CODE.SUCCESS){ - setDefaultLlm(value) - message.success(msg || $t(RESPONSE_TIPS.success)) - }else{ - message.error(msg || $t(RESPONSE_TIPS.error)) - } - }).finally(()=>setLoading(false)) - }; - - return ( -
+
+
- {provider.name} + {provider.name}
{provider.configured ? $t('已配置') : $t('未配置')} @@ -178,18 +141,7 @@ const AiSettingList = ()=>{
{ provider.configured && <> - - ({ + value:x.id, + label:
+ {x.id} + {x?.scopes?.map(s=>{s?.toLocaleUpperCase()})} +
}))} + onChange={(e)=>{ + form.setFieldValue('config',llmList?.find(x=>x.id===e)?.config) + }}> + + + + + label={$t("参数")} + name="config" + > + + + ) }) From 7a4f3dc4c54eee681b487d9996d9e722e0df932c Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Thu, 24 Oct 2024 13:51:22 +0800 Subject: [PATCH 48/91] fix: Modify translation --- .../aoplatform/UnUsedWordForTranslate.tsx | 1 + .../common/src/locales/keyHashMap.json | 49 ++++++++++--------- .../common/src/locales/scan/en-US.json | 49 ++++++++++--------- .../src/locales/scan/newJson/en-US.json | 3 ++ .../src/locales/scan/newJson/ja-JP.json | 28 +++++++++++ .../src/locales/scan/newJson/zh-CN.json | 3 ++ .../src/locales/scan/newJson/zh-TW.json | 28 +++++++++++ .../src/locales/scan/oldJson/en-US.json | 24 +++++++++ .../src/locales/scan/oldJson/ja-JP.json | 24 +++++++++ .../src/locales/scan/oldJson/zh-CN.json | 24 +++++++++ .../src/locales/scan/oldJson/zh-TW.json | 24 +++++++++ .../common/src/locales/scan/zh-CN.json | 27 +++++++++- 12 files changed, 238 insertions(+), 46 deletions(-) create mode 100644 frontend/packages/common/src/locales/scan/newJson/en-US.json create mode 100644 frontend/packages/common/src/locales/scan/newJson/ja-JP.json create mode 100644 frontend/packages/common/src/locales/scan/newJson/zh-CN.json create mode 100644 frontend/packages/common/src/locales/scan/newJson/zh-TW.json create mode 100644 frontend/packages/common/src/locales/scan/oldJson/en-US.json create mode 100644 frontend/packages/common/src/locales/scan/oldJson/ja-JP.json create mode 100644 frontend/packages/common/src/locales/scan/oldJson/zh-CN.json create mode 100644 frontend/packages/common/src/locales/scan/oldJson/zh-TW.json diff --git a/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx b/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx index 769b33f8..296a9473 100644 --- a/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx +++ b/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx @@ -132,6 +132,7 @@ export const TranslateWord = ()=>{ {$t('每小时')} {$t('每天')} {$t('每周')} + {$t('上线结果')} ) diff --git a/frontend/packages/common/src/locales/keyHashMap.json b/frontend/packages/common/src/locales/keyHashMap.json index e0f6def1..2f8e2877 100644 --- a/frontend/packages/common/src/locales/keyHashMap.json +++ b/frontend/packages/common/src/locales/keyHashMap.json @@ -1,8 +1,8 @@ { "工作空间": "Kc0e5ef9f", "首页": "K4de11e23", - "消费者": "Kfe93ef35", "服务": "Kb58e0c3f", + "消费者": "K7acfcfad", "团队": "Kc9e489f5", "API 市场": "K61c89f5f", "仪表盘": "K16d71239", @@ -95,8 +95,8 @@ "只读成员": "Ke41d7451", "服务管理员": "Kf99e8b66", "服务开发者": "Kda8db57a", - "消费者开发者": "K216a1ac7", - "消费者管理员": "K27924db", + "消费者开发者": "Kc8054dba", + "消费者管理员": "Keb1673a6", "驱动名称": "K8dc5c723", "请求失败数": "Kda249fe8", "转发失败数": "Kcf2df651", @@ -131,8 +131,8 @@ "上传 OpenAPI 文档 (.json/.yaml)": "K6206e4ad", "替换 OpenAPI 文档 (.json/.yaml)": "Kfba46e6d", "打开 OpenAPI YAML 编辑器": "Kdac8ce7e", - "无需审核:允许任何消费者调用该服务": "Kffd7e274", - "人工审核:仅允许通过人工审核的消费者调用该服务": "K8a8b13e4", + "无需审核:允许任何消费者调用该服务": "K1fc2cc28", + "人工审核:仅允许通过人工审核的消费者调用该服务": "K8dabb98e", "永久": "Kbfe02d7f", "否": "K1e9c479e", "是": "Kaddfcb6b", @@ -150,7 +150,7 @@ "版本状态": "Kcbf39b82", "创建人": "K339d15b5", "审核时间": "K7194cea2", - "申请方-消费者": "K831aa6c0", + "申请方-消费者": "K7c1fb123", "审核状态": "K7ad449bc", "审核人": "K3b3a98ce", "来源": "K61b62ace", @@ -207,6 +207,7 @@ "每小时": "Kf00f01ca", "每天": "Kfcda87fc", "每周": "K29ec75dc", + "上线结果": "K93c2696e", "暂无操作权限,请联系管理员分配。": "K23fda291", "微信小程序": "K4618cb0a", "获取文件,需填路径": "Ka854f511", @@ -369,7 +370,7 @@ "创建 AI 服务和 API": "Kc057704a", "创建 AI 类型的服务,并且你可以将 Prompt 提示词设置为一个 API,简化使用 AI 的流程。": "K76bb4a09", "创建调用 Token": "K71b2c70f", - "为了安全地调用 API,你需要创建一个消费者以及Token。": "K9bdd8403", + "为了安全地调用 API,你需要创建一个消费者以及Token。": "Kdea9a418", "调用": "Kc5738b6c", "现在你可以通过 Token 来调用这些 API。": "Kd6d7ca1f", "快速接入 REST API": "K86cf95f", @@ -379,13 +380,13 @@ "核心功能": "K2cdbb773", "账号与角色": "K3378c50d", "邀请你的团队成员加入 APIPark,共同管理和调用 API。": "Kda5bb930", - "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。": "Kc8239422", + "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。": "Keee27105", "服务内包含一组 API,并且可以发布到 API 市场被其他团队使用。": "Kd5be0cd7", "权限管理": "K62e89ee7", "订阅服务": "K8f7808e6", "如果需要调用某个服务的 API,需要先订阅该服务,并且等待提供服务的团队审核后才可发起 API 请求。": "Kf2410413", "审核订阅申请": "K6c2e44b8", - "提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。": "Ka0a8840a", + "提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。": "Kaa717866", "APIPark 提供详尽的 API 调用日志,帮助企业监控、分析和审计 API 的运行状况。": "K3453272", "Hello!欢迎使用 APIPark": "Kd518ba3e", "你能通过 APIPark 快速在企业内部构建 API 开放门户/市场,享受极致的转发性能、API 可观测、服务治理、多租户管理、订阅审核流程等诸多好处。": "K7e04ea16", @@ -396,10 +397,10 @@ "了解 APIPark 如何更好地管理 API 和 AI": "K1afaf20e", "了解更多功能": "K48f7e21f", "隐藏该教程": "K698296e2", - "登录": "Kd2c1a316", "请输入账号": "Kf076f63c", "请输入密码": "K25c895d5", "密码": "K551b0348", + "登录": "Kd2c1a316", "访客模式": "K192b3e38", "您可通过访客模式查看所有页面和功能,但是无法编辑数据。访客模式仅用于了解产品功能,您可以在正式产品中关闭该功能。": "K91aa4801", "Version (0)-(1)": "K480045ce", @@ -480,6 +481,8 @@ "只允许上传PNG、JPG或SVG格式的图片": "Ka9c08390", "服务名称": "K413b9869", "服务类型": "K9919285b", + "AI 服务": "Kd2c34e2c", + "REST 服务": "K62840d62", "默认 AI 供应商": "Kcef64f4d", "创建 API 时会默认选择该供应商,修改默认供应商不会影响现有 API": "K300c89d4", "未配置任何 AI 模型供应商,": "Kcab588a9", @@ -518,7 +521,7 @@ "添加成员": "Kec46a57f", "输入姓名查找": "K48724410", "搜索用户名、邮箱": "Kb9052305", - "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。": "K5ece3bac", + "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。": "K4c72fb6f", "添加团队": "K510cdd27", "输入名称、ID、负责人查找团队": "K9244ae14", "配置团队": "Kc7b24b4b", @@ -538,8 +541,8 @@ "导出": "Ka2c794a2", "退出全屏": "Kaf70c3b", "(0)调用详情": "Kd22841a4", - "消费者调用统计": "K1512e983", - "请选择消费者": "Kb4d2007f", + "消费者调用统计": "K61cca533", + "请选择消费者": "Kdfff59d4", "调用趋势": "K8c7f2d2e", "(0)-(1)调用趋势": "K657c3452", "调用量统计": "Kc04efb87", @@ -562,7 +565,7 @@ "请选择服务": "Kffcfe375", "调用详情": "Ka65f739c", "API 请求量 Top10": "K89b7ac79", - "消费者调用量 Top10": "Kc0915603", + "消费者调用量 Top10": "K386857bd", "服务被调用量 Top10": "Kf90b54", "暂无请求统计数据": "Kfb26388", "请求统计": "Kc8cbd8f8", @@ -585,9 +588,9 @@ "万": "Ke6a935d", "搜索分类或标签": "Kd59290a2", "暂无API数据": "K6b75bdbc", - "搜索或选择消费者": "Kd8a7a689", + "搜索或选择消费者": "Kb684c806", "申请理由": "K4b15d6f5", - "消费者管理": "Kb7e869a4", + "消费者管理": "Ke0fbd1c8", "鉴权类型": "Kb71b5a13", "Iss": "K4d1465ee", "签名算法": "K5dcd7ed8", @@ -600,9 +603,9 @@ "SK": "K31418470", "Apikey": "Kbfeb5297", "隐藏鉴权信息": "Ke64e43a", - "消费者名称": "K5168eb63", - "消费者 ID": "K546e46f", - "删除消费者": "K95764d1d", + "消费者名称": "K67b530f", + "消费者 ID": "K11f34de", + "删除消费者": "Kc01002", "鉴权详情": "K217cb125", "添加鉴权": "K2bb63eca", "编辑鉴权": "Kd74d69b7", @@ -619,9 +622,11 @@ "请确认是否取消订阅申请?": "K1856c229", "搜索服务": "K66ea2f0", "审核中": "K8adf7f8b", - "添加消费者": "K667bbbe7", + "添加消费者": "K84c4dc71", "暂无服务描述": "Ka4b45550", + "创建并管理自己的消费者实体,每个消费者可以订阅多个API服务,确保在调用之前已获得相应权限。你可以为消费者生成 API 密钥等鉴权方式,用于安全地调用 API 服务": "K5c4e2865", "订阅的服务数量:已通过 (0) 个,申请中 (1) 个": "K3c7b175f", + "输入名称、ID 查找服务": "K40a89bd8", "退出测试": "Kbe3e9335", "服务市场": "K370a3eb2", "服务详情": "Kf7ec36d", @@ -630,14 +635,14 @@ "Base URL": "Kc29dabf2", "申请": "K4aa9ed2c", "服务信息": "K6c060779", - "接入消费者": "K8723422e", + "接入消费者": "Kba74f26d", "供应方": "Kb97544cb", "分类": "Kb32f0afe", "版本": "K81634069", "更新时间": "Keefda53d", "无标签": "K96a2f1c8", "API 数量": "K72b0c0b3", - "接入消费者数量": "K93d5a66e", + "接入消费者数量": "K70b79760", "关联标签": "K96059c69", "更新者": "K8b7c2592", "添加 Open Api": "K32263abd", diff --git a/frontend/packages/common/src/locales/scan/en-US.json b/frontend/packages/common/src/locales/scan/en-US.json index 7d753731..ebe459d2 100644 --- a/frontend/packages/common/src/locales/scan/en-US.json +++ b/frontend/packages/common/src/locales/scan/en-US.json @@ -1,7 +1,6 @@ { "Kc0e5ef9f": "Workspace", "K4de11e23": "Home", - "Kfe93ef35": "Application", "Kb58e0c3f": "Service", "Kc9e489f5": "Team", "K61c89f5f": "API Portal", @@ -91,8 +90,6 @@ "K6206e4ad": "Upload OpenAPI File (.json/.yaml)", "Kfba46e6d": "Replace OpenAPI File (.json/.yaml)", "Kdac8ce7e": "Open OpenAPI YAML Editor", - "Kffd7e274": "No Review: All applications are allowed to subscribe to this service", - "K8a8b13e4": "Manual Review: Only reviewed and approved applications can subscribe to this service", "Kbfe02d7f": "Permanent", "K1e9c479e": "No", "Kaddfcb6b": "Yes", @@ -259,7 +256,6 @@ "Kc057704a": "Create AI Services and APIs", "K76bb4a09": "Create AI-based services, and you can set the prompt as an API to simplify the process of using AI.", "K71b2c70f": "Create Call Token", - "K9bdd8403": "To securely call APIs, you need to create an application and a token.", "Kc5738b6c": "Call", "Kd6d7ca1f": "You can now call these APIs with the token.", "K86cf95f": "Quickly Integrate REST API", @@ -269,13 +265,11 @@ "K2cdbb773": "Core Features", "K3378c50d": "Account and Role", "Kda5bb930": "Invite your team members to APIPark to collaboratively manage and call APIs.", - "Kc8239422": "Teams include personnel, applications, and services. Data between different teams is isolated, and can be used to manage different departments/project teams/teams within the enterprise.", "Kd5be0cd7": "Services include a set of APIs and can be published to the API Marketplace for use by other teams.", "K62e89ee7": "Permission Management", "K8f7808e6": "Subscribe to Services", "Kf2410413": "To call an API from a service, you need to subscribe to that service and wait for approval from the providing team before initiating the API request.", "K6c2e44b8": "Review Subscription", - "Ka0a8840a": "Review subscription requests from other applications. Only approved requests can initiate API calls.", "K3453272": "APIPark provides detailed API call logs, helping enterprises monitor, analyze, and audit API operations.", "Kd518ba3e": "Hello! Welcome to APIPark", "K7e04ea16": "🦄 APIPark is an open-source, all-in-one AI gateway and API developer portal, enabling enterprises and developers to quickly integrate over 100 AI models, combine AI models and prompts into new APIs, and standardize all AI request data formats, ensuring that switching AI models or adjusting prompts does not affect your APP or microservice. Additionally, APIPark’s developer portal allows you to share APIs within your team, manage applications that call your APIs, and ensure API security, while monitoring your AI API usage with clear charts.", @@ -405,7 +399,6 @@ "Kec46a57f": "Add Member", "K48724410": "Enter Name to Search", "Kb9052305": "Search Username, Email", - "K5ece3bac": "Set up teams and members. You can then create services and applications, subscribe to APIs within the team. Members can only see services and applications within their team.", "K510cdd27": "Add Team", "K9244ae14": "Enter Name, ID, Person in Charge to Search Teams", "Kc7b24b4b": "Configure Team", @@ -425,8 +418,6 @@ "Ka2c794a2": "Export", "Kaf70c3b": "Exit Fullscreen", "Kd22841a4": "(0) Call Details", - "K1512e983": "Application Call Statistics", - "Kb4d2007f": "Please Select Application", "K8c7f2d2e": "Call Trend", "K657c3452": "(0)-(1) Call Trend", "Kc04efb87": "Call Volume Statistics", @@ -449,7 +440,6 @@ "Kffcfe375": "Please Select Service", "Ka65f739c": "Call Details", "K89b7ac79": "API Top 10", - "Kc0915603": "Application Top 10", "Kf90b54": "Service Top 10", "Kfb26388": "No Request Data", "Kc8cbd8f8": "Request Statistics", @@ -472,9 +462,7 @@ "Ke6a935d": "Ten Thousand", "Kd59290a2": "Search Category or Tag", "K6b75bdbc": "No API Data", - "Kd8a7a689": "Search or Select Application", "K4b15d6f5": "Application Reason", - "Kb7e869a4": "Application Settings", "Kb71b5a13": "Authentication Type", "K4d1465ee": "ISS", "K5dcd7ed8": "Signature Algorithm", @@ -488,9 +476,6 @@ "Kbfeb5297": "API Key", "K1a78e6f0": "Expiration Time", "Ke64e43a": "Hide Authentication Info", - "K5168eb63": "Application Name", - "K546e46f": "Application ID", - "K95764d1d": "Delete Application", "K217cb125": "Authentication Details", "K2bb63eca": "Add Authentication", "Kd74d69b7": "Edit Authentication", @@ -507,7 +492,6 @@ "K1856c229": "Are you sure you want to cancel the subscription request?", "K66ea2f0": "Search Services", "K8adf7f8b": "Under Review", - "K667bbbe7": "Add Application", "Ka4b45550": "No Service Description", "K3c7b175f": "Number of Subscribed Services: (0) Approved, (1) Pending", "Kbe3e9335": "Exit Test", @@ -517,7 +501,6 @@ "K59cdbec3": "Intro", "K4aa9ed2c": "Subscribe", "K6c060779": "Service Information", - "K8723422e": "Access Application", "Kb97544cb": "Provider", "Kb32f0afe": "Category", "K81634069": "Version", @@ -525,7 +508,6 @@ "Keefda53d": "Update Time", "K96a2f1c8": "No Tags", "K72b0c0b3": "Number of APIs", - "K93d5a66e": "Number of Access Applications", "K96059c69": "Associated Tags", "K32263abd": "Add Open API", "K7829bb78": "Configure Open API", @@ -546,8 +528,6 @@ "Ke41d7451": "Read-Only Member", "Kf99e8b66": "Service Administrator", "Kda8db57a": "Service Developer", - "K216a1ac7": "Application Developer", - "K27924db": "Application Administrator", "K8dc5c723": "Driver Name", "Kda249fe8": "Failure", "Kcf2df651": "Failure", @@ -575,7 +555,6 @@ "K593e0c7e": "No Review Required", "Ke2d747d9": "Review Required", "Kc29dabf2": "Base URL", - "Kd55c6887": "Review", "K300c89d4": "When creating an API, this provider is selected by default. Changing the default provider will not affect existing APIs.", "Kefaf9956": "Create Time", "Kad1c674c": "Protocol", @@ -589,7 +568,6 @@ "Kcbf39b82": "Status", "K339d15b5": "Creator", "K7194cea2": "Review Time", - "K831aa6c0": "Applicant - Application", "K7ad449bc": "Status", "K3b3a98ce": "Reviewer", "K61b62ace": "Source", @@ -646,5 +624,30 @@ "K29ec75dc": "Per Week", "Kac172626": "Please provide a reason when rejecting the request.", "Ke1b1865": "Private", - "K4786c57c": "Public" + "K4786c57c": "Public", + "K7acfcfad": "Consumer", + "Kc8054dba": "Consumer Developer", + "Keb1673a6": "Consumer Administrator", + "K1fc2cc28": "No Review: All consumers are allowed to subscribe to this service", + "K8dabb98e": "Manual Review: Only reviewed and approved consumers can subscribe to this service", + "K7c1fb123": "Applicant - Application", + "Kdea9a418": "To securely call APIs, you need to create an consumer and a token.", + "Keee27105": "Teams include personnel, consumers, and services. Data between different teams is isolated, and can be used to manage different departments/project teams/teams within the enterprise.", + "Kaa717866": "Review subscription requests from other consumers. Only approved requests can initiate API calls.", + "Kd2c34e2c": "AI Service", + "K62840d62": "REST Service", + "K4c72fb6f": "Set up teams and members. You can then create services and consumers, subscribe to APIs within the team. Members can only see services and applications within their team.", + "K61cca533": "Consumer Call Statistics", + "Kdfff59d4": "Please Select Consumer", + "K386857bd": "Consumer Top 10", + "Kb684c806": "Search or Select Consumer", + "Ke0fbd1c8": "Consumer Settings", + "K67b530f": "Consumer Name", + "K11f34de": "Consumer ID", + "Kc01002": "Delete Consumer", + "K84c4dc71": "Add Consumer", + "K5c4e2865": "Create and manage your own consumer entities, with each consumer able to subscribe to multiple API services, ensuring the necessary permissions are obtained before making any calls. You can generate API keys or other credentials for consumers to securely call API services.", + "K40a89bd8": "Enter Name, ID to Search Member", + "Kba74f26d": "Access Consumer", + "K70b79760": "Number of Access Consumers" } diff --git a/frontend/packages/common/src/locales/scan/newJson/en-US.json b/frontend/packages/common/src/locales/scan/newJson/en-US.json new file mode 100644 index 00000000..7f35055b --- /dev/null +++ b/frontend/packages/common/src/locales/scan/newJson/en-US.json @@ -0,0 +1,3 @@ +{ + "K93c2696e": "上线结果" +} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json new file mode 100644 index 00000000..6165c447 --- /dev/null +++ b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json @@ -0,0 +1,28 @@ +{ + "K7acfcfad": "消费者", + "Kc8054dba": "消费者开发者", + "Keb1673a6": "消费者管理员", + "K1fc2cc28": "无需审核:允许任何消费者调用该服务", + "K8dabb98e": "人工审核:仅允许通过人工审核的消费者调用该服务", + "K7c1fb123": "申请方-消费者", + "K93c2696e": "上线结果", + "Kdea9a418": "为了安全地调用 API,你需要创建一个消费者以及Token。", + "Keee27105": "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。", + "Kaa717866": "提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。", + "Kd2c34e2c": "AI 服务", + "K62840d62": "REST 服务", + "K4c72fb6f": "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。", + "K61cca533": "消费者调用统计", + "Kdfff59d4": "请选择消费者", + "K386857bd": "消费者调用量 Top10", + "Kb684c806": "搜索或选择消费者", + "Ke0fbd1c8": "消费者管理", + "K67b530f": "消费者名称", + "K11f34de": "消费者 ID", + "Kc01002": "删除消费者", + "K84c4dc71": "添加消费者", + "K5c4e2865": "创建并管理自己的消费者实体,每个消费者可以订阅多个API服务,确保在调用之前已获得相应权限。你可以为消费者生成 API 密钥等鉴权方式,用于安全地调用 API 服务", + "K40a89bd8": "输入名称、ID 查找服务", + "Kba74f26d": "接入消费者", + "K70b79760": "接入消费者数量" +} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json new file mode 100644 index 00000000..7f35055b --- /dev/null +++ b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json @@ -0,0 +1,3 @@ +{ + "K93c2696e": "上线结果" +} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json new file mode 100644 index 00000000..6165c447 --- /dev/null +++ b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json @@ -0,0 +1,28 @@ +{ + "K7acfcfad": "消费者", + "Kc8054dba": "消费者开发者", + "Keb1673a6": "消费者管理员", + "K1fc2cc28": "无需审核:允许任何消费者调用该服务", + "K8dabb98e": "人工审核:仅允许通过人工审核的消费者调用该服务", + "K7c1fb123": "申请方-消费者", + "K93c2696e": "上线结果", + "Kdea9a418": "为了安全地调用 API,你需要创建一个消费者以及Token。", + "Keee27105": "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。", + "Kaa717866": "提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。", + "Kd2c34e2c": "AI 服务", + "K62840d62": "REST 服务", + "K4c72fb6f": "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。", + "K61cca533": "消费者调用统计", + "Kdfff59d4": "请选择消费者", + "K386857bd": "消费者调用量 Top10", + "Kb684c806": "搜索或选择消费者", + "Ke0fbd1c8": "消费者管理", + "K67b530f": "消费者名称", + "K11f34de": "消费者 ID", + "Kc01002": "删除消费者", + "K84c4dc71": "添加消费者", + "K5c4e2865": "创建并管理自己的消费者实体,每个消费者可以订阅多个API服务,确保在调用之前已获得相应权限。你可以为消费者生成 API 密钥等鉴权方式,用于安全地调用 API 服务", + "K40a89bd8": "输入名称、ID 查找服务", + "Kba74f26d": "接入消费者", + "K70b79760": "接入消费者数量" +} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/oldJson/en-US.json b/frontend/packages/common/src/locales/scan/oldJson/en-US.json new file mode 100644 index 00000000..6cabbaaf --- /dev/null +++ b/frontend/packages/common/src/locales/scan/oldJson/en-US.json @@ -0,0 +1,24 @@ +{ + "Kfe93ef35": "Application", + "Kffd7e274": "No Review: All applications are allowed to subscribe to this service", + "K8a8b13e4": "Manual Review: Only reviewed and approved applications can subscribe to this service", + "K9bdd8403": "To securely call APIs, you need to create an application and a token.", + "Kc8239422": "Teams include personnel, applications, and services. Data between different teams is isolated, and can be used to manage different departments/project teams/teams within the enterprise.", + "Ka0a8840a": "Review subscription requests from other applications. Only approved requests can initiate API calls.", + "K5ece3bac": "Set up teams and members. You can then create services and applications, subscribe to APIs within the team. Members can only see services and applications within their team.", + "K1512e983": "Application Call Statistics", + "Kb4d2007f": "Please Select Application", + "Kc0915603": "Application Top 10", + "Kd8a7a689": "Search or Select Application", + "Kb7e869a4": "Application Settings", + "K5168eb63": "Application Name", + "K546e46f": "Application ID", + "K95764d1d": "Delete Application", + "K667bbbe7": "Add Application", + "K8723422e": "Access Application", + "K93d5a66e": "Number of Access Applications", + "K216a1ac7": "Application Developer", + "K27924db": "Application Administrator", + "Kd55c6887": "Review", + "K831aa6c0": "Applicant - Application" +} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/oldJson/ja-JP.json b/frontend/packages/common/src/locales/scan/oldJson/ja-JP.json new file mode 100644 index 00000000..0813c11e --- /dev/null +++ b/frontend/packages/common/src/locales/scan/oldJson/ja-JP.json @@ -0,0 +1,24 @@ +{ + "Kfe93ef35": "Application", + "Kffd7e274": "無審査:すべてのアプリケーションがこのサービスにサブスクライブできます", + "K8a8b13e4": "手動審査:承認されたアプリケーションのみがこのサービスにサブスクライブできます", + "K9bdd8403": "API を安全に呼び出すためには、アプリケーションとトークンを作成する必要があります。", + "Kc8239422": "チームにはユーザー、アプリケーション、サービスが含まれ、異なるチームのアプリケーションとサービスのデータは分離されています。企業内の部門/プロジェクトグループ/チームの管理に使用できます。", + "Ka0a8840a": "他のアプリケーションのサブスクリプション申請をレビューし、承認後に API リクエストが発行できます。", + "K5ece3bac": "チームとメンバーを設定してから、チーム内でサービスとアプリケーションを作成し、API をサブスクライブできます。メンバーは所属チーム内のサービスとアプリケーションのみを表示できます。", + "K1512e983": "アプリケーション呼び出し統計", + "Kb4d2007f": "Application を選択", + "Kc0915603": "Application トップ10", + "Kd8a7a689": "アプリケーションを検索または選択", + "Kb7e869a4": "アプリケーション管理", + "K5168eb63": "Application 名", + "K546e46f": "Application ID", + "K95764d1d": "Application を削除", + "K667bbbe7": "Application を追加", + "K8723422e": "アプリケーションを接続", + "K93d5a66e": "接続アプリケーション数", + "K216a1ac7": "アプリケーション開発者", + "K27924db": "アプリケーション管理者", + "Kd55c6887": "レビュー", + "K831aa6c0": "申請元-アプリケーション" +} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/oldJson/zh-CN.json b/frontend/packages/common/src/locales/scan/oldJson/zh-CN.json new file mode 100644 index 00000000..8103f44e --- /dev/null +++ b/frontend/packages/common/src/locales/scan/oldJson/zh-CN.json @@ -0,0 +1,24 @@ +{ + "Kfe93ef35": "消费者", + "Kffd7e274": "无审核:允许所有消费者订阅该服务", + "K8a8b13e4": "人工审核:仅允许审核通过的消费者订阅该服务", + "K9bdd8403": "为了安全地调用 API,你需要创建一个消费者以及Token。", + "Kc8239422": "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。", + "Ka0a8840a": "审核其他消费者的订阅申请,审核通过后的才可发起 API 请求。", + "K5ece3bac": "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。", + "K1512e983": "消费者调用统计", + "Kb4d2007f": "请选择消费者", + "Kc0915603": "消费者 Top10", + "Kd8a7a689": "搜索或选择消费者", + "Kb7e869a4": "消费者管理", + "K5168eb63": "消费者名称", + "K546e46f": "消费者 ID", + "K95764d1d": "删除消费者", + "K667bbbe7": "添加消费者", + "K8723422e": "接入消费者", + "K93d5a66e": "接入消费者数量", + "K216a1ac7": "消费者开发者", + "K27924db": "消费者管理员", + "Kd55c6887": "审核", + "K831aa6c0": "申请方-消费者" +} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/oldJson/zh-TW.json b/frontend/packages/common/src/locales/scan/oldJson/zh-TW.json new file mode 100644 index 00000000..5de69cea --- /dev/null +++ b/frontend/packages/common/src/locales/scan/oldJson/zh-TW.json @@ -0,0 +1,24 @@ +{ + "Kfe93ef35": "應用程式", + "Kffd7e274": "無審核:允許所有應用程式訂閱該服務", + "K8a8b13e4": "人工審核:僅允許審核通過的應用程式訂閱該服務", + "K9bdd8403": "為了安全地調用 API,你需要創建一個應用以及Token。", + "Kc8239422": "團隊中包含了人員、應用程式和服務,不同團隊之間的應用程式和服務數據是隔離的,可用於管理企業內部不同的部門/項目組/團隊。", + "Ka0a8840a": "審核其他應用程式的訂閱申請,審核通過後的才可發起 API 請求。", + "K5ece3bac": "設置團隊和成員,然後你可以在團隊內創建服務和應用程式、訂閱API,成員只能看到所屬團隊內的服務和應用程式。", + "K1512e983": "應用程式調用統計", + "Kb4d2007f": "請選擇應用程式", + "Kc0915603": "應用程式 Top10", + "Kd8a7a689": "搜索或選擇應用程式", + "Kb7e869a4": "應用程式管理", + "K5168eb63": "應用程式名稱", + "K546e46f": "應用程式 ID", + "K95764d1d": "刪除應用程式", + "K667bbbe7": "添加應用程式", + "K8723422e": "接入應用程式", + "K93d5a66e": "接入應用程式數量", + "K216a1ac7": "應用程式開發者", + "K27924db": "應用程式管理員", + "Kd55c6887": "審核", + "K831aa6c0": "申請方-應用程式" +} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/zh-CN.json b/frontend/packages/common/src/locales/scan/zh-CN.json index 3a90e204..91de189f 100644 --- a/frontend/packages/common/src/locales/scan/zh-CN.json +++ b/frontend/packages/common/src/locales/scan/zh-CN.json @@ -646,5 +646,30 @@ "Kfcda87fc": "每天", "K29ec75dc": "每周", "Ke1b1865": "私有", - "K4786c57c": "公共" + "K4786c57c": "公共", + "K7acfcfad": "消费者", + "Kc8054dba": "消费者开发者", + "Keb1673a6": "消费者管理员", + "K1fc2cc28": "无需审核:允许任何消费者调用该服务", + "K8dabb98e": "人工审核:仅允许通过人工审核的消费者调用该服务", + "K7c1fb123": "申请方-消费者", + "Kdea9a418": "为了安全地调用 API,你需要创建一个消费者以及Token。", + "Keee27105": "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。", + "Kaa717866": "提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。", + "Kd2c34e2c": "AI 服务", + "K62840d62": "REST 服务", + "K4c72fb6f": "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。", + "K61cca533": "消费者调用统计", + "Kdfff59d4": "请选择消费者", + "K386857bd": "消费者调用量 Top10", + "Kb684c806": "搜索或选择消费者", + "Ke0fbd1c8": "消费者管理", + "K67b530f": "消费者名称", + "K11f34de": "消费者 ID", + "Kc01002": "删除消费者", + "K84c4dc71": "添加消费者", + "K5c4e2865": "创建并管理自己的消费者实体,每个消费者可以订阅多个API服务,确保在调用之前已获得相应权限。你可以为消费者生成 API 密钥等鉴权方式,用于安全地调用 API 服务", + "K40a89bd8": "输入名称、ID 查找服务", + "Kba74f26d": "接入消费者", + "K70b79760": "接入消费者数量" } \ No newline at end of file From 25f8712a9f3a03c0c713085c6c9848690715d987 Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Thu, 24 Oct 2024 14:39:49 +0800 Subject: [PATCH 49/91] fix: Update translation --- .../src/components/aoplatform/UnUsedWordForTranslate.tsx | 4 ++++ frontend/packages/common/src/locales/keyHashMap.json | 4 ++++ frontend/packages/common/src/locales/scan/en-US.json | 7 ++++++- .../packages/common/src/locales/scan/newJson/en-US.json | 4 +--- .../packages/common/src/locales/scan/newJson/ja-JP.json | 4 ++++ .../packages/common/src/locales/scan/newJson/zh-CN.json | 6 +++++- .../packages/common/src/locales/scan/newJson/zh-TW.json | 4 ++++ .../pages/serviceHub/management/ServiceHubManagement.tsx | 2 +- 8 files changed, 29 insertions(+), 6 deletions(-) diff --git a/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx b/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx index 296a9473..981fd393 100644 --- a/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx +++ b/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx @@ -133,6 +133,10 @@ export const TranslateWord = ()=>{ {$t('每天')} {$t('每周')} {$t('上线结果')} + {$t('订阅服务数量')} + {$t('鉴权数量')} + {$t('列表')} + {$t('块')} ) diff --git a/frontend/packages/common/src/locales/keyHashMap.json b/frontend/packages/common/src/locales/keyHashMap.json index 2f8e2877..35479eaf 100644 --- a/frontend/packages/common/src/locales/keyHashMap.json +++ b/frontend/packages/common/src/locales/keyHashMap.json @@ -208,6 +208,10 @@ "每天": "Kfcda87fc", "每周": "K29ec75dc", "上线结果": "K93c2696e", + "订阅服务数量": "K6e32a344", + "鉴权数量": "Ka701316", + "列表": "K9eaa2eb6", + "块": "Kfaec39e9", "暂无操作权限,请联系管理员分配。": "K23fda291", "微信小程序": "K4618cb0a", "获取文件,需填路径": "Ka854f511", diff --git a/frontend/packages/common/src/locales/scan/en-US.json b/frontend/packages/common/src/locales/scan/en-US.json index ebe459d2..e9f91be4 100644 --- a/frontend/packages/common/src/locales/scan/en-US.json +++ b/frontend/packages/common/src/locales/scan/en-US.json @@ -649,5 +649,10 @@ "K5c4e2865": "Create and manage your own consumer entities, with each consumer able to subscribe to multiple API services, ensuring the necessary permissions are obtained before making any calls. You can generate API keys or other credentials for consumers to securely call API services.", "K40a89bd8": "Enter Name, ID to Search Member", "Kba74f26d": "Access Consumer", - "K70b79760": "Number of Access Consumers" + "K70b79760": "Number of Access Consumers", + "K93c2696e": "Online Result", + "K6e32a344": "Number of Services", + "Ka701316": "Number of Auths", + "K9eaa2eb6": "List", + "Kfaec39e9": "Block" } diff --git a/frontend/packages/common/src/locales/scan/newJson/en-US.json b/frontend/packages/common/src/locales/scan/newJson/en-US.json index 7f35055b..9e26dfee 100644 --- a/frontend/packages/common/src/locales/scan/newJson/en-US.json +++ b/frontend/packages/common/src/locales/scan/newJson/en-US.json @@ -1,3 +1 @@ -{ - "K93c2696e": "上线结果" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json index 6165c447..fcba28fd 100644 --- a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json @@ -6,6 +6,10 @@ "K8dabb98e": "人工审核:仅允许通过人工审核的消费者调用该服务", "K7c1fb123": "申请方-消费者", "K93c2696e": "上线结果", + "K6e32a344": "订阅服务数量", + "Ka701316": "鉴权数量", + "K9eaa2eb6": "列表", + "Kfaec39e9": "块", "Kdea9a418": "为了安全地调用 API,你需要创建一个消费者以及Token。", "Keee27105": "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。", "Kaa717866": "提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。", diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json index 7f35055b..f16c4723 100644 --- a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json +++ b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json @@ -1,3 +1,7 @@ { - "K93c2696e": "上线结果" + "K93c2696e": "上线结果", + "K6e32a344": "订阅服务数量", + "Ka701316": "鉴权数量", + "K9eaa2eb6": "列表", + "Kfaec39e9": "块" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json index 6165c447..fcba28fd 100644 --- a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json @@ -6,6 +6,10 @@ "K8dabb98e": "人工审核:仅允许通过人工审核的消费者调用该服务", "K7c1fb123": "申请方-消费者", "K93c2696e": "上线结果", + "K6e32a344": "订阅服务数量", + "Ka701316": "鉴权数量", + "K9eaa2eb6": "列表", + "Kfaec39e9": "块", "Kdea9a418": "为了安全地调用 API,你需要创建一个消费者以及Token。", "Keee27105": "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。", "Kaa717866": "提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。", diff --git a/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx b/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx index f1efa116..a6ea2b6b 100644 --- a/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx +++ b/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx @@ -52,7 +52,7 @@ const getServiceList = ()=>{ } setServiceLoading(true) - return fetchData>(!checkPermission('system.workspace.application.view_all') ? 'my_apps':'apps',{method:'GET',eoParams:{ team:teamId,keyword:tableSearchWord},eoTransformKeys:['api_num','subscribe_num','subscribe_verify_num']}).then(response=>{ + return fetchData>(!checkPermission('system.workspace.application.view_all') ? 'my_apps':'apps',{method:'GET',eoParams:{ team:teamId,keyword:tableSearchWord},eoTransformKeys:['api_num','subscribe_num','subscribe_verify_num','auth_num']}).then(response=>{ const {code,data,msg} = response if(code === STATUS_CODE.SUCCESS){ setServiceList([...data.apps,{type:'addNewItem'}]) From 6944260767ec470e947a27ec6b577edf2a69b3e1 Mon Sep 17 00:00:00 2001 From: lidongjie Date: Thu, 24 Oct 2024 15:47:43 +0800 Subject: [PATCH 50/91] add:ai provider 360-zhinao --- ai-provider/model-runtime/model-providers/zhinao/zhinao.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ai-provider/model-runtime/model-providers/zhinao/zhinao.yaml b/ai-provider/model-runtime/model-providers/zhinao/zhinao.yaml index 39a2c595..7d2c5372 100644 --- a/ai-provider/model-runtime/model-providers/zhinao/zhinao.yaml +++ b/ai-provider/model-runtime/model-providers/zhinao/zhinao.yaml @@ -30,4 +30,4 @@ provider_credential_schema: placeholder: zh_Hans: 在此输入您的 API Key en_US: Enter your API Key -address: https://api.openai.com \ No newline at end of file +address: https://api.360.cn \ No newline at end of file From 74d402a330c05adbf059fc3f5a8c1ae95e892754 Mon Sep 17 00:00:00 2001 From: HaoZhen Liu Date: Thu, 24 Oct 2024 18:24:51 +0800 Subject: [PATCH 51/91] update translation --- .../common/src/locales/scan/ja-JP.json | 31 +++++++++++++++++- .../common/src/locales/scan/zh-CN.json | 7 +++- .../common/src/locales/scan/zh-TW.json | 32 ++++++++++++++++++- 3 files changed, 67 insertions(+), 3 deletions(-) diff --git a/frontend/packages/common/src/locales/scan/ja-JP.json b/frontend/packages/common/src/locales/scan/ja-JP.json index 3e60bcbf..a2f9812f 100644 --- a/frontend/packages/common/src/locales/scan/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/ja-JP.json @@ -646,5 +646,34 @@ "Kfcda87fc": "毎日", "K29ec75dc": "毎週", "Ke1b1865": "プライベート", - "K4786c57c": "パブリック" + "K4786c57c": "パブリック", + "K7acfcfad": "コンシューマー", + "Kc8054dba": "コンシューマー開発者", + "Keb1673a6": "コンシューマー管理者", + "K1fc2cc28": "審査不要:どのコンシューマーでもこのサービスを呼び出せます", + "K8dabb98e": "手動審査:手動審査に合格したコンシューマーのみ、このサービスを呼び出せます", + "K7c1fb123": "申請元-コンシューマー", + "K93c2696e": "オンライン結果", + "K6e32a344": "サブスクライブサービス数", + "Ka701316": "認証数", + "K9eaa2eb6": "リスト", + "Kfaec39e9": "ブロック", + "Kdea9a418": "API を安全に呼び出すためには、コンシューマーとトークンを作成する必要があります。", + "Keee27105": "チームにはメンバー、コンシューマー、サービスが含まれ、異なるチームのコンシューマーとサービスデータは分離されています。企業内の部門やプロジェクトチームの管理に役立ちます。", + "Kaa717866": "サービスを提供するチームは、他のチームからのサブスクリプション申請を審査できます。審査に合格したコンシューマーのみ API リクエストを行うことができます。", + "Kd2c34e2c": "AI サービス", + "K62840d62": "REST サービス", + "K4c72fb6f": "チームとメンバーを設定してから、チーム内でサービスとコンシューマーを作成し、API をサブスクライブできます。メンバーは所属チーム内のサービスとコンシューマーのみを表示できます。", + "K61cca533": "コンシューマー呼び出し統計", + "Kdfff59d4": "コンシューマーを選択してください", + "K386857bd": "コンシューマー呼び出し量トップ10", + "Kb684c806": "コンシューマーを検索または選択", + "Ke0fbd1c8": "コンシューマー管理", + "K67b530f": "コンシューマー名", + "K11f34de": "コンシューマー ID", + "Kc01002": "コンシューマーを削除", + "K84c4dc71": "コンシューマーエンティティを作成および管理し、各コンシューマーは複数の API サービスにサブスクライブできます。呼び出し前に適切な権限が付与されていることを確認してください。コンシューマー用に API キーなどの認証方法を生成して、安全に API サービスを呼び出せます。", + "K40a89bd8": "名前または ID を入力してサービスを検索", + "Kba74f26d": "コンシューマーを接続", + "K70b79760": "接続コンシューマー数" } diff --git a/frontend/packages/common/src/locales/scan/zh-CN.json b/frontend/packages/common/src/locales/scan/zh-CN.json index 91de189f..9c33895e 100644 --- a/frontend/packages/common/src/locales/scan/zh-CN.json +++ b/frontend/packages/common/src/locales/scan/zh-CN.json @@ -671,5 +671,10 @@ "K5c4e2865": "创建并管理自己的消费者实体,每个消费者可以订阅多个API服务,确保在调用之前已获得相应权限。你可以为消费者生成 API 密钥等鉴权方式,用于安全地调用 API 服务", "K40a89bd8": "输入名称、ID 查找服务", "Kba74f26d": "接入消费者", - "K70b79760": "接入消费者数量" + "K70b79760": "接入消费者数量", + "K93c2696e": "上线结果", + "K6e32a344": "订阅服务数量", + "Ka701316": "鉴权数量", + "K9eaa2eb6": "列表", + "Kfaec39e9": "块" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/zh-TW.json b/frontend/packages/common/src/locales/scan/zh-TW.json index d76510c6..94b80e17 100644 --- a/frontend/packages/common/src/locales/scan/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/zh-TW.json @@ -646,5 +646,35 @@ "Kfcda87fc": "每天", "K29ec75dc": "每週", "Ke1b1865": "私有", - "K4786c57c": "公共" + "K4786c57c": "公共", + "K7acfcfad": "消費者", + "Kc8054dba": "消費者開發者", + "Keb1673a6": "消費者管理員", + "K1fc2cc28": "無需審核:允許任何消費者調用該服務", + "K8dabb98e": "人工審核:僅允許通過人工審核的消費者調用該服務", + "K7c1fb123": "申請方-消費者", + "K93c2696e": "上線結果", + "K6e32a344": "訂閱服務數量", + "Ka701316": "鑒權數量", + "K9eaa2eb6": "列表", + "Kfaec39e9": "塊", + "Kdea9a418": "為了安全地調用 API,你需要創建一個消費者以及Token。", + "Keee27105": "團隊中包含了人員、消費者和服務,不同團隊之間的消費者和服務數據是隔離的,可用於管理企業內部不同的部門/項目組/團隊。", + "Kaa717866": "提供服務的團隊可以審核來自其他團隊的訂閱申請,審核通過後的消費者才可發起 API 請求。", + "Kd2c34e2c": "AI 服務", + "K62840d62": "REST 服務", + "K4c72fb6f": "設置團隊和成員,然後你可以在團隊內創建服務和消費者、訂閱API,成員只能看到所屬團隊內的服務和消費者。", + "K61cca533": "消費者調用統計", + "Kdfff59d4": "請選擇消費者", + "K386857bd": "消費者調用量 Top10", + "Kb684c806": "搜索或選擇消費者", + "Ke0fbd1c8": "消費者管理", + "K67b530f": "消費者名稱", + "K11f34de": "消費者 ID", + "Kc01002": "刪除消費者", + "K84c4dc71": "添加消費者", + "K5c4e2865": "創建並管理自己的消費者實體,每個消費者可以訂閱多個API服務,確保在調用之前已獲得相應權限。你可以為消費者生成 API 密鑰等鑒權方式,用於安全地調用 API 服務", + "K40a89bd8": "輸入名稱、ID 查找服務", + "Kba74f26d": "接入消費者", + "K70b79760": "接入消費者數量" } From fd3d6433e2fd0c863fd500682bc40c200b18d9f4 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Thu, 24 Oct 2024 23:30:25 +0800 Subject: [PATCH 52/91] finish fake ai --- .../fakegpt/assets/icon_l_en.svg | 23 +++++++++ .../fakegpt/assets/icon_s_en.svg | 23 +++++++++ .../model-providers/fakegpt/fakegpt.yaml | 30 +++++++++++ .../fakegpt/llm/fakegpt-1.0.yaml | 51 +++++++++++++++++++ .../vertex_ai/llm/gemini-1.0-pro-vision.yaml | 2 +- .../vertex_ai/llm/gemini-1.0-pro.yaml | 2 +- .../vertex_ai/llm/gemini-1.5-flash-001.yaml | 2 +- .../vertex_ai/llm/gemini-1.5-flash-002.yaml | 2 +- .../vertex_ai/llm/gemini-1.5-pro-001.yaml | 2 +- .../vertex_ai/llm/gemini-1.5-pro-002.yaml | 2 +- .../llm/gemini-flash-experimental.yaml | 2 +- .../llm/gemini-pro-experimental.yaml | 2 +- controller/system/iml.go | 8 +-- module/ai/iml.go | 6 ++- 14 files changed, 144 insertions(+), 13 deletions(-) create mode 100644 ai-provider/model-runtime/model-providers/fakegpt/assets/icon_l_en.svg create mode 100644 ai-provider/model-runtime/model-providers/fakegpt/assets/icon_s_en.svg create mode 100644 ai-provider/model-runtime/model-providers/fakegpt/fakegpt.yaml create mode 100644 ai-provider/model-runtime/model-providers/fakegpt/llm/fakegpt-1.0.yaml diff --git a/ai-provider/model-runtime/model-providers/fakegpt/assets/icon_l_en.svg b/ai-provider/model-runtime/model-providers/fakegpt/assets/icon_l_en.svg new file mode 100644 index 00000000..913864bf --- /dev/null +++ b/ai-provider/model-runtime/model-providers/fakegpt/assets/icon_l_en.svg @@ -0,0 +1,23 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ai-provider/model-runtime/model-providers/fakegpt/assets/icon_s_en.svg b/ai-provider/model-runtime/model-providers/fakegpt/assets/icon_s_en.svg new file mode 100644 index 00000000..913864bf --- /dev/null +++ b/ai-provider/model-runtime/model-providers/fakegpt/assets/icon_s_en.svg @@ -0,0 +1,23 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ai-provider/model-runtime/model-providers/fakegpt/fakegpt.yaml b/ai-provider/model-runtime/model-providers/fakegpt/fakegpt.yaml new file mode 100644 index 00000000..26bbd23d --- /dev/null +++ b/ai-provider/model-runtime/model-providers/fakegpt/fakegpt.yaml @@ -0,0 +1,30 @@ +provider: fakegpt +label: + en_US: FakeGPT +description: + en_US: FakeGPT is a fake model provider that does not actually connect to any model service. It is useful for testing and development purposes. +icon_small: + en_US: icon_s_en.svg +icon_large: + en_US: icon_l_en.svg +background: "#FCFDFF" +help: + title: + en_US: Get your Access Details from Google + url: + en_US: https://apipark.com +supported_model_types: + - llm + - text-embedding +configurate_methods: + - predefined-model +provider_credential_schema: + credential_form_schemas: + - variable: apikey + label: + en_US: API Key + type: secret-input + required: true + placeholder: + en_US: Enter your API key +address: https://apipark.com \ No newline at end of file diff --git a/ai-provider/model-runtime/model-providers/fakegpt/llm/fakegpt-1.0.yaml b/ai-provider/model-runtime/model-providers/fakegpt/llm/fakegpt-1.0.yaml new file mode 100644 index 00000000..ebee0690 --- /dev/null +++ b/ai-provider/model-runtime/model-providers/fakegpt/llm/fakegpt-1.0.yaml @@ -0,0 +1,51 @@ +model: fakegpt-1.0 +label: + en_US: FakeGPT 1.0 +model_type: llm +features: + - agent-thought + - vision +model_properties: + mode: chat + context_size: 200000 +parameter_rules: + - name: max_tokens + use_template: max_tokens + required: true + type: int + default: 4096 + min: 1 + max: 4096 + help: + zh_Hans: 停止前生成的最大令牌数。 + en_US: The maximum number of tokens to generate before stopping. + - name: temperature + use_template: temperature + required: false + type: float + default: 1 + min: 0.0 + max: 1.0 + help: + zh_Hans: 生成内容的随机性。 + en_US: The amount of randomness injected into the response. + - name: top_p + required: false + type: float + default: 0.999 + min: 0.000 + max: 1.000 + help: + zh_Hans: 在核采样中,按概率递减顺序计算每个后续标记的所有选项的累积分布,并在达到 top_p 指定的特定概率时将其切断。您应该更改温度或top_p,但不能同时更改两者。 + en_US: In nucleus sampling, computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches a particular probability specified by top_p. You should alter either temperature or top_p, but not both. + - name: top_k + required: false + type: int + default: 0 + min: 0 + # tip docs from aws has error, max value is 500 + max: 500 + help: + zh_Hans: 对于每个后续标记,仅从前 K 个选项中进行采样。使用 top_k 删除长尾低概率响应。 + en_US: Only sample from the top K options for each subsequent token. Use top_k to remove long tail low probability responses. + diff --git a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.0-pro-vision.yaml b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.0-pro-vision.yaml index ebb276b8..4630f063 100644 --- a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.0-pro-vision.yaml +++ b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.0-pro-vision.yaml @@ -24,7 +24,7 @@ parameter_rules: use_template: presence_penalty - name: frequency_penalty use_template: frequency_penalty - - name: max_output_tokens + - name: max_tokens use_template: max_tokens required: true default: 2048 diff --git a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.0-pro.yaml b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.0-pro.yaml index c3259738..7a50d8c1 100644 --- a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.0-pro.yaml +++ b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.0-pro.yaml @@ -23,7 +23,7 @@ parameter_rules: use_template: presence_penalty - name: frequency_penalty use_template: frequency_penalty - - name: max_output_tokens + - name: max_tokens use_template: max_tokens required: true default: 8192 diff --git a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-flash-001.yaml b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-flash-001.yaml index f5386be0..1d9a0b0c 100644 --- a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-flash-001.yaml +++ b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-flash-001.yaml @@ -24,7 +24,7 @@ parameter_rules: use_template: presence_penalty - name: frequency_penalty use_template: frequency_penalty - - name: max_output_tokens + - name: max_tokens use_template: max_tokens required: true default: 8192 diff --git a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-flash-002.yaml b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-flash-002.yaml index 97bd44f0..066d4ba3 100644 --- a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-flash-002.yaml +++ b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-flash-002.yaml @@ -24,7 +24,7 @@ parameter_rules: use_template: presence_penalty - name: frequency_penalty use_template: frequency_penalty - - name: max_output_tokens + - name: max_tokens use_template: max_tokens required: true default: 8192 diff --git a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-pro-001.yaml b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-pro-001.yaml index 5e08f229..33d2c25a 100644 --- a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-pro-001.yaml +++ b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-pro-001.yaml @@ -24,7 +24,7 @@ parameter_rules: use_template: presence_penalty - name: frequency_penalty use_template: frequency_penalty - - name: max_output_tokens + - name: max_tokens use_template: max_tokens required: true default: 8192 diff --git a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-pro-002.yaml b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-pro-002.yaml index 8f327ea2..8b4c33cc 100644 --- a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-pro-002.yaml +++ b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-1.5-pro-002.yaml @@ -24,7 +24,7 @@ parameter_rules: use_template: presence_penalty - name: frequency_penalty use_template: frequency_penalty - - name: max_output_tokens + - name: max_tokens use_template: max_tokens required: true default: 8192 diff --git a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-flash-experimental.yaml b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-flash-experimental.yaml index 0f5eb34c..ef340372 100644 --- a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-flash-experimental.yaml +++ b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-flash-experimental.yaml @@ -24,7 +24,7 @@ parameter_rules: use_template: presence_penalty - name: frequency_penalty use_template: frequency_penalty - - name: max_output_tokens + - name: max_tokens use_template: max_tokens required: true default: 8192 diff --git a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-pro-experimental.yaml b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-pro-experimental.yaml index fa31cabb..cff10423 100644 --- a/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-pro-experimental.yaml +++ b/ai-provider/model-runtime/model-providers/vertex_ai/llm/gemini-pro-experimental.yaml @@ -24,7 +24,7 @@ parameter_rules: use_template: presence_penalty - name: frequency_penalty use_template: frequency_penalty - - name: max_output_tokens + - name: max_tokens use_template: max_tokens required: true default: 8192 diff --git a/controller/system/iml.go b/controller/system/iml.go index 3739419e..b05cac3c 100644 --- a/controller/system/iml.go +++ b/controller/system/iml.go @@ -319,12 +319,12 @@ func (i *imlInitController) OnInit() { } func (i *imlInitController) createAIService(ctx context.Context, teamID string, input *service_dto.CreateService) error { - providerId := "openai" - err := i.providerModule.UpdateProviderConfig(ctx, "openai", &ai_dto.UpdateConfig{ - Config: "{\n \"openai_api_base\": \"API Base\",\n \"openai_api_key\": \"API Key\",\n \"openai_organization\": \"Organization\"\n}", + providerId := "fakegpt" + err := i.providerModule.UpdateProviderConfig(ctx, providerId, &ai_dto.UpdateConfig{ + Config: "{\n \"apikey\": \"xxx\" \n}", }) if err != nil { - return fmt.Errorf("update openai config error: %v", err) + return fmt.Errorf("update %s config error: %v", providerId, err) } input.Provider = &providerId if input.Id == "" { diff --git a/module/ai/iml.go b/module/ai/iml.go index c1547850..65d17cc5 100644 --- a/module/ai/iml.go +++ b/module/ai/iml.go @@ -147,7 +147,11 @@ func (i *imlProviderModule) Provider(ctx context.Context, id string) (*ai_dto.Pr } defaultLLM, has := p.GetModel(info.DefaultLLM) if !has { - return nil, fmt.Errorf("ai provider llm not found") + model, has := p.DefaultModel(model_runtime.ModelTypeLLM) + if !has { + return nil, fmt.Errorf("ai provider llm not found") + } + defaultLLM = model } return &ai_dto.Provider{ Id: info.Id, From 00bd72c1e4d02b7ea19a42f23c6b2b63c9cd33cd Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Thu, 24 Oct 2024 23:42:55 +0800 Subject: [PATCH 53/91] fix get llm error --- module/ai/iml.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/ai/iml.go b/module/ai/iml.go index 65d17cc5..a6a0c8a2 100644 --- a/module/ai/iml.go +++ b/module/ai/iml.go @@ -201,7 +201,7 @@ func (i *imlProviderModule) LLMs(ctx context.Context, driver string) ([]*ai_dto. DefaultLLMLogo: defaultLLM.Logo(), Logo: p.Logo(), Configured: false, - }, err + }, nil } return items, &ai_dto.ProviderItem{Id: info.Id, Name: info.Name, DefaultLLM: info.DefaultLLM, Logo: p.Logo(), Configured: true}, nil From b33dda4a32643a3cc501c8eca9c3fe32ac27c91d Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Fri, 25 Oct 2024 09:27:00 +0800 Subject: [PATCH 54/91] fix: update translation --- .../common/src/locales/keyHashMap.json | 5 +-- .../common/src/locales/scan/en-US.json | 4 ++- .../common/src/locales/scan/ja-JP.json | 7 ++-- .../src/locales/scan/newJson/en-US.json | 3 +- .../src/locales/scan/newJson/ja-JP.json | 30 ----------------- .../src/locales/scan/newJson/zh-CN.json | 7 ++-- .../src/locales/scan/newJson/zh-TW.json | 32 ++----------------- .../src/locales/scan/oldJson/en-US.json | 23 +------------ .../src/locales/scan/oldJson/ja-JP.json | 3 +- .../src/locales/scan/oldJson/zh-CN.json | 3 +- .../src/locales/scan/oldJson/zh-TW.json | 3 +- .../common/src/locales/scan/zh-TW.json | 4 ++- .../management/ServiceHubManagement.tsx | 6 ++-- 13 files changed, 30 insertions(+), 100 deletions(-) diff --git a/frontend/packages/common/src/locales/keyHashMap.json b/frontend/packages/common/src/locales/keyHashMap.json index 35479eaf..534968c4 100644 --- a/frontend/packages/common/src/locales/keyHashMap.json +++ b/frontend/packages/common/src/locales/keyHashMap.json @@ -627,10 +627,10 @@ "搜索服务": "K66ea2f0", "审核中": "K8adf7f8b", "添加消费者": "K84c4dc71", - "暂无服务描述": "Ka4b45550", + "暂无消费者描述": "Kc3b7bfa8", "创建并管理自己的消费者实体,每个消费者可以订阅多个API服务,确保在调用之前已获得相应权限。你可以为消费者生成 API 密钥等鉴权方式,用于安全地调用 API 服务": "K5c4e2865", "订阅的服务数量:已通过 (0) 个,申请中 (1) 个": "K3c7b175f", - "输入名称、ID 查找服务": "K40a89bd8", + "输入名称、ID 查找消费者": "K3a6f905d", "退出测试": "Kbe3e9335", "服务市场": "K370a3eb2", "服务详情": "Kf7ec36d", @@ -645,6 +645,7 @@ "版本": "K81634069", "更新时间": "Keefda53d", "无标签": "K96a2f1c8", + "暂无服务描述": "Ka4b45550", "API 数量": "K72b0c0b3", "接入消费者数量": "K70b79760", "关联标签": "K96059c69", diff --git a/frontend/packages/common/src/locales/scan/en-US.json b/frontend/packages/common/src/locales/scan/en-US.json index e9f91be4..2811dec3 100644 --- a/frontend/packages/common/src/locales/scan/en-US.json +++ b/frontend/packages/common/src/locales/scan/en-US.json @@ -654,5 +654,7 @@ "K6e32a344": "Number of Services", "Ka701316": "Number of Auths", "K9eaa2eb6": "List", - "Kfaec39e9": "Block" + "Kfaec39e9": "Block", + "Kc3b7bfa8": "No Consumer Description", + "K3a6f905d": "Enter Name, ID to Search Consumer" } diff --git a/frontend/packages/common/src/locales/scan/ja-JP.json b/frontend/packages/common/src/locales/scan/ja-JP.json index a2f9812f..7902b78c 100644 --- a/frontend/packages/common/src/locales/scan/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/ja-JP.json @@ -672,8 +672,11 @@ "K67b530f": "コンシューマー名", "K11f34de": "コンシューマー ID", "Kc01002": "コンシューマーを削除", - "K84c4dc71": "コンシューマーエンティティを作成および管理し、各コンシューマーは複数の API サービスにサブスクライブできます。呼び出し前に適切な権限が付与されていることを確認してください。コンシューマー用に API キーなどの認証方法を生成して、安全に API サービスを呼び出せます。", "K40a89bd8": "名前または ID を入力してサービスを検索", "Kba74f26d": "コンシューマーを接続", - "K70b79760": "接続コンシューマー数" + "K70b79760": "接続コンシューマー数", + "K5c4e2865": "コンシューマーエンティティを作成および管理し、各コンシューマーは複数の API サービスにサブスクライブできます。呼び出し前に適切な権限が付与されていることを確認してください。コンシューマー用に API キーなどの認証方法を生成して、安全に API サービスを呼び出せます。", + "K84c4dc71": "コンシューマーを追加", + "Kc3b7bfa8": "コンシューマーの説明がありません", + "K3a6f905d": "名前、IDを入力してコンシューマーを検索" } diff --git a/frontend/packages/common/src/locales/scan/newJson/en-US.json b/frontend/packages/common/src/locales/scan/newJson/en-US.json index 9e26dfee..7a73a41b 100644 --- a/frontend/packages/common/src/locales/scan/newJson/en-US.json +++ b/frontend/packages/common/src/locales/scan/newJson/en-US.json @@ -1 +1,2 @@ -{} \ No newline at end of file +{ +} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json index fcba28fd..7a73a41b 100644 --- a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json @@ -1,32 +1,2 @@ { - "K7acfcfad": "消费者", - "Kc8054dba": "消费者开发者", - "Keb1673a6": "消费者管理员", - "K1fc2cc28": "无需审核:允许任何消费者调用该服务", - "K8dabb98e": "人工审核:仅允许通过人工审核的消费者调用该服务", - "K7c1fb123": "申请方-消费者", - "K93c2696e": "上线结果", - "K6e32a344": "订阅服务数量", - "Ka701316": "鉴权数量", - "K9eaa2eb6": "列表", - "Kfaec39e9": "块", - "Kdea9a418": "为了安全地调用 API,你需要创建一个消费者以及Token。", - "Keee27105": "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。", - "Kaa717866": "提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。", - "Kd2c34e2c": "AI 服务", - "K62840d62": "REST 服务", - "K4c72fb6f": "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。", - "K61cca533": "消费者调用统计", - "Kdfff59d4": "请选择消费者", - "K386857bd": "消费者调用量 Top10", - "Kb684c806": "搜索或选择消费者", - "Ke0fbd1c8": "消费者管理", - "K67b530f": "消费者名称", - "K11f34de": "消费者 ID", - "Kc01002": "删除消费者", - "K84c4dc71": "添加消费者", - "K5c4e2865": "创建并管理自己的消费者实体,每个消费者可以订阅多个API服务,确保在调用之前已获得相应权限。你可以为消费者生成 API 密钥等鉴权方式,用于安全地调用 API 服务", - "K40a89bd8": "输入名称、ID 查找服务", - "Kba74f26d": "接入消费者", - "K70b79760": "接入消费者数量" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json index f16c4723..0e647920 100644 --- a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json +++ b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json @@ -1,7 +1,4 @@ { - "K93c2696e": "上线结果", - "K6e32a344": "订阅服务数量", - "Ka701316": "鉴权数量", - "K9eaa2eb6": "列表", - "Kfaec39e9": "块" + "Kc3b7bfa8": "暂无消费者描述", + "K3a6f905d": "输入名称、ID 查找消费者" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json index fcba28fd..0e647920 100644 --- a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json @@ -1,32 +1,4 @@ { - "K7acfcfad": "消费者", - "Kc8054dba": "消费者开发者", - "Keb1673a6": "消费者管理员", - "K1fc2cc28": "无需审核:允许任何消费者调用该服务", - "K8dabb98e": "人工审核:仅允许通过人工审核的消费者调用该服务", - "K7c1fb123": "申请方-消费者", - "K93c2696e": "上线结果", - "K6e32a344": "订阅服务数量", - "Ka701316": "鉴权数量", - "K9eaa2eb6": "列表", - "Kfaec39e9": "块", - "Kdea9a418": "为了安全地调用 API,你需要创建一个消费者以及Token。", - "Keee27105": "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。", - "Kaa717866": "提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。", - "Kd2c34e2c": "AI 服务", - "K62840d62": "REST 服务", - "K4c72fb6f": "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。", - "K61cca533": "消费者调用统计", - "Kdfff59d4": "请选择消费者", - "K386857bd": "消费者调用量 Top10", - "Kb684c806": "搜索或选择消费者", - "Ke0fbd1c8": "消费者管理", - "K67b530f": "消费者名称", - "K11f34de": "消费者 ID", - "Kc01002": "删除消费者", - "K84c4dc71": "添加消费者", - "K5c4e2865": "创建并管理自己的消费者实体,每个消费者可以订阅多个API服务,确保在调用之前已获得相应权限。你可以为消费者生成 API 密钥等鉴权方式,用于安全地调用 API 服务", - "K40a89bd8": "输入名称、ID 查找服务", - "Kba74f26d": "接入消费者", - "K70b79760": "接入消费者数量" + "Kc3b7bfa8": "暂无消费者描述", + "K3a6f905d": "输入名称、ID 查找消费者" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/oldJson/en-US.json b/frontend/packages/common/src/locales/scan/oldJson/en-US.json index 6cabbaaf..08de42fa 100644 --- a/frontend/packages/common/src/locales/scan/oldJson/en-US.json +++ b/frontend/packages/common/src/locales/scan/oldJson/en-US.json @@ -1,24 +1,3 @@ { - "Kfe93ef35": "Application", - "Kffd7e274": "No Review: All applications are allowed to subscribe to this service", - "K8a8b13e4": "Manual Review: Only reviewed and approved applications can subscribe to this service", - "K9bdd8403": "To securely call APIs, you need to create an application and a token.", - "Kc8239422": "Teams include personnel, applications, and services. Data between different teams is isolated, and can be used to manage different departments/project teams/teams within the enterprise.", - "Ka0a8840a": "Review subscription requests from other applications. Only approved requests can initiate API calls.", - "K5ece3bac": "Set up teams and members. You can then create services and applications, subscribe to APIs within the team. Members can only see services and applications within their team.", - "K1512e983": "Application Call Statistics", - "Kb4d2007f": "Please Select Application", - "Kc0915603": "Application Top 10", - "Kd8a7a689": "Search or Select Application", - "Kb7e869a4": "Application Settings", - "K5168eb63": "Application Name", - "K546e46f": "Application ID", - "K95764d1d": "Delete Application", - "K667bbbe7": "Add Application", - "K8723422e": "Access Application", - "K93d5a66e": "Number of Access Applications", - "K216a1ac7": "Application Developer", - "K27924db": "Application Administrator", - "Kd55c6887": "Review", - "K831aa6c0": "Applicant - Application" + "K40a89bd8": "Enter Name, ID to Search Member" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/oldJson/ja-JP.json b/frontend/packages/common/src/locales/scan/oldJson/ja-JP.json index 0813c11e..b5c29e42 100644 --- a/frontend/packages/common/src/locales/scan/oldJson/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/oldJson/ja-JP.json @@ -20,5 +20,6 @@ "K216a1ac7": "アプリケーション開発者", "K27924db": "アプリケーション管理者", "Kd55c6887": "レビュー", - "K831aa6c0": "申請元-アプリケーション" + "K831aa6c0": "申請元-アプリケーション", + "K40a89bd8": "名前または ID を入力してサービスを検索" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/oldJson/zh-CN.json b/frontend/packages/common/src/locales/scan/oldJson/zh-CN.json index 8103f44e..35fb722a 100644 --- a/frontend/packages/common/src/locales/scan/oldJson/zh-CN.json +++ b/frontend/packages/common/src/locales/scan/oldJson/zh-CN.json @@ -20,5 +20,6 @@ "K216a1ac7": "消费者开发者", "K27924db": "消费者管理员", "Kd55c6887": "审核", - "K831aa6c0": "申请方-消费者" + "K831aa6c0": "申请方-消费者", + "K40a89bd8": "输入名称、ID 查找服务" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/oldJson/zh-TW.json b/frontend/packages/common/src/locales/scan/oldJson/zh-TW.json index 5de69cea..adfc47cc 100644 --- a/frontend/packages/common/src/locales/scan/oldJson/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/oldJson/zh-TW.json @@ -20,5 +20,6 @@ "K216a1ac7": "應用程式開發者", "K27924db": "應用程式管理員", "Kd55c6887": "審核", - "K831aa6c0": "申請方-應用程式" + "K831aa6c0": "申請方-應用程式", + "K40a89bd8": "輸入名稱、ID 查找服務" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/zh-TW.json b/frontend/packages/common/src/locales/scan/zh-TW.json index 94b80e17..af886d2a 100644 --- a/frontend/packages/common/src/locales/scan/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/zh-TW.json @@ -676,5 +676,7 @@ "K5c4e2865": "創建並管理自己的消費者實體,每個消費者可以訂閱多個API服務,確保在調用之前已獲得相應權限。你可以為消費者生成 API 密鑰等鑒權方式,用於安全地調用 API 服務", "K40a89bd8": "輸入名稱、ID 查找服務", "Kba74f26d": "接入消費者", - "K70b79760": "接入消費者數量" + "K70b79760": "接入消費者數量", + "Kc3b7bfa8": "暫無消費者描述", + "K3a6f905d": "輸入名稱、ID 查找消費者" } diff --git a/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx b/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx index a6ea2b6b..8db42868 100644 --- a/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx +++ b/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx @@ -196,7 +196,7 @@ useEffect(() => { item.type === 'addNewItem' ?{openModal('add')}}>
{$t('添加消费者')}
: {setAppName(item.name);navigateTo(`/consumer/${teamId}/inside/${item.id}/service`)}}> - {item.description || $t('暂无服务描述')} + {item.description || $t('暂无消费者描述')} }
); @@ -293,8 +293,8 @@ const TableArea = memo(({language, getServiceList, addNewApp, setTableHttpReload id="service_hub_list" columns={[...columns]} request={()=>getServiceList()} - addNewBtnTitle={$t("添加服务")} - searchPlaceholder={$t("输入名称、ID 查找服务")} + addNewBtnTitle={$t("添加消费者")} + searchPlaceholder={$t("输入名称、ID 查找消费者")} onAddNewBtnClick={addNewApp} onChange={() => { setTableHttpReload(false) From 885cec57dbc7c84cd02a0487b44d7ffe9241a14d Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Fri, 25 Oct 2024 09:32:12 +0800 Subject: [PATCH 55/91] update issue templete --- .github/ISSUE_TEMPLATE/bug_report.yml | 11 +++++------ .github/ISSUE_TEMPLATE/request_help.yml | 2 +- common/version/version.go | 4 ++-- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index da994f4f..c8806d68 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -45,19 +45,18 @@ body: label: Steps to Reproduce description: Share the steps you took so that we can reproduce the issue. Reports without proper steps details will likely be closed. placeholder: | - 1. Run apinto via the Docker image. - 2. Create a Route with the Admin API. - 3. Try configuring ... - 4. ... + 1. Run APIPark via the Docker image. + 2. Try configuring ... + 3. ... validations: - required: true + required: false - type: textarea id: environment attributes: label: Environment description: Share your environment details. Reports without proper environment details will likely be closed. value: | - - APINTO Dashboard version (run `apinto dashboard version`): + - APINTO Dashboard version: - Operating system (run `uname -a`): validations: required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/request_help.yml b/.github/ISSUE_TEMPLATE/request_help.yml index 076cbb92..5ffa869a 100644 --- a/.github/ISSUE_TEMPLATE/request_help.yml +++ b/.github/ISSUE_TEMPLATE/request_help.yml @@ -25,7 +25,7 @@ body: label: Environment description: Share your environment details. Reports without proper environment details will likely be closed. value: | - - APIPark version (run `apinto dashboard version`): + - APIPark version: - Operating system (run `uname -a`): validations: required: true \ No newline at end of file diff --git a/common/version/version.go b/common/version/version.go index bcacbb3c..b6e5d2e7 100644 --- a/common/version/version.go +++ b/common/version/version.go @@ -4,7 +4,7 @@ import ( "bytes" "fmt" - "github.com/urfave/cli/v2" + "github.com/urfave/cli" ) // These should be set via go build -ldflags -X 'xxxx'. @@ -20,7 +20,7 @@ var profileInfo []byte func init() { buffer := &bytes.Buffer{} - fmt.Fprintf(buffer, "Apinto version: %s\n", Version) + fmt.Fprintf(buffer, "APIPark version: %s\n", Version) fmt.Fprintf(buffer, "Golang version: %s\n", goVersion) fmt.Fprintf(buffer, "Git commit hash: %s\n", gitCommit) fmt.Fprintf(buffer, "Built on: %s\n", BuildTime) From 727fd0bd36cedca9803c329c216e29f505908873 Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:02:23 +0800 Subject: [PATCH 56/91] fix: AI Model config bug --- .../packages/core/src/pages/aiSetting/AiSettingModal.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/packages/core/src/pages/aiSetting/AiSettingModal.tsx b/frontend/packages/core/src/pages/aiSetting/AiSettingModal.tsx index 159360fe..9155a703 100644 --- a/frontend/packages/core/src/pages/aiSetting/AiSettingModal.tsx +++ b/frontend/packages/core/src/pages/aiSetting/AiSettingModal.tsx @@ -106,10 +106,7 @@ const AiSettingModalContent = forwardRef {x.id} {x?.scopes?.map(s=>{s?.toLocaleUpperCase()})} -
}))} - onChange={(e)=>{ - form.setFieldValue('config',llmList?.find(x=>x.id===e)?.config) - }}> +
}))}> From ceee52010211b41237e573d2eeda1eb95408a6b6 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Fri, 25 Oct 2024 14:21:50 +0800 Subject: [PATCH 57/91] tmp commit --- go.mod | 7 +++---- go.sum | 11 +++++------ module/team/iml.go | 4 ++-- resources/access/role.yaml | 4 ++-- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/go.mod b/go.mod index 03187bb3..0bc17fb0 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/gin-gonic/gin v1.10.0 github.com/google/uuid v1.6.0 github.com/influxdata/influxdb-client-go/v2 v2.14.0 - github.com/urfave/cli/v2 v2.27.2 + github.com/urfave/cli v1.22.16 golang.org/x/crypto v0.24.0 gopkg.in/yaml.v3 v3.0.1 gorm.io/gorm v1.25.5 @@ -26,7 +26,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cloudwego/base64x v0.1.4 // indirect github.com/cloudwego/iasm v0.2.0 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/ghodss/yaml v1.0.0 // indirect @@ -62,7 +62,6 @@ require ( github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/ugorji/go/codec v1.2.12 // indirect - github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.13 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect @@ -76,4 +75,4 @@ require ( gorm.io/driver/mysql v1.5.2 // indirect ) -//replace github.com/eolinker/ap-account => ../../eolinker/ap-account +replace github.com/eolinker/ap-account => ../../eolinker/ap-account diff --git a/go.sum b/go.sum index 13e39a7e..c10fa993 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,4 @@ +github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk= github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ= github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk= @@ -18,8 +19,8 @@ github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/ github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= -github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= -github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= +github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -139,10 +140,8 @@ github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE= github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI= -github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM= -github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw= -github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= +github.com/urfave/cli v1.22.16 h1:MH0k6uJxdwdeWQTwhSO42Pwr4YLrNLwBtg1MRgTqPdQ= +github.com/urfave/cli v1.22.16/go.mod h1:EeJR6BKodywf4zciqrdw6hpCPk68JO9z5LazXZMn5Po= go.etcd.io/etcd/client/pkg/v3 v3.5.13 h1:RVZSAnWWWiI5IrYAXjQorajncORbS0zI48LQlE2kQWg= go.etcd.io/etcd/client/pkg/v3 v3.5.13/go.mod h1:XxHT4u1qU12E2+po+UVPrEeL94Um6zL58ppuJWXSAB8= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= diff --git a/module/team/iml.go b/module/team/iml.go index a61f9854..4a291939 100644 --- a/module/team/iml.go +++ b/module/team/iml.go @@ -111,13 +111,13 @@ func (m *imlTeamModule) Create(ctx context.Context, input *team_dto.CreateTeam) if err != nil { return err } - supperRole, err := m.roleService.GetSupperRole(ctx, role.GroupTeam) + superRole, err := m.roleService.GetSupperRole(ctx, role.GroupTeam) if err != nil { return err } return m.roleMemberService.Add(ctx, &role.AddMember{ - Role: supperRole.Id, + Role: superRole.Id, User: input.Master, Target: role.TeamTarget(input.Id), }) diff --git a/resources/access/role.yaml b/resources/access/role.yaml index 30054bb5..5b752025 100644 --- a/resources/access/role.yaml +++ b/resources/access/role.yaml @@ -1,6 +1,6 @@ system: - - name: supper admin - value: supper_admin + - name: super admin + value: super_admin permits: - system.dashboard.run_view.view - system.devops.ai_provider.manager From d93c76ca36b01ccde9bbfe9e993bb0a7d3800d61 Mon Sep 17 00:00:00 2001 From: HaoZhen Liu Date: Fri, 25 Oct 2024 14:30:57 +0800 Subject: [PATCH 58/91] update translation --- frontend/packages/common/src/locales/scan/en-US.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/packages/common/src/locales/scan/en-US.json b/frontend/packages/common/src/locales/scan/en-US.json index e9f91be4..55bcb24c 100644 --- a/frontend/packages/common/src/locales/scan/en-US.json +++ b/frontend/packages/common/src/locales/scan/en-US.json @@ -580,8 +580,8 @@ "Kd7d84192": "Name", "Kc88e03b6": "Team Roles", "Ke08ff808": "Addition Date", - "K19a3ebe0": "Successful Requests", - "Kcaa8259": "Successful Forwards", + "K19a3ebe0": "Success", + "Kcaa8259": "Success", "K17f93984": "API", "K888f038f": "Failed Status Code Count", "Ke792d01c": "Service Association", @@ -607,7 +607,7 @@ "Ke108c369": "Success", "K9168d3e": "Redirecting to Login Page", "K2f8a7ab7": "Review Comments Not Provided", - "Kb858d78a": "Copy Successful", + "Kb858d78a": "Copied", "K26e85d15": "Copy Failed, Please Copy Manually", "Kd60d204": "Service Team", "K823bfe63": "Online", From 396464c5739f1cd75c8c9b3145e8abbfbc4fc158 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Fri, 25 Oct 2024 14:30:58 +0800 Subject: [PATCH 59/91] update ao-account dependent version --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 0bc17fb0..4d86b706 100644 --- a/go.mod +++ b/go.mod @@ -75,4 +75,4 @@ require ( gorm.io/driver/mysql v1.5.2 // indirect ) -replace github.com/eolinker/ap-account => ../../eolinker/ap-account +replace github.com/eolinker/ap-account => ../ap-account From ada121015d84acc2736525673c5196391e6d2b9e Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Fri, 25 Oct 2024 14:32:11 +0800 Subject: [PATCH 60/91] update ao-account dependent version --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 4d86b706..2d2bf464 100644 --- a/go.mod +++ b/go.mod @@ -75,4 +75,4 @@ require ( gorm.io/driver/mysql v1.5.2 // indirect ) -replace github.com/eolinker/ap-account => ../ap-account +replace github.com/eolinker/ap-account => ../aoaccount From c0c43be6b9a7f641d8340e1f5beb4ac25ade5111 Mon Sep 17 00:00:00 2001 From: sunanzhi Date: Fri, 25 Oct 2024 15:16:47 +0800 Subject: [PATCH 61/91] fix:issue template content --- .github/ISSUE_TEMPLATE/bug_report.yml | 4 ++-- .github/ISSUE_TEMPLATE/request_help.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index da994f4f..dcce6152 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -45,7 +45,7 @@ body: label: Steps to Reproduce description: Share the steps you took so that we can reproduce the issue. Reports without proper steps details will likely be closed. placeholder: | - 1. Run apinto via the Docker image. + 1. Run APIPark via the Docker image. 2. Create a Route with the Admin API. 3. Try configuring ... 4. ... @@ -57,7 +57,7 @@ body: label: Environment description: Share your environment details. Reports without proper environment details will likely be closed. value: | - - APINTO Dashboard version (run `apinto dashboard version`): + - APIPark Dashboard version: - Operating system (run `uname -a`): validations: required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/request_help.yml b/.github/ISSUE_TEMPLATE/request_help.yml index 076cbb92..b040a124 100644 --- a/.github/ISSUE_TEMPLATE/request_help.yml +++ b/.github/ISSUE_TEMPLATE/request_help.yml @@ -25,7 +25,7 @@ body: label: Environment description: Share your environment details. Reports without proper environment details will likely be closed. value: | - - APIPark version (run `apinto dashboard version`): + - APIPark Dashboard version: - Operating system (run `uname -a`): validations: required: true \ No newline at end of file From c6c775f4365621e180b6dffe7bbc170e313328ac Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Fri, 25 Oct 2024 15:22:06 +0800 Subject: [PATCH 62/91] fix: Remove guest's account setting & update translation --- .../src/components/aoplatform/BasicLayout.tsx | 27 ++++++++----------- .../aoplatform/UnUsedWordForTranslate.tsx | 14 ++++++++++ frontend/packages/common/src/const/type.ts | 2 ++ .../common/src/locales/keyHashMap.json | 14 ++++++++++ .../src/locales/scan/newJson/en-US.json | 14 ++++++++++ .../src/locales/scan/newJson/ja-JP.json | 14 ++++++++++ .../src/locales/scan/newJson/zh-CN.json | 14 ++++++++++ .../src/locales/scan/newJson/zh-TW.json | 16 +++++++++-- .../api/AiServiceInsideRouterCreate.tsx | 4 +-- .../core/src/pages/system/SystemList.tsx | 2 +- 10 files changed, 100 insertions(+), 21 deletions(-) diff --git a/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx b/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx index 207996b8..7843ef1f 100644 --- a/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx +++ b/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx @@ -1,19 +1,15 @@ import { - ConfigProvider, - Dropdown, MenuProps, App, - Button} from 'antd'; + Button, + ConfigProvider, + Dropdown} from 'antd'; +import { Outlet, useLocation, useNavigate} from "react-router-dom"; import Logo from '@common/assets/layout-logo.png'; import AvatarPic from '@common/assets/default-avatar.png' -import {Outlet, useLocation, useNavigate} from "react-router-dom"; -import { useEffect, useMemo, useState} from "react"; +import { useEffect, useMemo, useState} from "react"; import { useGlobalContext } from '@common/contexts/GlobalStateContext.tsx'; import { PERMISSION_DEFINITION } from '@common/const/permissions.ts'; - import { - ProConfigProvider, - ProLayout, - } from '@ant-design/pro-components'; import { BasicResponse, RESPONSE_TIPS, routerKeyMap, STATUS_CODE } from '@common/const/const.tsx'; import { UserInfoType } from '@common/const/type.ts'; import { useFetch } from '@common/hooks/http.ts'; @@ -21,6 +17,7 @@ import { ProjectFilled } from '@ant-design/icons'; import { getNavItem } from '@common/utils/navigation'; import { Icon } from '@iconify/react'; import { $t } from '@common/locales'; +import { ProConfigProvider, ProLayout } from '@ant-design/pro-components'; import LanguageSetting from './LanguageSetting'; const APP_MODE = import.meta.env.VITE_APP_MODE; @@ -41,9 +38,8 @@ const themeToken = { const navigator = useNavigate() const location = useLocation() const currentUrl = location.pathname - const { state,accessData,checkPermission,accessInit} = useGlobalContext() - const [pathname, setPathname] = useState(currentUrl); - const mainPage = project === 'core' ?'/service/list':'/serviceHub/list' + const { state,accessData,checkPermission,accessInit,dispatch,resetAccess,getGlobalAccessData} = useGlobalContext() + const [pathname, setPathname] = useState(currentUrl); const mainPage = project === 'core' ?'/service/list':'/serviceHub/list' const TOTAL_MENU_ITEMS:MenuProps['items'] = useMemo(() => [ getNavItem($t('工作空间'), 'workspace','/guide/page',, [ @@ -126,7 +122,6 @@ const themeToken = { const { message } = App.useApp() - const { dispatch,resetAccess,getGlobalAccessData} = useGlobalContext() const [userInfo,setUserInfo] = useState() const {fetchData} = useFetch() const navigate = useNavigate(); @@ -163,8 +158,8 @@ const themeToken = { }) } - const items: MenuProps['items'] = [ - { + const items: MenuProps['items'] = useMemo(() => [ + userInfo?.type !== 'guest' && { key: '2', label: ( ) }, - ]; + ].filter(Boolean), [userInfo]); diff --git a/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx b/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx index 981fd393..d2d76808 100644 --- a/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx +++ b/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx @@ -137,6 +137,20 @@ export const TranslateWord = ()=>{ {$t('鉴权数量')} {$t('列表')} {$t('块')} + {$t('HTTP 请求头')} + {$t('全等匹配')} + {$t('前缀匹配')} + {$t('后缀匹配')} + {$t('子串匹配')} + {$t('非等匹配')} + {$t('空值匹配')} + {$t('存在匹配')} + {$t('区分大小写的正则匹配')} + {$t('不区分大小写的正则匹配')} + {$t('任意匹配')} + {$t('驳回')} + {$t('已订阅')} + {$t('取消申请')} ) diff --git a/frontend/packages/common/src/const/type.ts b/frontend/packages/common/src/const/type.ts index 1ea206cc..094d858e 100644 --- a/frontend/packages/common/src/const/type.ts +++ b/frontend/packages/common/src/const/type.ts @@ -7,6 +7,8 @@ export type UserInfoType = { email: string phone: string avatar: string + type:string + } export type UserProfileProps = { diff --git a/frontend/packages/common/src/locales/keyHashMap.json b/frontend/packages/common/src/locales/keyHashMap.json index 534968c4..0731b7e7 100644 --- a/frontend/packages/common/src/locales/keyHashMap.json +++ b/frontend/packages/common/src/locales/keyHashMap.json @@ -212,6 +212,20 @@ "鉴权数量": "Ka701316", "列表": "K9eaa2eb6", "块": "Kfaec39e9", + "HTTP 请求头": "K76036e25", + "全等匹配": "K44607e3f", + "前缀匹配": "Kc287500a", + "后缀匹配": "Kfc0b1147", + "子串匹配": "Ka4a92043", + "非等匹配": "K30b2e44f", + "空值匹配": "Kb1587991", + "存在匹配": "K1e97dbd8", + "区分大小写的正则匹配": "K87c5a801", + "不区分大小写的正则匹配": "K95f062f1", + "任意匹配": "Kfbd230a5", + "驳回": "Kd85208a3", + "已订阅": "Kad6aa439", + "取消申请": "K9a68443b", "暂无操作权限,请联系管理员分配。": "K23fda291", "微信小程序": "K4618cb0a", "获取文件,需填路径": "Ka854f511", diff --git a/frontend/packages/common/src/locales/scan/newJson/en-US.json b/frontend/packages/common/src/locales/scan/newJson/en-US.json index 7a73a41b..522f3e8d 100644 --- a/frontend/packages/common/src/locales/scan/newJson/en-US.json +++ b/frontend/packages/common/src/locales/scan/newJson/en-US.json @@ -1,2 +1,16 @@ { + "K76036e25": "HTTP 请求头", + "K44607e3f": "全等匹配", + "Kc287500a": "前缀匹配", + "Kfc0b1147": "后缀匹配", + "Ka4a92043": "子串匹配", + "K30b2e44f": "非等匹配", + "Kb1587991": "空值匹配", + "K1e97dbd8": "存在匹配", + "K87c5a801": "区分大小写的正则匹配", + "K95f062f1": "不区分大小写的正则匹配", + "Kfbd230a5": "任意匹配", + "Kd85208a3": "驳回", + "Kad6aa439": "已订阅", + "K9a68443b": "取消申请" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json index 7a73a41b..522f3e8d 100644 --- a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json @@ -1,2 +1,16 @@ { + "K76036e25": "HTTP 请求头", + "K44607e3f": "全等匹配", + "Kc287500a": "前缀匹配", + "Kfc0b1147": "后缀匹配", + "Ka4a92043": "子串匹配", + "K30b2e44f": "非等匹配", + "Kb1587991": "空值匹配", + "K1e97dbd8": "存在匹配", + "K87c5a801": "区分大小写的正则匹配", + "K95f062f1": "不区分大小写的正则匹配", + "Kfbd230a5": "任意匹配", + "Kd85208a3": "驳回", + "Kad6aa439": "已订阅", + "K9a68443b": "取消申请" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json index 0e647920..1ac9637f 100644 --- a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json +++ b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json @@ -1,4 +1,18 @@ { + "K76036e25": "HTTP 请求头", + "K44607e3f": "全等匹配", + "Kc287500a": "前缀匹配", + "Kfc0b1147": "后缀匹配", + "Ka4a92043": "子串匹配", + "K30b2e44f": "非等匹配", + "Kb1587991": "空值匹配", + "K1e97dbd8": "存在匹配", + "K87c5a801": "区分大小写的正则匹配", + "K95f062f1": "不区分大小写的正则匹配", + "Kfbd230a5": "任意匹配", + "Kd85208a3": "驳回", + "Kad6aa439": "已订阅", + "K9a68443b": "取消申请", "Kc3b7bfa8": "暂无消费者描述", "K3a6f905d": "输入名称、ID 查找消费者" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json index 0e647920..522f3e8d 100644 --- a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json @@ -1,4 +1,16 @@ { - "Kc3b7bfa8": "暂无消费者描述", - "K3a6f905d": "输入名称、ID 查找消费者" + "K76036e25": "HTTP 请求头", + "K44607e3f": "全等匹配", + "Kc287500a": "前缀匹配", + "Kfc0b1147": "后缀匹配", + "Ka4a92043": "子串匹配", + "K30b2e44f": "非等匹配", + "Kb1587991": "空值匹配", + "K1e97dbd8": "存在匹配", + "K87c5a801": "区分大小写的正则匹配", + "K95f062f1": "不区分大小写的正则匹配", + "Kfbd230a5": "任意匹配", + "Kd85208a3": "驳回", + "Kad6aa439": "已订阅", + "K9a68443b": "取消申请" } \ No newline at end of file diff --git a/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterCreate.tsx b/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterCreate.tsx index 0377e05e..e983f90d 100644 --- a/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterCreate.tsx +++ b/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterCreate.tsx @@ -256,7 +256,7 @@ const AiServiceInsideRouterCreate = () => { - + { }]} noStyle > - { if((e.target.value as string).endsWith('/*')){ form.setFieldValue('path',e.target.value.slice(0,-2)) diff --git a/frontend/packages/core/src/pages/system/SystemList.tsx b/frontend/packages/core/src/pages/system/SystemList.tsx index 8f53ae96..fa906a19 100644 --- a/frontend/packages/core/src/pages/system/SystemList.tsx +++ b/frontend/packages/core/src/pages/system/SystemList.tsx @@ -153,7 +153,7 @@ const SystemList:FC = ()=>{ From baa073b05d92253a6a84b031f99dd01e36d4c42b Mon Sep 17 00:00:00 2001 From: Scarqin Date: Fri, 25 Oct 2024 15:44:42 +0800 Subject: [PATCH 63/91] Update README.md --- frontend/README.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/frontend/README.md b/frontend/README.md index 61e84890..b27fef50 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,10 +1,17 @@ # 部署 ## 安装依赖 - 建议使用pnpm - `npm install -g pnpm` - 使用pnpm安装依赖 - `pnpm install` + 建议使用 pnpm + ``` + npm install -g pnpm +``` + + 使用pnpm安装依赖 + ``` + pnpm install +``` ## 编译 - `pnpm run build` \ No newline at end of file +``` + pnpm run build +``` From 7ab2e291014f49c15b7474d786114f1a5616a4e8 Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:16:15 +0800 Subject: [PATCH 64/91] fix: update translation --- .../aoplatform/UnUsedWordForTranslate.tsx | 6 +++++ .../common/src/locales/keyHashMap.json | 6 +++++ .../common/src/locales/scan/en-US.json | 22 ++++++++++++++++++- .../common/src/locales/scan/ja-JP.json | 22 ++++++++++++++++++- .../src/locales/scan/newJson/en-US.json | 14 ------------ .../src/locales/scan/newJson/ja-JP.json | 14 ------------ .../src/locales/scan/newJson/zh-CN.json | 6 +++++ .../src/locales/scan/newJson/zh-TW.json | 14 ------------ .../common/src/locales/scan/zh-TW.json | 22 ++++++++++++++++++- 9 files changed, 81 insertions(+), 45 deletions(-) diff --git a/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx b/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx index d2d76808..ff20fc74 100644 --- a/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx +++ b/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx @@ -151,6 +151,12 @@ export const TranslateWord = ()=>{ {$t('驳回')} {$t('已订阅')} {$t('取消申请')} + {$t('透传客户端请求 Host')} + {$t('使用上游服务 Host')} + {$t('重写 Host')} + {$t('动态服务发现')} + {$t('地址')} + {$t('新增')} ) diff --git a/frontend/packages/common/src/locales/keyHashMap.json b/frontend/packages/common/src/locales/keyHashMap.json index 0731b7e7..0d0d5bb7 100644 --- a/frontend/packages/common/src/locales/keyHashMap.json +++ b/frontend/packages/common/src/locales/keyHashMap.json @@ -226,6 +226,12 @@ "驳回": "Kd85208a3", "已订阅": "Kad6aa439", "取消申请": "K9a68443b", + "透传客户端请求 Host": "Kaeba0229", + "使用上游服务 Host": "K6d7e2fd0", + "重写 Host": "K31332633", + "动态服务发现": "K2c2bc64f", + "地址": "K78b1ca25", + "新增": "K1644b775", "暂无操作权限,请联系管理员分配。": "K23fda291", "微信小程序": "K4618cb0a", "获取文件,需填路径": "Ka854f511", diff --git a/frontend/packages/common/src/locales/scan/en-US.json b/frontend/packages/common/src/locales/scan/en-US.json index 7f32cdda..2221e09d 100644 --- a/frontend/packages/common/src/locales/scan/en-US.json +++ b/frontend/packages/common/src/locales/scan/en-US.json @@ -656,5 +656,25 @@ "K9eaa2eb6": "List", "Kfaec39e9": "Block", "Kc3b7bfa8": "No Consumer Description", - "K3a6f905d": "Enter Name, ID to Search Consumer" + "K3a6f905d": "Enter Name, ID to Search Consumer", + "K76036e25": "HTTP Request Header", + "K44607e3f": "Exact Match", + "Kc287500a": "Prefix Match", + "Kfc0b1147": "Suffix Match", + "Ka4a92043": "Substring Match", + "K30b2e44f": "Non-Exact Match", + "Kb1587991": "Null Match", + "K1e97dbd8": "Exists Match", + "K87c5a801": "Case-Sensitive Regex Match", + "K95f062f1": "Case-Insensitive Regex Match", + "Kfbd230a5": "Any Match", + "Kd85208a3": "Reject", + "Kad6aa439": "Subscribed", + "K9a68443b": "Cancel Request", + "Kaeba0229": "Pass-through Client Request Host", + "K6d7e2fd0": "Use Upstream Service Host", + "K31332633": "Rewrite Host", + "K2c2bc64f": "Dynamic Service Discovery", + "K78b1ca25": "Address", + "K1644b775": "Add" } diff --git a/frontend/packages/common/src/locales/scan/ja-JP.json b/frontend/packages/common/src/locales/scan/ja-JP.json index 7902b78c..6a937b5c 100644 --- a/frontend/packages/common/src/locales/scan/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/ja-JP.json @@ -678,5 +678,25 @@ "K5c4e2865": "コンシューマーエンティティを作成および管理し、各コンシューマーは複数の API サービスにサブスクライブできます。呼び出し前に適切な権限が付与されていることを確認してください。コンシューマー用に API キーなどの認証方法を生成して、安全に API サービスを呼び出せます。", "K84c4dc71": "コンシューマーを追加", "Kc3b7bfa8": "コンシューマーの説明がありません", - "K3a6f905d": "名前、IDを入力してコンシューマーを検索" + "K3a6f905d": "名前、IDを入力してコンシューマーを検索", + "K76036e25": "HTTPリクエストヘッダー", + "K44607e3f": "完全一致", + "Kc287500a": "プレフィックス一致", + "Kfc0b1147": "サフィックス一致", + "Ka4a92043": "部分一致", + "K30b2e44f": "非完全一致", + "Kb1587991": "ヌル一致", + "K1e97dbd8": "存在一致", + "K87c5a801": "大文字小文字を区別する正規表現一致", + "K95f062f1": "大文字小文字を区別しない正規表現一致", + "Kfbd230a5": "任意一致", + "Kd85208a3": "拒否", + "Kad6aa439": "申し込み済み", + "K9a68443b": "申し込み取消", + "Kaeba0229": "クライアントリクエストホストのパススルー", + "K6d7e2fd0": "上位サービスホストの使用", + "K31332633": "ホストの書き換え", + "K2c2bc64f": "動的サービス発見", + "K78b1ca25": "アドレス", + "K1644b775": "追加" } diff --git a/frontend/packages/common/src/locales/scan/newJson/en-US.json b/frontend/packages/common/src/locales/scan/newJson/en-US.json index 522f3e8d..7a73a41b 100644 --- a/frontend/packages/common/src/locales/scan/newJson/en-US.json +++ b/frontend/packages/common/src/locales/scan/newJson/en-US.json @@ -1,16 +1,2 @@ { - "K76036e25": "HTTP 请求头", - "K44607e3f": "全等匹配", - "Kc287500a": "前缀匹配", - "Kfc0b1147": "后缀匹配", - "Ka4a92043": "子串匹配", - "K30b2e44f": "非等匹配", - "Kb1587991": "空值匹配", - "K1e97dbd8": "存在匹配", - "K87c5a801": "区分大小写的正则匹配", - "K95f062f1": "不区分大小写的正则匹配", - "Kfbd230a5": "任意匹配", - "Kd85208a3": "驳回", - "Kad6aa439": "已订阅", - "K9a68443b": "取消申请" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json index 522f3e8d..7a73a41b 100644 --- a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json @@ -1,16 +1,2 @@ { - "K76036e25": "HTTP 请求头", - "K44607e3f": "全等匹配", - "Kc287500a": "前缀匹配", - "Kfc0b1147": "后缀匹配", - "Ka4a92043": "子串匹配", - "K30b2e44f": "非等匹配", - "Kb1587991": "空值匹配", - "K1e97dbd8": "存在匹配", - "K87c5a801": "区分大小写的正则匹配", - "K95f062f1": "不区分大小写的正则匹配", - "Kfbd230a5": "任意匹配", - "Kd85208a3": "驳回", - "Kad6aa439": "已订阅", - "K9a68443b": "取消申请" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json index 1ac9637f..201b5675 100644 --- a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json +++ b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json @@ -13,6 +13,12 @@ "Kd85208a3": "驳回", "Kad6aa439": "已订阅", "K9a68443b": "取消申请", + "Kaeba0229": "透传客户端请求 Host", + "K6d7e2fd0": "使用上游服务 Host", + "K31332633": "重写 Host", + "K2c2bc64f": "动态服务发现", + "K78b1ca25": "地址", + "K1644b775": "新增", "Kc3b7bfa8": "暂无消费者描述", "K3a6f905d": "输入名称、ID 查找消费者" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json index 522f3e8d..7a73a41b 100644 --- a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json @@ -1,16 +1,2 @@ { - "K76036e25": "HTTP 请求头", - "K44607e3f": "全等匹配", - "Kc287500a": "前缀匹配", - "Kfc0b1147": "后缀匹配", - "Ka4a92043": "子串匹配", - "K30b2e44f": "非等匹配", - "Kb1587991": "空值匹配", - "K1e97dbd8": "存在匹配", - "K87c5a801": "区分大小写的正则匹配", - "K95f062f1": "不区分大小写的正则匹配", - "Kfbd230a5": "任意匹配", - "Kd85208a3": "驳回", - "Kad6aa439": "已订阅", - "K9a68443b": "取消申请" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/zh-TW.json b/frontend/packages/common/src/locales/scan/zh-TW.json index af886d2a..c750d0bc 100644 --- a/frontend/packages/common/src/locales/scan/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/zh-TW.json @@ -678,5 +678,25 @@ "Kba74f26d": "接入消費者", "K70b79760": "接入消費者數量", "Kc3b7bfa8": "暫無消費者描述", - "K3a6f905d": "輸入名稱、ID 查找消費者" + "K3a6f905d": "輸入名稱、ID 查找消費者", + "K76036e25": "HTTP請求頭", + "K44607e3f": "全等匹配", + "Kc287500a": "前綴匹配", + "Kfc0b1147": "後綴匹配", + "Ka4a92043": "子串匹配", + "K30b2e44f": "非等匹配", + "Kb1587991": "空值匹配", + "K1e97dbd8": "存在匹配", + "K87c5a801": "區分大小寫的正則匹配", + "K95f062f1": "不區分大小寫的正則匹配", + "Kfbd230a5": "任意匹配", + "Kd85208a3": "駁回", + "Kad6aa439": "已訂閱", + "K9a68443b": "取消申請", + "Kaeba0229": "透傳客戶端請求Host", + "K6d7e2fd0": "使用上游服務Host", + "K31332633": "重寫Host", + "K2c2bc64f": "動態服務發現", + "K78b1ca25": "位址", + "K1644b775": "新增" } From 0c64fa9986ab74a5dc58dc210f04fd2c8f4399ca Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:34:06 +0800 Subject: [PATCH 65/91] fix: update translation --- .../src/components/aoplatform/UnUsedWordForTranslate.tsx | 2 ++ frontend/packages/common/src/locales/keyHashMap.json | 2 ++ frontend/packages/common/src/locales/scan/en-US.json | 6 ++++-- frontend/packages/common/src/locales/scan/ja-JP.json | 6 ++++-- .../packages/common/src/locales/scan/newJson/en-US.json | 3 +-- .../packages/common/src/locales/scan/newJson/ja-JP.json | 3 +-- .../packages/common/src/locales/scan/newJson/zh-CN.json | 2 ++ .../packages/common/src/locales/scan/newJson/zh-TW.json | 3 +-- frontend/packages/common/src/locales/scan/zh-TW.json | 6 ++++-- 9 files changed, 21 insertions(+), 12 deletions(-) diff --git a/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx b/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx index ff20fc74..02b3e24c 100644 --- a/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx +++ b/frontend/packages/common/src/components/aoplatform/UnUsedWordForTranslate.tsx @@ -145,6 +145,7 @@ export const TranslateWord = ()=>{ {$t('非等匹配')} {$t('空值匹配')} {$t('存在匹配')} + {$t('不存在匹配')} {$t('区分大小写的正则匹配')} {$t('不区分大小写的正则匹配')} {$t('任意匹配')} @@ -157,6 +158,7 @@ export const TranslateWord = ()=>{ {$t('动态服务发现')} {$t('地址')} {$t('新增')} + {$t('申请方消费者')} ) diff --git a/frontend/packages/common/src/locales/keyHashMap.json b/frontend/packages/common/src/locales/keyHashMap.json index 0d0d5bb7..89227607 100644 --- a/frontend/packages/common/src/locales/keyHashMap.json +++ b/frontend/packages/common/src/locales/keyHashMap.json @@ -220,6 +220,7 @@ "非等匹配": "K30b2e44f", "空值匹配": "Kb1587991", "存在匹配": "K1e97dbd8", + "不存在匹配": "Kc8ee3e62", "区分大小写的正则匹配": "K87c5a801", "不区分大小写的正则匹配": "K95f062f1", "任意匹配": "Kfbd230a5", @@ -232,6 +233,7 @@ "动态服务发现": "K2c2bc64f", "地址": "K78b1ca25", "新增": "K1644b775", + "申请方消费者": "Kec91f0db", "暂无操作权限,请联系管理员分配。": "K23fda291", "微信小程序": "K4618cb0a", "获取文件,需填路径": "Ka854f511", diff --git a/frontend/packages/common/src/locales/scan/en-US.json b/frontend/packages/common/src/locales/scan/en-US.json index 2221e09d..d3c8158a 100644 --- a/frontend/packages/common/src/locales/scan/en-US.json +++ b/frontend/packages/common/src/locales/scan/en-US.json @@ -664,7 +664,6 @@ "Ka4a92043": "Substring Match", "K30b2e44f": "Non-Exact Match", "Kb1587991": "Null Match", - "K1e97dbd8": "Exists Match", "K87c5a801": "Case-Sensitive Regex Match", "K95f062f1": "Case-Insensitive Regex Match", "Kfbd230a5": "Any Match", @@ -676,5 +675,8 @@ "K31332633": "Rewrite Host", "K2c2bc64f": "Dynamic Service Discovery", "K78b1ca25": "Address", - "K1644b775": "Add" + "K1644b775": "Add", + "Kc8ee3e62": "Non-Existence", + "K1e97dbd8": "Existence", + "Kec91f0db": "Applicant Consumer" } diff --git a/frontend/packages/common/src/locales/scan/ja-JP.json b/frontend/packages/common/src/locales/scan/ja-JP.json index 6a937b5c..b9f63dd8 100644 --- a/frontend/packages/common/src/locales/scan/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/ja-JP.json @@ -686,7 +686,6 @@ "Ka4a92043": "部分一致", "K30b2e44f": "非完全一致", "Kb1587991": "ヌル一致", - "K1e97dbd8": "存在一致", "K87c5a801": "大文字小文字を区別する正規表現一致", "K95f062f1": "大文字小文字を区別しない正規表現一致", "Kfbd230a5": "任意一致", @@ -698,5 +697,8 @@ "K31332633": "ホストの書き換え", "K2c2bc64f": "動的サービス発見", "K78b1ca25": "アドレス", - "K1644b775": "追加" + "K1644b775": "追加", + "Kc8ee3e62": "存在しない", + "K1e97dbd8": "存在する", + "Kec91f0db": "申請側コンシューマー" } diff --git a/frontend/packages/common/src/locales/scan/newJson/en-US.json b/frontend/packages/common/src/locales/scan/newJson/en-US.json index 7a73a41b..9e26dfee 100644 --- a/frontend/packages/common/src/locales/scan/newJson/en-US.json +++ b/frontend/packages/common/src/locales/scan/newJson/en-US.json @@ -1,2 +1 @@ -{ -} \ No newline at end of file +{} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json index 7a73a41b..9e26dfee 100644 --- a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json @@ -1,2 +1 @@ -{ -} \ No newline at end of file +{} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json index 201b5675..b98863ab 100644 --- a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json +++ b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json @@ -7,6 +7,7 @@ "K30b2e44f": "非等匹配", "Kb1587991": "空值匹配", "K1e97dbd8": "存在匹配", + "Kc8ee3e62": "不存在匹配", "K87c5a801": "区分大小写的正则匹配", "K95f062f1": "不区分大小写的正则匹配", "Kfbd230a5": "任意匹配", @@ -19,6 +20,7 @@ "K2c2bc64f": "动态服务发现", "K78b1ca25": "地址", "K1644b775": "新增", + "Kec91f0db": "申请方消费者", "Kc3b7bfa8": "暂无消费者描述", "K3a6f905d": "输入名称、ID 查找消费者" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json index 7a73a41b..9e26dfee 100644 --- a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json @@ -1,2 +1 @@ -{ -} \ No newline at end of file +{} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/zh-TW.json b/frontend/packages/common/src/locales/scan/zh-TW.json index c750d0bc..0c12871f 100644 --- a/frontend/packages/common/src/locales/scan/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/zh-TW.json @@ -686,7 +686,6 @@ "Ka4a92043": "子串匹配", "K30b2e44f": "非等匹配", "Kb1587991": "空值匹配", - "K1e97dbd8": "存在匹配", "K87c5a801": "區分大小寫的正則匹配", "K95f062f1": "不區分大小寫的正則匹配", "Kfbd230a5": "任意匹配", @@ -698,5 +697,8 @@ "K31332633": "重寫Host", "K2c2bc64f": "動態服務發現", "K78b1ca25": "位址", - "K1644b775": "新增" + "K1644b775": "新增", + "Kc8ee3e62": "不存在匹配", + "K1e97dbd8": "存在匹配", + "Kec91f0db": "申請方消費者" } From c01e95c716f6c06e9ad110f18a0962a0ec9e361c Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Fri, 25 Oct 2024 18:45:38 +0800 Subject: [PATCH 66/91] update translate --- resources/locale/i18n/en-US.json | 2 +- resources/locale/i18n/ja-JP.json | 2 +- resources/locale/i18n/zh-CN.json | 2 +- resources/locale/i18n/zh-TW.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/locale/i18n/en-US.json b/resources/locale/i18n/en-US.json index 4d865e69..0db78da0 100644 --- a/resources/locale/i18n/en-US.json +++ b/resources/locale/i18n/en-US.json @@ -29,7 +29,7 @@ "ssl certificate": "SSL Certificate", "subscription management": "Subscription Management", "subscription service": "Subscription Service", - "supper admin": "Super Administrator", + "super admin": "Super Administrator", "system settings": "System Settings", "team": "Team", "team admin": "Team Administrator", diff --git a/resources/locale/i18n/ja-JP.json b/resources/locale/i18n/ja-JP.json index 894c899c..a6c81be1 100644 --- a/resources/locale/i18n/ja-JP.json +++ b/resources/locale/i18n/ja-JP.json @@ -29,7 +29,7 @@ "ssl certificate": "SSL証明書", "subscription management": "サブスクリプション管理", "subscription service": "サブスクリプションサービス", - "supper admin": "スーパ管理者", + "super admin": "スーパ管理者", "system settings": "システム設定", "team": "チーム", "team admin": "チーム管理者", diff --git a/resources/locale/i18n/zh-CN.json b/resources/locale/i18n/zh-CN.json index ea248a81..5fb14ae1 100644 --- a/resources/locale/i18n/zh-CN.json +++ b/resources/locale/i18n/zh-CN.json @@ -29,7 +29,7 @@ "ssl certificate": "SSL证书", "subscription management": "订阅方管理", "subscription service": "订阅服务", - "supper admin": "超级管理员", + "super admin": "超级管理员", "system settings": "系统设置", "team": "团队", "team admin": "团队管理员", diff --git a/resources/locale/i18n/zh-TW.json b/resources/locale/i18n/zh-TW.json index 44c6075f..5b35ad94 100644 --- a/resources/locale/i18n/zh-TW.json +++ b/resources/locale/i18n/zh-TW.json @@ -29,7 +29,7 @@ "ssl certificate": "SSL證書", "subscription management": "訂閱方管理", "subscription service": "訂閱服務", - "supper admin": "超級管理員", + "super admin": "超級管理員", "system settings": "系統設置", "team": "團隊", "team admin": "團隊管理員", From 7155e14e641dba3c96f7dea0f516bc73c1b73532 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Sat, 26 Oct 2024 21:25:13 +0800 Subject: [PATCH 67/91] create ai service add provider --- controller/service/iml.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controller/service/iml.go b/controller/service/iml.go index aac8c32b..b8cfdc8a 100644 --- a/controller/service/iml.go +++ b/controller/service/iml.go @@ -151,8 +151,9 @@ func (i *imlServiceController) createAIService(ctx *gin.Context, teamID string, Prompt: "You need to translate {{source_lang}} into {{target_lang}}, and the following is the content that needs to be translated.\n---\n{{text}}", } aiModel := &ai_api_dto.AiModel{ - Id: m.ID(), - Config: m.DefaultConfig(), + Id: m.ID(), + Config: m.DefaultConfig(), + Provider: *input.Provider, } name := "Demo Translation API" description := "A demo that shows you how to use a prompt to create a Translation API." From 2f1677f58157f3d8afbbc3ca4786cfcd8f645cbf Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Sun, 27 Oct 2024 00:47:48 +0800 Subject: [PATCH 68/91] role update --- resources/access/access.yaml | 6 ------ resources/access/role.yaml | 4 ++-- resources/locale/i18n/en-US.json | 2 +- resources/locale/i18n/zh-CN.json | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/resources/access/access.yaml b/resources/access/access.yaml index 1ff6ba0b..76d3d327 100644 --- a/resources/access/access.yaml +++ b/resources/access/access.yaml @@ -262,11 +262,9 @@ system: apis: - "GET:/api/v1/manager/teams" - name: api market -# cname: API市场 value: 'api_market' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: @@ -274,15 +272,12 @@ system: - "GET:/api/v1/catalogue/service" team: - name: service -# cname: 服务 value: 'service' children: - name: router -# cname: 路由 value: 'router' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: @@ -291,7 +286,6 @@ team: - "GET:/api/v1/service/router/detail/simple" - "GET:/api/v1/service/router/define" - name: manager -# cname: 管理 value: 'manager' apis: - "POST:/api/v1/service/router" diff --git a/resources/access/role.yaml b/resources/access/role.yaml index 30054bb5..5b752025 100644 --- a/resources/access/role.yaml +++ b/resources/access/role.yaml @@ -1,6 +1,6 @@ system: - - name: supper admin - value: supper_admin + - name: super admin + value: super_admin permits: - system.dashboard.run_view.view - system.devops.ai_provider.manager diff --git a/resources/locale/i18n/en-US.json b/resources/locale/i18n/en-US.json index 0db78da0..12c793a1 100644 --- a/resources/locale/i18n/en-US.json +++ b/resources/locale/i18n/en-US.json @@ -1,6 +1,6 @@ { "ai provider": "AI Provider", - "api market": "API Market", + "api market": "API Portal", "api doc": "API Documentation", "application": "Application", "application admin": "Application Administrator", diff --git a/resources/locale/i18n/zh-CN.json b/resources/locale/i18n/zh-CN.json index 5fb14ae1..3882a74f 100644 --- a/resources/locale/i18n/zh-CN.json +++ b/resources/locale/i18n/zh-CN.json @@ -1,6 +1,6 @@ { "ai provider": "AI供应商", - "api market": "API市场", + "api market": "API门户", "api doc": "API文档", "application": "应用", "application admin": "应用管理员", From 10486669721134b2a276036beb4b63d4b1ff4653 Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Mon, 28 Oct 2024 09:58:04 +0800 Subject: [PATCH 69/91] fix: Modify publish and title & add debug --- .../components/aoplatform/PublishApprovalModalContent.tsx | 4 ++-- frontend/packages/core/index.html | 2 +- frontend/packages/core/src/pages/role/RoleConfig.tsx | 6 +++++- .../pages/serviceHub/management/ServiceHubManagement.tsx | 2 ++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/frontend/packages/common/src/components/aoplatform/PublishApprovalModalContent.tsx b/frontend/packages/common/src/components/aoplatform/PublishApprovalModalContent.tsx index d791bb9f..97baa331 100644 --- a/frontend/packages/common/src/components/aoplatform/PublishApprovalModalContent.tsx +++ b/frontend/packages/common/src/components/aoplatform/PublishApprovalModalContent.tsx @@ -219,12 +219,12 @@ export const PublishApprovalModalContent = forwardRef } - - + */} {/* {type !== 'add' && type !== 'publish' && - APIPark - 企业API数据开放平台 + APIPark
diff --git a/frontend/packages/core/src/pages/role/RoleConfig.tsx b/frontend/packages/core/src/pages/role/RoleConfig.tsx index 153125a7..2b997ac6 100644 --- a/frontend/packages/core/src/pages/role/RoleConfig.tsx +++ b/frontend/packages/core/src/pages/role/RoleConfig.tsx @@ -176,13 +176,17 @@ const RoleConfig = ()=>{ },[permissionInfo, state.language]) useEffect(() => { - getPermissionTemplate() form.setFieldsValue({name:'',permits:[]}) if(roleId){ getPermissionInfo() } }, []); + useEffect(()=>{ + getPermissionTemplate() + + },[state.language]) + const onFinish =async() => { const body = await form.validateFields() diff --git a/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx b/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx index 8db42868..38b25672 100644 --- a/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx +++ b/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx @@ -76,6 +76,7 @@ const getServiceList = ()=>{ const getTeamsList = ()=>{ + console.log('GetTeamList', accessInit,getGlobalAccessData) if(!accessInit){ getGlobalAccessData()?.then?.(()=>{getTeamsList()}) return @@ -167,6 +168,7 @@ useEffect(() => { ) getTeamsList() setAppName('') + console.log() }, []); From 1d1c7c78e865bd99ee281b34a7679b15f6fa3646 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 28 Oct 2024 10:00:34 +0800 Subject: [PATCH 70/91] update go.mod --- go.mod | 4 ++-- go.sum | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 2d2bf464..3c8d6cad 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21 //toolchain go1.21.1 require ( - github.com/eolinker/ap-account v1.0.13 + github.com/eolinker/ap-account v1.0.14 github.com/eolinker/eosc v0.17.3 github.com/eolinker/go-common v1.1.0 github.com/gabriel-vasile/mimetype v1.4.4 @@ -75,4 +75,4 @@ require ( gorm.io/driver/mysql v1.5.2 // indirect ) -replace github.com/eolinker/ap-account => ../aoaccount +//replace github.com/eolinker/ap-account => ../../eolinker/ap-account diff --git a/go.sum b/go.sum index c10fa993..40b6a55c 100644 --- a/go.sum +++ b/go.sum @@ -28,8 +28,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/eolinker/ap-account v1.0.13 h1:6iWdyxLAIkJfgw9JvkHEq0t2m8Levpg30kSx5pTK2wY= -github.com/eolinker/ap-account v1.0.13/go.mod h1:qLKg4xervGHTNBWaGckfPkQb+FZT0XfhwPEdNpzvsjE= +github.com/eolinker/ap-account v1.0.14 h1:QE9LWx9F/t/BbTeBcjPX+Alzh3mdlHv+BVvKcBwr5dc= +github.com/eolinker/ap-account v1.0.14/go.mod h1:qLKg4xervGHTNBWaGckfPkQb+FZT0XfhwPEdNpzvsjE= github.com/eolinker/eosc v0.17.3 h1:sr2yT+v/AsqEdciRaaZZj0zL9pTufR5RvDW6+65hraQ= github.com/eolinker/eosc v0.17.3/go.mod h1:xgq816hpanlMXFtZw7Ztdctb1eEk9UPHchY4NfFO6Cw= github.com/eolinker/go-common v1.1.0 h1:n/XXK7yVRen3jhNG/SfZGXJA+KNnaYf0XTDfMeviaBw= From ee8e93d1e80db6a62b06d4917e57fa40a86a1551 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 28 Oct 2024 10:46:17 +0800 Subject: [PATCH 71/91] update action --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 040fe3ce..cf815dfc 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: echo "Build frontend..." cd ./frontend && pnpm run build - name: upload frontend release - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: frontend-package path: frontend/dist From c5fecf73c8199572ebfe460e06e7b9a1cde98914 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 28 Oct 2024 10:53:28 +0800 Subject: [PATCH 72/91] update action --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index cf815dfc..49b80caa 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -41,7 +41,7 @@ jobs: - name: Checkout #Checkout代码 uses: actions/checkout@v3 - name: download frontend release - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: frontend-package path: frontend/dist @@ -71,7 +71,7 @@ jobs: - uses: actions/checkout@v3 - name: download frontend release - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: frontend-package path: frontend/dist From 4f6fee4d73bfb5267752b8e127dd229f94afa70a Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Mon, 28 Oct 2024 11:52:51 +0800 Subject: [PATCH 73/91] fix: Delete operation from team & Delete comments from publish --- .../common/src/const/approval/const.tsx | 5 ---- .../core/src/pages/team/TeamConfig.tsx | 4 +-- .../packages/core/src/pages/team/TeamList.tsx | 26 ++++--------------- .../src/component/MonitorTotalPage.tsx | 6 ++--- .../dashboard/src/pages/Dashboard.tsx | 2 +- .../management/ServiceHubManagement.tsx | 5 ++-- 6 files changed, 14 insertions(+), 34 deletions(-) diff --git a/frontend/packages/common/src/const/approval/const.tsx b/frontend/packages/common/src/const/approval/const.tsx index 905834d3..9642b9a6 100644 --- a/frontend/packages/common/src/const/approval/const.tsx +++ b/frontend/packages/common/src/const/approval/const.tsx @@ -343,11 +343,6 @@ export const PUBLISH_APPROVAL_RECORD_INNER_TABLE_COLUMN : PageProColumns((props,ref) => {

{$t('删除团队')}:{$t('删除操作不可恢复,请谨慎操作!')}

- +
diff --git a/frontend/packages/core/src/pages/team/TeamList.tsx b/frontend/packages/core/src/pages/team/TeamList.tsx index b7d87645..075d753d 100644 --- a/frontend/packages/core/src/pages/team/TeamList.tsx +++ b/frontend/packages/core/src/pages/team/TeamList.tsx @@ -1,16 +1,15 @@ -import PageList, { PageProColumns } from "@common/components/aoplatform/PageList.tsx" +import PageList from "@common/components/aoplatform/PageList.tsx" import {ActionType} from "@ant-design/pro-components"; import {FC, useEffect, useMemo, useRef, useState} from "react"; import {useLocation, useNavigate} from "react-router-dom"; import {useBreadcrumb} from "@common/contexts/BreadcrumbContext.tsx"; -import {App, Divider, Modal} from "antd"; -import {BasicResponse, COLUMNS_TITLE, DELETE_TIPS, RESPONSE_TIPS, STATUS_CODE} from "@common/const/const.tsx"; +import {App, Modal} from "antd"; +import {BasicResponse, DELETE_TIPS, RESPONSE_TIPS, STATUS_CODE} from "@common/const/const.tsx"; import { SimpleMemberItem } from "@common/const/type.ts"; import {useFetch} from "@common/hooks/http.ts"; import { TEAM_TABLE_COLUMNS } from "../../const/team/const.tsx"; import { TeamConfigFieldType, TeamConfigHandle, TeamTableListItem } from "../../const/team/type.ts"; -import TableBtnWithPermission from "@common/components/aoplatform/TableBtnWithPermission.tsx"; import { useGlobalContext } from "@common/contexts/GlobalStateContext.tsx"; import { checkAccess } from "@common/utils/permission.ts"; import TeamConfig from "./TeamConfig.tsx"; @@ -131,21 +130,6 @@ const TeamList:FC = ()=>{ }) } - const operation:PageProColumns[] =[ - { - title: COLUMNS_TITLE.operate, - key: 'option', - fixed:'right', - btnNums:2, - valueType: 'option', - render: (_: React.ReactNode, entity: TeamTableListItem) => [ - , - , - {openModal('delete',entity)}} btnTitle="删除"/>, - ], - } - ] - useEffect(() => { setBreadcrumb([ {title: $t('团队')} @@ -173,7 +157,7 @@ const TeamList:FC = ()=>{ id="global_team" className="pl-btnbase" ref={pageListRef} - columns = {[...columns,...operation]} + columns = {[...columns]} request = {()=>getTeamList()} showPagination={false} addNewBtnTitle={$t('添加团队')} @@ -207,7 +191,7 @@ const TeamList:FC = ()=>{ } return res})} > - + ) diff --git a/frontend/packages/dashboard/src/component/MonitorTotalPage.tsx b/frontend/packages/dashboard/src/component/MonitorTotalPage.tsx index 7d37c5d4..3f7c18a7 100644 --- a/frontend/packages/dashboard/src/component/MonitorTotalPage.tsx +++ b/frontend/packages/dashboard/src/component/MonitorTotalPage.tsx @@ -231,9 +231,9 @@ const MonitorTotalPage = (props:MonitorTotalPageProps) => { } return ( -
+
-
+
{
} spinning={queryBtnLoading}> {totalEmpty ?: -
+
{/* 图表区域 */}
{/* 请求统计饼图 */} diff --git a/frontend/packages/dashboard/src/pages/Dashboard.tsx b/frontend/packages/dashboard/src/pages/Dashboard.tsx index 410136fd..b916a4eb 100644 --- a/frontend/packages/dashboard/src/pages/Dashboard.tsx +++ b/frontend/packages/dashboard/src/pages/Dashboard.tsx @@ -47,7 +47,7 @@ export default function Dashboard(){ return ( <> - } spinning={loading}> + } spinning={loading}> { !loading && <> { diff --git a/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx b/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx index 38b25672..e4d939ee 100644 --- a/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx +++ b/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx @@ -76,9 +76,10 @@ const getServiceList = ()=>{ const getTeamsList = ()=>{ - console.log('GetTeamList', accessInit,getGlobalAccessData) if(!accessInit){ - getGlobalAccessData()?.then?.(()=>{getTeamsList()}) + setTimeout(()=>{ + getGlobalAccessData()?.then?.(()=>{getTeamsList()}) + },200) return } setPageLoading(true) From 522183eb4d312be6142030831f1c70a654a2ea2b Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:39:47 +0800 Subject: [PATCH 74/91] fix: update message --- frontend/.gitignore | 1 + frontend/jest.config.js | 9 +------ frontend/jest.setup.js | 8 +----- frontend/lerna.json | 1 + frontend/packages/businessEntry/.gitignore | 1 - frontend/packages/businessEntry/index.html | 2 +- frontend/packages/businessEntry/package.json | 2 +- .../packages/businessEntry/postcss.config.js | 6 ----- .../businessEntry/public/iconpark_apinto.js | 6 ----- .../businessEntry/public/iconpark_eolink.js | 6 ----- frontend/packages/businessEntry/start-vite.js | 7 +---- frontend/packages/common/postcss.config.js | 7 +---- frontend/packages/common/src/hooks/crypto.ts | 26 ------------------- frontend/packages/common/src/index.css | 7 +---- frontend/packages/common/tailwind.config.js | 7 +---- frontend/packages/core/postcss.config.js | 7 +---- .../packages/core/public/iconpark_apinto.js | 7 +---- .../packages/core/public/iconpark_eolink.js | 7 +---- frontend/packages/core/start-vite.js | 7 +---- frontend/packages/core/tailwind.config.js | 7 +---- frontend/packages/dashboard/postcss.config.js | 7 +---- .../dashboard/src/pages/Dashboard.tsx | 1 - .../packages/dashboard/tailwind.config.js | 7 +---- frontend/packages/market/postcss.config.js | 7 +---- frontend/packages/openApi/postcss.config.js | 7 +---- frontend/packages/openApi/tailwind.config.js | 7 +---- .../packages/systemRunning/postcss.config.js | 7 +---- .../packages/systemRunning/tailwind.config.js | 7 +---- frontend/pnpm-workspace.yaml | 3 ++- frontend/tailwind.config.js | 7 +---- frontend/tsconfig.json | 1 + 31 files changed, 26 insertions(+), 166 deletions(-) delete mode 100644 frontend/packages/common/src/hooks/crypto.ts diff --git a/frontend/.gitignore b/frontend/.gitignore index 2196ff5f..d5e4b5bf 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -27,4 +27,5 @@ packages/core/public/tinymce/ *.sln *.sw? + /pnpm-lock.yaml diff --git a/frontend/jest.config.js b/frontend/jest.config.js index 8d74aab3..bcf71b3f 100644 --- a/frontend/jest.config.js +++ b/frontend/jest.config.js @@ -1,10 +1,3 @@ -/* - * @Date: 2024-05-10 14:19:56 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-05-10 15:55:29 - * @FilePath: \frontend\jest.config.js - */ - module.exports = { roots: ['/packages'], testMatch: ['**/__tests__/**/*.+(ts|tsx|js)', '**/?(*.)+(spec|test).+(ts|tsx|js)'], @@ -15,4 +8,4 @@ module.exports = { moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'], testPathIgnorePatterns: ['/node_modules/', '/dist/'], setupFilesAfterEnv: ['/jest.setup.js'], -}; \ No newline at end of file +}; diff --git a/frontend/jest.setup.js b/frontend/jest.setup.js index 4fb49c35..82676db4 100644 --- a/frontend/jest.setup.js +++ b/frontend/jest.setup.js @@ -1,7 +1 @@ -/* - * @Date: 2024-05-10 14:22:41 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-05-10 15:49:31 - * @FilePath: \frontend\jest.setup.js - */ -// import '@testing-library/jest-dom/extend-expect'; \ No newline at end of file +// import '@testing-library/jest-dom/extend-expect'; diff --git a/frontend/lerna.json b/frontend/lerna.json index 558e6109..d4b5da5f 100644 --- a/frontend/lerna.json +++ b/frontend/lerna.json @@ -3,4 +3,5 @@ "packages/*" ], "version": "independent" + } \ No newline at end of file diff --git a/frontend/packages/businessEntry/.gitignore b/frontend/packages/businessEntry/.gitignore index c5647721..b5e526e8 100644 --- a/frontend/packages/businessEntry/.gitignore +++ b/frontend/packages/businessEntry/.gitignore @@ -6,7 +6,6 @@ yarn-debug.log* yarn-error.log* pnpm-debug.log* lerna-debug.log* - node_modules dist dist-ssr diff --git a/frontend/packages/businessEntry/index.html b/frontend/packages/businessEntry/index.html index 3a72b495..3f94bfbe 100644 --- a/frontend/packages/businessEntry/index.html +++ b/frontend/packages/businessEntry/index.html @@ -4,7 +4,7 @@ - APIPark - 企业API数据开放平台 + APIPark
diff --git a/frontend/packages/businessEntry/package.json b/frontend/packages/businessEntry/package.json index 9db872f3..98766f5c 100644 --- a/frontend/packages/businessEntry/package.json +++ b/frontend/packages/businessEntry/package.json @@ -4,7 +4,7 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": " vite --port 5000 --strictPort", + "dev": " vite --port 5000 --strictPort", "build": "vite build ", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview --port 5000 --strictPort", diff --git a/frontend/packages/businessEntry/postcss.config.js b/frontend/packages/businessEntry/postcss.config.js index 69215941..494471a0 100644 --- a/frontend/packages/businessEntry/postcss.config.js +++ b/frontend/packages/businessEntry/postcss.config.js @@ -1,9 +1,3 @@ -/* - * @Date: 2023-11-27 17:31:54 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-06-05 10:42:18 - * @FilePath: \frontend\packages\core\postcss.config.js - */ export default { plugins: { 'postcss-import': {}, diff --git a/frontend/packages/businessEntry/public/iconpark_apinto.js b/frontend/packages/businessEntry/public/iconpark_apinto.js index d125a4a0..93caf0e3 100644 --- a/frontend/packages/businessEntry/public/iconpark_apinto.js +++ b/frontend/packages/businessEntry/public/iconpark_apinto.js @@ -1,8 +1,2 @@ -/* - * @Date: 2024-05-06 09:47:27 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-05-06 09:47:47 - * @FilePath: \frontend\packages\core\src\assets\iconpark_apinto.js - */ (function(){window.__iconpark__=window.__iconpark__||{};var obj=JSON.parse("{\"680840\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"content\":\"\"},\"680856\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680857\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680858\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680859\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680860\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680861\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680862\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680863\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680864\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680865\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680866\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680867\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680868\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680869\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680870\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680871\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680872\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680873\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680874\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680875\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680876\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680877\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680878\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680879\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680880\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680881\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680882\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680883\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680884\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680885\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680886\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680887\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680888\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680889\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680890\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680891\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680892\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680893\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680894\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680895\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680896\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680897\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680898\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680899\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680900\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680901\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680902\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680903\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680904\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680905\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680906\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680907\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680908\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680909\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680910\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680911\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680912\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680913\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680914\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680915\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680916\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680917\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680918\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680919\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680920\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680921\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680922\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680923\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680924\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680925\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680926\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680927\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680928\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680929\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680930\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680931\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680932\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680933\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680934\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680935\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680936\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680937\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680938\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680939\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"681014\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"681015\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"681016\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"681017\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"681018\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"681019\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"681787\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"content\":\"\"},\"694557\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"694558\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707431\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707736\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707739\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707741\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707742\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707743\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707744\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707749\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"708142\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"708144\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"708145\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"708146\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"708147\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"708181\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"709715\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"808898\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"808900\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"808916\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"810363\":{\"viewBox\":\"0 0 20 20\",\"fill\":\"none\",\"content\":\"\"},\"810396\":{\"viewBox\":\"0 0 20 20\",\"fill\":\"none\",\"content\":\"\"},\"818250\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"818340\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"content\":\"\"}}");for(var _k in obj){window.__iconpark__[_k] = obj[_k]};var nm={"fuzhi1":680840,"bianji":680856,"tishi":680857,"xinkaibiaoqian":680858,"bianjiyoujian":680859,"suoyou":680860,"fuzhi":680861,"shijian":680862,"gundongxuanze":680863,"guanbi":680864,"zanting":680865,"chenggong":680866,"chakanyinyong":680867,"guidang":680868,"tihuan":680869,"zhankai":680870,"duankailianjie":680871,"Cookieguanli":680872,"riqi":680873,"zhongwen":680874,"yingwen":680875,"shuaxinjiankongzhuangtai":680876,"rili":680877,"genmulu":680878,"shangxianguanli":680879,"daimashili":680880,"yingyong":680881,"tianjia-2":680882,"qingchu":680883,"daoru":680884,"xiala":680885,"kuaisuceshi-2":680886,"saoyisao":680887,"shiyongjiaocheng":680888,"tianjiafujian":680889,"xiazai":680890,"jinzhidengji":680891,"fasongyoujian":680892,"bug":680893,"chaping":680894,"kuaisuceshi":680895,"yunshangchuan":680896,"yunxiazai":680897,"sousuo":680898,"peizhi":680899,"xinchuangkoudakai":680900,"shanchu-2":680901,"quanjusuoxiao":680902,"qiehuan":680903,"jianshao":680904,"chakanAPIlishi":680905,"lianjie":680906,"dunpaibaoxianrenzheng":680907,"shaixuan":680908,"zhihang":680909,"congmobanzhongchuangjianyongli":680910,"zhengligeshi":680911,"haoping":680912,"shouqi-2":680913,"gouwuche":680914,"lishi":680915,"tianjiaziji":680916,"tianjia":680917,"shouqi":680918,"gailan":680919,"paixu":680920,"gengduo":680921,"guanliyuanrenzheng":680922,"fenxiang":680923,"shanchu":680924,"yidong":680925,"chakan":680926,"shujuku":680927,"shangyoufuwu-":680928,"huanyuangeshi":680929,"jiangxu":680930,"shengxu":680931,"quanjufangda":680932,"xuanzhong":680933,"riqiqujian":680934,"ditu-1":680935,"qunzu":680936,"daochu":680937,"zhankai-":680938,"ditu-2":680939,"Eolink":681014,"APISpace":681015,"Apinto":681016,"json":681017,"webhook":681018,"linux":681019,"xinzengfenzu":681787,"circle-right-up":694557,"circle-right-down":694558,"APIjiekou-7mme3dcg":707431,"connection-box":707736,"system":707739,"form-one":707741,"yingyong-7mmhj11e":707742,"jiankongshexiangtou":707743,"file-cabinet":707744,"network-tree":707749,"search":708142,"find":708144,"circle-right-up-7mnlo5g9":708145,"circle-right-down-7mnlphn2":708146,"reduce-one":708147,"tool":708181,"shangxianguanli-new":709715,"hamburger-button":808898,"puzzle":808900,"keyline":808916,"daohang":810363,"lanjieqiguanli":810396,"shop":818250,"xiangmu":818340};for(var _i in nm){window.__iconpark__[_i] = obj[nm[_i]]}})();"object"!=typeof globalThis&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__);(()=>{"use strict";var t={816:(t,e,i)=>{var s,r,o,n;i.d(e,{Vm:()=>z,dy:()=>P,Jb:()=>x,Ld:()=>$,sY:()=>T,YP:()=>A});const l=globalThis.trustedTypes,a=l?l.createPolicy("lit-html",{createHTML:t=>t}):void 0,h=`lit$${(Math.random()+"").slice(9)}$`,c="?"+h,d=`<${c}>`,u=document,p=(t="")=>u.createComment(t),v=t=>null===t||"object"!=typeof t&&"function"!=typeof t,f=Array.isArray,y=t=>{var e;return f(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,g=/-->/g,b=/>/g,S=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,w=/'/g,k=/"/g,E=/^(?:script|style|textarea)$/i,C=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),P=C(1),A=C(2),x=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),O=new WeakMap,T=(t,e,i)=>{var s,r;const o=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let n=o._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=n=new H(e.insertBefore(p(),t),t,void 0,i)}return n.I(t),n},R=u.createTreeWalker(u,129,null,!1),_=(t,e)=>{const i=t.length-1,s=[];let r,o=2===e?"":"",n=m;for(let e=0;e"===a[0]?(n=null!=r?r:m,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?S:'"'===a[3]?k:w):n===k||n===w?n=S:n===g||n===b?n=m:(n=S,r=void 0);const p=n===S&&t[e+1].startsWith("/>")?" ":"";o+=n===m?i+d:c>=0?(s.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+h+p):i+h+(-2===c?(s.push(void 0),e):p)}const l=o+(t[i]||"")+(2===e?"":"");return[void 0!==a?a.createHTML(l):l,s]};class N{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[d,u]=_(t,e);if(this.el=N.createElement(d,i),R.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=R.nextNode())&&a.length0){s.textContent=l?l.emptyScript:"";for(let i=0;i2||""!==i[0]||""!==i[1]?(this.H=Array(i.length-1).fill($),this.strings=i):this.H=$}get tagName(){return this.element.tagName}I(t,e=this,i,s){const r=this.strings;let o=!1;if(void 0===r)t=U(this,t,e,0),o=!v(t)||t!==this.H&&t!==x,o&&(this.H=t);else{const s=t;let n,l;for(t=r[0],n=0;n{i.r(e),i.d(e,{customElement:()=>s,eventOptions:()=>a,property:()=>o,query:()=>h,queryAll:()=>c,queryAssignedNodes:()=>v,queryAsync:()=>d,state:()=>n});const s=t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:s}=e;return{kind:i,elements:s,finisher(e){window.customElements.define(t,e)}}})(t,e),r=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function o(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):r(t,e)}function n(t){return o({...t,state:!0,attribute:!1})}const l=({finisher:t,descriptor:e})=>(i,s)=>{var r;if(void 0===s){const s=null!==(r=i.originalKey)&&void 0!==r?r:i.key,o=null!=e?{kind:"method",placement:"prototype",key:s,descriptor:e(i.key)}:{...i,key:s};return null!=t&&(o.finisher=function(e){t(e,s)}),o}{const r=i.constructor;void 0!==e&&Object.defineProperty(i,s,e(s)),null==t||t(r,s)}};function a(t){return l({finisher:(e,i)=>{Object.assign(e.prototype[i],t)}})}function h(t,e){return l({descriptor:i=>{const s={get(){var e;return null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t)},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;s.get=function(){var i;return void 0===this[e]&&(this[e]=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t)),this[e]}}return s}})}function c(t){return l({descriptor:e=>({get(){var e;return null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t)},enumerable:!0,configurable:!0})})}function d(t){return l({descriptor:e=>({async get(){var e;return await this.updateComplete,null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t)},enumerable:!0,configurable:!0})})}const u=Element.prototype,p=u.msMatchesSelector||u.webkitMatchesSelector;function v(t="",e=!1,i=""){return l({descriptor:s=>({get(){var s,r;const o="slot"+(t?`[name=${t}]`:":not([name])");let n=null===(r=null===(s=this.renderRoot)||void 0===s?void 0:s.querySelector(o))||void 0===r?void 0:r.assignedNodes({flatten:e});return n&&i&&(n=n.filter((t=>t.nodeType===Node.ELEMENT_NODE&&(t.matches?t.matches(i):p.call(t,i))))),n},enumerable:!0,configurable:!0})})}},23:(t,e,i)=>{i.r(e),i.d(e,{unsafeSVG:()=>l});const s=t=>(...e)=>({_$litDirective$:t,values:e});var r=i(816);class o extends class{constructor(t){}T(t,e,i){this.Σdt=t,this.M=e,this.Σct=i}S(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}{constructor(t){if(super(t),this.vt=r.Ld,2!==t.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===r.Ld)return this.Vt=void 0,this.vt=t;if(t===r.Jb)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.vt)return this.Vt;this.vt=t;const e=[t];return e.raw=e,this.Vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}o.directiveName="unsafeHTML",o.resultType=1,s(o);class n extends o{}n.directiveName="unsafeSVG",n.resultType=2;const l=s(n)},249:(t,e,i)=>{i.r(e),i.d(e,{CSSResult:()=>n,LitElement:()=>x,ReactiveElement:()=>b,UpdatingElement:()=>A,_Σ:()=>s.Vm,_Φ:()=>$,adoptStyles:()=>c,css:()=>h,defaultConverter:()=>y,getCompatibleStyle:()=>d,html:()=>s.dy,noChange:()=>s.Jb,notEqual:()=>m,nothing:()=>s.Ld,render:()=>s.sY,supportsAdoptingStyleSheets:()=>r,svg:()=>s.YP,unsafeCSS:()=>l});var s=i(816);const r=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol();class n{constructor(t,e){if(e!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return r&&void 0===this.t&&(this.t=new CSSStyleSheet,this.t.replaceSync(this.cssText)),this.t}toString(){return this.cssText}}const l=t=>new n(t+"",o),a=new Map,h=(t,...e)=>{const i=e.reduce(((e,i,s)=>e+(t=>{if(t instanceof n)return t.cssText;if("number"==typeof t)return t;throw Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(i)+t[s+1]),t[0]);let s=a.get(i);return void 0===s&&a.set(i,s=new n(i,o)),s},c=(t,e)=>{r?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style");i.textContent=e.cssText,t.appendChild(i)}))},d=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return l(e)})(t):t;var u,p,v,f;const y={toAttribute(t,e){switch(e){case Boolean:t=t?"":null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},m=(t,e)=>e!==t&&(e==e||t==t),g={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:m};class b extends HTMLElement{constructor(){super(),this.Πi=new Map,this.Πo=void 0,this.Πl=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.Πh=null,this.u()}static addInitializer(t){var e;null!==(e=this.v)&&void 0!==e||(this.v=[]),this.v.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const s=this.Πp(i,e);void 0!==s&&(this.Πm.set(s,i),t.push(s))})),t}static createProperty(t,e=g){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const r=this[t];this[e]=s,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||g}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this.Πm=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(d(t))}else void 0!==t&&e.push(d(t));return e}static Πp(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this.Πg=new Promise((t=>this.enableUpdating=t)),this.L=new Map,this.Π_(),this.requestUpdate(),null===(t=this.constructor.v)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this.ΠU)&&void 0!==e?e:this.ΠU=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this.ΠU)||void 0===e||e.splice(this.ΠU.indexOf(t)>>>0,1)}Π_(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this.Πi.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return c(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)})),this.Πl&&(this.Πl(),this.Πo=this.Πl=void 0)}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)})),this.Πo=new Promise((t=>this.Πl=t))}attributeChangedCallback(t,e,i){this.K(t,i)}Πj(t,e,i=g){var s,r;const o=this.constructor.Πp(t,i);if(void 0!==o&&!0===i.reflect){const n=(null!==(r=null===(s=i.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==r?r:y.toAttribute)(e,i.type);this.Πh=t,null==n?this.removeAttribute(o):this.setAttribute(o,n),this.Πh=null}}K(t,e){var i,s,r;const o=this.constructor,n=o.Πm.get(t);if(void 0!==n&&this.Πh!==n){const t=o.getPropertyOptions(n),l=t.converter,a=null!==(r=null!==(s=null===(i=l)||void 0===i?void 0:i.fromAttribute)&&void 0!==s?s:"function"==typeof l?l:null)&&void 0!==r?r:y.fromAttribute;this.Πh=n,this[n]=a(e,t.type),this.Πh=null}}requestUpdate(t,e,i){let s=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||m)(this[t],e)?(this.L.has(t)||this.L.set(t,e),!0===i.reflect&&this.Πh!==t&&(void 0===this.Πk&&(this.Πk=new Map),this.Πk.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this.Πg=this.Πq())}async Πq(){this.isUpdatePending=!0;try{for(await this.Πg;this.Πo;)await this.Πo}catch(t){Promise.reject(t)}const t=this.performUpdate();return null!=t&&await t,!this.isUpdatePending}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this.Πi&&(this.Πi.forEach(((t,e)=>this[e]=t)),this.Πi=void 0);let e=!1;const i=this.L;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this.Π$()}catch(t){throw e=!1,this.Π$(),t}e&&this.E(i)}willUpdate(t){}E(t){var e;null===(e=this.ΠU)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}Π$(){this.L=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.Πg}shouldUpdate(t){return!0}update(t){void 0!==this.Πk&&(this.Πk.forEach(((t,e)=>this.Πj(e,this[e],t))),this.Πk=void 0),this.Π$()}updated(t){}firstUpdated(t){}}var S,w,k,E,C,P;b.finalized=!0,b.shadowRootOptions={mode:"open"},null===(p=(u=globalThis).reactiveElementPlatformSupport)||void 0===p||p.call(u,{ReactiveElement:b}),(null!==(v=(f=globalThis).reactiveElementVersions)&&void 0!==v?v:f.reactiveElementVersions=[]).push("1.0.0-rc.1");const A=b;(null!==(S=(P=globalThis).litElementVersions)&&void 0!==S?S:P.litElementVersions=[]).push("3.0.0-rc.1");class x extends b{constructor(){super(...arguments),this.renderOptions={host:this},this.Φt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();super.update(t),this.Φt=(0,s.sY)(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!1)}render(){return s.Jb}}x.finalized=!0,x._$litElement$=!0,null===(k=(w=globalThis).litElementHydrateSupport)||void 0===k||k.call(w,{LitElement:x}),null===(C=(E=globalThis).litElementPlatformSupport)||void 0===C||C.call(E,{LitElement:x});const $={K:(t,e,i)=>{t.K(e,i)},L:t=>t.L}},409:function(t,e,i){var s=this&&this.__decorate||function(t,e,i,s){var r,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(n=(o<3?r(n):o>3?r(e,i,n):r(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};Object.defineProperty(e,"__esModule",{value:!0}),e.IconparkIconElement=void 0;const r=i(249),o=i(26),n=i(23),l={color:1,fill:1,stroke:1},a={STROKE:{trackAttr:"data-follow-stroke",rawAttr:"stroke"},FILL:{trackAttr:"data-follow-fill",rawAttr:"fill"}};class h extends r.LitElement{constructor(){super(...arguments),this.name="",this.identifyer="",this.size="1em"}get _width(){return this.width||this.size}get _height(){return this.height||this.size}get _stroke(){return this.stroke||this.color}get _fill(){return this.fill||this.color}get SVGConfig(){return(window.__iconpark__||{})[this.identifyer]||(window.__iconpark__||{})[this.name]||{viewBox:"0 0 0 0",content:""}}connectedCallback(){super.connectedCallback(),setTimeout((()=>{this.monkeyPatch("STROKE",!0),this.monkeyPatch("FILL",!0)}))}monkeyPatch(t,e){switch(t){case"STROKE":this.updateDOMByHand(this.strokeAppliedNodes,"STROKE",this._stroke,!!e);break;case"FILL":this.updateDOMByHand(this.fillAppliedNodes,"FILL",this._fill,!!e)}}updateDOMByHand(t,e,i,s){!i&&s||t&&t.forEach((t=>{i&&i===t.getAttribute(a[e].rawAttr)||t.setAttribute(a[e].rawAttr,i||t.getAttribute(a[e].trackAttr))}))}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"name"===t||"identifyer"===t?setTimeout((()=>{this.monkeyPatch("STROKE"),this.monkeyPatch("FILL")})):l[t]&&(this.monkeyPatch("STROKE"),this.monkeyPatch("FILL"))}render(){return r.svg`${n.unsafeSVG(this.SVGConfig.content)}`}}h.styles=r.css`:host {display: inline-flex; align-items: center; justify-content: center;} :host([spin]) svg {animation: iconpark-spin 1s infinite linear;} :host([spin][rtl]) svg {animation: iconpark-spin-rtl 1s infinite linear;} :host([rtl]) svg {transform: scaleX(-1);} @keyframes iconpark-spin {0% { -webkit-transform: rotate(0); transform: rotate(0);} 100% {-webkit-transform: rotate(360deg); transform: rotate(360deg);}} @keyframes iconpark-spin-rtl {0% {-webkit-transform: scaleX(-1) rotate(0); transform: scaleX(-1) rotate(0);} 100% {-webkit-transform: scaleX(-1) rotate(360deg); transform: scaleX(-1) rotate(360deg);}}`,s([o.property({reflect:!0})],h.prototype,"name",void 0),s([o.property({reflect:!0,attribute:"icon-id"})],h.prototype,"identifyer",void 0),s([o.property({reflect:!0})],h.prototype,"color",void 0),s([o.property({reflect:!0})],h.prototype,"stroke",void 0),s([o.property({reflect:!0})],h.prototype,"fill",void 0),s([o.property({reflect:!0})],h.prototype,"size",void 0),s([o.property({reflect:!0})],h.prototype,"width",void 0),s([o.property({reflect:!0})],h.prototype,"height",void 0),s([o.queryAll(`[${a.STROKE.trackAttr}]`)],h.prototype,"strokeAppliedNodes",void 0),s([o.queryAll(`[${a.FILL.trackAttr}]`)],h.prototype,"fillAppliedNodes",void 0),e.IconparkIconElement=h,customElements.get("iconpark-icon")||customElements.define("iconpark-icon",h)}},e={};function i(s){var r=e[s];if(void 0!==r)return r.exports;var o=e[s]={exports:{}};return t[s].call(o.exports,o,o.exports,i),o.exports}i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(409)})(); \ No newline at end of file diff --git a/frontend/packages/businessEntry/public/iconpark_eolink.js b/frontend/packages/businessEntry/public/iconpark_eolink.js index 5c7f6392..8cc587d7 100644 --- a/frontend/packages/businessEntry/public/iconpark_eolink.js +++ b/frontend/packages/businessEntry/public/iconpark_eolink.js @@ -1,7 +1 @@ -/* - * @Date: 2024-05-06 09:53:45 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-05-06 09:53:50 - * @FilePath: \frontend\packages\core\src\assets\iconpark_eolink.js - */ (function(){window.__iconpark__=window.__iconpark__||{};var obj=JSON.parse("{\"647367\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"684408\":{\"viewBox\":\"0 0 194 194\",\"content\":\"\"},\"684409\":{\"viewBox\":\"0 0 194 194\",\"content\":\"\"},\"684411\":{\"viewBox\":\"0 0 119.19 102.5\",\"content\":\"\"},\"684412\":{\"viewBox\":\"0 0 108.55 93.99\",\"fill\":\"currentColor\",\"content\":\"\"},\"684413\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"684414\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"686740\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686741\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686742\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686743\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686744\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686745\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686746\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686747\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686748\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686749\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686750\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686751\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686752\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686753\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686754\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686993\":{\"viewBox\":\"0 0 38.22 22.18\",\"fill\":\"currentColor\",\"content\":\"\"},\"687741\":{\"viewBox\":\"0 0 194 194\",\"content\":\"\"},\"687742\":{\"viewBox\":\"0 0 194 194\",\"content\":\"\"},\"691262\":{\"viewBox\":\"0 0 194 194\",\"content\":\"\"},\"691537\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"691538\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"691806\":{\"viewBox\":\"0 0 194 194\",\"content\":\"\"},\"695738\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695739\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695740\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695741\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695742\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695743\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695746\":{\"viewBox\":\"0 0 1185 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"695747\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695748\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695750\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"695751\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"695752\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"695754\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"695755\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"695756\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"695758\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695759\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695760\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695761\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695762\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695763\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695764\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695801\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695802\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695803\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695804\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695805\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695806\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695807\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695810\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695811\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695812\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695817\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695818\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695819\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695820\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695821\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695822\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695828\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695829\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695830\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695831\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695833\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695834\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695835\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695836\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695837\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695838\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695839\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695840\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695841\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695842\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695844\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695845\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695846\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695865\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695867\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695868\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695869\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695870\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695876\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695877\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695878\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695883\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695884\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695886\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695887\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695888\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695889\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695890\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695891\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695892\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695893\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695896\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695899\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695900\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695901\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695902\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695903\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695904\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695905\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695906\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695907\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695908\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695909\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695913\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695914\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695915\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695916\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695933\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695934\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695935\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695936\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695938\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695940\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695941\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695942\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695944\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695945\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695946\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695947\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695948\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695950\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695951\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695953\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695954\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695955\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695956\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695957\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695958\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695959\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695960\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695961\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695962\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695963\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695964\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695966\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695967\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695968\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695969\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695971\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695972\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695973\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695975\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695978\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695979\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695980\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695981\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695982\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695984\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695985\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695986\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695987\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695988\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695990\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695993\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695995\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695997\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695999\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696002\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696003\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696004\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696005\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696007\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696009\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696010\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696011\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696012\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696013\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696014\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696015\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696016\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696017\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696018\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696019\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696020\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696021\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696022\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696023\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696024\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696025\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696027\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696028\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696029\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696030\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696031\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696032\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696033\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696034\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696035\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696036\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696037\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696038\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696039\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696040\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696041\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696042\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696043\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696044\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696045\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696046\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696048\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696049\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696660\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696661\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"744163\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"744173\":{\"viewBox\":\"0 0 128 128\",\"fill\":\"none\",\"content\":\"\"},\"744175\":{\"viewBox\":\"0 0 128 128\",\"fill\":\"none\",\"content\":\"\"},\"750656\":{\"viewBox\":\"0 0 61 61\",\"fill\":\"none\",\"content\":\"\"},\"752737\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"756392\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757321\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757499\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757504\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757518\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757519\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757520\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757521\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757616\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757650\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"767277\":{\"viewBox\":\"0 0 20 20\",\"fill\":\"none\",\"content\":\"\"},\"767278\":{\"viewBox\":\"0 0 20 20\",\"fill\":\"none\",\"content\":\"\"},\"775549\":{\"viewBox\":\"0 0 18 14\",\"fill\":\"none\",\"content\":\"\"},\"779333\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"content\":\"\"},\"779418\":{\"viewBox\":\"0 0 1024 1024\",\"content\":\"\"},\"779705\":{\"viewBox\":\"0 0 20 20\",\"fill\":\"none\",\"content\":\"\"},\"779706\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"content\":\"\"},\"787702\":{\"viewBox\":\"0 0 1024 1024\",\"content\":\"\"},\"788577\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"802334\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"804269\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"804612\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"804614\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"806103\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"813707\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"815901\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"820089\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"826687\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"854318\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"855246\":{\"viewBox\":\"0 0 16 16\",\"fill\":\"none\",\"content\":\"\"},\"855247\":{\"viewBox\":\"0 0 16 16\",\"fill\":\"none\",\"content\":\"\"},\"855248\":{\"viewBox\":\"0 0 16 16\",\"fill\":\"none\",\"content\":\"\"},\"855927\":{\"viewBox\":\"0 0 83 20\",\"fill\":\"none\",\"content\":\"\"},\"855928\":{\"viewBox\":\"0 0 68 24\",\"fill\":\"none\",\"content\":\"\"},\"855929\":{\"viewBox\":\"0 0 66 24\",\"fill\":\"none\",\"content\":\"\"},\"855938\":{\"viewBox\":\"0 0 198 72\",\"fill\":\"none\",\"content\":\"\"},\"857931\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"857985\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"861388\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"876705\":{\"viewBox\":\"0 0 16 16\",\"fill\":\"none\",\"content\":\"\"},\"884011\":{\"viewBox\":\"0 0 20 20\",\"fill\":\"none\",\"content\":\"\"},\"885387\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"897026\":{\"viewBox\":\"0 0 250 250\",\"fill\":\"none\",\"content\":\"\"},\"915485\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"929257\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"932197\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"949128\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"970590\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"973801\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"985435\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1002903\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"content\":\"\"},\"1021623\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1021686\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1035721\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1035737\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1037074\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1037815\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1037816\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1037817\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1039918\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1042170\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1042171\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"}}");for(var _k in obj){window.__iconpark__[_k] = obj[_k]};var nm={"round-fill":647367,"apinto-pro-icon":684408,"apinto-icon":684409,"apinto-pro":684411,"apinto":684412,"check-circle":684413,"apispace":684414,"auto-generate-api":686740,"compare-api":686741,"multi-protocal":686742,"read-good":686743,"richdoc":686744,"mockapi":686745,"script-support":686746,"diy-test":686747,"send":686748,"stereo-perspective":686749,"automatic-robot":686750,"switch-env":686751,"flash":686752,"chart-pie":686753,"date-drive":686754,"apistudio":686993,"postcat-icon":687741,"postcat":687742,"apistudio-icon":691262,"update-rotation":691537,"page":691538,"apispace-icon":691806,"avatar":695738,"people":695739,"people-minus":695740,"people-plus":695741,"peoples":695742,"user-business":695743,"folder-close-fill":695746,"windows":695747,"github":695748,"qq":695750,"browser-chrome":695751,"linux":695752,"edge":695754,"wechat":695755,"browser":695756,"gitlab":695758,"apple":695759,"alipay":695760,"facebook":695761,"twitter":695762,"paypal":695763,"new-lark":695764,"delete":695801,"return":695802,"search":695803,"import":695804,"export":695805,"add":695806,"add-child":695807,"file-addition":695810,"add-circle":695811,"minus":695812,"close":695817,"close-small":695818,"check-small":695819,"check":695820,"code-terminal":695821,"code":695822,"preview-open":695828,"preview-close":695829,"folder-close":695830,"folder-open":695831,"upload":695833,"download":695834,"copy":695835,"upload-file":695836,"compare":695837,"edit":695838,"share":695839,"share-all":695840,"share-url-fill":695841,"share-url":695842,"back":695844,"back-fill":695845,"share-fill":695846,"sort":695865,"filter":695867,"reduce":695868,"done-all":695869,"full-selection":695870,"right-bar":695876,"left-bar":695877,"direction-adjustment":695878,"down-small":695883,"left-small":695884,"right-small":695886,"right-one":695887,"right":695888,"up":695889,"up-one":695890,"up-small":695891,"up-two":695892,"down-two":695893,"enter":695896,"down":695899,"left":695900,"down-one":695901,"left-two":695902,"right-two":695903,"left-one":695904,"more":695905,"expand-left":695906,"expand-right":695907,"column":695908,"center-alignment":695909,"list-add":695913,"sort-amount-down":695914,"sort-amount-up":695915,"list":695916,"remind":695933,"close-remind":695934,"api":695935,"rocket":695936,"monitor":695938,"robot":695940,"plan":695941,"application":695942,"chart-proportion":695944,"data":695945,"chart-line":695946,"pie-10":695947,"pie":695948,"chart-bubble":695950,"cube":695951,"application-menu":695953,"crown":695954,"crown-fill":695955,"market":695956,"file-word":695957,"file-excel":695958,"hashtag-key":695959,"file-hash":695960,"refresh":695961,"order":695962,"command":695963,"branch":695964,"page-template":695966,"smart-optimization":695967,"assembly-line":695968,"stopwatch":695969,"checklist":695971,"menu-fold":695972,"menu-unfold":695973,"alarm":695975,"protection":695978,"caution":695979,"openapi":695980,"webhook":695981,"holding-hands":695982,"support":695984,"agreement":695985,"community":695986,"roadmap":695987,"family-7knl2ae1":695988,"smiling-face":695990,"play-fill":695993,"play":695995,"pause":695997,"magic":695999,"whole-site-accelerator":696002,"link-cloud-faild":696003,"link-cloud-sucess":696004,"translate":696005,"funds":696007,"unhappy-face":696009,"message":696010,"connection-arrow":696011,"loading":696012,"fork":696013,"quote":696014,"headset":696015,"attention":696016,"theme":696017,"keyboard":696018,"briefcase":696019,"star":696020,"star-7knmka28":696021,"protect":696022,"finance":696023,"setting":696024,"link":696025,"undo":696027,"inbox-success":696028,"home":696029,"local":696030,"laptop":696031,"view-list":696032,"lock":696033,"unlock":696034,"lightning":696035,"file-text":696036,"cooperative-handshake":696037,"navigation":696038,"view-grid-detail":696039,"help":696040,"history":696041,"logout-7knnioon":696042,"chinese":696043,"calendar":696044,"play-cycle":696045,"world":696046,"plugins":696048,"link-cloud":696049,"book":696660,"table-report":696661,"qiyeweixin":744163,"Oauth":744173,"dingding":744175,"eolink":750656,"tool":752737,"category-management":756392,"folder-code-one":757321,"link-three-8ah7lifn":757499,"download-two-8ah85008":757504,"quanjusuoxiao1":757518,"quanjufangda21":757519,"quanjusuoxiao211":757520,"quanjufangda1":757521,"wenjianshezhi":757616,"key":757650,"zidingyijiaoben":767277,"tiqubianliang":767278,"mock":775549,"tongzhishezhi":779333,"csdn":779418,"ceshibaogao":779705,"biangengtongzhi":779706,"icon-api":787702,"youjian":788577,"pushpin":802334,"announcement":804269,"collapse-text-input":804612,"zhankai":804614,"replay-music":806103,"download-web":813707,"permissions":815901,"file-editing":820089,"wallet":826687,"file-focus":854318,"pingpu-9a913n0n":855246,"zuoyoufenping-9a913n1f":855247,"shangxiafenping-9a913n1i":855248,"Paypal11":855927,"zhifubaozhifu1":855928,"weixinzhifu11":855929,"weixinzhifu":855938,"update-rotation-9and40f5":857931,"terminal":857985,"switch":861388,"zhinengrucan":876705,"biaoqian-banbenleixinzeng":884011,"book-open":885387,"morentouxiang-2":897026,"xiajia":915485,"drag":929257,"new-up":932197,"rss":949128,"yewuchangjing":970590,"newlybuild":973801,"bianji":985435,"jiekoushouquan":1002903,"interfacefenzutubiao":1021623,"yidong":1021686,"link-one":1035721,"canshugouzaoqi":1035737,"bianliang":1037074,"tars":1037815,"if":1037816,"tars-2":1037817,"yingyongguanxi":1039918,"save-one":1042170,"save":1042171};for(var _i in nm){window.__iconpark__[_i] = obj[nm[_i]]}})();"object"!=typeof globalThis&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__);(()=>{"use strict";var t={816:(t,e,i)=>{var s,r,o,n;i.d(e,{Vm:()=>z,dy:()=>P,Jb:()=>x,Ld:()=>$,sY:()=>T,YP:()=>A});const l=globalThis.trustedTypes,a=l?l.createPolicy("lit-html",{createHTML:t=>t}):void 0,h=`lit$${(Math.random()+"").slice(9)}$`,c="?"+h,d=`<${c}>`,u=document,p=(t="")=>u.createComment(t),v=t=>null===t||"object"!=typeof t&&"function"!=typeof t,f=Array.isArray,y=t=>{var e;return f(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,g=/-->/g,b=/>/g,S=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,w=/'/g,k=/"/g,E=/^(?:script|style|textarea)$/i,C=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),P=C(1),A=C(2),x=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),O=new WeakMap,T=(t,e,i)=>{var s,r;const o=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let n=o._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=n=new H(e.insertBefore(p(),t),t,void 0,i)}return n.I(t),n},R=u.createTreeWalker(u,129,null,!1),_=(t,e)=>{const i=t.length-1,s=[];let r,o=2===e?"":"",n=m;for(let e=0;e"===a[0]?(n=null!=r?r:m,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?S:'"'===a[3]?k:w):n===k||n===w?n=S:n===g||n===b?n=m:(n=S,r=void 0);const p=n===S&&t[e+1].startsWith("/>")?" ":"";o+=n===m?i+d:c>=0?(s.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+h+p):i+h+(-2===c?(s.push(void 0),e):p)}const l=o+(t[i]||"")+(2===e?"":"");return[void 0!==a?a.createHTML(l):l,s]};class N{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[d,u]=_(t,e);if(this.el=N.createElement(d,i),R.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=R.nextNode())&&a.length0){s.textContent=l?l.emptyScript:"";for(let i=0;i2||""!==i[0]||""!==i[1]?(this.H=Array(i.length-1).fill($),this.strings=i):this.H=$}get tagName(){return this.element.tagName}I(t,e=this,i,s){const r=this.strings;let o=!1;if(void 0===r)t=U(this,t,e,0),o=!v(t)||t!==this.H&&t!==x,o&&(this.H=t);else{const s=t;let n,l;for(t=r[0],n=0;n{i.r(e),i.d(e,{customElement:()=>s,eventOptions:()=>a,property:()=>o,query:()=>h,queryAll:()=>c,queryAssignedNodes:()=>v,queryAsync:()=>d,state:()=>n});const s=t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:s}=e;return{kind:i,elements:s,finisher(e){window.customElements.define(t,e)}}})(t,e),r=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function o(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):r(t,e)}function n(t){return o({...t,state:!0,attribute:!1})}const l=({finisher:t,descriptor:e})=>(i,s)=>{var r;if(void 0===s){const s=null!==(r=i.originalKey)&&void 0!==r?r:i.key,o=null!=e?{kind:"method",placement:"prototype",key:s,descriptor:e(i.key)}:{...i,key:s};return null!=t&&(o.finisher=function(e){t(e,s)}),o}{const r=i.constructor;void 0!==e&&Object.defineProperty(i,s,e(s)),null==t||t(r,s)}};function a(t){return l({finisher:(e,i)=>{Object.assign(e.prototype[i],t)}})}function h(t,e){return l({descriptor:i=>{const s={get(){var e;return null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t)},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;s.get=function(){var i;return void 0===this[e]&&(this[e]=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t)),this[e]}}return s}})}function c(t){return l({descriptor:e=>({get(){var e;return null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t)},enumerable:!0,configurable:!0})})}function d(t){return l({descriptor:e=>({async get(){var e;return await this.updateComplete,null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t)},enumerable:!0,configurable:!0})})}const u=Element.prototype,p=u.msMatchesSelector||u.webkitMatchesSelector;function v(t="",e=!1,i=""){return l({descriptor:s=>({get(){var s,r;const o="slot"+(t?`[name=${t}]`:":not([name])");let n=null===(r=null===(s=this.renderRoot)||void 0===s?void 0:s.querySelector(o))||void 0===r?void 0:r.assignedNodes({flatten:e});return n&&i&&(n=n.filter((t=>t.nodeType===Node.ELEMENT_NODE&&(t.matches?t.matches(i):p.call(t,i))))),n},enumerable:!0,configurable:!0})})}},23:(t,e,i)=>{i.r(e),i.d(e,{unsafeSVG:()=>l});const s=t=>(...e)=>({_$litDirective$:t,values:e});var r=i(816);class o extends class{constructor(t){}T(t,e,i){this.Σdt=t,this.M=e,this.Σct=i}S(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}{constructor(t){if(super(t),this.vt=r.Ld,2!==t.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===r.Ld)return this.Vt=void 0,this.vt=t;if(t===r.Jb)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.vt)return this.Vt;this.vt=t;const e=[t];return e.raw=e,this.Vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}o.directiveName="unsafeHTML",o.resultType=1,s(o);class n extends o{}n.directiveName="unsafeSVG",n.resultType=2;const l=s(n)},249:(t,e,i)=>{i.r(e),i.d(e,{CSSResult:()=>n,LitElement:()=>x,ReactiveElement:()=>b,UpdatingElement:()=>A,_Σ:()=>s.Vm,_Φ:()=>$,adoptStyles:()=>c,css:()=>h,defaultConverter:()=>y,getCompatibleStyle:()=>d,html:()=>s.dy,noChange:()=>s.Jb,notEqual:()=>m,nothing:()=>s.Ld,render:()=>s.sY,supportsAdoptingStyleSheets:()=>r,svg:()=>s.YP,unsafeCSS:()=>l});var s=i(816);const r=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol();class n{constructor(t,e){if(e!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return r&&void 0===this.t&&(this.t=new CSSStyleSheet,this.t.replaceSync(this.cssText)),this.t}toString(){return this.cssText}}const l=t=>new n(t+"",o),a=new Map,h=(t,...e)=>{const i=e.reduce(((e,i,s)=>e+(t=>{if(t instanceof n)return t.cssText;if("number"==typeof t)return t;throw Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(i)+t[s+1]),t[0]);let s=a.get(i);return void 0===s&&a.set(i,s=new n(i,o)),s},c=(t,e)=>{r?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style");i.textContent=e.cssText,t.appendChild(i)}))},d=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return l(e)})(t):t;var u,p,v,f;const y={toAttribute(t,e){switch(e){case Boolean:t=t?"":null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},m=(t,e)=>e!==t&&(e==e||t==t),g={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:m};class b extends HTMLElement{constructor(){super(),this.Πi=new Map,this.Πo=void 0,this.Πl=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.Πh=null,this.u()}static addInitializer(t){var e;null!==(e=this.v)&&void 0!==e||(this.v=[]),this.v.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const s=this.Πp(i,e);void 0!==s&&(this.Πm.set(s,i),t.push(s))})),t}static createProperty(t,e=g){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const r=this[t];this[e]=s,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||g}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this.Πm=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(d(t))}else void 0!==t&&e.push(d(t));return e}static Πp(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this.Πg=new Promise((t=>this.enableUpdating=t)),this.L=new Map,this.Π_(),this.requestUpdate(),null===(t=this.constructor.v)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this.ΠU)&&void 0!==e?e:this.ΠU=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this.ΠU)||void 0===e||e.splice(this.ΠU.indexOf(t)>>>0,1)}Π_(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this.Πi.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return c(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)})),this.Πl&&(this.Πl(),this.Πo=this.Πl=void 0)}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)})),this.Πo=new Promise((t=>this.Πl=t))}attributeChangedCallback(t,e,i){this.K(t,i)}Πj(t,e,i=g){var s,r;const o=this.constructor.Πp(t,i);if(void 0!==o&&!0===i.reflect){const n=(null!==(r=null===(s=i.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==r?r:y.toAttribute)(e,i.type);this.Πh=t,null==n?this.removeAttribute(o):this.setAttribute(o,n),this.Πh=null}}K(t,e){var i,s,r;const o=this.constructor,n=o.Πm.get(t);if(void 0!==n&&this.Πh!==n){const t=o.getPropertyOptions(n),l=t.converter,a=null!==(r=null!==(s=null===(i=l)||void 0===i?void 0:i.fromAttribute)&&void 0!==s?s:"function"==typeof l?l:null)&&void 0!==r?r:y.fromAttribute;this.Πh=n,this[n]=a(e,t.type),this.Πh=null}}requestUpdate(t,e,i){let s=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||m)(this[t],e)?(this.L.has(t)||this.L.set(t,e),!0===i.reflect&&this.Πh!==t&&(void 0===this.Πk&&(this.Πk=new Map),this.Πk.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this.Πg=this.Πq())}async Πq(){this.isUpdatePending=!0;try{for(await this.Πg;this.Πo;)await this.Πo}catch(t){Promise.reject(t)}const t=this.performUpdate();return null!=t&&await t,!this.isUpdatePending}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this.Πi&&(this.Πi.forEach(((t,e)=>this[e]=t)),this.Πi=void 0);let e=!1;const i=this.L;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this.Π$()}catch(t){throw e=!1,this.Π$(),t}e&&this.E(i)}willUpdate(t){}E(t){var e;null===(e=this.ΠU)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}Π$(){this.L=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.Πg}shouldUpdate(t){return!0}update(t){void 0!==this.Πk&&(this.Πk.forEach(((t,e)=>this.Πj(e,this[e],t))),this.Πk=void 0),this.Π$()}updated(t){}firstUpdated(t){}}var S,w,k,E,C,P;b.finalized=!0,b.shadowRootOptions={mode:"open"},null===(p=(u=globalThis).reactiveElementPlatformSupport)||void 0===p||p.call(u,{ReactiveElement:b}),(null!==(v=(f=globalThis).reactiveElementVersions)&&void 0!==v?v:f.reactiveElementVersions=[]).push("1.0.0-rc.1");const A=b;(null!==(S=(P=globalThis).litElementVersions)&&void 0!==S?S:P.litElementVersions=[]).push("3.0.0-rc.1");class x extends b{constructor(){super(...arguments),this.renderOptions={host:this},this.Φt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();super.update(t),this.Φt=(0,s.sY)(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!1)}render(){return s.Jb}}x.finalized=!0,x._$litElement$=!0,null===(k=(w=globalThis).litElementHydrateSupport)||void 0===k||k.call(w,{LitElement:x}),null===(C=(E=globalThis).litElementPlatformSupport)||void 0===C||C.call(E,{LitElement:x});const $={K:(t,e,i)=>{t.K(e,i)},L:t=>t.L}},409:function(t,e,i){var s=this&&this.__decorate||function(t,e,i,s){var r,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(n=(o<3?r(n):o>3?r(e,i,n):r(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};Object.defineProperty(e,"__esModule",{value:!0}),e.IconparkIconElement=void 0;const r=i(249),o=i(26),n=i(23),l={color:1,fill:1,stroke:1},a={STROKE:{trackAttr:"data-follow-stroke",rawAttr:"stroke"},FILL:{trackAttr:"data-follow-fill",rawAttr:"fill"}};class h extends r.LitElement{constructor(){super(...arguments),this.name="",this.identifyer="",this.size="1em"}get _width(){return this.width||this.size}get _height(){return this.height||this.size}get _stroke(){return this.stroke||this.color}get _fill(){return this.fill||this.color}get SVGConfig(){return(window.__iconpark__||{})[this.identifyer]||(window.__iconpark__||{})[this.name]||{viewBox:"0 0 0 0",content:""}}connectedCallback(){super.connectedCallback(),setTimeout((()=>{this.monkeyPatch("STROKE",!0),this.monkeyPatch("FILL",!0)}))}monkeyPatch(t,e){switch(t){case"STROKE":this.updateDOMByHand(this.strokeAppliedNodes,"STROKE",this._stroke,!!e);break;case"FILL":this.updateDOMByHand(this.fillAppliedNodes,"FILL",this._fill,!!e)}}updateDOMByHand(t,e,i,s){!i&&s||t&&t.forEach((t=>{i&&i===t.getAttribute(a[e].rawAttr)||t.setAttribute(a[e].rawAttr,i||t.getAttribute(a[e].trackAttr))}))}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"name"===t||"identifyer"===t?setTimeout((()=>{this.monkeyPatch("STROKE"),this.monkeyPatch("FILL")})):l[t]&&(this.monkeyPatch("STROKE"),this.monkeyPatch("FILL"))}render(){return r.svg`${n.unsafeSVG(this.SVGConfig.content)}`}}h.styles=r.css`:host {display: inline-flex; align-items: center; justify-content: center;} :host([spin]) svg {animation: iconpark-spin 1s infinite linear;} :host([spin][rtl]) svg {animation: iconpark-spin-rtl 1s infinite linear;} :host([rtl]) svg {transform: scaleX(-1);} @keyframes iconpark-spin {0% { -webkit-transform: rotate(0); transform: rotate(0);} 100% {-webkit-transform: rotate(360deg); transform: rotate(360deg);}} @keyframes iconpark-spin-rtl {0% {-webkit-transform: scaleX(-1) rotate(0); transform: scaleX(-1) rotate(0);} 100% {-webkit-transform: scaleX(-1) rotate(360deg); transform: scaleX(-1) rotate(360deg);}}`,s([o.property({reflect:!0})],h.prototype,"name",void 0),s([o.property({reflect:!0,attribute:"icon-id"})],h.prototype,"identifyer",void 0),s([o.property({reflect:!0})],h.prototype,"color",void 0),s([o.property({reflect:!0})],h.prototype,"stroke",void 0),s([o.property({reflect:!0})],h.prototype,"fill",void 0),s([o.property({reflect:!0})],h.prototype,"size",void 0),s([o.property({reflect:!0})],h.prototype,"width",void 0),s([o.property({reflect:!0})],h.prototype,"height",void 0),s([o.queryAll(`[${a.STROKE.trackAttr}]`)],h.prototype,"strokeAppliedNodes",void 0),s([o.queryAll(`[${a.FILL.trackAttr}]`)],h.prototype,"fillAppliedNodes",void 0),e.IconparkIconElement=h,customElements.get("iconpark-icon")||customElements.define("iconpark-icon",h)}},e={};function i(s){var r=e[s];if(void 0!==r)return r.exports;var o=e[s]={exports:{}};return t[s].call(o.exports,o,o.exports,i),o.exports}i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(409)})(); \ No newline at end of file diff --git a/frontend/packages/businessEntry/start-vite.js b/frontend/packages/businessEntry/start-vite.js index f55d1cb4..224115dc 100644 --- a/frontend/packages/businessEntry/start-vite.js +++ b/frontend/packages/businessEntry/start-vite.js @@ -1,9 +1,4 @@ -/* - * @Date: 2024-06-05 09:35:25 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-06-05 10:50:12 - * @FilePath: \frontend\packages\core\start-vite.js - */ + // start-vite.js// start-vite.js import { exec } from 'child_process'; diff --git a/frontend/packages/common/postcss.config.js b/frontend/packages/common/postcss.config.js index 80393090..8610d836 100644 --- a/frontend/packages/common/postcss.config.js +++ b/frontend/packages/common/postcss.config.js @@ -1,9 +1,4 @@ -/* - * @Date: 2023-11-27 17:31:54 - * @LastEditors: maggieyyy - * @LastEditTime: 2023-11-29 15:49:05 - * @FilePath: \applatform\frontend\packages\core\postcss.config.js - */ + export default { plugins: { 'postcss-import': {}, diff --git a/frontend/packages/common/src/hooks/crypto.ts b/frontend/packages/common/src/hooks/crypto.ts deleted file mode 100644 index 3943f9f6..00000000 --- a/frontend/packages/common/src/hooks/crypto.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * @Date: 2024-01-31 15:00:11 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-05-10 17:03:03 - * @FilePath: \frontend\packages\core\src\hooks\crypto.ts - */ -// import CryptoJS from 'crypto-js'; - -// export const useCrypto = () => { -// const key = '1e42=7838a1vfc6n'; - -// const encryptByEnAES = (secretKey: string, data: string, initializationVector?: string): string => { -// const iv = CryptoJS.enc.Latin1.parse(initializationVector || key); -// const keyForEncryption = CryptoJS.enc.Latin1.parse(CryptoJS.MD5(secretKey).toString()); - -// const cipher = CryptoJS.AES.encrypt(data, keyForEncryption, { -// iv, -// mode: CryptoJS.mode.CBC, -// padding: CryptoJS.pad.Pkcs7, -// }); - -// return CryptoJS.enc.Base64.stringify(cipher.ciphertext); -// }; - -// return { encryptByEnAES }; -// }; \ No newline at end of file diff --git a/frontend/packages/common/src/index.css b/frontend/packages/common/src/index.css index 08d27fe4..79ce83c2 100644 --- a/frontend/packages/common/src/index.css +++ b/frontend/packages/common/src/index.css @@ -1,9 +1,4 @@ -/* - * @Date: 2024-06-04 14:58:33 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-06-04 15:39:24 - * @FilePath: \frontend\packages\common\src\index.css - */ + @tailwind base; @tailwind components; @tailwind utilities; \ No newline at end of file diff --git a/frontend/packages/common/tailwind.config.js b/frontend/packages/common/tailwind.config.js index b621c7be..5b8c5102 100644 --- a/frontend/packages/common/tailwind.config.js +++ b/frontend/packages/common/tailwind.config.js @@ -1,9 +1,4 @@ -/* - * @Date: 2024-06-04 15:05:05 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-08-01 17:59:56 - * @FilePath: \frontend\packages\common\tailwind.config.js - */ + /** @type {import('tailwindcss').Config} */ module.exports = { important:true, diff --git a/frontend/packages/core/postcss.config.js b/frontend/packages/core/postcss.config.js index 69215941..8610d836 100644 --- a/frontend/packages/core/postcss.config.js +++ b/frontend/packages/core/postcss.config.js @@ -1,9 +1,4 @@ -/* - * @Date: 2023-11-27 17:31:54 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-06-05 10:42:18 - * @FilePath: \frontend\packages\core\postcss.config.js - */ + export default { plugins: { 'postcss-import': {}, diff --git a/frontend/packages/core/public/iconpark_apinto.js b/frontend/packages/core/public/iconpark_apinto.js index d125a4a0..04e07fd9 100644 --- a/frontend/packages/core/public/iconpark_apinto.js +++ b/frontend/packages/core/public/iconpark_apinto.js @@ -1,8 +1,3 @@ -/* - * @Date: 2024-05-06 09:47:27 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-05-06 09:47:47 - * @FilePath: \frontend\packages\core\src\assets\iconpark_apinto.js - */ + (function(){window.__iconpark__=window.__iconpark__||{};var obj=JSON.parse("{\"680840\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"content\":\"\"},\"680856\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680857\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680858\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680859\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680860\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680861\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680862\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680863\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680864\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680865\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680866\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680867\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680868\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680869\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680870\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680871\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680872\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680873\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680874\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680875\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680876\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680877\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680878\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680879\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680880\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680881\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680882\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680883\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680884\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680885\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680886\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680887\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680888\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680889\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680890\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680891\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680892\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680893\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680894\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680895\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680896\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680897\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680898\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680899\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680900\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680901\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680902\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680903\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680904\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680905\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680906\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680907\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680908\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680909\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680910\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680911\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680912\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680913\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680914\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680915\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680916\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680917\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680918\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680919\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680920\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680921\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680922\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680923\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680924\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680925\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680926\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680927\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680928\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680929\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680930\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680931\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680932\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680933\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680934\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680935\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680936\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680937\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680938\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"680939\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"681014\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"681015\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"681016\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"681017\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"681018\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"681019\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"currentColor\",\"content\":\"\"},\"681787\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"content\":\"\"},\"694557\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"694558\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707431\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707736\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707739\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707741\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707742\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707743\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707744\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"707749\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"708142\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"708144\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"708145\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"708146\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"708147\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"708181\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"709715\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"808898\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"808900\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"808916\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"810363\":{\"viewBox\":\"0 0 20 20\",\"fill\":\"none\",\"content\":\"\"},\"810396\":{\"viewBox\":\"0 0 20 20\",\"fill\":\"none\",\"content\":\"\"},\"818250\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"818340\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"content\":\"\"}}");for(var _k in obj){window.__iconpark__[_k] = obj[_k]};var nm={"fuzhi1":680840,"bianji":680856,"tishi":680857,"xinkaibiaoqian":680858,"bianjiyoujian":680859,"suoyou":680860,"fuzhi":680861,"shijian":680862,"gundongxuanze":680863,"guanbi":680864,"zanting":680865,"chenggong":680866,"chakanyinyong":680867,"guidang":680868,"tihuan":680869,"zhankai":680870,"duankailianjie":680871,"Cookieguanli":680872,"riqi":680873,"zhongwen":680874,"yingwen":680875,"shuaxinjiankongzhuangtai":680876,"rili":680877,"genmulu":680878,"shangxianguanli":680879,"daimashili":680880,"yingyong":680881,"tianjia-2":680882,"qingchu":680883,"daoru":680884,"xiala":680885,"kuaisuceshi-2":680886,"saoyisao":680887,"shiyongjiaocheng":680888,"tianjiafujian":680889,"xiazai":680890,"jinzhidengji":680891,"fasongyoujian":680892,"bug":680893,"chaping":680894,"kuaisuceshi":680895,"yunshangchuan":680896,"yunxiazai":680897,"sousuo":680898,"peizhi":680899,"xinchuangkoudakai":680900,"shanchu-2":680901,"quanjusuoxiao":680902,"qiehuan":680903,"jianshao":680904,"chakanAPIlishi":680905,"lianjie":680906,"dunpaibaoxianrenzheng":680907,"shaixuan":680908,"zhihang":680909,"congmobanzhongchuangjianyongli":680910,"zhengligeshi":680911,"haoping":680912,"shouqi-2":680913,"gouwuche":680914,"lishi":680915,"tianjiaziji":680916,"tianjia":680917,"shouqi":680918,"gailan":680919,"paixu":680920,"gengduo":680921,"guanliyuanrenzheng":680922,"fenxiang":680923,"shanchu":680924,"yidong":680925,"chakan":680926,"shujuku":680927,"shangyoufuwu-":680928,"huanyuangeshi":680929,"jiangxu":680930,"shengxu":680931,"quanjufangda":680932,"xuanzhong":680933,"riqiqujian":680934,"ditu-1":680935,"qunzu":680936,"daochu":680937,"zhankai-":680938,"ditu-2":680939,"Eolink":681014,"APISpace":681015,"Apinto":681016,"json":681017,"webhook":681018,"linux":681019,"xinzengfenzu":681787,"circle-right-up":694557,"circle-right-down":694558,"APIjiekou-7mme3dcg":707431,"connection-box":707736,"system":707739,"form-one":707741,"yingyong-7mmhj11e":707742,"jiankongshexiangtou":707743,"file-cabinet":707744,"network-tree":707749,"search":708142,"find":708144,"circle-right-up-7mnlo5g9":708145,"circle-right-down-7mnlphn2":708146,"reduce-one":708147,"tool":708181,"shangxianguanli-new":709715,"hamburger-button":808898,"puzzle":808900,"keyline":808916,"daohang":810363,"lanjieqiguanli":810396,"shop":818250,"xiangmu":818340};for(var _i in nm){window.__iconpark__[_i] = obj[nm[_i]]}})();"object"!=typeof globalThis&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__);(()=>{"use strict";var t={816:(t,e,i)=>{var s,r,o,n;i.d(e,{Vm:()=>z,dy:()=>P,Jb:()=>x,Ld:()=>$,sY:()=>T,YP:()=>A});const l=globalThis.trustedTypes,a=l?l.createPolicy("lit-html",{createHTML:t=>t}):void 0,h=`lit$${(Math.random()+"").slice(9)}$`,c="?"+h,d=`<${c}>`,u=document,p=(t="")=>u.createComment(t),v=t=>null===t||"object"!=typeof t&&"function"!=typeof t,f=Array.isArray,y=t=>{var e;return f(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,g=/-->/g,b=/>/g,S=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,w=/'/g,k=/"/g,E=/^(?:script|style|textarea)$/i,C=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),P=C(1),A=C(2),x=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),O=new WeakMap,T=(t,e,i)=>{var s,r;const o=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let n=o._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=n=new H(e.insertBefore(p(),t),t,void 0,i)}return n.I(t),n},R=u.createTreeWalker(u,129,null,!1),_=(t,e)=>{const i=t.length-1,s=[];let r,o=2===e?"":"",n=m;for(let e=0;e"===a[0]?(n=null!=r?r:m,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?S:'"'===a[3]?k:w):n===k||n===w?n=S:n===g||n===b?n=m:(n=S,r=void 0);const p=n===S&&t[e+1].startsWith("/>")?" ":"";o+=n===m?i+d:c>=0?(s.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+h+p):i+h+(-2===c?(s.push(void 0),e):p)}const l=o+(t[i]||"")+(2===e?"":"");return[void 0!==a?a.createHTML(l):l,s]};class N{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[d,u]=_(t,e);if(this.el=N.createElement(d,i),R.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=R.nextNode())&&a.length0){s.textContent=l?l.emptyScript:"";for(let i=0;i2||""!==i[0]||""!==i[1]?(this.H=Array(i.length-1).fill($),this.strings=i):this.H=$}get tagName(){return this.element.tagName}I(t,e=this,i,s){const r=this.strings;let o=!1;if(void 0===r)t=U(this,t,e,0),o=!v(t)||t!==this.H&&t!==x,o&&(this.H=t);else{const s=t;let n,l;for(t=r[0],n=0;n{i.r(e),i.d(e,{customElement:()=>s,eventOptions:()=>a,property:()=>o,query:()=>h,queryAll:()=>c,queryAssignedNodes:()=>v,queryAsync:()=>d,state:()=>n});const s=t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:s}=e;return{kind:i,elements:s,finisher(e){window.customElements.define(t,e)}}})(t,e),r=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function o(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):r(t,e)}function n(t){return o({...t,state:!0,attribute:!1})}const l=({finisher:t,descriptor:e})=>(i,s)=>{var r;if(void 0===s){const s=null!==(r=i.originalKey)&&void 0!==r?r:i.key,o=null!=e?{kind:"method",placement:"prototype",key:s,descriptor:e(i.key)}:{...i,key:s};return null!=t&&(o.finisher=function(e){t(e,s)}),o}{const r=i.constructor;void 0!==e&&Object.defineProperty(i,s,e(s)),null==t||t(r,s)}};function a(t){return l({finisher:(e,i)=>{Object.assign(e.prototype[i],t)}})}function h(t,e){return l({descriptor:i=>{const s={get(){var e;return null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t)},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;s.get=function(){var i;return void 0===this[e]&&(this[e]=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t)),this[e]}}return s}})}function c(t){return l({descriptor:e=>({get(){var e;return null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t)},enumerable:!0,configurable:!0})})}function d(t){return l({descriptor:e=>({async get(){var e;return await this.updateComplete,null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t)},enumerable:!0,configurable:!0})})}const u=Element.prototype,p=u.msMatchesSelector||u.webkitMatchesSelector;function v(t="",e=!1,i=""){return l({descriptor:s=>({get(){var s,r;const o="slot"+(t?`[name=${t}]`:":not([name])");let n=null===(r=null===(s=this.renderRoot)||void 0===s?void 0:s.querySelector(o))||void 0===r?void 0:r.assignedNodes({flatten:e});return n&&i&&(n=n.filter((t=>t.nodeType===Node.ELEMENT_NODE&&(t.matches?t.matches(i):p.call(t,i))))),n},enumerable:!0,configurable:!0})})}},23:(t,e,i)=>{i.r(e),i.d(e,{unsafeSVG:()=>l});const s=t=>(...e)=>({_$litDirective$:t,values:e});var r=i(816);class o extends class{constructor(t){}T(t,e,i){this.Σdt=t,this.M=e,this.Σct=i}S(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}{constructor(t){if(super(t),this.vt=r.Ld,2!==t.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===r.Ld)return this.Vt=void 0,this.vt=t;if(t===r.Jb)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.vt)return this.Vt;this.vt=t;const e=[t];return e.raw=e,this.Vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}o.directiveName="unsafeHTML",o.resultType=1,s(o);class n extends o{}n.directiveName="unsafeSVG",n.resultType=2;const l=s(n)},249:(t,e,i)=>{i.r(e),i.d(e,{CSSResult:()=>n,LitElement:()=>x,ReactiveElement:()=>b,UpdatingElement:()=>A,_Σ:()=>s.Vm,_Φ:()=>$,adoptStyles:()=>c,css:()=>h,defaultConverter:()=>y,getCompatibleStyle:()=>d,html:()=>s.dy,noChange:()=>s.Jb,notEqual:()=>m,nothing:()=>s.Ld,render:()=>s.sY,supportsAdoptingStyleSheets:()=>r,svg:()=>s.YP,unsafeCSS:()=>l});var s=i(816);const r=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol();class n{constructor(t,e){if(e!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return r&&void 0===this.t&&(this.t=new CSSStyleSheet,this.t.replaceSync(this.cssText)),this.t}toString(){return this.cssText}}const l=t=>new n(t+"",o),a=new Map,h=(t,...e)=>{const i=e.reduce(((e,i,s)=>e+(t=>{if(t instanceof n)return t.cssText;if("number"==typeof t)return t;throw Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(i)+t[s+1]),t[0]);let s=a.get(i);return void 0===s&&a.set(i,s=new n(i,o)),s},c=(t,e)=>{r?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style");i.textContent=e.cssText,t.appendChild(i)}))},d=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return l(e)})(t):t;var u,p,v,f;const y={toAttribute(t,e){switch(e){case Boolean:t=t?"":null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},m=(t,e)=>e!==t&&(e==e||t==t),g={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:m};class b extends HTMLElement{constructor(){super(),this.Πi=new Map,this.Πo=void 0,this.Πl=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.Πh=null,this.u()}static addInitializer(t){var e;null!==(e=this.v)&&void 0!==e||(this.v=[]),this.v.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const s=this.Πp(i,e);void 0!==s&&(this.Πm.set(s,i),t.push(s))})),t}static createProperty(t,e=g){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const r=this[t];this[e]=s,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||g}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this.Πm=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(d(t))}else void 0!==t&&e.push(d(t));return e}static Πp(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this.Πg=new Promise((t=>this.enableUpdating=t)),this.L=new Map,this.Π_(),this.requestUpdate(),null===(t=this.constructor.v)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this.ΠU)&&void 0!==e?e:this.ΠU=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this.ΠU)||void 0===e||e.splice(this.ΠU.indexOf(t)>>>0,1)}Π_(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this.Πi.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return c(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)})),this.Πl&&(this.Πl(),this.Πo=this.Πl=void 0)}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)})),this.Πo=new Promise((t=>this.Πl=t))}attributeChangedCallback(t,e,i){this.K(t,i)}Πj(t,e,i=g){var s,r;const o=this.constructor.Πp(t,i);if(void 0!==o&&!0===i.reflect){const n=(null!==(r=null===(s=i.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==r?r:y.toAttribute)(e,i.type);this.Πh=t,null==n?this.removeAttribute(o):this.setAttribute(o,n),this.Πh=null}}K(t,e){var i,s,r;const o=this.constructor,n=o.Πm.get(t);if(void 0!==n&&this.Πh!==n){const t=o.getPropertyOptions(n),l=t.converter,a=null!==(r=null!==(s=null===(i=l)||void 0===i?void 0:i.fromAttribute)&&void 0!==s?s:"function"==typeof l?l:null)&&void 0!==r?r:y.fromAttribute;this.Πh=n,this[n]=a(e,t.type),this.Πh=null}}requestUpdate(t,e,i){let s=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||m)(this[t],e)?(this.L.has(t)||this.L.set(t,e),!0===i.reflect&&this.Πh!==t&&(void 0===this.Πk&&(this.Πk=new Map),this.Πk.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this.Πg=this.Πq())}async Πq(){this.isUpdatePending=!0;try{for(await this.Πg;this.Πo;)await this.Πo}catch(t){Promise.reject(t)}const t=this.performUpdate();return null!=t&&await t,!this.isUpdatePending}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this.Πi&&(this.Πi.forEach(((t,e)=>this[e]=t)),this.Πi=void 0);let e=!1;const i=this.L;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this.Π$()}catch(t){throw e=!1,this.Π$(),t}e&&this.E(i)}willUpdate(t){}E(t){var e;null===(e=this.ΠU)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}Π$(){this.L=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.Πg}shouldUpdate(t){return!0}update(t){void 0!==this.Πk&&(this.Πk.forEach(((t,e)=>this.Πj(e,this[e],t))),this.Πk=void 0),this.Π$()}updated(t){}firstUpdated(t){}}var S,w,k,E,C,P;b.finalized=!0,b.shadowRootOptions={mode:"open"},null===(p=(u=globalThis).reactiveElementPlatformSupport)||void 0===p||p.call(u,{ReactiveElement:b}),(null!==(v=(f=globalThis).reactiveElementVersions)&&void 0!==v?v:f.reactiveElementVersions=[]).push("1.0.0-rc.1");const A=b;(null!==(S=(P=globalThis).litElementVersions)&&void 0!==S?S:P.litElementVersions=[]).push("3.0.0-rc.1");class x extends b{constructor(){super(...arguments),this.renderOptions={host:this},this.Φt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();super.update(t),this.Φt=(0,s.sY)(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!1)}render(){return s.Jb}}x.finalized=!0,x._$litElement$=!0,null===(k=(w=globalThis).litElementHydrateSupport)||void 0===k||k.call(w,{LitElement:x}),null===(C=(E=globalThis).litElementPlatformSupport)||void 0===C||C.call(E,{LitElement:x});const $={K:(t,e,i)=>{t.K(e,i)},L:t=>t.L}},409:function(t,e,i){var s=this&&this.__decorate||function(t,e,i,s){var r,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(n=(o<3?r(n):o>3?r(e,i,n):r(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};Object.defineProperty(e,"__esModule",{value:!0}),e.IconparkIconElement=void 0;const r=i(249),o=i(26),n=i(23),l={color:1,fill:1,stroke:1},a={STROKE:{trackAttr:"data-follow-stroke",rawAttr:"stroke"},FILL:{trackAttr:"data-follow-fill",rawAttr:"fill"}};class h extends r.LitElement{constructor(){super(...arguments),this.name="",this.identifyer="",this.size="1em"}get _width(){return this.width||this.size}get _height(){return this.height||this.size}get _stroke(){return this.stroke||this.color}get _fill(){return this.fill||this.color}get SVGConfig(){return(window.__iconpark__||{})[this.identifyer]||(window.__iconpark__||{})[this.name]||{viewBox:"0 0 0 0",content:""}}connectedCallback(){super.connectedCallback(),setTimeout((()=>{this.monkeyPatch("STROKE",!0),this.monkeyPatch("FILL",!0)}))}monkeyPatch(t,e){switch(t){case"STROKE":this.updateDOMByHand(this.strokeAppliedNodes,"STROKE",this._stroke,!!e);break;case"FILL":this.updateDOMByHand(this.fillAppliedNodes,"FILL",this._fill,!!e)}}updateDOMByHand(t,e,i,s){!i&&s||t&&t.forEach((t=>{i&&i===t.getAttribute(a[e].rawAttr)||t.setAttribute(a[e].rawAttr,i||t.getAttribute(a[e].trackAttr))}))}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"name"===t||"identifyer"===t?setTimeout((()=>{this.monkeyPatch("STROKE"),this.monkeyPatch("FILL")})):l[t]&&(this.monkeyPatch("STROKE"),this.monkeyPatch("FILL"))}render(){return r.svg`${n.unsafeSVG(this.SVGConfig.content)}`}}h.styles=r.css`:host {display: inline-flex; align-items: center; justify-content: center;} :host([spin]) svg {animation: iconpark-spin 1s infinite linear;} :host([spin][rtl]) svg {animation: iconpark-spin-rtl 1s infinite linear;} :host([rtl]) svg {transform: scaleX(-1);} @keyframes iconpark-spin {0% { -webkit-transform: rotate(0); transform: rotate(0);} 100% {-webkit-transform: rotate(360deg); transform: rotate(360deg);}} @keyframes iconpark-spin-rtl {0% {-webkit-transform: scaleX(-1) rotate(0); transform: scaleX(-1) rotate(0);} 100% {-webkit-transform: scaleX(-1) rotate(360deg); transform: scaleX(-1) rotate(360deg);}}`,s([o.property({reflect:!0})],h.prototype,"name",void 0),s([o.property({reflect:!0,attribute:"icon-id"})],h.prototype,"identifyer",void 0),s([o.property({reflect:!0})],h.prototype,"color",void 0),s([o.property({reflect:!0})],h.prototype,"stroke",void 0),s([o.property({reflect:!0})],h.prototype,"fill",void 0),s([o.property({reflect:!0})],h.prototype,"size",void 0),s([o.property({reflect:!0})],h.prototype,"width",void 0),s([o.property({reflect:!0})],h.prototype,"height",void 0),s([o.queryAll(`[${a.STROKE.trackAttr}]`)],h.prototype,"strokeAppliedNodes",void 0),s([o.queryAll(`[${a.FILL.trackAttr}]`)],h.prototype,"fillAppliedNodes",void 0),e.IconparkIconElement=h,customElements.get("iconpark-icon")||customElements.define("iconpark-icon",h)}},e={};function i(s){var r=e[s];if(void 0!==r)return r.exports;var o=e[s]={exports:{}};return t[s].call(o.exports,o,o.exports,i),o.exports}i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(409)})(); \ No newline at end of file diff --git a/frontend/packages/core/public/iconpark_eolink.js b/frontend/packages/core/public/iconpark_eolink.js index 5c7f6392..e75cca43 100644 --- a/frontend/packages/core/public/iconpark_eolink.js +++ b/frontend/packages/core/public/iconpark_eolink.js @@ -1,7 +1,2 @@ -/* - * @Date: 2024-05-06 09:53:45 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-05-06 09:53:50 - * @FilePath: \frontend\packages\core\src\assets\iconpark_eolink.js - */ + (function(){window.__iconpark__=window.__iconpark__||{};var obj=JSON.parse("{\"647367\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"684408\":{\"viewBox\":\"0 0 194 194\",\"content\":\"\"},\"684409\":{\"viewBox\":\"0 0 194 194\",\"content\":\"\"},\"684411\":{\"viewBox\":\"0 0 119.19 102.5\",\"content\":\"\"},\"684412\":{\"viewBox\":\"0 0 108.55 93.99\",\"fill\":\"currentColor\",\"content\":\"\"},\"684413\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"684414\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"686740\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686741\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686742\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686743\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686744\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686745\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686746\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686747\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686748\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686749\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686750\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686751\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686752\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686753\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686754\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"686993\":{\"viewBox\":\"0 0 38.22 22.18\",\"fill\":\"currentColor\",\"content\":\"\"},\"687741\":{\"viewBox\":\"0 0 194 194\",\"content\":\"\"},\"687742\":{\"viewBox\":\"0 0 194 194\",\"content\":\"\"},\"691262\":{\"viewBox\":\"0 0 194 194\",\"content\":\"\"},\"691537\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"691538\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"691806\":{\"viewBox\":\"0 0 194 194\",\"content\":\"\"},\"695738\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695739\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695740\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695741\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695742\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695743\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695746\":{\"viewBox\":\"0 0 1185 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"695747\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695748\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695750\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"695751\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"695752\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"695754\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"695755\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"695756\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"695758\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695759\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695760\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695761\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695762\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695763\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695764\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695801\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695802\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695803\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695804\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695805\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695806\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695807\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695810\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695811\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695812\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695817\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695818\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695819\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695820\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695821\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695822\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695828\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695829\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695830\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695831\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695833\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695834\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695835\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695836\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695837\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695838\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695839\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695840\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695841\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695842\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695844\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695845\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695846\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695865\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695867\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695868\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695869\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695870\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695876\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695877\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695878\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695883\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695884\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695886\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695887\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695888\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695889\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695890\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695891\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695892\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695893\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695896\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695899\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695900\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695901\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695902\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695903\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695904\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695905\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695906\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695907\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695908\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695909\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695913\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695914\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695915\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695916\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695933\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695934\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695935\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695936\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695938\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695940\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695941\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695942\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695944\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695945\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695946\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695947\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695948\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695950\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695951\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695953\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695954\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695955\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695956\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695957\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695958\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695959\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695960\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695961\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695962\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695963\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695964\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695966\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695967\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695968\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695969\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695971\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695972\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695973\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695975\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695978\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695979\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695980\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695981\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695982\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695984\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695985\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695986\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695987\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695988\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695990\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695993\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695995\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695997\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"695999\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696002\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696003\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696004\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696005\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696007\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696009\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696010\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696011\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696012\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696013\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696014\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696015\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696016\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696017\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696018\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696019\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696020\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696021\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696022\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696023\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696024\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696025\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696027\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696028\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696029\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696030\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696031\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696032\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696033\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696034\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696035\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696036\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696037\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696038\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696039\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696040\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696041\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696042\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696043\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696044\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696045\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696046\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696048\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696049\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696660\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"696661\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"744163\":{\"viewBox\":\"0 0 1024 1024\",\"fill\":\"currentColor\",\"content\":\"\"},\"744173\":{\"viewBox\":\"0 0 128 128\",\"fill\":\"none\",\"content\":\"\"},\"744175\":{\"viewBox\":\"0 0 128 128\",\"fill\":\"none\",\"content\":\"\"},\"750656\":{\"viewBox\":\"0 0 61 61\",\"fill\":\"none\",\"content\":\"\"},\"752737\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"756392\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757321\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757499\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757504\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757518\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757519\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757520\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757521\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757616\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"757650\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"767277\":{\"viewBox\":\"0 0 20 20\",\"fill\":\"none\",\"content\":\"\"},\"767278\":{\"viewBox\":\"0 0 20 20\",\"fill\":\"none\",\"content\":\"\"},\"775549\":{\"viewBox\":\"0 0 18 14\",\"fill\":\"none\",\"content\":\"\"},\"779333\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"content\":\"\"},\"779418\":{\"viewBox\":\"0 0 1024 1024\",\"content\":\"\"},\"779705\":{\"viewBox\":\"0 0 20 20\",\"fill\":\"none\",\"content\":\"\"},\"779706\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"content\":\"\"},\"787702\":{\"viewBox\":\"0 0 1024 1024\",\"content\":\"\"},\"788577\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"802334\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"804269\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"804612\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"804614\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"806103\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"813707\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"815901\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"820089\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"826687\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"854318\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"855246\":{\"viewBox\":\"0 0 16 16\",\"fill\":\"none\",\"content\":\"\"},\"855247\":{\"viewBox\":\"0 0 16 16\",\"fill\":\"none\",\"content\":\"\"},\"855248\":{\"viewBox\":\"0 0 16 16\",\"fill\":\"none\",\"content\":\"\"},\"855927\":{\"viewBox\":\"0 0 83 20\",\"fill\":\"none\",\"content\":\"\"},\"855928\":{\"viewBox\":\"0 0 68 24\",\"fill\":\"none\",\"content\":\"\"},\"855929\":{\"viewBox\":\"0 0 66 24\",\"fill\":\"none\",\"content\":\"\"},\"855938\":{\"viewBox\":\"0 0 198 72\",\"fill\":\"none\",\"content\":\"\"},\"857931\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"857985\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"861388\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"876705\":{\"viewBox\":\"0 0 16 16\",\"fill\":\"none\",\"content\":\"\"},\"884011\":{\"viewBox\":\"0 0 20 20\",\"fill\":\"none\",\"content\":\"\"},\"885387\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"897026\":{\"viewBox\":\"0 0 250 250\",\"fill\":\"none\",\"content\":\"\"},\"915485\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"929257\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"932197\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"949128\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"970590\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"973801\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"985435\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1002903\":{\"viewBox\":\"0 0 24 24\",\"fill\":\"none\",\"content\":\"\"},\"1021623\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1021686\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1035721\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1035737\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1037074\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1037815\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1037816\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1037817\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1039918\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1042170\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"},\"1042171\":{\"viewBox\":\"0 0 48 48\",\"fill\":\"none\",\"content\":\"\"}}");for(var _k in obj){window.__iconpark__[_k] = obj[_k]};var nm={"round-fill":647367,"apinto-pro-icon":684408,"apinto-icon":684409,"apinto-pro":684411,"apinto":684412,"check-circle":684413,"apispace":684414,"auto-generate-api":686740,"compare-api":686741,"multi-protocal":686742,"read-good":686743,"richdoc":686744,"mockapi":686745,"script-support":686746,"diy-test":686747,"send":686748,"stereo-perspective":686749,"automatic-robot":686750,"switch-env":686751,"flash":686752,"chart-pie":686753,"date-drive":686754,"apistudio":686993,"postcat-icon":687741,"postcat":687742,"apistudio-icon":691262,"update-rotation":691537,"page":691538,"apispace-icon":691806,"avatar":695738,"people":695739,"people-minus":695740,"people-plus":695741,"peoples":695742,"user-business":695743,"folder-close-fill":695746,"windows":695747,"github":695748,"qq":695750,"browser-chrome":695751,"linux":695752,"edge":695754,"wechat":695755,"browser":695756,"gitlab":695758,"apple":695759,"alipay":695760,"facebook":695761,"twitter":695762,"paypal":695763,"new-lark":695764,"delete":695801,"return":695802,"search":695803,"import":695804,"export":695805,"add":695806,"add-child":695807,"file-addition":695810,"add-circle":695811,"minus":695812,"close":695817,"close-small":695818,"check-small":695819,"check":695820,"code-terminal":695821,"code":695822,"preview-open":695828,"preview-close":695829,"folder-close":695830,"folder-open":695831,"upload":695833,"download":695834,"copy":695835,"upload-file":695836,"compare":695837,"edit":695838,"share":695839,"share-all":695840,"share-url-fill":695841,"share-url":695842,"back":695844,"back-fill":695845,"share-fill":695846,"sort":695865,"filter":695867,"reduce":695868,"done-all":695869,"full-selection":695870,"right-bar":695876,"left-bar":695877,"direction-adjustment":695878,"down-small":695883,"left-small":695884,"right-small":695886,"right-one":695887,"right":695888,"up":695889,"up-one":695890,"up-small":695891,"up-two":695892,"down-two":695893,"enter":695896,"down":695899,"left":695900,"down-one":695901,"left-two":695902,"right-two":695903,"left-one":695904,"more":695905,"expand-left":695906,"expand-right":695907,"column":695908,"center-alignment":695909,"list-add":695913,"sort-amount-down":695914,"sort-amount-up":695915,"list":695916,"remind":695933,"close-remind":695934,"api":695935,"rocket":695936,"monitor":695938,"robot":695940,"plan":695941,"application":695942,"chart-proportion":695944,"data":695945,"chart-line":695946,"pie-10":695947,"pie":695948,"chart-bubble":695950,"cube":695951,"application-menu":695953,"crown":695954,"crown-fill":695955,"market":695956,"file-word":695957,"file-excel":695958,"hashtag-key":695959,"file-hash":695960,"refresh":695961,"order":695962,"command":695963,"branch":695964,"page-template":695966,"smart-optimization":695967,"assembly-line":695968,"stopwatch":695969,"checklist":695971,"menu-fold":695972,"menu-unfold":695973,"alarm":695975,"protection":695978,"caution":695979,"openapi":695980,"webhook":695981,"holding-hands":695982,"support":695984,"agreement":695985,"community":695986,"roadmap":695987,"family-7knl2ae1":695988,"smiling-face":695990,"play-fill":695993,"play":695995,"pause":695997,"magic":695999,"whole-site-accelerator":696002,"link-cloud-faild":696003,"link-cloud-sucess":696004,"translate":696005,"funds":696007,"unhappy-face":696009,"message":696010,"connection-arrow":696011,"loading":696012,"fork":696013,"quote":696014,"headset":696015,"attention":696016,"theme":696017,"keyboard":696018,"briefcase":696019,"star":696020,"star-7knmka28":696021,"protect":696022,"finance":696023,"setting":696024,"link":696025,"undo":696027,"inbox-success":696028,"home":696029,"local":696030,"laptop":696031,"view-list":696032,"lock":696033,"unlock":696034,"lightning":696035,"file-text":696036,"cooperative-handshake":696037,"navigation":696038,"view-grid-detail":696039,"help":696040,"history":696041,"logout-7knnioon":696042,"chinese":696043,"calendar":696044,"play-cycle":696045,"world":696046,"plugins":696048,"link-cloud":696049,"book":696660,"table-report":696661,"qiyeweixin":744163,"Oauth":744173,"dingding":744175,"eolink":750656,"tool":752737,"category-management":756392,"folder-code-one":757321,"link-three-8ah7lifn":757499,"download-two-8ah85008":757504,"quanjusuoxiao1":757518,"quanjufangda21":757519,"quanjusuoxiao211":757520,"quanjufangda1":757521,"wenjianshezhi":757616,"key":757650,"zidingyijiaoben":767277,"tiqubianliang":767278,"mock":775549,"tongzhishezhi":779333,"csdn":779418,"ceshibaogao":779705,"biangengtongzhi":779706,"icon-api":787702,"youjian":788577,"pushpin":802334,"announcement":804269,"collapse-text-input":804612,"zhankai":804614,"replay-music":806103,"download-web":813707,"permissions":815901,"file-editing":820089,"wallet":826687,"file-focus":854318,"pingpu-9a913n0n":855246,"zuoyoufenping-9a913n1f":855247,"shangxiafenping-9a913n1i":855248,"Paypal11":855927,"zhifubaozhifu1":855928,"weixinzhifu11":855929,"weixinzhifu":855938,"update-rotation-9and40f5":857931,"terminal":857985,"switch":861388,"zhinengrucan":876705,"biaoqian-banbenleixinzeng":884011,"book-open":885387,"morentouxiang-2":897026,"xiajia":915485,"drag":929257,"new-up":932197,"rss":949128,"yewuchangjing":970590,"newlybuild":973801,"bianji":985435,"jiekoushouquan":1002903,"interfacefenzutubiao":1021623,"yidong":1021686,"link-one":1035721,"canshugouzaoqi":1035737,"bianliang":1037074,"tars":1037815,"if":1037816,"tars-2":1037817,"yingyongguanxi":1039918,"save-one":1042170,"save":1042171};for(var _i in nm){window.__iconpark__[_i] = obj[nm[_i]]}})();"object"!=typeof globalThis&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__);(()=>{"use strict";var t={816:(t,e,i)=>{var s,r,o,n;i.d(e,{Vm:()=>z,dy:()=>P,Jb:()=>x,Ld:()=>$,sY:()=>T,YP:()=>A});const l=globalThis.trustedTypes,a=l?l.createPolicy("lit-html",{createHTML:t=>t}):void 0,h=`lit$${(Math.random()+"").slice(9)}$`,c="?"+h,d=`<${c}>`,u=document,p=(t="")=>u.createComment(t),v=t=>null===t||"object"!=typeof t&&"function"!=typeof t,f=Array.isArray,y=t=>{var e;return f(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,g=/-->/g,b=/>/g,S=/>|[ \n \r](?:([^\s"'>=/]+)([ \n \r]*=[ \n \r]*(?:[^ \n \r"'`<>=]|("|')|))|$)/g,w=/'/g,k=/"/g,E=/^(?:script|style|textarea)$/i,C=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),P=C(1),A=C(2),x=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),O=new WeakMap,T=(t,e,i)=>{var s,r;const o=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let n=o._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=n=new H(e.insertBefore(p(),t),t,void 0,i)}return n.I(t),n},R=u.createTreeWalker(u,129,null,!1),_=(t,e)=>{const i=t.length-1,s=[];let r,o=2===e?"":"",n=m;for(let e=0;e"===a[0]?(n=null!=r?r:m,c=-1):void 0===a[1]?c=-2:(c=n.lastIndex-a[2].length,l=a[1],n=void 0===a[3]?S:'"'===a[3]?k:w):n===k||n===w?n=S:n===g||n===b?n=m:(n=S,r=void 0);const p=n===S&&t[e+1].startsWith("/>")?" ":"";o+=n===m?i+d:c>=0?(s.push(l),i.slice(0,c)+"$lit$"+i.slice(c)+h+p):i+h+(-2===c?(s.push(void 0),e):p)}const l=o+(t[i]||"")+(2===e?"":"");return[void 0!==a?a.createHTML(l):l,s]};class N{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[d,u]=_(t,e);if(this.el=N.createElement(d,i),R.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=R.nextNode())&&a.length0){s.textContent=l?l.emptyScript:"";for(let i=0;i2||""!==i[0]||""!==i[1]?(this.H=Array(i.length-1).fill($),this.strings=i):this.H=$}get tagName(){return this.element.tagName}I(t,e=this,i,s){const r=this.strings;let o=!1;if(void 0===r)t=U(this,t,e,0),o=!v(t)||t!==this.H&&t!==x,o&&(this.H=t);else{const s=t;let n,l;for(t=r[0],n=0;n{i.r(e),i.d(e,{customElement:()=>s,eventOptions:()=>a,property:()=>o,query:()=>h,queryAll:()=>c,queryAssignedNodes:()=>v,queryAsync:()=>d,state:()=>n});const s=t=>e=>"function"==typeof e?((t,e)=>(window.customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:i,elements:s}=e;return{kind:i,elements:s,finisher(e){window.customElements.define(t,e)}}})(t,e),r=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(i){i.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(i){i.createProperty(e.key,t)}};function o(t){return(e,i)=>void 0!==i?((t,e,i)=>{e.constructor.createProperty(i,t)})(t,e,i):r(t,e)}function n(t){return o({...t,state:!0,attribute:!1})}const l=({finisher:t,descriptor:e})=>(i,s)=>{var r;if(void 0===s){const s=null!==(r=i.originalKey)&&void 0!==r?r:i.key,o=null!=e?{kind:"method",placement:"prototype",key:s,descriptor:e(i.key)}:{...i,key:s};return null!=t&&(o.finisher=function(e){t(e,s)}),o}{const r=i.constructor;void 0!==e&&Object.defineProperty(i,s,e(s)),null==t||t(r,s)}};function a(t){return l({finisher:(e,i)=>{Object.assign(e.prototype[i],t)}})}function h(t,e){return l({descriptor:i=>{const s={get(){var e;return null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t)},enumerable:!0,configurable:!0};if(e){const e="symbol"==typeof i?Symbol():"__"+i;s.get=function(){var i;return void 0===this[e]&&(this[e]=null===(i=this.renderRoot)||void 0===i?void 0:i.querySelector(t)),this[e]}}return s}})}function c(t){return l({descriptor:e=>({get(){var e;return null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t)},enumerable:!0,configurable:!0})})}function d(t){return l({descriptor:e=>({async get(){var e;return await this.updateComplete,null===(e=this.renderRoot)||void 0===e?void 0:e.querySelector(t)},enumerable:!0,configurable:!0})})}const u=Element.prototype,p=u.msMatchesSelector||u.webkitMatchesSelector;function v(t="",e=!1,i=""){return l({descriptor:s=>({get(){var s,r;const o="slot"+(t?`[name=${t}]`:":not([name])");let n=null===(r=null===(s=this.renderRoot)||void 0===s?void 0:s.querySelector(o))||void 0===r?void 0:r.assignedNodes({flatten:e});return n&&i&&(n=n.filter((t=>t.nodeType===Node.ELEMENT_NODE&&(t.matches?t.matches(i):p.call(t,i))))),n},enumerable:!0,configurable:!0})})}},23:(t,e,i)=>{i.r(e),i.d(e,{unsafeSVG:()=>l});const s=t=>(...e)=>({_$litDirective$:t,values:e});var r=i(816);class o extends class{constructor(t){}T(t,e,i){this.Σdt=t,this.M=e,this.Σct=i}S(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}{constructor(t){if(super(t),this.vt=r.Ld,2!==t.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===r.Ld)return this.Vt=void 0,this.vt=t;if(t===r.Jb)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.vt)return this.Vt;this.vt=t;const e=[t];return e.raw=e,this.Vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}o.directiveName="unsafeHTML",o.resultType=1,s(o);class n extends o{}n.directiveName="unsafeSVG",n.resultType=2;const l=s(n)},249:(t,e,i)=>{i.r(e),i.d(e,{CSSResult:()=>n,LitElement:()=>x,ReactiveElement:()=>b,UpdatingElement:()=>A,_Σ:()=>s.Vm,_Φ:()=>$,adoptStyles:()=>c,css:()=>h,defaultConverter:()=>y,getCompatibleStyle:()=>d,html:()=>s.dy,noChange:()=>s.Jb,notEqual:()=>m,nothing:()=>s.Ld,render:()=>s.sY,supportsAdoptingStyleSheets:()=>r,svg:()=>s.YP,unsafeCSS:()=>l});var s=i(816);const r=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol();class n{constructor(t,e){if(e!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return r&&void 0===this.t&&(this.t=new CSSStyleSheet,this.t.replaceSync(this.cssText)),this.t}toString(){return this.cssText}}const l=t=>new n(t+"",o),a=new Map,h=(t,...e)=>{const i=e.reduce(((e,i,s)=>e+(t=>{if(t instanceof n)return t.cssText;if("number"==typeof t)return t;throw Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(i)+t[s+1]),t[0]);let s=a.get(i);return void 0===s&&a.set(i,s=new n(i,o)),s},c=(t,e)=>{r?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style");i.textContent=e.cssText,t.appendChild(i)}))},d=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return l(e)})(t):t;var u,p,v,f;const y={toAttribute(t,e){switch(e){case Boolean:t=t?"":null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},m=(t,e)=>e!==t&&(e==e||t==t),g={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:m};class b extends HTMLElement{constructor(){super(),this.Πi=new Map,this.Πo=void 0,this.Πl=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.Πh=null,this.u()}static addInitializer(t){var e;null!==(e=this.v)&&void 0!==e||(this.v=[]),this.v.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const s=this.Πp(i,e);void 0!==s&&(this.Πm.set(s,i),t.push(s))})),t}static createProperty(t,e=g){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,s=this.getPropertyDescriptor(t,i,e);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const r=this[t];this[e]=s,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||g}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this.Πm=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(d(t))}else void 0!==t&&e.push(d(t));return e}static Πp(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this.Πg=new Promise((t=>this.enableUpdating=t)),this.L=new Map,this.Π_(),this.requestUpdate(),null===(t=this.constructor.v)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this.ΠU)&&void 0!==e?e:this.ΠU=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this.ΠU)||void 0===e||e.splice(this.ΠU.indexOf(t)>>>0,1)}Π_(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this.Πi.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return c(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)})),this.Πl&&(this.Πl(),this.Πo=this.Πl=void 0)}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)})),this.Πo=new Promise((t=>this.Πl=t))}attributeChangedCallback(t,e,i){this.K(t,i)}Πj(t,e,i=g){var s,r;const o=this.constructor.Πp(t,i);if(void 0!==o&&!0===i.reflect){const n=(null!==(r=null===(s=i.converter)||void 0===s?void 0:s.toAttribute)&&void 0!==r?r:y.toAttribute)(e,i.type);this.Πh=t,null==n?this.removeAttribute(o):this.setAttribute(o,n),this.Πh=null}}K(t,e){var i,s,r;const o=this.constructor,n=o.Πm.get(t);if(void 0!==n&&this.Πh!==n){const t=o.getPropertyOptions(n),l=t.converter,a=null!==(r=null!==(s=null===(i=l)||void 0===i?void 0:i.fromAttribute)&&void 0!==s?s:"function"==typeof l?l:null)&&void 0!==r?r:y.fromAttribute;this.Πh=n,this[n]=a(e,t.type),this.Πh=null}}requestUpdate(t,e,i){let s=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||m)(this[t],e)?(this.L.has(t)||this.L.set(t,e),!0===i.reflect&&this.Πh!==t&&(void 0===this.Πk&&(this.Πk=new Map),this.Πk.set(t,i))):s=!1),!this.isUpdatePending&&s&&(this.Πg=this.Πq())}async Πq(){this.isUpdatePending=!0;try{for(await this.Πg;this.Πo;)await this.Πo}catch(t){Promise.reject(t)}const t=this.performUpdate();return null!=t&&await t,!this.isUpdatePending}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this.Πi&&(this.Πi.forEach(((t,e)=>this[e]=t)),this.Πi=void 0);let e=!1;const i=this.L;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this.ΠU)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this.Π$()}catch(t){throw e=!1,this.Π$(),t}e&&this.E(i)}willUpdate(t){}E(t){var e;null===(e=this.ΠU)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}Π$(){this.L=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.Πg}shouldUpdate(t){return!0}update(t){void 0!==this.Πk&&(this.Πk.forEach(((t,e)=>this.Πj(e,this[e],t))),this.Πk=void 0),this.Π$()}updated(t){}firstUpdated(t){}}var S,w,k,E,C,P;b.finalized=!0,b.shadowRootOptions={mode:"open"},null===(p=(u=globalThis).reactiveElementPlatformSupport)||void 0===p||p.call(u,{ReactiveElement:b}),(null!==(v=(f=globalThis).reactiveElementVersions)&&void 0!==v?v:f.reactiveElementVersions=[]).push("1.0.0-rc.1");const A=b;(null!==(S=(P=globalThis).litElementVersions)&&void 0!==S?S:P.litElementVersions=[]).push("3.0.0-rc.1");class x extends b{constructor(){super(...arguments),this.renderOptions={host:this},this.Φt=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();super.update(t),this.Φt=(0,s.sY)(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.Φt)||void 0===t||t.setConnected(!1)}render(){return s.Jb}}x.finalized=!0,x._$litElement$=!0,null===(k=(w=globalThis).litElementHydrateSupport)||void 0===k||k.call(w,{LitElement:x}),null===(C=(E=globalThis).litElementPlatformSupport)||void 0===C||C.call(E,{LitElement:x});const $={K:(t,e,i)=>{t.K(e,i)},L:t=>t.L}},409:function(t,e,i){var s=this&&this.__decorate||function(t,e,i,s){var r,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(n=(o<3?r(n):o>3?r(e,i,n):r(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};Object.defineProperty(e,"__esModule",{value:!0}),e.IconparkIconElement=void 0;const r=i(249),o=i(26),n=i(23),l={color:1,fill:1,stroke:1},a={STROKE:{trackAttr:"data-follow-stroke",rawAttr:"stroke"},FILL:{trackAttr:"data-follow-fill",rawAttr:"fill"}};class h extends r.LitElement{constructor(){super(...arguments),this.name="",this.identifyer="",this.size="1em"}get _width(){return this.width||this.size}get _height(){return this.height||this.size}get _stroke(){return this.stroke||this.color}get _fill(){return this.fill||this.color}get SVGConfig(){return(window.__iconpark__||{})[this.identifyer]||(window.__iconpark__||{})[this.name]||{viewBox:"0 0 0 0",content:""}}connectedCallback(){super.connectedCallback(),setTimeout((()=>{this.monkeyPatch("STROKE",!0),this.monkeyPatch("FILL",!0)}))}monkeyPatch(t,e){switch(t){case"STROKE":this.updateDOMByHand(this.strokeAppliedNodes,"STROKE",this._stroke,!!e);break;case"FILL":this.updateDOMByHand(this.fillAppliedNodes,"FILL",this._fill,!!e)}}updateDOMByHand(t,e,i,s){!i&&s||t&&t.forEach((t=>{i&&i===t.getAttribute(a[e].rawAttr)||t.setAttribute(a[e].rawAttr,i||t.getAttribute(a[e].trackAttr))}))}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"name"===t||"identifyer"===t?setTimeout((()=>{this.monkeyPatch("STROKE"),this.monkeyPatch("FILL")})):l[t]&&(this.monkeyPatch("STROKE"),this.monkeyPatch("FILL"))}render(){return r.svg`${n.unsafeSVG(this.SVGConfig.content)}`}}h.styles=r.css`:host {display: inline-flex; align-items: center; justify-content: center;} :host([spin]) svg {animation: iconpark-spin 1s infinite linear;} :host([spin][rtl]) svg {animation: iconpark-spin-rtl 1s infinite linear;} :host([rtl]) svg {transform: scaleX(-1);} @keyframes iconpark-spin {0% { -webkit-transform: rotate(0); transform: rotate(0);} 100% {-webkit-transform: rotate(360deg); transform: rotate(360deg);}} @keyframes iconpark-spin-rtl {0% {-webkit-transform: scaleX(-1) rotate(0); transform: scaleX(-1) rotate(0);} 100% {-webkit-transform: scaleX(-1) rotate(360deg); transform: scaleX(-1) rotate(360deg);}}`,s([o.property({reflect:!0})],h.prototype,"name",void 0),s([o.property({reflect:!0,attribute:"icon-id"})],h.prototype,"identifyer",void 0),s([o.property({reflect:!0})],h.prototype,"color",void 0),s([o.property({reflect:!0})],h.prototype,"stroke",void 0),s([o.property({reflect:!0})],h.prototype,"fill",void 0),s([o.property({reflect:!0})],h.prototype,"size",void 0),s([o.property({reflect:!0})],h.prototype,"width",void 0),s([o.property({reflect:!0})],h.prototype,"height",void 0),s([o.queryAll(`[${a.STROKE.trackAttr}]`)],h.prototype,"strokeAppliedNodes",void 0),s([o.queryAll(`[${a.FILL.trackAttr}]`)],h.prototype,"fillAppliedNodes",void 0),e.IconparkIconElement=h,customElements.get("iconpark-icon")||customElements.define("iconpark-icon",h)}},e={};function i(s){var r=e[s];if(void 0!==r)return r.exports;var o=e[s]={exports:{}};return t[s].call(o.exports,o,o.exports,i),o.exports}i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(409)})(); \ No newline at end of file diff --git a/frontend/packages/core/start-vite.js b/frontend/packages/core/start-vite.js index f55d1cb4..224115dc 100644 --- a/frontend/packages/core/start-vite.js +++ b/frontend/packages/core/start-vite.js @@ -1,9 +1,4 @@ -/* - * @Date: 2024-06-05 09:35:25 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-06-05 10:50:12 - * @FilePath: \frontend\packages\core\start-vite.js - */ + // start-vite.js// start-vite.js import { exec } from 'child_process'; diff --git a/frontend/packages/core/tailwind.config.js b/frontend/packages/core/tailwind.config.js index c98c8b02..c1b367f7 100644 --- a/frontend/packages/core/tailwind.config.js +++ b/frontend/packages/core/tailwind.config.js @@ -1,9 +1,4 @@ -/* - * @Date: 2023-11-27 17:31:44 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-06-05 10:36:46 - * @FilePath: \frontend\packages\core\tailwind.config.js - */ + /** @type {import('tailwindcss').Config} */ export default { diff --git a/frontend/packages/dashboard/postcss.config.js b/frontend/packages/dashboard/postcss.config.js index 80393090..8610d836 100644 --- a/frontend/packages/dashboard/postcss.config.js +++ b/frontend/packages/dashboard/postcss.config.js @@ -1,9 +1,4 @@ -/* - * @Date: 2023-11-27 17:31:54 - * @LastEditors: maggieyyy - * @LastEditTime: 2023-11-29 15:49:05 - * @FilePath: \applatform\frontend\packages\core\postcss.config.js - */ + export default { plugins: { 'postcss-import': {}, diff --git a/frontend/packages/dashboard/src/pages/Dashboard.tsx b/frontend/packages/dashboard/src/pages/Dashboard.tsx index b916a4eb..f5f683e2 100644 --- a/frontend/packages/dashboard/src/pages/Dashboard.tsx +++ b/frontend/packages/dashboard/src/pages/Dashboard.tsx @@ -10,7 +10,6 @@ import { reject } from "lodash-es"; import { EntityItem } from "@common/const/type"; import { LoadingOutlined } from "@ant-design/icons"; import DashboardInstruction from "./DashboardInstruction"; -import cluster from "cluster"; export default function Dashboard(){ const { setBreadcrumb } = useBreadcrumb() diff --git a/frontend/packages/dashboard/tailwind.config.js b/frontend/packages/dashboard/tailwind.config.js index e53065a4..22fe1ba7 100644 --- a/frontend/packages/dashboard/tailwind.config.js +++ b/frontend/packages/dashboard/tailwind.config.js @@ -1,9 +1,4 @@ -/* - * @Date: 2023-11-27 17:31:44 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-06-05 10:36:11 - * @FilePath: \frontend\packages\market\tailwind.config.js - */ + /** @type {import('tailwindcss').Config} */ export default { diff --git a/frontend/packages/market/postcss.config.js b/frontend/packages/market/postcss.config.js index 69215941..8610d836 100644 --- a/frontend/packages/market/postcss.config.js +++ b/frontend/packages/market/postcss.config.js @@ -1,9 +1,4 @@ -/* - * @Date: 2023-11-27 17:31:54 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-06-05 10:42:18 - * @FilePath: \frontend\packages\core\postcss.config.js - */ + export default { plugins: { 'postcss-import': {}, diff --git a/frontend/packages/openApi/postcss.config.js b/frontend/packages/openApi/postcss.config.js index 80393090..8610d836 100644 --- a/frontend/packages/openApi/postcss.config.js +++ b/frontend/packages/openApi/postcss.config.js @@ -1,9 +1,4 @@ -/* - * @Date: 2023-11-27 17:31:54 - * @LastEditors: maggieyyy - * @LastEditTime: 2023-11-29 15:49:05 - * @FilePath: \applatform\frontend\packages\core\postcss.config.js - */ + export default { plugins: { 'postcss-import': {}, diff --git a/frontend/packages/openApi/tailwind.config.js b/frontend/packages/openApi/tailwind.config.js index e53065a4..22fe1ba7 100644 --- a/frontend/packages/openApi/tailwind.config.js +++ b/frontend/packages/openApi/tailwind.config.js @@ -1,9 +1,4 @@ -/* - * @Date: 2023-11-27 17:31:44 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-06-05 10:36:11 - * @FilePath: \frontend\packages\market\tailwind.config.js - */ + /** @type {import('tailwindcss').Config} */ export default { diff --git a/frontend/packages/systemRunning/postcss.config.js b/frontend/packages/systemRunning/postcss.config.js index 80393090..8610d836 100644 --- a/frontend/packages/systemRunning/postcss.config.js +++ b/frontend/packages/systemRunning/postcss.config.js @@ -1,9 +1,4 @@ -/* - * @Date: 2023-11-27 17:31:54 - * @LastEditors: maggieyyy - * @LastEditTime: 2023-11-29 15:49:05 - * @FilePath: \applatform\frontend\packages\core\postcss.config.js - */ + export default { plugins: { 'postcss-import': {}, diff --git a/frontend/packages/systemRunning/tailwind.config.js b/frontend/packages/systemRunning/tailwind.config.js index e53065a4..22fe1ba7 100644 --- a/frontend/packages/systemRunning/tailwind.config.js +++ b/frontend/packages/systemRunning/tailwind.config.js @@ -1,9 +1,4 @@ -/* - * @Date: 2023-11-27 17:31:44 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-06-05 10:36:11 - * @FilePath: \frontend\packages\market\tailwind.config.js - */ + /** @type {import('tailwindcss').Config} */ export default { diff --git a/frontend/pnpm-workspace.yaml b/frontend/pnpm-workspace.yaml index ccdc80cd..732fd016 100644 --- a/frontend/pnpm-workspace.yaml +++ b/frontend/pnpm-workspace.yaml @@ -1,2 +1,3 @@ packages: - - "packages/*" \ No newline at end of file + - "packages/*" + \ No newline at end of file diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index acf9d2fe..b6ee0067 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -1,9 +1,4 @@ -/* - * @Date: 2023-11-27 17:31:44 - * @LastEditors: maggieyyy - * @LastEditTime: 2024-06-04 15:03:36 - * @FilePath: \frontend\tailwind.config.js - */ + /** @type {import('tailwindcss').Config} */ module.exports = { diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 4025916c..9da0bcfe 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -11,4 +11,5 @@ }, "include": ["**/*.test.ts", "**/*.test.tsx", "jest.setup.js"], "exclude": ["node_modules"] + } \ No newline at end of file From 68309ac582543d4cf5206cab2f02dc8ab6dce4cb Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:00:59 +0800 Subject: [PATCH 75/91] fix: Modify access --- .../src/components/aoplatform/BasicLayout.tsx | 18 +- .../packages/common/src/const/permissions.ts | 168 ++++++++++-------- .../common/src/const/permissions.yaml | 16 +- .../aiService/AiServiceInsideDocument.tsx | 2 +- .../pages/aiService/AiServiceInsidePage.tsx | 2 +- .../api/AiServiceInsideRouterModelConfig.tsx | 6 + .../src/pages/aiSetting/AiSettingList.tsx | 2 +- .../src/pages/logsettings/LogSettings.tsx | 2 +- .../resourcesettings/ResourceSettings.tsx | 2 +- .../core/src/pages/system/SystemConfig.tsx | 8 +- .../src/pages/system/SystemInsideDocument.tsx | 2 +- .../src/pages/system/SystemInsidePage.tsx | 2 +- .../core/src/pages/team/TeamConfig.tsx | 2 +- 13 files changed, 129 insertions(+), 103 deletions(-) diff --git a/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx b/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx index 7843ef1f..f4a96738 100644 --- a/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx +++ b/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx @@ -48,27 +48,27 @@ const themeToken = { getNavItem({$t('消费者')}, 'consumer','/consumer',,undefined,undefined,'all'), getNavItem({$t('团队')}, 'team','/team',,undefined,undefined,'all'), ]), - getNavItem($t('API 市场'), 'serviceHub','/serviceHub',,undefined,undefined,'system.workspace.api_market.view'), + getNavItem($t('API 市场'), 'serviceHub','/serviceHub',,undefined,undefined,'system.api_portal.api_portal.view'), getNavItem($t('仪表盘'), 'mainPage', APP_MODE === 'pro' ? '/analytics' : '/analytics/total',,[ - getNavItem({$t('运行视图')}, 'analytics',APP_MODE === 'pro' ? '/analytics' : '/analytics/total' ,,undefined,undefined,'system.dashboard.run_view.view'), + getNavItem({$t('运行视图')}, 'analytics',APP_MODE === 'pro' ? '/analytics' : '/analytics/total' ,,undefined,undefined,'system.analysis.run_view.view'), APP_MODE === 'pro' ? getNavItem({$t('系统拓扑图')}, 'systemrunning','/systemrunning',,undefined,undefined,'system.dashboard.systemrunning.view') : null, - ],undefined,'system.dashboard.run_view.view'), + ],undefined,'system.analysis.run_view.view'), getNavItem($t('系统设置'), 'operationCenter','/commonsetting',, [ getNavItem($t('系统'), 'serviceHubSetting','/commonsetting',null,[ getNavItem({$t('常规')}, 'commonsetting','/commonsetting',,undefined,undefined,'system.api_market.service_classification.view'), - getNavItem({$t('API 网关')}, 'cluster','/cluster',,undefined,undefined,'system.devops.cluster.view'), - getNavItem({$t('AI 模型')}, 'aisetting','/aisetting',,undefined,undefined,'system.devops.cluster.view'), + getNavItem({$t('API 网关')}, 'cluster','/cluster',,undefined,undefined,'system.settings.api_gateway.view'), + getNavItem({$t('AI 模型')}, 'aisetting','/aisetting',,undefined,undefined,'system.settings.api_gateway.view'), ],undefined,'system.api_market.service_classification.view'), getNavItem($t('用户'), 'organization','/member',null,[ - getNavItem({$t('账号')}, 'member','/member',,undefined,undefined,'system.organization.member.view'), + getNavItem({$t('账号')}, 'member','/member',,undefined,undefined,'system.settings.account.view'), getNavItem({$t('角色')}, 'role','/role',,undefined,undefined,'system.organization.role.view'), ],undefined,''), getNavItem($t('集成'), 'maintenanceCenter','/datasourcing', null, [ - getNavItem({$t('数据源')}, 'datasourcing','/datasourcing',,undefined,undefined,'system.devops.data_source.view'), - getNavItem({$t('证书')}, 'cert','/cert',,undefined,undefined,'system.devops.ssl_certificate.view'), - getNavItem({$t('日志')}, 'logsettings','/logsettings',,undefined,undefined,'system.devops.log_configuration.view'), + getNavItem({$t('数据源')}, 'datasourcing','/datasourcing',,undefined,undefined,'system.settings.data_source.view'), + getNavItem({$t('证书')}, 'cert','/cert',,undefined,undefined,'system.settings.ssl_certificate.view'), + getNavItem({$t('日志')}, 'logsettings','/logsettings',,undefined,undefined,'system.settings.log_configuration.view'), APP_MODE === 'pro' ? getNavItem({$t('资源')}, 'resourcesettings','/resourcesettings',null,undefined,undefined,'system.partition.self.view'):null, APP_MODE === 'pro' ? getNavItem({$t('Open API')}, 'openapi','/openapi',null,undefined,undefined,'system.openapi.self.view'):null, ]), diff --git a/frontend/packages/common/src/const/permissions.ts b/frontend/packages/common/src/const/permissions.ts index 9d6ff2f7..15e18a74 100644 --- a/frontend/packages/common/src/const/permissions.ts +++ b/frontend/packages/common/src/const/permissions.ts @@ -4,84 +4,84 @@ export const PERMISSION_DEFINITION = [ { - "system.organization.member.view": { + "system.settings.account.view": { "granted": { - "anyOf": [{ "backend": ["system.organization.member.view"] }] + "anyOf": [{ "backend": ["system.settings.account.view"] }] } }, "system.organization.member.add": { "granted": { - "anyOf": [{ "backend": ["system.organization.member.manager"] }] + "anyOf": [{ "backend": ["system.settings.account.manager"] }] } }, "system.organization.member.edit": { "granted": { - "anyOf": [{ "backend": ["system.organization.member.manager"] }] + "anyOf": [{ "backend": ["system.settings.account.manager"] }] } }, "system.organization.member.remove": { "granted": { - "anyOf": [{ "backend": ["system.organization.member.manager"] }] + "anyOf": [{ "backend": ["system.settings.account.manager"] }] } }, "system.organization.member.delete": { "granted": { - "anyOf": [{ "backend": ["system.organization.member.manager"] }] + "anyOf": [{ "backend": ["system.settings.account.manager"] }] } }, "system.organization.member.block": { "granted": { - "anyOf": [{ "backend": ["system.organization.member.manager"] }] + "anyOf": [{ "backend": ["system.settings.account.manager"] }] } }, "system.organization.member.department.add": { "granted": { - "anyOf": [{ "backend": ["system.organization.member.manager"] }] + "anyOf": [{ "backend": ["system.settings.account.manager"] }] } }, "system.organization.member.department.edit": { "granted": { - "anyOf": [{ "backend": ["system.organization.member.manager"] }] + "anyOf": [{ "backend": ["system.settings.account.manager"] }] } }, "system.organization.member.department.delete": { "granted": { - "anyOf": [{ "backend": ["system.organization.member.manager"] }] + "anyOf": [{ "backend": ["system.settings.account.manager"] }] } }, - "system.organization.team.view": { + "system.workspace.team.view_all": { "granted": { - "anyOf": [{ "backend": ["system.organization.team.view"] }] + "anyOf": [{ "backend": ["system.workspace.team.view_all"] }] } }, "system.organization.team.add": { "granted": { - "anyOf": [{ "backend": ["system.organization.team.manager"] }] + "anyOf": [{ "backend": ["system.workspace.team.create"] }] } }, "system.organization.team.edit": { "granted": { - "anyOf": [{ "backend": ["system.organization.team.manager"] }] + "anyOf": [{ "backend": ["system.workspace.team.manager"] }] } }, "system.organization.team.delete": { "granted": { - "anyOf": [{ "backend": ["system.organization.team.manager"] }] + "anyOf": [{ "backend": ["system.workspace.team.manager"] }] } }, "system.organization.team.running": { "granted": { - "anyOf": [{ "backend": ["system.organization.team.manager"] }] + "anyOf": [{ "backend": ["system.workspace.team.manager"] }] } }, "system.organization.role.view": { "granted": { - "anyOf": [{ "backend": ["system.organization.role.view_system_role","system.organization.role.view_team_role"] }] + "anyOf": [{ "backend": ["system.settings.role.view"] }] } }, "system.organization.role.system.view": { "granted": { - "anyOf": [{ "backend": ["system.organization.role.view_system_role"] }] + "anyOf": [{ "backend": ["system.settings.role.view"] }] } }, "system.organization.role.system.add": { @@ -101,7 +101,7 @@ export const PERMISSION_DEFINITION = [ }, "system.organization.role.team.view": { "granted": { - "anyOf": [{ "backend": ["system.organization.role.view_team_role"] }] + "anyOf": [{ "backend": ["system.settings.role.view"] }] } }, "system.organization.role.team.add": { @@ -121,22 +121,22 @@ export const PERMISSION_DEFINITION = [ }, "system.api_market.service_classification.view": { "granted": { - "anyOf": [{ "backend": ["system.settings.service_classification.view"] }] + "anyOf": [{ "backend": ["system.settings.general.view"] }] } }, "system.api_market.service_classification.add": { "granted": { - "anyOf": [{ "backend": ["system.settings.service_classification.manager"] }] + "anyOf": [{ "backend": ["system.settings.general.manager"] }] } }, "system.api_market.service_classification.edit": { "granted": { - "anyOf": [{ "backend": ["system.settings.service_classification.manager"] }] + "anyOf": [{ "backend": ["system.settings.general.manager"] }] } }, "system.api_market.service_classification.delete": { "granted": { - "anyOf": [{ "backend": ["system.settings.service_classification.manager"] }] + "anyOf": [{ "backend": ["system.settings.general.manager"] }] } }, "system.devops.system_setting.view": { @@ -149,94 +149,94 @@ export const PERMISSION_DEFINITION = [ "anyOf": [{ "backend": ["system.settings.general.manager"] }] } }, - "system.dashboard.run_view.view":{ + "system.analysis.run_view.view":{ "granted": { - "anyOf": [{ "backend": ['system.dashboard.run_view.view'] }] + "anyOf": [{ "backend": ['system.analysis.run_view.view'] }] } }, - "system.devops.data_source.view":{ + "system.settings.data_source.view":{ "granted":{ - "anyOf":[{"backend":['system.devops.data_source.view']}] + "anyOf":[{"backend":['system.settings.data_source.view']}] } }, "system.devops.data_source.edit":{ "granted":{ - "anyOf":[{"backend":['system.devops.data_source.manager']}] + "anyOf":[{"backend":['system.settings.data_source.manager']}] } }, - "system.devops.cluster.view": { + "system.settings.api_gateway.view": { "granted": { - "anyOf": [{ "backend": ["system.devops.cluster.view"] }] + "anyOf": [{ "backend": ["system.settings.api_gateway.view"] }] } }, "system.devops.cluster.add": { "granted": { - "anyOf": [{ "backend": ["system.devops.cluster.manager"] }] + "anyOf": [{ "backend": ["system.settings.api_gateway.manager"] }] } }, "system.devops.cluster.edit": { "granted": { - "anyOf": [{ "backend": ["system.devops.cluster.manager"] }] + "anyOf": [{ "backend": ["system.settings.api_gateway.manager"] }] } }, "system.devops.cluster.delete": { "granted": { - "anyOf": [{ "backend": ["system.devops.cluster.manager"] }] + "anyOf": [{ "backend": ["system.settings.api_gateway.manager"] }] } }, - "system.devops.ai_provider.view": { + "system.settings.ai_provider.view": { "granted": { - "anyOf": [{ "backend": ["system.devops.ai_provider.view"] }] + "anyOf": [{ "backend": ["system.settings.ai_provider.view"] }] } }, "system.devops.ai_provider.edit": { "granted": { - "anyOf": [{ "backend": ["system.devops.ai_provider.manager"] }] + "anyOf": [{ "backend": ["system.settings.ai_provider.manager"] }] } }, - "system.devops.ssl_certificate.view": { + "system.settings.ssl_certificate.view": { "granted": { - "anyOf": [{ "backend": ["system.devops.ssl_certificate.view"] }] + "anyOf": [{ "backend": ["system.settings.ssl_certificate.view"] }] } }, "system.devops.ssl_certificate.add": { "granted": { - "anyOf": [{ "backend": ["system.devops.ssl_certificate.manager"] }] + "anyOf": [{ "backend": ["system.settings.ssl_certificate.manager"] }] } }, "system.devops.ssl_certificate.edit": { "granted": { - "anyOf": [{ "backend": ["system.devops.ssl_certificate.manager"] }] + "anyOf": [{ "backend": ["system.settings.ssl_certificate.manager"] }] } }, "system.devops.ssl_certificate.delete": { "granted": { - "anyOf": [{ "backend": ["system.devops.ssl_certificate.manager"] }] + "anyOf": [{ "backend": ["system.settings.ssl_certificate.manager"] }] } }, - "system.devops.log_configuration.view": { + "system.settings.log_configuration.view": { "granted": { - "anyOf": [{ "backend": ["system.devops.log_configuration.view"] }] + "anyOf": [{ "backend": ["system.settings.log_configuration.view"] }] } }, "system.devops.log_configuration.add": { "granted": { - "anyOf": [{ "backend": ["system.devops.log_configuration.manager"] }] + "anyOf": [{ "backend": ["system.settings.log_configuration.manager"] }] } }, "system.devops.log_configuration.edit": { "granted": { - "anyOf": [{ "backend": ["system.devops.log_configuration.manager"] }] + "anyOf": [{ "backend": ["system.settings.log_configuration.manager"] }] } }, "system.devops.log_configuration.publish": { "granted": { - "anyOf": [{ "backend": ["system.devops.log_configuration.manager"] }] + "anyOf": [{ "backend": ["system.settings.log_configuration.manager"] }] } }, "system.devops.log_configuration.delete": { "granted": { - "anyOf": [{ "backend": ["system.devops.log_configuration.manager"] }] + "anyOf": [{ "backend": ["system.settings.log_configuration.manager"] }] } }, "system.workspace.application.view_all": { @@ -244,19 +244,24 @@ export const PERMISSION_DEFINITION = [ "anyOf": [{ "backend": ["system.workspace.application.view_all"] }] } }, + "system.workspace.application.edit": { + "granted": { + "anyOf": [{ "backend": ["system.workspace.application.manager_all"] }] + } + }, "system.workspace.service.view_all": { "granted": { "anyOf": [{ "backend": ["system.workspace.service.view_all"] }] } }, - "system.workspace.team.view_all": { + "system.workspace.service.edit": { "granted": { - "anyOf": [{ "backend": ["system.workspace.team.view_all"] }] + "anyOf": [{ "backend": ["system.workspace.service.manager_all"] }] } }, - "system.workspace.api_market.view": { + "system.api_portal.api_portal.view": { "granted": { - "anyOf": [{ "backend": ["system.workspace.api_market.view"] }] + "anyOf": [{ "backend": ["system.api_portal.api_portal.view"] }] } }, "system.dashboard.dashboard.view": { @@ -284,6 +289,21 @@ export const PERMISSION_DEFINITION = [ "anyOf": [{ "backend": ["team.service.api_doc.manager"] }] } }, + "team.service.service_intro.view": { + "granted": { + "anyOf": [{ "backend": ["team.service.service_intro.view"] }] + } + }, + "team.service.service_intro.add": { + "granted": { + "anyOf": [{ "backend": [" team.service.service_intro.manager"] }] + } + }, + "team.service.service_intro.edit": { + "granted": { + "anyOf": [{ "backend": [" team.service.service_intro.manager"] }] + } + }, "team.service.api_doc.import": { "granted": { "anyOf": [{ "backend": ["team.service.api_doc.manager"] }] @@ -291,22 +311,22 @@ export const PERMISSION_DEFINITION = [ }, "team.service.router.view": { "granted": { - "anyOf": [{ "backend": ["team.service.router.view"] }] + "anyOf": [{ "backend": ["team.service.api.view"] }] } }, "team.service.router.add": { "granted": { - "anyOf": [{ "backend": ["team.service.router.manager"] }] + "anyOf": [{ "backend": ["team.service.api.manager"] }] } }, "team.service.router.edit": { "granted": { - "anyOf": [{ "backend": ["team.service.router.manager"] }] + "anyOf": [{ "backend": ["team.service.api.manager"] }] } }, "team.service.router.delete": { "granted": { - "anyOf": [{ "backend": ["team.service.router.manager"] }] + "anyOf": [{ "backend": ["team.service.api.manager"] }] } }, "team.service.upstream.view": { @@ -391,92 +411,92 @@ export const PERMISSION_DEFINITION = [ }, "team.service.service.view": { "granted": { - "anyOf": [{ "backend": [""] }] + "anyOf": [{ "backend": ["team.team.service.view"] }] } }, "team.service.service.add": { "granted": { - "anyOf": [{ "backend": ["team.service.service.manager"] }] + "anyOf": [{ "backend": ["team.team.service.manager","team.service.service.manager"] }] } }, "team.service.service.edit": { "granted": { - "anyOf": [{ "backend": ["team.service.service.manager"] }] + "anyOf": [{ "backend": ["team.team.service.manager","team.service.service.manager"] }] } }, "team.service.service.delete": { "granted": { - "anyOf": [{ "backend": ["team.service.service.manager"] }] + "anyOf": [{ "backend": ["team.team.service.manager","team.service.service.manager"] }] } }, "team.application.subscription.view": { "granted": { - "anyOf": [{ "backend": ["team.application.subscription.view"] }] + "anyOf": [{ "backend": ["team.consumer.subscription.view_subscribed_service"] }] } }, "team.application.subscription.add": { "granted": { - "anyOf": [{ "backend": ["team.application.subscription.manager"] }] + "anyOf": [{ "backend": ["team.consumer.subscription.subscribe"] }] } }, "team.application.subscription.edit": { "granted": { - "anyOf": [{ "backend": ["team.application.subscription.manager"] }] + "anyOf": [{ "backend": ["team.consumer.subscription.manager_subscribed_services"] }] } }, "team.application.subscription.delete": { "granted": { - "anyOf": [{ "backend": ["team.application.subscription.manager"] }] + "anyOf": [{ "backend": ["team.team.consumer.subscription.manager_subscribed_services"] }] } }, "team.application.application.view": { "granted": { - "anyOf": [{ "backend": ["team.application.application.view"] }] + "anyOf": [{ "backend": ["team.team.consumer.view"] }] } }, "team.application.application.add": { "granted": { - "anyOf": [{ "backend": ["team.application.application.manager"] }] + "anyOf": [{ "backend": ['team.team.consumer.manager',"team.consumer.application.manager"] }] } }, "team.application.application.edit": { "granted": { - "anyOf": [{ "backend": ["team.application.application.manager"] }] + "anyOf": [{ "backend": ['team.team.consumer.manager',"team.consumer.application.manager"] }] } }, "team.application.application.delete": { "granted": { - "anyOf": [{ "backend": ["team.application.application.manager"] }] + "anyOf": [{ "backend": ['team.team.consumer.manager',"team.consumer.application.manager"] }] } }, - "team.application.authorization.view": { + "team.consumer.authorization.view": { "granted": { - "anyOf": [{ "backend": ["team.application.authorization.view"] }] + "anyOf": [{ "backend": ["team.consumer.authorization.view"] }] } }, "team.application.authorization.add": { "granted": { - "anyOf": [{ "backend": ["team.application.authorization.manager"] }] + "anyOf": [{ "backend": ["team.consumer.authorization.manager"] }] } }, "team.application.authorization.edit": { "granted": { - "anyOf": [{ "backend": ["team.application.authorization.manager"] }] + "anyOf": [{ "backend": ["team.consumer.authorization.manager"] }] } }, "team.application.authorization.delete": { "granted": { - "anyOf": [{ "backend": ["team.application.authorization.manager"] }] + "anyOf": [{ "backend": ["team.consumer.authorization.manager"] }] } }, "team.application.authorization.cancelSubApply": { "granted": { - "anyOf": [{ "backend": ["team.application.authorization.manager"] }] + "anyOf": [{ "backend": ["team.consumer.authorization.manager"] }] } }, "team.application.authorization.cancelSub": { "granted": { - "anyOf": [{ "backend": ["team.application.authorization.manager"] }] + "anyOf": [{ "backend": ["team.consumer.authorization.manager"] }] } }, "team.team.team.view": { diff --git a/frontend/packages/common/src/const/permissions.yaml b/frontend/packages/common/src/const/permissions.yaml index cf54cb5b..f81d25ca 100644 --- a/frontend/packages/common/src/const/permissions.yaml +++ b/frontend/packages/common/src/const/permissions.yaml @@ -7,7 +7,7 @@ system: cname: '成员' value: 'member' access: - - system.organization.member.view + - system.settings.account.view - system.organization.member.add - system.organization.member.edit - system.organization.member.delete @@ -18,7 +18,7 @@ system: - name: team_manager cname: '团队管理' desc: '团队管理' - - system.organization.team.view + - system.workspace.team.view_all - system.organization.team.add - system.organization.team.edit - system.organization.team.delete @@ -55,7 +55,7 @@ system: cname: 集群 value: 'cluster' children: - - system.devops.cluster.view + - system.settings.api_gateway.view - system.devops.cluster.add - system.devops.cluster.edit - system.devops.cluster.delete @@ -63,7 +63,7 @@ system: cname: 证书 value: 'ssl_certificate' children: - - system.devops.ssl_certificate.view + - system.settings.ssl_certificate.view - system.devops.ssl_certificate.add - system.devops.ssl_certificate.edit - system.devops.ssl_certificate.delete @@ -71,7 +71,7 @@ system: cname: 日志 value: 'log_configuration' children: - - system.devops.log_configuration.view + - system.settings.log_configuration.view - system.devops.log_configuration.add - system.devops.log_configuration.edit - system.devops.log_configuration.publish @@ -99,7 +99,7 @@ system: cname: API市场 value: 'api_market' children: - - system.workspace.api_market.view + - system.api_portal.api_portal.view team: - name: service cname: 服务 @@ -172,8 +172,8 @@ team: cname: 访问授权 value: 'authorization' children: - - team.application.authorization.view - - team.application.authorization.manager + - team.consumer.authorization.view + - team.consumer.authorization.manager - team.application.authorization.add - team.application.authorization.edit - team.application.authorization.delete diff --git a/frontend/packages/core/src/pages/aiService/AiServiceInsideDocument.tsx b/frontend/packages/core/src/pages/aiService/AiServiceInsideDocument.tsx index 3dd2ef2b..9b9f32e2 100644 --- a/frontend/packages/core/src/pages/aiService/AiServiceInsideDocument.tsx +++ b/frontend/packages/core/src/pages/aiService/AiServiceInsideDocument.tsx @@ -137,7 +137,7 @@ const ServiceInsideDocument = ()=>{

{$t('最近一次更新者')}:{updater || '-'}{$t('最近一次更新时间')}:{updateTime || '-'}

- +
) diff --git a/frontend/packages/core/src/pages/aiService/AiServiceInsidePage.tsx b/frontend/packages/core/src/pages/aiService/AiServiceInsidePage.tsx index 946ec5db..0eba2efd 100644 --- a/frontend/packages/core/src/pages/aiService/AiServiceInsidePage.tsx +++ b/frontend/packages/core/src/pages/aiService/AiServiceInsidePage.tsx @@ -62,7 +62,7 @@ const AiServiceInsidePage:FC = ()=> { [ getItem({$t('API 路由')}, 'route',undefined,undefined,undefined,'team.service.router.view'), getItem({$t('API 文档')}, 'api',undefined,undefined,undefined,'team.service.api_doc.view'), - getItem({$t('使用说明')}, 'document',undefined,undefined,undefined,''), + getItem({$t('使用说明')}, 'document',undefined,undefined,undefined,'team.service.service_intro.view'), getItem({$t('发布')}, 'publish',undefined,undefined,undefined,'team.service.release.view'), ], 'group'), diff --git a/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterModelConfig.tsx b/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterModelConfig.tsx index 291769c4..916139c3 100644 --- a/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterModelConfig.tsx +++ b/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterModelConfig.tsx @@ -18,6 +18,7 @@ export type AiServiceRouterModelConfigProps = { } type AiServiceRouterModelConfigField = { + provider:string id:string config:string } @@ -57,6 +58,7 @@ const AiServiceRouterModelConfig = forwardRefx.id===data.provider.defaultLlm)?.config}) @@ -70,6 +72,10 @@ const AiServiceRouterModelConfig = forwardRef{ + getLlmList(entity.provider) + },[]) + return (
{ }
- +
diff --git a/frontend/packages/core/src/pages/logsettings/LogSettings.tsx b/frontend/packages/core/src/pages/logsettings/LogSettings.tsx index 7a55d37a..232cc8a5 100644 --- a/frontend/packages/core/src/pages/logsettings/LogSettings.tsx +++ b/frontend/packages/core/src/pages/logsettings/LogSettings.tsx @@ -45,7 +45,7 @@ const LogSettings = ()=>{ undefined, undefined, undefined, - 'system.devops.log_configuration.view') + 'system.settings.log_configuration.view') }) return newMenu },[state.language,menuItems]) diff --git a/frontend/packages/core/src/pages/resourcesettings/ResourceSettings.tsx b/frontend/packages/core/src/pages/resourcesettings/ResourceSettings.tsx index 780bf549..fe24c935 100644 --- a/frontend/packages/core/src/pages/resourcesettings/ResourceSettings.tsx +++ b/frontend/packages/core/src/pages/resourcesettings/ResourceSettings.tsx @@ -47,7 +47,7 @@ const LogSettings = ()=>{ undefined, undefined, undefined, - 'system.devops.log_configuration.view') + 'system.settings.log_configuration.view') }) return newMenu },[state.language,menuItems]) diff --git a/frontend/packages/core/src/pages/system/SystemConfig.tsx b/frontend/packages/core/src/pages/system/SystemConfig.tsx index 60b2e67d..51edbb50 100644 --- a/frontend/packages/core/src/pages/system/SystemConfig.tsx +++ b/frontend/packages/core/src/pages/system/SystemConfig.tsx @@ -292,7 +292,7 @@ const SystemConfig = forwardRef((_,ref) => { return ( <> - + ((_,ref) => { - + @@ -468,11 +468,11 @@ const SystemConfig = forwardRef((_,ref) => { }
{onEdit && <> - +

{$t('删除服务')}:{$t('删除操作不可恢复,请谨慎操作!')}

- +
diff --git a/frontend/packages/core/src/pages/system/SystemInsideDocument.tsx b/frontend/packages/core/src/pages/system/SystemInsideDocument.tsx index 5755ffa9..b07e2995 100644 --- a/frontend/packages/core/src/pages/system/SystemInsideDocument.tsx +++ b/frontend/packages/core/src/pages/system/SystemInsideDocument.tsx @@ -137,7 +137,7 @@ const ServiceInsideDocument = ()=>{

{$t('最近一次更新者')}:{updater || '-'}{$t('最近一次更新时间')}:{updateTime || '-'}

- +
) diff --git a/frontend/packages/core/src/pages/system/SystemInsidePage.tsx b/frontend/packages/core/src/pages/system/SystemInsidePage.tsx index 34974408..e7ef1176 100644 --- a/frontend/packages/core/src/pages/system/SystemInsidePage.tsx +++ b/frontend/packages/core/src/pages/system/SystemInsidePage.tsx @@ -62,7 +62,7 @@ const SystemInsidePage:FC = ()=> { getItem({$t('API 路由')}, 'route',undefined,undefined,undefined,'team.service.router.view'), getItem({$t('API 文档')}, 'api',undefined,undefined,undefined,'team.service.api_doc.view'), getItem({$t('上游')}, 'upstream',undefined,undefined,undefined,'team.service.upstream.view'), - getItem({$t('使用说明')}, 'document',undefined,undefined,undefined,''), + getItem({$t('使用说明')}, 'document',undefined,undefined,undefined,'team.service.service_intro.view'), getItem({$t('发布')}, 'publish',undefined,undefined,undefined,'team.service.release.view'), ], 'group'), diff --git a/frontend/packages/core/src/pages/team/TeamConfig.tsx b/frontend/packages/core/src/pages/team/TeamConfig.tsx index fa0ba3fe..dc0c7df5 100644 --- a/frontend/packages/core/src/pages/team/TeamConfig.tsx +++ b/frontend/packages/core/src/pages/team/TeamConfig.tsx @@ -37,7 +37,7 @@ const TeamConfig= forwardRef((props,ref) => { const {checkPermission,accessInit} = useGlobalContext() const pageType= useMemo(()=>{ if(!accessInit) return 'myteam' - return checkPermission('system.organization.team.view') ? 'manage' : 'myteam' + return checkPermission('system.workspace.team.view_all') ? 'manage' : 'myteam' },[checkPermission,accessInit]) const [canDelete, setCanDelete] = useState(false) From 4de0d29f3087ab095745bf62d3627a372f4f3969 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 28 Oct 2024 15:03:04 +0800 Subject: [PATCH 76/91] update access --- .../model-providers/openAI/openai.yaml | 9 - controller/system/iml.go | 5 +- module/ai/iml.go | 20 +- module/team/iml.go | 3 +- resources/access/access.yaml | 377 +++++++----------- resources/access/role.yaml | 212 +++++----- service/service/iml.go | 4 +- 7 files changed, 274 insertions(+), 356 deletions(-) diff --git a/ai-provider/model-runtime/model-providers/openAI/openai.yaml b/ai-provider/model-runtime/model-providers/openAI/openai.yaml index 475a8700..2d5cfca6 100644 --- a/ai-provider/model-runtime/model-providers/openAI/openai.yaml +++ b/ai-provider/model-runtime/model-providers/openAI/openai.yaml @@ -69,15 +69,6 @@ provider_credential_schema: placeholder: zh_Hans: 在此输入您的 API Key en_US: Enter your API Key - - variable: openai_organization - label: - zh_Hans: 组织 ID - en_US: Organization - type: text-input - required: false - placeholder: - zh_Hans: 在此输入您的组织 ID - en_US: Enter your Organization ID - variable: openai_api_base label: zh_Hans: API Base diff --git a/controller/system/iml.go b/controller/system/iml.go index b05cac3c..1c1269d5 100644 --- a/controller/system/iml.go +++ b/controller/system/iml.go @@ -381,8 +381,9 @@ func (i *imlInitController) createAIService(ctx context.Context, teamID string, Prompt: "You need to translate {{source_lang}} into {{target_lang}}, and the following is the content that needs to be translated.\n---\n{{text}}", } aiModel := &ai_api_dto.AiModel{ - Id: m.ID(), - Config: m.DefaultConfig(), + Id: m.ID(), + Config: m.DefaultConfig(), + Provider: providerId, } name := "Demo Translation API" description := "A demo that shows you how to use a prompt to create a Translation API." diff --git a/module/ai/iml.go b/module/ai/iml.go index a6a0c8a2..83616431 100644 --- a/module/ai/iml.go +++ b/module/ai/iml.go @@ -85,10 +85,7 @@ func (i *imlProviderModule) Providers(ctx context.Context) ([]*ai_dto.ProviderIt }) items := make([]*ai_dto.ProviderItem, 0, len(providers)) for _, v := range providers { - defaultLLM, has := v.DefaultModel(model_runtime.ModelTypeLLM) - if !has { - continue - } + item := &ai_dto.ProviderItem{ Id: v.ID(), Name: v.Name(), @@ -97,6 +94,10 @@ func (i *imlProviderModule) Providers(ctx context.Context) ([]*ai_dto.ProviderIt Sort: v.Sort(), } if info, has := providerMap[v.ID()]; has { + defaultLLM, has := v.GetModel(info.DefaultLLM) + if !has { + continue + } item.Configured = true item.DefaultLLM = defaultLLM.ID() item.DefaultLLMLogo = defaultLLM.Logo() @@ -279,10 +280,13 @@ func (i *imlProviderModule) UpdateProviderConfig(ctx context.Context, id string, if !errors.Is(err, gorm.ErrRecordNotFound) { return err } - //defaultLLm, ok := p.DefaultModel(model_runtime.ModelTypeLLM) - //if !ok { - // return fmt.Errorf("ai provider default llm not found") - //} + if input.DefaultLLM == "" { + defaultLLM, has := p.DefaultModel(model_runtime.ModelTypeLLM) + if !has { + return fmt.Errorf("ai provider default llm not found") + } + input.DefaultLLM = defaultLLM.ID() + } info = &ai.Provider{ Id: id, Name: p.Name(), diff --git a/module/team/iml.go b/module/team/iml.go index 4a291939..f8c4a1aa 100644 --- a/module/team/iml.go +++ b/module/team/iml.go @@ -145,7 +145,8 @@ func (m *imlTeamModule) Edit(ctx context.Context, id string, input *team_dto.Edi func (m *imlTeamModule) Delete(ctx context.Context, id string) error { err := m.transaction.Transaction(ctx, func(ctx context.Context) error { count, err := m.serviceService.Count(ctx, "", map[string]interface{}{ - "team": id, + "team": id, + "is_delete": false, }) if err != nil { return err diff --git a/resources/access/access.yaml b/resources/access/access.yaml index 76d3d327..a78cbe6b 100644 --- a/resources/access/access.yaml +++ b/resources/access/access.yaml @@ -1,21 +1,75 @@ system: - - name: organization -# cname: '组织管理' - value: 'organization' + - name: workspace + value: 'workspace' children: - - name: member -# cname: '成员' - value: 'member' + - name: consumer + value: 'application' + children: + - name: view all consumer + value: 'view_all' + guest_allow: true + - name: manager all consumer + value: "manager_all" + dependents: + - system.workspace.consumer.view_all + - name: service + value: 'service' + children: + - name: view all service + value: 'view_all' + guest_allow: true + - name: manager all consumer + value: "manager_all" + dependents: + - system.workspace.service.view_all + - name: team + value: 'team' + children: + - name: view all team + value: 'view_all' + guest_allow: true + - name: create + value: 'create' + - name: manager + value: 'manager' + dependents: + - system.workspace.team.view_all + - name: api portal + value: 'api_portal' + children: + - name: api portal + value: 'api_portal' + children: + - name: view + value: 'view' + guest_allow: true + - name: analysis + value: 'analysis' + children: + - name: run view + value: 'run_view' + children: + - name: view + value: 'view' + guest_allow: true + - name: system settings + value: 'settings' + children: + - name: general + value: 'general' + children: + - name: view + value: 'view' + guest_allow: true + - name: manager + value: 'manager' + - name: account + value: 'account' children: - name: view -# cname: '查看' value: 'view' guest_allow: true - apis: - - "GET:/api/v1/user/accounts" - - "GET:/api/v1/user/departments" - name: manager -# cname: '管理' value: 'manager' apis: - "POST:/api/v1/user/account" @@ -31,93 +85,20 @@ system: - "POST:/api/v1/user/department/member/remove" - "POST:/api/v1/account/role" dependents: - - system.organization.member.view - - name: team - cname: '团队' - value: 'team' - children: - - name: view -# cname: '查看' - value: 'view' - guest_allow: true - apis: - - "GET:/api/v1/manager/teams" - - "GET:/api/v1/manager/team" - - name: manager -# cname: '管理' - value: 'manager' - apis: - - "POST:/api/v1/manager/team" - - "PUT:/api/v1/manager/team" - - "DELETE:/api/v1/manager/team" - dependents: - - system.organization.team.view + - system.settings.account.view - name: role -# cname: '角色' value: 'role' children: - - name: view system role - cname: '查看系统角色' + - name: view guest_allow: true - value: 'view_system_role' + value: 'view' apis: - "GET:/api/v1/system/roles" - "GET:/api/v1/system/role" - - name: view team role - cname: '查看团队角色' - guest_allow: true - value: 'view_team_role' - apis: - "GET:/api/v1/team/roles" - "GET:/api/v1/team/role" - - name: System Settings -# cname: '系统设置' - value: 'settings' - children: - - name: service classification -# cname: '服务分类' - value: 'service_classification' - children: - - name: view -# cname: '查看' - value: 'view' - guest_allow: true -# apis: -# - "GET:/api/v1/catalogues" - - name: manager -# cname: '管理' - value: 'manager' - apis: - - "POST:/api/v1/catalogue" - - "PUT:/api/v1/catalogue" - - "DELETE:/api/v1/catalogue" - - "PUT:/api/v1/catalogue/sort" - dependents: - - system.settings.service_classification.view - - name: General -# cname: 常规设置 - value: 'general' - children: - - name: view -# cname: 查看 - value: 'view' - guest_allow: true - apis: -# - "GET:/api/v1/setting" - - name: manager -# cname: 管理 - value: 'manager' - apis: -# - "PUT:/api/v1/setting" - dependents: - - system.settings.general.view - - name: Devops -# cname: 运维 - value: 'devops' - children: - - name: cluster - cname: 集群 - value: 'cluster' + - name: api gateway + value: 'api_gateway' children: - name: view cname: 查看 @@ -126,53 +107,63 @@ system: apis: - "GET:/api/v1/cluster/nodes" - name: manager -# cname: 管理 value: 'manager' apis: - "PUT:/api/v1/cluster/reset" - "POST:/api/v1/cluster/check" + - name: ai provider + value: 'ai_provider' + children: + - name: view + value: 'view' + guest_allow: true + apis: + - "GET:/api/v1/ai/providers" + - "GET:/api/v1/ai/provider/config" + - name: manager + value: 'manager' + apis: + - "PUT:/api/v1/ai/provider/config" + - "PUT:/api/v1/ai/provider/default-llm" + dependents: + - system.settings.ai_provider.view - name: ssl certificate cname: 证书 value: 'ssl_certificate' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: - "GET:/api/v1/certificates" - "GET:/api/v1/certificate" - name: manager -# cname: 管理 value: 'manager' apis: - "POST:/api/v1/certificate" - "PUT:/api/v1/certificate" - "DELETE:/api/v1/certificate" dependents: - - system.devops.ssl_certificate.view + - system.settings.ssl_certificate.view - name: Data Source -# cname: '数据源' value: 'data_source' children: - name: view -# cname: '查看' value: 'view' guest_allow: true apis: - "GET:/api/v1/monitor/config" - name: manager -# cname: '管理' value: 'manager' apis: - "POST:/api/v1/monitor/config" - "PUT:/api/v1/monitor/config" + dependents: + - system.settings.data_source.view - name: log configuration -# cname: 日志 value: 'log_configuration' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: @@ -180,7 +171,6 @@ system: - "GET:/api/v1/dynamic/{name}/list" - "GET:/api/v1/dynamic/{name}/render" - name: manager -# cname: 管理 value: 'manager' apis: - "POST:/api/v1/dynamic/{name}" @@ -189,93 +179,13 @@ system: - "PUT:/api/v1/dynamic/{name}/online" - "PUT:/api/v1/dynamic/{name}/offline" dependents: - - system.devops.log_configuration.view - - name: ai provider -# cname: AI 模型供应商 - value: 'ai_provider' - children: - - name: view -# cname: 查看 - value: 'view' - guest_allow: true - apis: - - "GET:/api/v1/ai/providers" - - "GET:/api/v1/ai/provider/config" - - name: manager -# cname: 管理 - value: 'manager' - apis: - - "PUT:/api/v1/ai/provider/config" - - "PUT:/api/v1/ai/provider/default-llm" - dependents: - - system.devops.ai_provider.view - - - name: dashboard -# cname: 仪表盘 - value: 'dashboard' - children: - - name: run view -# cname: 运行视图 - value: 'run_view' - children: - - name: view -# cname: 查看 - value: 'view' - guest_allow: true - apis: - - "GET:/api/v1/monitor/overview/invoke" - - "GET:/api/v1/monitor/overview/message" - - "GET:/api/v1/monitor/overview/top10" - - "GET:/api/v1/monitor/overview/summary" - - name: workspace -# cname: 工作空间 - value: 'workspace' - children: - - name: application -# cname: 应用 - value: 'application' - children: - - name: view all application -# cname: 查看所有应用 - value: 'view_all' - guest_allow: true - apis: - - "GET:/api/v1/apps" - - name: service -# cname: 服务 - value: 'service' - children: - - name: view all service -# cname: 查看所有服务 - value: 'view_all' - guest_allow: true - apis: - - "GET:/api/v1/services" - - name: team -# cname: 团队 - value: 'team' - children: - - name: view all team -# cname: 查看所有团队 - value: 'view_all' - guest_allow: true - apis: - - "GET:/api/v1/manager/teams" - - name: api market - value: 'api_market' - children: - - name: view - value: 'view' - guest_allow: true - apis: - - "GET:/api/v1/catalogue/services" - - "GET:/api/v1/catalogue/service" + - system.settings.log_configuration.view team: - name: service value: 'service' children: - - name: router - value: 'router' + - name: api + value: 'api' children: - name: view value: 'view' @@ -291,43 +201,53 @@ team: - "POST:/api/v1/service/router" - "PUT:/api/v1/service/router" - "DELETE:/api/v1/service/router" + dependents: + - team.service.api.view - name: api doc cname: API文档 value: 'api_doc' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: - "GET:/api/v1/service/api_doc" - name: manager -# cname: 管理 value: 'manager' apis: - "PUT:/api/v1/service/api_doc" - "POST:/api/v1/service/api_doc/upload" + dependents: + - team.service.api_doc.view + - name: service intro + value: 'service_intro' + children: + - name: view + value: 'view' + guest_allow: true + - name: manager + value: 'manager' + dependents: + - team.service.service_intro.view - name: upstream cname: 上游 value: 'upstream' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: - "GET:/api/v1/service/upstream" - name: manager -# cname: 管理 value: 'manager' apis: - "PUT:/api/v1/service/upstream" + dependents: + - team.service.upstream.view - name: release -# cname: 发布 value: 'release' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: @@ -338,18 +258,16 @@ team: - "GET:/api/v1/service/release/preview" - "GET:/api/v1/service/publish/status" - name: manager -# cname: 管理 value: 'manager' apis: - "POST:/api/v1/service/publish/release/do" -# - "PUT:/api/v1/service/publish/execute" - "DELETE:/api/v1/service/release" + dependents: + - team.service.release.view - name: subscription management -# cname: 订阅方管理 value: 'subscription' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: @@ -357,50 +275,49 @@ team: - "GET:/api/v1/service/approval/subscribe" - "GET:/api/v1/service/subscribers" - name: manager -# cname: 管理 value: 'manager' apis: - "POST:/api/v1/service/approval/subscribe" - "POST:/api/v1/service/subscriber" - "DELETE:/api/v1/service/subscriber" + dependents: + - team.service.subscription.view - name: service -# cname: 服务管理 value: 'service' children: - name: manager -# cname: 管理 value: 'manager' apis: - "PUT:/api/v1/service/info" - "POST:/api/v1/team/service" - "DELETE:/api/v1/team/service" - - name: application - cname: 应用 - value: 'application' + dependents: + - team.service.service.manager + - name: consumer + value: 'consumer' children: - name: subscription Service cname: 订阅服务 value: 'subscription' children: - - name: view -# cname: 查看 - value: 'view' + - name: subscribe + value: 'subscribe' + + - name: view subscribed services + value: 'view_subscribed_service' guest_allow: true apis: - - "GET:/api/v1/application/subscriptions" - - name: manager -# cname: 管理 - value: 'manager' + - "GET:/api/v1/application/subscription" + - name: manager subscribed services + value: 'manager_subscribed_services' apis: - "POST:/api/v1/catalogue/service/subscribe" - "POST:/api/v1/application/subscription/cancel" - "POST:/api/v1/application/subscription/cancel_apply" - name: authorization -# cname: 访问授权 value: 'authorization' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: @@ -408,60 +325,66 @@ team: - "GET:/api/v1/app/authorizations" - "GET:/api/v1/app/authorization/details" - name: manager -# cname: 管理 value: 'manager' apis: - "POST:/api/v1/app/authorization" - "PUT:/api/v1/app/authorization" - "DELETE:/api/v1/app/authorization" - - name: application -# cname: 应用 + - name: consumer value: 'application' children: - name: manager -# cname: 管理 value: 'manager' apis: - "PUT:/api/v1/app/info" - "POST:/api/v1/team/app" - - "DELETE:/api/v1/app" - name: team -# cname: 团队 value: 'team' children: + - name: service + value: 'service' + children: + - name: view + value: 'view' + guest_allow: true + - name: manager + value: 'manager' + dependents: + - team.team.service.view + - name: consumer + value: 'consumer' + children: + - name: view + value: 'view' + guest_allow: true + - name: manager + value: 'manager' + dependents: + - team.team.consumer.view - name: member -# cname: 成员 value: 'member' children: - name: view -# cname: 查看 value: 'view' guest_allow: true - apis: - - "GET:/api/v1/team/members" - - "GET:/api/v1/team/members/toadd" - name: manager -# cname: 管理 value: 'manager' - apis: - - "POST:/api/v1/team/member" - - "DELETE:/api/v1/team/member" - - "PUT:/api/v1/team/member/role" + dependents: + - team.team.member.view - name: team -# cname: 团队管理 value: 'team' children: - name: view -# cname: '查看' value: 'view' guest_allow: true apis: - "GET:/api/v1/manager/teams" - "GET:/api/v1/manager/team" - name: manager -# cname: '管理' value: 'manager' apis: - "POST:/api/v1/manager/team" - "PUT:/api/v1/manager/team" - - "DELETE:/api/v1/manager/team" \ No newline at end of file + - "DELETE:/api/v1/manager/team" + dependents: + - team.team.team.view \ No newline at end of file diff --git a/resources/access/role.yaml b/resources/access/role.yaml index 5b752025..19772f90 100644 --- a/resources/access/role.yaml +++ b/resources/access/role.yaml @@ -2,163 +2,159 @@ system: - name: super admin value: super_admin permits: - - system.dashboard.run_view.view - - system.devops.ai_provider.manager - - system.devops.ai_provider.view - - system.devops.cluster.manager - - system.devops.cluster.view - - system.devops.data_source.manager - - system.devops.data_source.view - - system.devops.log_configuration.manager - - system.devops.log_configuration.view - - system.devops.ssl_certificate.manager - - system.devops.ssl_certificate.view - - system.organization.member.manager - - system.organization.member.view - - system.organization.role.view_system_role - - system.organization.role.view_team_role - - system.organization.team.manager - - system.organization.team.view + - system.analysis.run_view.view + - system.api_portal.api_portal.view + - system.settings.account.manager + - system.settings.account.view + - system.settings.ai_provider.manager + - system.settings.ai_provider.view + - system.settings.api_gateway.manager + - system.settings.api_gateway.view + - system.settings.data_source.manager + - system.settings.data_source.view - system.settings.general.manager - system.settings.general.view - - system.settings.service_classification.manager - - system.settings.service_classification.view - - system.workspace.api_market.view + - system.settings.log_configuration.manager + - system.settings.log_configuration.view + - system.settings.role.view + - system.settings.ssl_certificate.manager + - system.settings.ssl_certificate.view + - system.workspace.application.manager_all - system.workspace.application.view_all + - system.workspace.service.manager_all - system.workspace.service.view_all + - system.workspace.team.create + - system.workspace.team.manager - system.workspace.team.view_all supper: true - name: team admin value: team_admin permits: - - system.organization.role.view_team_role - - system.organization.team.manager - - system.organization.team.view - - system.workspace.api_market.view - - system.workspace.application.view_all - - system.workspace.service.view_all - - system.workspace.team.view_all + - system.api_portal.api_portal.view + - system.workspace.team.create - name: devops admin value: devops_admin permits: - - system.dashboard.run_view.view - - system.devops.ai_provider.manager - - system.devops.ai_provider.view - - system.devops.cluster.manager - - system.devops.cluster.view - - system.devops.data_source.manager - - system.devops.data_source.view - - system.devops.log_configuration.manager - - system.devops.log_configuration.view - - system.devops.ssl_certificate.manager - - system.devops.ssl_certificate.view - - system.workspace.api_market.view + - system.analysis.run_view.view + - system.api_portal.api_portal.view + - system.settings.ai_provider.manager + - system.settings.ai_provider.view + - system.settings.api_gateway.manager + - system.settings.api_gateway.view + - system.settings.data_source.manager + - system.settings.data_source.view + - system.settings.general.manager + - system.settings.general.view + - system.settings.log_configuration.manager + - system.settings.log_configuration.view + - system.settings.ssl_certificate.manager + - system.settings.ssl_certificate.view - system.workspace.application.view_all - system.workspace.service.view_all - system.workspace.team.view_all - - system.settings.general.manager - - system.settings.general.view - - system.settings.service_classification.manager - - system.settings.service_classification.view - name: general member value: member permits: - - system.workspace.api_market.view + - system.api_portal.api_portal.view default: true - - name: guest - value: guest - permits: - - system.settings.service_classification.view - - system.devops.cluster.view - - system.devops.log_configuration.view - - system.devops.ssl_certificate.view - - system.devops.monitor.view - - system.organization.member.view - - system.organization.role.view_system_role - - system.organization.role.view_team_role - - system.organization.team.view - - system.workspace.api_market.view - - system.workspace.application.view_all - - system.workspace.service.view_all - - system.workspace.team.view_all - - system.dashboard.run_view.view + team: - name: team admin value: team_admin permits: - - team.application.application.manager - - team.application.authorization.manager - - team.application.authorization.view - - team.application.subscription.manager - - team.application.subscription.view - - team.service.api_doc.view + - team.consumer.application.manager + - team.consumer.authorization.manager + - team.consumer.authorization.view + - team.consumer.subscription.manager_subscribed_services + - team.consumer.subscription.subscribe + - team.consumer.subscription.view_subscribed_service + - team.service.api.manager + - team.service.api.view - team.service.api_doc.manager - - team.service.router.manager - - team.service.router.view + - team.service.api_doc.view - team.service.release.manager - team.service.release.view - team.service.service.manager + - team.service.service_intro.manager + - team.service.service_intro.view - team.service.subscription.manager - team.service.subscription.view - team.service.upstream.manager - team.service.upstream.view + - team.team.consumer.manager + - team.team.consumer.view - team.team.member.manager - team.team.member.view + - team.team.service.manager + - team.team.service.view - team.team.team.manager - team.team.team.view supper: true - name: service admin value: service_admin permits: - - team.service.service.manager - - team.service.upstream.manager - - team.service.upstream.view - - team.service.api_doc.view + - team.service.api.manager + - team.service.api.view - team.service.api_doc.manager - - team.service.router.manager - - team.service.router.view - - team.service.subscription.manager - - team.service.subscription.view + - team.service.api_doc.view - team.service.release.manager - team.service.release.view + - team.service.service.manager + - team.service.service_intro.manager + - team.service.service_intro.view + - team.service.subscription.manager + - team.service.subscription.view + - team.service.upstream.manager + - team.service.upstream.view + - team.team.consumer.view - team.team.member.view + - team.team.service.manager + - team.team.service.view + - team.team.team.view - name: service developer value: service_developer permits: - - team.service.upstream.manager - - team.service.upstream.view - - team.service.api_doc.view + - team.service.api.manager + - team.service.api.view - team.service.api_doc.manager - - team.service.router.manager - - team.service.router.view + - team.service.api_doc.view - team.service.release.manager - team.service.release.view - - team.team.member.view - - name: application admin - value: application_admin - permits: - - team.application.application.manager - - team.application.authorization.manager - - team.application.authorization.view - - team.application.subscription.manager - - team.application.subscription.view - - team.team.member.view - - name: application developer - value: application_developer - permits: - - team.application.authorization.view - - team.application.subscription.manager - - team.application.subscription.view - - team.team.member.view - default: true - - name: guest - value: guest - permits: - - team.application.authorization.view - - team.application.subscription.view - - team.service.router.view - - team.service.release.view + - team.service.service.manager + - team.service.service_intro.manager + - team.service.service_intro.view + - team.service.subscription.manager - team.service.subscription.view + - team.service.upstream.manager - team.service.upstream.view + - team.team.consumer.view - team.team.member.view - - team.team.team.view \ No newline at end of file + - team.team.service.view + - team.team.team.view + - name: consumer admin + value: consumer_admin + permits: + - team.consumer.application.manager + - team.consumer.authorization.manager + - team.consumer.authorization.view + - team.consumer.subscription.manager_subscribed_services + - team.consumer.subscription.subscribe + - team.consumer.subscription.view_subscribed_service + - team.team.consumer.manager + - team.team.consumer.view + - team.team.member.view + - team.team.service.view + - team.team.team.view + - name: consumer developer + value: consumer_developer + permits: + - team.consumer.application.manager + - team.consumer.authorization.manager + - team.consumer.authorization.view + - team.consumer.subscription.subscribe + - team.consumer.subscription.view_subscribed_service + - team.team.consumer.view + - team.team.member.view + - team.team.service.view + - team.team.team.view + default: true diff --git a/service/service/iml.go b/service/service/iml.go index 69604366..e799e836 100644 --- a/service/service/iml.go +++ b/service/service/iml.go @@ -68,6 +68,7 @@ func (i *imlServiceService) SearchPublicServices(ctx context.Context, keyword st func (i *imlServiceService) ServiceCountByTeam(ctx context.Context, teamId ...string) (map[string]int64, error) { w := map[string]interface{}{ "as_server": true, + "is_delete": false, } if len(teamId) > 0 { w["team"] = teamId @@ -77,7 +78,8 @@ func (i *imlServiceService) ServiceCountByTeam(ctx context.Context, teamId ...st func (i *imlServiceService) AppCountByTeam(ctx context.Context, teamId ...string) (map[string]int64, error) { w := map[string]interface{}{ - "as_app": true, + "as_app": true, + "is_delete": false, } if len(teamId) > 0 { w["team"] = teamId From 44f0b704619b63107e82ca0d199611fa77acab6f Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:44:10 +0800 Subject: [PATCH 77/91] fix: Consumer list bugs --- .../api/AiServiceInsideRouterModelConfig.tsx | 1 - .../management/ServiceHubManagement.tsx | 34 +++++++++++++------ 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterModelConfig.tsx b/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterModelConfig.tsx index 916139c3..415a99f6 100644 --- a/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterModelConfig.tsx +++ b/frontend/packages/core/src/pages/aiService/api/AiServiceInsideRouterModelConfig.tsx @@ -58,7 +58,6 @@ const AiServiceRouterModelConfig = forwardRefx.id===data.provider.defaultLlm)?.config}) diff --git a/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx b/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx index e4d939ee..d43b954d 100644 --- a/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx +++ b/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx @@ -37,13 +37,14 @@ export default function ServiceHubManagement() { const [tableListDataSource, setTableListDataSource] = useState([]); const [tableSearchWord, setTableSearchWord] = useState('') -const getServiceList = ()=>{ +const getServiceList = (dataType?:'block'|'list')=>{ + dataType = dataType ?? dataShowType if(!accessInit){ - getGlobalAccessData()?.then?.(()=>{getServiceList()}) + getGlobalAccessData()?.then?.(()=>{getServiceList(dataType)}) return Promise.resolve({data:[], success:false}) } - if(dataShowType === 'list' && !tableHttpReload){ + if(dataType === 'list' && !tableHttpReload){ setTableHttpReload(true) return Promise.resolve({ data: tableListDataSource, @@ -52,7 +53,7 @@ const getServiceList = ()=>{ } setServiceLoading(true) - return fetchData>(!checkPermission('system.workspace.application.view_all') ? 'my_apps':'apps',{method:'GET',eoParams:{ team:teamId,keyword:tableSearchWord},eoTransformKeys:['api_num','subscribe_num','subscribe_verify_num','auth_num']}).then(response=>{ + return fetchData>(!checkPermission('system.workspace.application.view_all') ? 'my_apps':'apps',{method:'GET',eoParams:{ team: dataType === 'list' ? undefined : teamId,keyword:tableSearchWord},eoTransformKeys:['api_num','subscribe_num','subscribe_verify_num','auth_num']}).then(response=>{ const {code,data,msg} = response if(code === STATUS_CODE.SUCCESS){ setServiceList([...data.apps,{type:'addNewItem'}]) @@ -76,13 +77,27 @@ const getServiceList = ()=>{ const getTeamsList = ()=>{ + setPageLoading(true) if(!accessInit){ setTimeout(()=>{ - getGlobalAccessData()?.then?.(()=>{getTeamsList()}) - },200) + const accessInitd = getGlobalAccessData() + if(!accessInitd){ + setTimeout(()=>{ + getTeamsList() + },100) + return + } + const afterAccessInitd = getGlobalAccessData()?.then + if(!afterAccessInitd){ + setTimeout(()=>{ + getTeamsList() + },100) + return + } + afterAccessInitd(()=>{getTeamsList()}) + },100) return } - setPageLoading(true) fetchData>(!checkPermission('system.workspace.team.view_all') ?'simple/teams/mine' :'simple/teams',{method:'GET',eoTransformKeys:['app_num','subscribe_num']}).then(response=>{ const {code,data,msg} = response if(code === STATUS_CODE.SUCCESS){ @@ -169,7 +184,6 @@ useEffect(() => { ) getTeamsList() setAppName('') - console.log() }, []); @@ -244,13 +258,13 @@ useEffect(() => { customBtn={ setDataShowType(e.target.value)} + onChange={(e)=>{setDataShowType(e.target.value); setTableHttpReload(true); if(e.target.value === 'block'){getServiceList(e.target.value)}}} value={dataShowType} optionType="button" buttonStyle="solid" />} >{ - dataShowType === 'block' ? : openModal('add')} setTableHttpReload={setTableHttpReload} setTableSearchWord={setTableSearchWord} editApp={(row:ServiceHubAppListItem)=>{setAppName(row.name);navigateTo(`/consumer/${row.team.id}/inside/${row.id}/service`)}}/> + dataShowType === 'block' ? : getServiceList('list')} addNewApp={()=>openModal('add')} setTableHttpReload={setTableHttpReload} setTableSearchWord={setTableSearchWord} editApp={(row:ServiceHubAppListItem)=>{setAppName(row.name);navigateTo(`/consumer/${row.team.id}/inside/${row.id}/service`)}}/> } : From 0f0204b6470676f1224c41f97bac645e4da33f5c Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:00:15 +0800 Subject: [PATCH 78/91] fix: cosumer list bug --- .../management/ServiceHubManagement.tsx | 93 ++++++++++++------- 1 file changed, 60 insertions(+), 33 deletions(-) diff --git a/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx b/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx index d43b954d..932a84ec 100644 --- a/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx +++ b/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx @@ -76,42 +76,69 @@ const getServiceList = (dataType?:'block'|'list')=>{ }; - const getTeamsList = ()=>{ - setPageLoading(true) - if(!accessInit){ - setTimeout(()=>{ - const accessInitd = getGlobalAccessData() - if(!accessInitd){ - setTimeout(()=>{ - getTeamsList() - },100) - return + const getTeamsList = () => { + setPageLoading(true); + + const fetchTeams = () => { + fetchData>( + !checkPermission('system.workspace.team.view_all') + ? 'simple/teams/mine' + : 'simple/teams', + { + method: 'GET', + eoTransformKeys: ['app_num', 'subscribe_num'], } - const afterAccessInitd = getGlobalAccessData()?.then - if(!afterAccessInitd){ - setTimeout(()=>{ - getTeamsList() - },100) - return + ) + .then(response => { + const { code, data, msg } = response; + if (code === STATUS_CODE.SUCCESS) { + setTeamList( + data.teams.map((x: SimpleTeamItem) => ({ + label: ( +
+ + {x.name} + + + {x.appNum || 0} + +
+ ), + key: x.id, + })) + ); + if (!teamId && data.teams?.[0]?.id) { + navigateTo(data.teams[0].id); + } + } else { + message.error(msg || $t(RESPONSE_TIPS.error)); } - afterAccessInitd(()=>{getTeamsList()}) - },100) - return + }) + .finally(() => { + setPageLoading(false); + }); + }; + + if (!accessInit) { + const checkAccessData = () => { + const accessInitd = getGlobalAccessData(); + if (!accessInitd) { + setTimeout(checkAccessData, 100); + return; + } + + if (typeof accessInitd.then === 'function') { + accessInitd.then(fetchTeams); + } else { + fetchTeams(); + } + }; + + checkAccessData(); + } else { + fetchTeams(); } - fetchData>(!checkPermission('system.workspace.team.view_all') ?'simple/teams/mine' :'simple/teams',{method:'GET',eoTransformKeys:['app_num','subscribe_num']}).then(response=>{ - const {code,data,msg} = response - if(code === STATUS_CODE.SUCCESS){ - setTeamList(data.teams.map((x:SimpleTeamItem)=>({label:
{x.name}{x.appNum || 0}
, key:x.id}))) - if(!teamId && data.teams?.[0]?.id){ - navigateTo(data.teams[0].id) - } - }else{ - message.error(msg || $t(RESPONSE_TIPS.error)) - } - }).finally(()=>{ - setPageLoading(false) - }) -} +}; const openModal = async (type:'add'|'edit'|'delete')=>{ From e5d85bb3dfdf0fd9dcf08608da69b8f0f52bd637 Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:15:38 +0800 Subject: [PATCH 79/91] fix: Modify access fields --- frontend/packages/common/src/const/permissions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/packages/common/src/const/permissions.ts b/frontend/packages/common/src/const/permissions.ts index 15e18a74..5f0530ba 100644 --- a/frontend/packages/common/src/const/permissions.ts +++ b/frontend/packages/common/src/const/permissions.ts @@ -296,12 +296,12 @@ export const PERMISSION_DEFINITION = [ }, "team.service.service_intro.add": { "granted": { - "anyOf": [{ "backend": [" team.service.service_intro.manager"] }] + "anyOf": [{ "backend": ["team.service.service_intro.manager"] }] } }, "team.service.service_intro.edit": { "granted": { - "anyOf": [{ "backend": [" team.service.service_intro.manager"] }] + "anyOf": [{ "backend": ["team.service.service_intro.manager"] }] } }, "team.service.api_doc.import": { From 79497489518a08a81a52bb21b4b3106e03efbb63 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 28 Oct 2024 18:27:37 +0800 Subject: [PATCH 80/91] update permission --- module/ai/iml.go | 35 ++- resources/access/access.yaml | 387 ++++++++++++------------------- resources/access/role.yaml | 212 +++++++++-------- resources/locale/i18n/zh-CN.json | 38 +-- 4 files changed, 292 insertions(+), 380 deletions(-) diff --git a/module/ai/iml.go b/module/ai/iml.go index a6a0c8a2..58710ff2 100644 --- a/module/ai/iml.go +++ b/module/ai/iml.go @@ -85,10 +85,7 @@ func (i *imlProviderModule) Providers(ctx context.Context) ([]*ai_dto.ProviderIt }) items := make([]*ai_dto.ProviderItem, 0, len(providers)) for _, v := range providers { - defaultLLM, has := v.DefaultModel(model_runtime.ModelTypeLLM) - if !has { - continue - } + item := &ai_dto.ProviderItem{ Id: v.ID(), Name: v.Name(), @@ -97,6 +94,10 @@ func (i *imlProviderModule) Providers(ctx context.Context) ([]*ai_dto.ProviderIt Sort: v.Sort(), } if info, has := providerMap[v.ID()]; has { + defaultLLM, has := v.GetModel(info.DefaultLLM) + if !has { + continue + } item.Configured = true item.DefaultLLM = defaultLLM.ID() item.DefaultLLMLogo = defaultLLM.Logo() @@ -279,10 +280,13 @@ func (i *imlProviderModule) UpdateProviderConfig(ctx context.Context, id string, if !errors.Is(err, gorm.ErrRecordNotFound) { return err } - //defaultLLm, ok := p.DefaultModel(model_runtime.ModelTypeLLM) - //if !ok { - // return fmt.Errorf("ai provider default llm not found") - //} + if input.DefaultLLM == "" { + defaultLLM, has := p.DefaultModel(model_runtime.ModelTypeLLM) + if !has { + return fmt.Errorf("ai provider default llm not found") + } + input.DefaultLLM = defaultLLM.ID() + } info = &ai.Provider{ Id: id, Name: p.Name(), @@ -344,20 +348,13 @@ func (i *imlProviderModule) UpdateProviderDefaultLLM(ctx context.Context, id str }) } -func (i *imlProviderModule) getAiProviders(ctx context.Context, clusterId string) ([]*gateway.DynamicRelease, error) { - list, err := i.providerService.List(ctx, clusterId) - if err != nil { - return nil, err - } +func (i *imlProviderModule) getAiProviders(ctx context.Context) ([]*gateway.DynamicRelease, error) { + list, err := i.providerService.List(ctx) if err != nil { return nil, err } providers := make([]*gateway.DynamicRelease, 0, len(list)) for _, p := range list { - if !p.Status { - // 关闭 - continue - } cfg := make(map[string]interface{}) err = json.Unmarshal([]byte(p.Config), &cfg) if err != nil { @@ -380,7 +377,7 @@ func (i *imlProviderModule) getAiProviders(ctx context.Context, clusterId string return providers, nil } func (i *imlProviderModule) initGateway(ctx context.Context, clusterId string, clientDriver gateway.IClientDriver) error { - providers, err := i.getAiProviders(ctx, clusterId) + providers, err := i.getAiProviders(ctx) if err != nil { return err } @@ -397,7 +394,7 @@ func (i *imlProviderModule) initGateway(ctx context.Context, clusterId string, c if err != nil { return err } - err = client.Online(ctx, providers...) + err = client.Online(ctx, p) if err != nil { return err } diff --git a/resources/access/access.yaml b/resources/access/access.yaml index 76d3d327..4008e5e1 100644 --- a/resources/access/access.yaml +++ b/resources/access/access.yaml @@ -1,21 +1,75 @@ system: - - name: organization -# cname: '组织管理' - value: 'organization' + - name: workspace + value: 'workspace' children: - - name: member -# cname: '成员' - value: 'member' + - name: consumer + value: 'application' + children: + - name: view all consumer + value: 'view_all' + guest_allow: true + - name: manager all consumer + value: "manager_all" + dependents: + - system.workspace.consumer.view_all + - name: service + value: 'service' + children: + - name: view all service + value: 'view_all' + guest_allow: true + - name: manager all consumer + value: "manager_all" + dependents: + - system.workspace.service.view_all + - name: team + value: 'team' + children: + - name: view all team + value: 'view_all' + guest_allow: true + - name: create + value: 'create' + - name: manager + value: 'manager' + dependents: + - system.workspace.team.view_all + - name: api portal + value: 'api_portal' + children: + - name: api portal + value: 'api_portal' + children: + - name: view + value: 'view' + guest_allow: true + - name: analysis + value: 'analysis' + children: + - name: run view + value: 'run_view' + children: + - name: view + value: 'view' + guest_allow: true + - name: system settings + value: 'settings' + children: + - name: general + value: 'general' + children: + - name: view + value: 'view' + guest_allow: true + - name: manager + value: 'manager' + - name: account + value: 'account' children: - name: view -# cname: '查看' value: 'view' guest_allow: true - apis: - - "GET:/api/v1/user/accounts" - - "GET:/api/v1/user/departments" - name: manager -# cname: '管理' value: 'manager' apis: - "POST:/api/v1/user/account" @@ -31,93 +85,20 @@ system: - "POST:/api/v1/user/department/member/remove" - "POST:/api/v1/account/role" dependents: - - system.organization.member.view - - name: team - cname: '团队' - value: 'team' - children: - - name: view -# cname: '查看' - value: 'view' - guest_allow: true - apis: - - "GET:/api/v1/manager/teams" - - "GET:/api/v1/manager/team" - - name: manager -# cname: '管理' - value: 'manager' - apis: - - "POST:/api/v1/manager/team" - - "PUT:/api/v1/manager/team" - - "DELETE:/api/v1/manager/team" - dependents: - - system.organization.team.view + - system.settings.account.view - name: role -# cname: '角色' value: 'role' children: - - name: view system role - cname: '查看系统角色' + - name: view guest_allow: true - value: 'view_system_role' + value: 'view' apis: - "GET:/api/v1/system/roles" - "GET:/api/v1/system/role" - - name: view team role - cname: '查看团队角色' - guest_allow: true - value: 'view_team_role' - apis: - "GET:/api/v1/team/roles" - "GET:/api/v1/team/role" - - name: System Settings -# cname: '系统设置' - value: 'settings' - children: - - name: service classification -# cname: '服务分类' - value: 'service_classification' - children: - - name: view -# cname: '查看' - value: 'view' - guest_allow: true -# apis: -# - "GET:/api/v1/catalogues" - - name: manager -# cname: '管理' - value: 'manager' - apis: - - "POST:/api/v1/catalogue" - - "PUT:/api/v1/catalogue" - - "DELETE:/api/v1/catalogue" - - "PUT:/api/v1/catalogue/sort" - dependents: - - system.settings.service_classification.view - - name: General -# cname: 常规设置 - value: 'general' - children: - - name: view -# cname: 查看 - value: 'view' - guest_allow: true - apis: -# - "GET:/api/v1/setting" - - name: manager -# cname: 管理 - value: 'manager' - apis: -# - "PUT:/api/v1/setting" - dependents: - - system.settings.general.view - - name: Devops -# cname: 运维 - value: 'devops' - children: - - name: cluster - cname: 集群 - value: 'cluster' + - name: api gateway + value: 'api_gateway' children: - name: view cname: 查看 @@ -126,53 +107,63 @@ system: apis: - "GET:/api/v1/cluster/nodes" - name: manager -# cname: 管理 value: 'manager' apis: - "PUT:/api/v1/cluster/reset" - "POST:/api/v1/cluster/check" + - name: ai provider + value: 'ai_provider' + children: + - name: view + value: 'view' + guest_allow: true + apis: + - "GET:/api/v1/ai/providers" + - "GET:/api/v1/ai/provider/config" + - name: manager + value: 'manager' + apis: + - "PUT:/api/v1/ai/provider/config" + - "PUT:/api/v1/ai/provider/default-llm" + dependents: + - system.settings.ai_provider.view - name: ssl certificate cname: 证书 value: 'ssl_certificate' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: - "GET:/api/v1/certificates" - "GET:/api/v1/certificate" - name: manager -# cname: 管理 value: 'manager' apis: - "POST:/api/v1/certificate" - "PUT:/api/v1/certificate" - "DELETE:/api/v1/certificate" dependents: - - system.devops.ssl_certificate.view - - name: Data Source -# cname: '数据源' + - system.settings.ssl_certificate.view + - name: data source value: 'data_source' children: - name: view -# cname: '查看' value: 'view' guest_allow: true apis: - "GET:/api/v1/monitor/config" - name: manager -# cname: '管理' value: 'manager' apis: - "POST:/api/v1/monitor/config" - "PUT:/api/v1/monitor/config" + dependents: + - system.settings.data_source.view - name: log configuration -# cname: 日志 value: 'log_configuration' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: @@ -180,7 +171,6 @@ system: - "GET:/api/v1/dynamic/{name}/list" - "GET:/api/v1/dynamic/{name}/render" - name: manager -# cname: 管理 value: 'manager' apis: - "POST:/api/v1/dynamic/{name}" @@ -189,93 +179,13 @@ system: - "PUT:/api/v1/dynamic/{name}/online" - "PUT:/api/v1/dynamic/{name}/offline" dependents: - - system.devops.log_configuration.view - - name: ai provider -# cname: AI 模型供应商 - value: 'ai_provider' - children: - - name: view -# cname: 查看 - value: 'view' - guest_allow: true - apis: - - "GET:/api/v1/ai/providers" - - "GET:/api/v1/ai/provider/config" - - name: manager -# cname: 管理 - value: 'manager' - apis: - - "PUT:/api/v1/ai/provider/config" - - "PUT:/api/v1/ai/provider/default-llm" - dependents: - - system.devops.ai_provider.view - - - name: dashboard -# cname: 仪表盘 - value: 'dashboard' - children: - - name: run view -# cname: 运行视图 - value: 'run_view' - children: - - name: view -# cname: 查看 - value: 'view' - guest_allow: true - apis: - - "GET:/api/v1/monitor/overview/invoke" - - "GET:/api/v1/monitor/overview/message" - - "GET:/api/v1/monitor/overview/top10" - - "GET:/api/v1/monitor/overview/summary" - - name: workspace -# cname: 工作空间 - value: 'workspace' - children: - - name: application -# cname: 应用 - value: 'application' - children: - - name: view all application -# cname: 查看所有应用 - value: 'view_all' - guest_allow: true - apis: - - "GET:/api/v1/apps" - - name: service -# cname: 服务 - value: 'service' - children: - - name: view all service -# cname: 查看所有服务 - value: 'view_all' - guest_allow: true - apis: - - "GET:/api/v1/services" - - name: team -# cname: 团队 - value: 'team' - children: - - name: view all team -# cname: 查看所有团队 - value: 'view_all' - guest_allow: true - apis: - - "GET:/api/v1/manager/teams" - - name: api market - value: 'api_market' - children: - - name: view - value: 'view' - guest_allow: true - apis: - - "GET:/api/v1/catalogue/services" - - "GET:/api/v1/catalogue/service" + - system.settings.log_configuration.view team: - name: service value: 'service' children: - - name: router - value: 'router' + - name: api + value: 'api' children: - name: view value: 'view' @@ -291,43 +201,53 @@ team: - "POST:/api/v1/service/router" - "PUT:/api/v1/service/router" - "DELETE:/api/v1/service/router" + dependents: + - team.service.api.view - name: api doc cname: API文档 value: 'api_doc' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: - "GET:/api/v1/service/api_doc" - name: manager -# cname: 管理 value: 'manager' apis: - "PUT:/api/v1/service/api_doc" - "POST:/api/v1/service/api_doc/upload" + dependents: + - team.service.api_doc.view + - name: service intro + value: 'service_intro' + children: + - name: view + value: 'view' + guest_allow: true + - name: manager + value: 'manager' + dependents: + - team.service.service_intro.view - name: upstream cname: 上游 value: 'upstream' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: - "GET:/api/v1/service/upstream" - name: manager -# cname: 管理 value: 'manager' apis: - "PUT:/api/v1/service/upstream" + dependents: + - team.service.upstream.view - name: release -# cname: 发布 value: 'release' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: @@ -338,18 +258,16 @@ team: - "GET:/api/v1/service/release/preview" - "GET:/api/v1/service/publish/status" - name: manager -# cname: 管理 value: 'manager' apis: - "POST:/api/v1/service/publish/release/do" -# - "PUT:/api/v1/service/publish/execute" - "DELETE:/api/v1/service/release" - - name: subscription management -# cname: 订阅方管理 + dependents: + - team.service.release.view + - name: subscription review value: 'subscription' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: @@ -357,50 +275,48 @@ team: - "GET:/api/v1/service/approval/subscribe" - "GET:/api/v1/service/subscribers" - name: manager -# cname: 管理 value: 'manager' apis: - "POST:/api/v1/service/approval/subscribe" - "POST:/api/v1/service/subscriber" - "DELETE:/api/v1/service/subscriber" + dependents: + - team.service.subscription.view - name: service -# cname: 服务管理 value: 'service' children: - name: manager -# cname: 管理 value: 'manager' apis: - "PUT:/api/v1/service/info" - "POST:/api/v1/team/service" - "DELETE:/api/v1/team/service" - - name: application - cname: 应用 - value: 'application' + dependents: + - team.service.service.manager + - name: consumer + value: 'consumer' children: - - name: subscription Service + - name: subscription service cname: 订阅服务 value: 'subscription' children: - - name: view -# cname: 查看 - value: 'view' + - name: allow subscribe service + value: 'subscribe' + - name: view subscribed services + value: 'view_subscribed_service' guest_allow: true apis: - - "GET:/api/v1/application/subscriptions" - - name: manager -# cname: 管理 - value: 'manager' + - "GET:/api/v1/application/subscription" + - name: manager subscribed services + value: 'manager_subscribed_services' apis: - "POST:/api/v1/catalogue/service/subscribe" - "POST:/api/v1/application/subscription/cancel" - "POST:/api/v1/application/subscription/cancel_apply" - name: authorization -# cname: 访问授权 value: 'authorization' children: - name: view -# cname: 查看 value: 'view' guest_allow: true apis: @@ -408,60 +324,61 @@ team: - "GET:/api/v1/app/authorizations" - "GET:/api/v1/app/authorization/details" - name: manager -# cname: 管理 value: 'manager' apis: - "POST:/api/v1/app/authorization" - "PUT:/api/v1/app/authorization" - "DELETE:/api/v1/app/authorization" - - name: application -# cname: 应用 + - name: consumer value: 'application' children: - name: manager -# cname: 管理 value: 'manager' apis: - "PUT:/api/v1/app/info" - "POST:/api/v1/team/app" - - "DELETE:/api/v1/app" - name: team -# cname: 团队 value: 'team' children: + - name: service + value: 'service' + children: + - name: view + value: 'view' + guest_allow: true + - name: manager + value: 'manager' + dependents: + - team.team.service.view + - name: consumer + value: 'consumer' + children: + - name: view + value: 'view' + guest_allow: true + - name: manager + value: 'manager' + dependents: + - team.team.consumer.view - name: member -# cname: 成员 value: 'member' children: - name: view -# cname: 查看 value: 'view' guest_allow: true - apis: - - "GET:/api/v1/team/members" - - "GET:/api/v1/team/members/toadd" - name: manager -# cname: 管理 value: 'manager' - apis: - - "POST:/api/v1/team/member" - - "DELETE:/api/v1/team/member" - - "PUT:/api/v1/team/member/role" - - name: team -# cname: 团队管理 + dependents: + - team.team.member.view + - name: team settings value: 'team' children: - name: view -# cname: '查看' value: 'view' guest_allow: true apis: - - "GET:/api/v1/manager/teams" - - "GET:/api/v1/manager/team" - name: manager -# cname: '管理' value: 'manager' apis: - - "POST:/api/v1/manager/team" - - "PUT:/api/v1/manager/team" - - "DELETE:/api/v1/manager/team" \ No newline at end of file + dependents: + - team.team.team.view \ No newline at end of file diff --git a/resources/access/role.yaml b/resources/access/role.yaml index 5b752025..19772f90 100644 --- a/resources/access/role.yaml +++ b/resources/access/role.yaml @@ -2,163 +2,159 @@ system: - name: super admin value: super_admin permits: - - system.dashboard.run_view.view - - system.devops.ai_provider.manager - - system.devops.ai_provider.view - - system.devops.cluster.manager - - system.devops.cluster.view - - system.devops.data_source.manager - - system.devops.data_source.view - - system.devops.log_configuration.manager - - system.devops.log_configuration.view - - system.devops.ssl_certificate.manager - - system.devops.ssl_certificate.view - - system.organization.member.manager - - system.organization.member.view - - system.organization.role.view_system_role - - system.organization.role.view_team_role - - system.organization.team.manager - - system.organization.team.view + - system.analysis.run_view.view + - system.api_portal.api_portal.view + - system.settings.account.manager + - system.settings.account.view + - system.settings.ai_provider.manager + - system.settings.ai_provider.view + - system.settings.api_gateway.manager + - system.settings.api_gateway.view + - system.settings.data_source.manager + - system.settings.data_source.view - system.settings.general.manager - system.settings.general.view - - system.settings.service_classification.manager - - system.settings.service_classification.view - - system.workspace.api_market.view + - system.settings.log_configuration.manager + - system.settings.log_configuration.view + - system.settings.role.view + - system.settings.ssl_certificate.manager + - system.settings.ssl_certificate.view + - system.workspace.application.manager_all - system.workspace.application.view_all + - system.workspace.service.manager_all - system.workspace.service.view_all + - system.workspace.team.create + - system.workspace.team.manager - system.workspace.team.view_all supper: true - name: team admin value: team_admin permits: - - system.organization.role.view_team_role - - system.organization.team.manager - - system.organization.team.view - - system.workspace.api_market.view - - system.workspace.application.view_all - - system.workspace.service.view_all - - system.workspace.team.view_all + - system.api_portal.api_portal.view + - system.workspace.team.create - name: devops admin value: devops_admin permits: - - system.dashboard.run_view.view - - system.devops.ai_provider.manager - - system.devops.ai_provider.view - - system.devops.cluster.manager - - system.devops.cluster.view - - system.devops.data_source.manager - - system.devops.data_source.view - - system.devops.log_configuration.manager - - system.devops.log_configuration.view - - system.devops.ssl_certificate.manager - - system.devops.ssl_certificate.view - - system.workspace.api_market.view + - system.analysis.run_view.view + - system.api_portal.api_portal.view + - system.settings.ai_provider.manager + - system.settings.ai_provider.view + - system.settings.api_gateway.manager + - system.settings.api_gateway.view + - system.settings.data_source.manager + - system.settings.data_source.view + - system.settings.general.manager + - system.settings.general.view + - system.settings.log_configuration.manager + - system.settings.log_configuration.view + - system.settings.ssl_certificate.manager + - system.settings.ssl_certificate.view - system.workspace.application.view_all - system.workspace.service.view_all - system.workspace.team.view_all - - system.settings.general.manager - - system.settings.general.view - - system.settings.service_classification.manager - - system.settings.service_classification.view - name: general member value: member permits: - - system.workspace.api_market.view + - system.api_portal.api_portal.view default: true - - name: guest - value: guest - permits: - - system.settings.service_classification.view - - system.devops.cluster.view - - system.devops.log_configuration.view - - system.devops.ssl_certificate.view - - system.devops.monitor.view - - system.organization.member.view - - system.organization.role.view_system_role - - system.organization.role.view_team_role - - system.organization.team.view - - system.workspace.api_market.view - - system.workspace.application.view_all - - system.workspace.service.view_all - - system.workspace.team.view_all - - system.dashboard.run_view.view + team: - name: team admin value: team_admin permits: - - team.application.application.manager - - team.application.authorization.manager - - team.application.authorization.view - - team.application.subscription.manager - - team.application.subscription.view - - team.service.api_doc.view + - team.consumer.application.manager + - team.consumer.authorization.manager + - team.consumer.authorization.view + - team.consumer.subscription.manager_subscribed_services + - team.consumer.subscription.subscribe + - team.consumer.subscription.view_subscribed_service + - team.service.api.manager + - team.service.api.view - team.service.api_doc.manager - - team.service.router.manager - - team.service.router.view + - team.service.api_doc.view - team.service.release.manager - team.service.release.view - team.service.service.manager + - team.service.service_intro.manager + - team.service.service_intro.view - team.service.subscription.manager - team.service.subscription.view - team.service.upstream.manager - team.service.upstream.view + - team.team.consumer.manager + - team.team.consumer.view - team.team.member.manager - team.team.member.view + - team.team.service.manager + - team.team.service.view - team.team.team.manager - team.team.team.view supper: true - name: service admin value: service_admin permits: - - team.service.service.manager - - team.service.upstream.manager - - team.service.upstream.view - - team.service.api_doc.view + - team.service.api.manager + - team.service.api.view - team.service.api_doc.manager - - team.service.router.manager - - team.service.router.view - - team.service.subscription.manager - - team.service.subscription.view + - team.service.api_doc.view - team.service.release.manager - team.service.release.view + - team.service.service.manager + - team.service.service_intro.manager + - team.service.service_intro.view + - team.service.subscription.manager + - team.service.subscription.view + - team.service.upstream.manager + - team.service.upstream.view + - team.team.consumer.view - team.team.member.view + - team.team.service.manager + - team.team.service.view + - team.team.team.view - name: service developer value: service_developer permits: - - team.service.upstream.manager - - team.service.upstream.view - - team.service.api_doc.view + - team.service.api.manager + - team.service.api.view - team.service.api_doc.manager - - team.service.router.manager - - team.service.router.view + - team.service.api_doc.view - team.service.release.manager - team.service.release.view - - team.team.member.view - - name: application admin - value: application_admin - permits: - - team.application.application.manager - - team.application.authorization.manager - - team.application.authorization.view - - team.application.subscription.manager - - team.application.subscription.view - - team.team.member.view - - name: application developer - value: application_developer - permits: - - team.application.authorization.view - - team.application.subscription.manager - - team.application.subscription.view - - team.team.member.view - default: true - - name: guest - value: guest - permits: - - team.application.authorization.view - - team.application.subscription.view - - team.service.router.view - - team.service.release.view + - team.service.service.manager + - team.service.service_intro.manager + - team.service.service_intro.view + - team.service.subscription.manager - team.service.subscription.view + - team.service.upstream.manager - team.service.upstream.view + - team.team.consumer.view - team.team.member.view - - team.team.team.view \ No newline at end of file + - team.team.service.view + - team.team.team.view + - name: consumer admin + value: consumer_admin + permits: + - team.consumer.application.manager + - team.consumer.authorization.manager + - team.consumer.authorization.view + - team.consumer.subscription.manager_subscribed_services + - team.consumer.subscription.subscribe + - team.consumer.subscription.view_subscribed_service + - team.team.consumer.manager + - team.team.consumer.view + - team.team.member.view + - team.team.service.view + - team.team.team.view + - name: consumer developer + value: consumer_developer + permits: + - team.consumer.application.manager + - team.consumer.authorization.manager + - team.consumer.authorization.view + - team.consumer.subscription.subscribe + - team.consumer.subscription.view_subscribed_service + - team.team.consumer.view + - team.team.member.view + - team.team.service.view + - team.team.team.view + default: true diff --git a/resources/locale/i18n/zh-CN.json b/resources/locale/i18n/zh-CN.json index 3882a74f..e9b000f4 100644 --- a/resources/locale/i18n/zh-CN.json +++ b/resources/locale/i18n/zh-CN.json @@ -1,44 +1,46 @@ { - "ai provider": "AI供应商", - "api market": "API门户", + "account": "账号", + "ai provider": "AI模型供应商", + "analysis": "分析报告", + "api": "API", "api doc": "API文档", - "application": "应用", - "application admin": "应用管理员", - "application developer": "应用开发者", - "authorization": "鉴权", - "cluster": "集群", - "dashboard": "仪表盘", + "api gateway": "API网关", + "api portal": "API门户", + "authorization": "访问授权", + "consumer": "消费者", + "consumer admin": "消费者管理员", + "consumer developer": "消费者开发者", + "create": "创建", "data source": "数据源", - "devops": "运维", "devops admin": "运维管理员", "general": "常规设置", "general member": "普通成员", - "guest": "访客", "log configuration": "日志配置", "manager": "管理", + "manager all consumer": "管理所有消费者", + "manager subscribed services": "管理已订阅的服务", "member": "成员", - "organization": "组织管理", "release": "发布", "role": "角色", - "router": "路由", "run view": "运行视图", "service": "服务", "service admin": "服务管理员", - "service classification": "服务目录", "service developer": "服务开发者", + "service intro": "服务文档", "ssl certificate": "SSL证书", - "subscription management": "订阅方管理", + "allow subscribe service": "允许订阅服务", + "subscription review": "订阅审核", "subscription service": "订阅服务", "super admin": "超级管理员", "system settings": "系统设置", "team": "团队", + "team settings": "团队设置", "team admin": "团队管理员", "upstream": "上游", "view": "查看", - "view all application": "查看所有应用", + "view all consumer": "查看所有消费者", "view all service": "查看所有服务", "view all team": "查看所有团队", - "view system role": "查看系统角色", - "view team role": "查看团队角色", + "view subscribed services": "查看已经订阅的服务", "workspace": "工作空间" -} \ No newline at end of file +} From d6062ea4e78c98c8d92dde1ca97e2aaa2443e059 Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:32:20 +0800 Subject: [PATCH 81/91] fix: table fields --- frontend/packages/core/src/pages/member/MemberList.tsx | 2 +- frontend/packages/core/src/pages/team/TeamInsideMember.tsx | 1 + frontend/packages/market/src/const/serviceHub/const.tsx | 1 - .../src/pages/serviceHub/management/ServiceHubManagement.tsx | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/packages/core/src/pages/member/MemberList.tsx b/frontend/packages/core/src/pages/member/MemberList.tsx index 48f04fce..948820ee 100644 --- a/frontend/packages/core/src/pages/member/MemberList.tsx +++ b/frontend/packages/core/src/pages/member/MemberList.tsx @@ -346,7 +346,7 @@ const MemberList = ()=>{ x.id)} options={roleList?.map((x:{id:string,name:string})=>({label:(x.name), value:x.id}))} onChange={(value)=>{ diff --git a/frontend/packages/market/src/const/serviceHub/const.tsx b/frontend/packages/market/src/const/serviceHub/const.tsx index dd968d6f..52b08e47 100644 --- a/frontend/packages/market/src/const/serviceHub/const.tsx +++ b/frontend/packages/market/src/const/serviceHub/const.tsx @@ -25,7 +25,6 @@ export const SERVICE_HUB_TABLE_COLUMNS: PageProColumns[ title:('团队'), dataIndex: ['team','name'], ellipsis:true, - renderText:(_,entity:ServiceHubTableListItem)=>entity.tags?.map(x=>x.name).join(',') || '-' }, { title:('订阅服务数量'), diff --git a/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx b/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx index 932a84ec..c67d6102 100644 --- a/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx +++ b/frontend/packages/market/src/pages/serviceHub/management/ServiceHubManagement.tsx @@ -53,7 +53,7 @@ const getServiceList = (dataType?:'block'|'list')=>{ } setServiceLoading(true) - return fetchData>(!checkPermission('system.workspace.application.view_all') ? 'my_apps':'apps',{method:'GET',eoParams:{ team: dataType === 'list' ? undefined : teamId,keyword:tableSearchWord},eoTransformKeys:['api_num','subscribe_num','subscribe_verify_num','auth_num']}).then(response=>{ + return fetchData>(!checkPermission('system.workspace.application.view_all') ? 'my_apps':'apps',{method:'GET',eoParams:{ team: dataType === 'list' ? undefined : teamId,keyword:tableSearchWord},eoTransformKeys:['api_num','subscribe_num','subscribe_verify_num','auth_num','create_time','can_delete']}).then(response=>{ const {code,data,msg} = response if(code === STATUS_CODE.SUCCESS){ setServiceList([...data.apps,{type:'addNewItem'}]) From 087e598be0dc725d5e4accaf50317674ec6d4df7 Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Mon, 28 Oct 2024 18:39:55 +0800 Subject: [PATCH 82/91] update remark --- .gitignore | 1 - init.go | 1 + initialization-none.go | 1 - initialization.go | 28 ++++++++++++++-------------- main.go | 6 +++--- middleware/permit/permit.go | 15 +++++---------- model/plugin_model/type.go | 1 + scripts/Dockerfile | 2 +- scripts/prefix.sh | 1 + 9 files changed, 26 insertions(+), 30 deletions(-) mode change 100755 => 100644 scripts/prefix.sh diff --git a/.gitignore b/.gitignore index 9b16619e..17943495 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,3 @@ /config.yml /build/ /apipark -/aoplatform diff --git a/init.go b/init.go index f0edbabf..3e398f85 100644 --- a/init.go +++ b/init.go @@ -1,5 +1,6 @@ package main +// init module import ( _ "github.com/APIParkLab/APIPark/frontend" _ "github.com/APIParkLab/APIPark/gateway/apinto" diff --git a/initialization-none.go b/initialization-none.go index f4c82193..c241316f 100644 --- a/initialization-none.go +++ b/initialization-none.go @@ -9,5 +9,4 @@ import ( ) func doCheck() { - } diff --git a/initialization.go b/initialization.go index ae49f334..297741be 100644 --- a/initialization.go +++ b/initialization.go @@ -6,6 +6,11 @@ import ( "bytes" "encoding/csv" "fmt" + "os" + "sort" + "strings" + "time" + _ "github.com/APIParkLab/APIPark/resources/access" _ "github.com/APIParkLab/APIPark/resources/permit" _ "github.com/APIParkLab/APIPark/resources/plugin" @@ -14,19 +19,15 @@ import ( "github.com/eolinker/go-common/permit" "github.com/eolinker/go-common/pm3" "github.com/eolinker/go-common/utils" - "os" - "sort" - "strings" - "time" ) const unsetValue = "-" func doCheck() { accessConf, unset := loadAccess() - + drivers := pm3.List() - + newAccess := 0 for _, p := range drivers { if ac, ok := p.(pm3.AccessConfig); ok { @@ -39,9 +40,9 @@ func doCheck() { } } } - + } - + } for asKey := range permit.All() { key := strings.ToLower(asKey) @@ -53,12 +54,11 @@ func doCheck() { if newAccess > 0 || unset > 0 { f := accessFile() fmt.Printf("%d access need set, see : %s and %s", newAccess+unset, saveTemplate(accessConf, f), saveCsv(accessConf, f)) - } os.Exit(0) } func accessFile() string { - + if version == "" { return time.Now().Format("20060102-150405") } @@ -84,7 +84,7 @@ func saveCsv(as map[string]*Access, key string) string { err = os.WriteFile(filePath, buf.Bytes(), 0666) if err != nil { log.Fatal(err) - + } return filePath } @@ -111,9 +111,9 @@ func (ls AccessListSort) Swap(i, j int) { func saveTemplate(as map[string]*Access, key string) string { out := make(map[string][]access.Access) - + for _, a := range as { - + out[a.Group] = append(out[a.Group], access.Access{ Name: a.Name, CName: a.Cname, @@ -130,7 +130,7 @@ func saveTemplate(as map[string]*Access, key string) string { err = os.WriteFile(filePath, buf.Bytes(), 0666) if err != nil { log.Fatal(err) - + } return filePath } diff --git a/main.go b/main.go index 872a3616..52097fbc 100644 --- a/main.go +++ b/main.go @@ -3,13 +3,14 @@ package main import ( "flag" "fmt" + "net" + "net/http" + "github.com/eolinker/eosc/log" "github.com/eolinker/go-common/autowire" "github.com/eolinker/go-common/cftool" "github.com/eolinker/go-common/permit" "github.com/eolinker/go-common/server" - "net" - "net/http" ) var ( @@ -54,7 +55,6 @@ func main() { for access, paths := range srv.Permits() { permit.AddPermitRule(access, paths...) } - err = http.Serve(ln, srv) if err != nil { log.Fatal(err) diff --git a/middleware/permit/permit.go b/middleware/permit/permit.go index 41880740..428350b6 100644 --- a/middleware/permit/permit.go +++ b/middleware/permit/permit.go @@ -3,7 +3,7 @@ package permit_middleware import ( "net/http" "reflect" - + permit_identity "github.com/APIParkLab/APIPark/middleware/permit/identity" "github.com/eolinker/eosc/log" "github.com/eolinker/go-common/autowire" @@ -42,11 +42,11 @@ func (p *PermitMiddleware) Sort() int { func (p *PermitMiddleware) Check(method string, path string) (bool, []gin.HandlerFunc) { // 当前路径是否有配置权限 accessRules, has := permit.GetPathRule(method, path) - + if !has || len(accessRules) == 0 { return false, nil } - + return true, []gin.HandlerFunc{ func(ginCtx *gin.Context) { userId := utils.UserId(ginCtx) @@ -56,19 +56,14 @@ func (p *PermitMiddleware) Check(method string, path string) (bool, []gin.Handle ginCtx.Abort() return } - - //if userId == "admin" { - // // 超级管理员不校验 - // return - //} - + for _, group := range checkSort { accessList, has := accessRules[group] if !has { // 当前分组没有配置权限 continue } - + domainHandler, has := permit.SelectDomain(group) if !has { // 当前分组没有配置身份handler diff --git a/model/plugin_model/type.go b/model/plugin_model/type.go index a95cce28..b7fea1f6 100644 --- a/model/plugin_model/type.go +++ b/model/plugin_model/type.go @@ -9,6 +9,7 @@ type Kind int func (k *Kind) UnmarshalJSON(bytes []byte) error { str := "" + err := json.Unmarshal(bytes, &str) if err != nil { return err diff --git a/scripts/Dockerfile b/scripts/Dockerfile index cd08cc73..f78900c8 100755 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -1,4 +1,4 @@ -# 名称:apinto通用镜像 +# 名称:apipark通用镜像 # 创建时间:2022-10-25 FROM centos:7.9.2009 MAINTAINER liujian diff --git a/scripts/prefix.sh b/scripts/prefix.sh old mode 100755 new mode 100644 index 800e9117..0ce4577f --- a/scripts/prefix.sh +++ b/scripts/prefix.sh @@ -25,6 +25,7 @@ cd "./eosc" && git pull # ========================================================================= echo "更新 aoaccount" cd "${BASEPATH}/" + if [ ! -d "./aoaccount" ]; then git clone http://gitlab.eolink.com/apinto/aoaccount.git fi From cd441ccfe73315785df5cb394a8426d5c3dd9e1e Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Tue, 29 Oct 2024 09:19:35 +0800 Subject: [PATCH 83/91] fix: account translation --- .../src/pages/member/MemberDropdownModal.tsx | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx b/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx index b94d52e3..d0c1a6f4 100644 --- a/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx +++ b/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx @@ -1,10 +1,12 @@ import {App, Form, Input, TreeSelect} from "antd"; -import {forwardRef, useEffect, useImperativeHandle, useState} from "react"; +import {forwardRef, useEffect, useImperativeHandle, useMemo, useState} from "react"; import {BasicResponse, PLACEHOLDER, RESPONSE_TIPS, STATUS_CODE, VALIDATE_MESSAGE} from "@common/const/const.tsx"; import {useFetch} from "@common/hooks/http.ts"; import { MemberDropdownModalHandle, MemberDropdownModalProps, DepartmentListItem, MemberDropdownModalFieldType, MemberTableListItem } from "../../const/member/type.ts"; import WithPermission from "@common/components/aoplatform/WithPermission.tsx"; import { $t } from "@common/locales/index.ts"; +import { useGlobalContext } from "@common/contexts/GlobalStateContext.tsx"; +import { DataNode } from "antd/es/tree/index"; export const MemberDropdownModal = forwardRef((props,ref)=>{ const { message} = App.useApp() @@ -12,6 +14,7 @@ export const MemberDropdownModal = forwardRef([]) + const { state } = useGlobalContext() const save:()=>Promise = ()=>{ let url:string @@ -97,6 +100,24 @@ export const MemberDropdownModal = forwardRef { + const loop = (data: DepartmentListItem[]): unknown[] => + data?.map((item) => { + const title = ['unknown','disable'].indexOf(item.id) === -1 ?item.name : $t(item.name) as string; + if (item.children) { + return {...item,name:title, children:loop(item.children)} + } + + return { + ...item, + name: title + }; + }); + return loop(departmentList); + }, [departmentList,state.language]); + + console.log(treeData) return ( From ab2a0d8ae249e4600d8e3a8ed8fc98c8005293d3 Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Tue, 29 Oct 2024 11:58:09 +0800 Subject: [PATCH 84/91] fix: Modify member transfer --- .../components/aoplatform/MemberTransfer.tsx | 214 ++++++------------ frontend/packages/core/src/App.css | 5 + .../src/pages/member/MemberDropdownModal.tsx | 1 - .../core/src/pages/team/TeamConfig.tsx | 7 +- .../core/src/pages/team/TeamInsideMember.tsx | 13 +- 5 files changed, 89 insertions(+), 151 deletions(-) diff --git a/frontend/packages/common/src/components/aoplatform/MemberTransfer.tsx b/frontend/packages/common/src/components/aoplatform/MemberTransfer.tsx index 90c2e424..4945379c 100644 --- a/frontend/packages/common/src/components/aoplatform/MemberTransfer.tsx +++ b/frontend/packages/common/src/components/aoplatform/MemberTransfer.tsx @@ -1,27 +1,24 @@ -import { GetProp, TransferProps, TreeDataNode, theme, Transfer, Tree, Spin } from "antd"; -import { DataNode, TreeProps } from "antd/es/tree"; +import { TransferProps, TreeDataNode, Tree, Spin, Input } from "antd"; +import { DataNode } from "antd/es/tree"; import { Ref, forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react"; -import { ApartmentOutlined, LoadingOutlined, UserOutlined } from "@ant-design/icons"; -import { cloneDeep, debounce } from "lodash-es"; +import { LoadingOutlined } from "@ant-design/icons"; import { ColumnsType } from "antd/es/table"; import { $t } from "@common/locales"; import { useGlobalContext } from "@common/contexts/GlobalStateContext"; - -type TransferItem = GetProp[number]; +import Search from "antd/es/input/Search"; export type TransferTableProps = { request?:(k?:string)=>Promise<{data:T[],success:boolean}> columns: ColumnsType primaryKey:string - onSelect:(selectedData:T[])=>void + onSelect:(selectedData:string[])=>void tableType?:'member'|'api' disabledData:string[] searchPlaceholder?:string } export type TransferTableHandle = { - selectedData: () => T[]; selectedRowKeys: () => React.Key[]; } @@ -31,10 +28,6 @@ interface TreeTransferProps { onChange: TransferProps['onChange']; } -// Customize Table Transfer -const isChecked = (selectedKeys: React.Key[], eventKey: React.Key) => - selectedKeys.includes(eventKey); - const generateTree = ( treeNodes: TreeDataNode[] = [], checkedKeys: TreeTransferProps['targetKeys'] = [], @@ -73,167 +66,102 @@ const generateTree = ( ) }; -const TransferTree = (props)=>{ - const { direction, token, tableHeight, dataSource, targetKeys, onItemSelect, onItemSelectAll,checkedKey,selectedKeys, filteredItems ,disabledData} = props; - const [expandedKeys, setExpandedKeys] = useState([]); - - const getExpandedKeys = (newData:TreeDataNode[], expandedSet:Set = new Set())=>{ - newData.forEach((item)=>{ - if(item.children && item.children.length > 0){ - expandedSet.add(item.key) - getExpandedKeys(item.children,expandedSet) - } - }) - return expandedSet - } - - const treeData:TreeDataNode[] = useMemo(()=>{ - const filteredSet = filteredItems && filteredItems.length > 0 ? new Set(filteredItems.map((x)=>x.id)) : new Set() - const res = dataSource && dataSource.length > 0 ? generateTree(dataSource, targetKeys,direction === 'right',disabledData,filteredSet) : [] - setExpandedKeys(Array.from(getExpandedKeys(res))) - return res - },[ - dataSource, targetKeys,direction ,disabledData,filteredItems - ]) - - const onExpand: TreeProps['onExpand'] = (expandedKeysValue) => { - setExpandedKeys(expandedKeysValue as string[]); - }; - - return ( - -
- { return (props.type === 'member' ? : )} } - treeData={treeData} - onCheck={(_checkedKeys, e:{checked: boolean, checkedNodes, node, event, halfCheckedKeys}) => { - if(e.checked){ - onItemSelectAll( _checkedKeys, e.checked); - }else{ - const checkedKeyArrFromTree = e.checkedNodes.map(node => node.key) - onItemSelectAll((checkedKey as string[]).filter(key => checkedKeyArrFromTree.indexOf(key) === -1),e.checked) - } - }} - onSelect={(_, { node: { key } }) => { - onItemSelect(key as string, !isChecked(checkedKey, key)); - }} - /> -
- ) -} - const MemberTransfer= forwardRef, TransferTableProps<{[k:string]:unknown}>>( (props: TransferTableProps, ref:Ref>) => { const {request,columns,primaryKey,onSelect,tableType,disabledData = [],searchPlaceholder} = props - const [tableHeight, setTableHeight] = useState(window.innerHeight * 80 / 100 - 64 - 72 - 56 - 16 -3); const [targetKeys, setTargetKeys] = useState([]); const [dataSource, setDataSource] = useState([]) const parentRef = useRef(null); const [loading, setLoading] = useState(false) const {state} = useGlobalContext() - + const [expandedKeys, setExpandedKeys] = useState([]); + const [searchWord, setSearchWord] = useState('') useEffect(()=>{ setTargetKeys(disabledData) },[disabledData]) useImperativeHandle(ref, () =>({ - selectedData: () => dataSource, selectedRowKeys: () => targetKeys,})) - const onChange: TreeTransferProps['onChange'] = (keys) => { - onSelect?.(new Set(keys)) - setTargetKeys(Array.from(new Set(keys))); - }; + const translatedDataSource = useMemo(()=>{ + + const loop = (data: DataNode[]): DataNode[] => + data?.map((item) => { + const strTitle:string = item.name === '所有成员' ? $t(item.name) as string : item.name as string; + const index = strTitle.indexOf(searchWord); + const beforeStr = strTitle.substring(0, index); + const afterStr = strTitle.slice(index + searchWord.length); + const title = + index > -1 ? ( + + {beforeStr} + {searchWord} + {afterStr} + + ) : ( + {strTitle} + ) + if (item.children) { + return { + ...item, + title, + disableCheckbox:disabledData.indexOf(item.key as string) !== -1, + children: loop(item.children as T[]) }; + } - const { token } = theme.useToken(); - - const transferDataSource: TransferItem[] = useMemo(()=>{ - function flatten(list: TreeDataNode[] = [], res:TransferItem[]) { - list.forEach((item) => { - res.push({...item, title:item.title === '所有成员' ? $t((item as unknown as {title:string}).title):item.title }as TransferItem); - flatten(item.children,res); - }); - } - const res:TransferItem[] =[] - flatten(dataSource,res); - return res - },[ - dataSource, state.language - ]) - - - const translatedDataSource = useMemo(()=>dataSource.map((item)=>({ - ...item, - name:item.name === '所有成员' ? $t((item as unknown as {name:string}).name):item.name, - })),[dataSource, state.language]) - - - - let memo: Record = {}; - - const handlerFilterOption = (inputValue: string, item: any, parentResult: boolean = false, childrenSet: Set = new Set()): boolean => { - const cacheKey = `${inputValue}_${item.key}`; - if (memo[cacheKey]) { - return memo[cacheKey]; - } - - childrenSet.add(item.key); - let result = item.title.includes(inputValue) || parentResult - if (item.children) { - for (const child of item.children) { - if (handlerFilterOption(inputValue, child, result,childrenSet)) { - result = true; - } - } - } - - if (result) { - memo[cacheKey] = result; - childrenSet.forEach((key) => { - memo[`${inputValue}_${key}`] = result; + return { + ...item, + title, + isLeaf:true, + disableCheckbox:disabledData.indexOf(item.key as string) !== -1 + }; }); - } - return result; - }; + console.log(searchWord, dataSource) + return loop(dataSource); + },[dataSource, state.language, searchWord]) + + const getInitExpandKeys = (data:T[], expandKeys:string[] = [])=>{ + data.forEach((item)=>{ + if(item.children?.length){ + expandKeys.push(item.key as string) + getInitExpandKeys(item.children,expandKeys) + } + }) + return expandKeys + } const getDataSource = ()=>{ setLoading(true) request && request().then((res)=>{ const {data,success} = res setDataSource(success? data : []) + setExpandedKeys(getInitExpandKeys(success? data:[])) }).finally(()=>{setLoading(false)}) -} + } -useEffect(() => { - getDataSource() - const handleResize = () => { - setTableHeight(window.innerHeight * 80 / 100 - 64 - 72 - 56 - 16 -3) - }; - const debouncedHandleResize = debounce(handleResize, 200); - - // 监听窗口大小变化 - window.addEventListener('resize', debouncedHandleResize); - handleResize(); - return () => { - window.removeEventListener('resize', debouncedHandleResize); - }; -}, []); + useEffect(() => { + getDataSource() + }, []); return (
} spinning={loading} className=''> - setSearchWord(e.target.value)} value={searchWord} /> + {setTargetKeys(e); + onSelect(((e as string[])?.filter(x=>disabledData.indexOf(x as string) === -1))||[])}} + onExpand={setExpandedKeys} + treeData={translatedDataSource} + blockNode + /> + + {/* { memo = {}; @@ -266,7 +194,7 @@ useEffect(() => { ); } }} - + */}
); diff --git a/frontend/packages/core/src/App.css b/frontend/packages/core/src/App.css index d50fdc28..9afb2c31 100644 --- a/frontend/packages/core/src/App.css +++ b/frontend/packages/core/src/App.css @@ -290,3 +290,8 @@ a{ transition: background-color 0s 600000s, color 0s 600000s !important; } } + + .ant-select-selection-overflow-item:first-child { + max-width: calc(100% - 60px); + margin-right: 4px; + } \ No newline at end of file diff --git a/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx b/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx index d0c1a6f4..5d4cbe52 100644 --- a/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx +++ b/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx @@ -117,7 +117,6 @@ export const MemberDropdownModal = forwardRef ((props,ref) => { const [managerOption, setManagerOption] = useState([]) const { setBreadcrumb} = useBreadcrumb() const { setTeamInfo } =useTeamContext() - const {checkPermission,accessInit} = useGlobalContext() + const {checkPermission,accessInit,state} = useGlobalContext() const pageType= useMemo(()=>{ if(!accessInit) return 'myteam' return checkPermission('system.workspace.team.view_all') ? 'manage' : 'myteam' @@ -128,7 +128,10 @@ const TeamConfig= forwardRef((props,ref) => { getTeamInfo(); } else { setOnEdit(false); - form.setFieldsValue({id:uuidv4()}); // 清空 initialValues + form.setFieldsValue( + {id:uuidv4(), + master:state?.userData?.uid + }); // 清空 initialValues } return (form.setFieldsValue({})) }, [teamId]); diff --git a/frontend/packages/core/src/pages/team/TeamInsideMember.tsx b/frontend/packages/core/src/pages/team/TeamInsideMember.tsx index 0c61cc18..81836fb1 100644 --- a/frontend/packages/core/src/pages/team/TeamInsideMember.tsx +++ b/frontend/packages/core/src/pages/team/TeamInsideMember.tsx @@ -273,7 +273,6 @@ const TeamInsideMember:FC = ()=>{ },[ state.language,roleList]) useEffect(() => { - getRoleList() setBreadcrumb([ {title:{$t('团队')}}, {title:$t('成员')} @@ -281,6 +280,11 @@ const TeamInsideMember:FC = ()=>{ manualReloadTable() }, [teamId]); + + useEffect(()=>{ + getRoleList() + },[state.language]) + const treeDisabledData = useMemo(()=>{ return [...allMemberIds,...allMemberSelectedDepartIds]},[allMemberIds,allMemberSelectedDepartIds]) return ( @@ -303,7 +307,7 @@ const TeamInsideMember:FC = ()=>{ title={$t("添加成员")} open={modalVisible} destroyOnClose={true} - width={900} + width={600} onCancel={() => cleanModalData()} maskClosable={false} footer={[ @@ -327,10 +331,9 @@ const TeamInsideMember:FC = ()=>{ disabledData={treeDisabledData} request={()=>getDepartmentMemberList()} onSelect={(selectedData: Set) => { - const memberKeyFromModal = Array.from(selectedData)?.filter(x => allMemberIds.indexOf(x) === -1 &&selectableMemberIds.has(x)) || []; - setAddMemberBtnDisabled((memberKeyFromModal.length === 0)); + setAddMemberBtnDisabled((selectedData.length === 0)); }} - searchPlaceholder={$t("搜索用户名、邮箱")} + searchPlaceholder={$t("搜索用户名")} /> From 5f03973bf292b393876709d7f4b051473ef034ac Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:37:38 +0800 Subject: [PATCH 85/91] fix: Modify guide link --- .../packages/core/src/pages/guide/Guide.tsx | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/frontend/packages/core/src/pages/guide/Guide.tsx b/frontend/packages/core/src/pages/guide/Guide.tsx index ef3045ed..9e79f2e8 100644 --- a/frontend/packages/core/src/pages/guide/Guide.tsx +++ b/frontend/packages/core/src/pages/guide/Guide.tsx @@ -21,22 +21,22 @@ export default function Guide(){ { title: $t("配置你的 AI 模型"), description: $t('通过 APIPark 快速接入各种 AI 模型,使用统一的格式来调用API,并且可以随意切换模型。'), - link: 'https://docs.apipark.com/docs/quick/pre-work/team' + link: 'https://docs.apipark.com/docs/system_setting/ai_model_providers' }, { title: $t("创建 AI 服务和 API"), description: $t('创建 AI 类型的服务,并且你可以将 Prompt 提示词设置为一个 API,简化使用 AI 的流程。'), - link: 'https://docs.apipark.com/docs/quick/provider/service' + link: 'https://docs.apipark.com/docs/services/ai_services' }, { title: $t("创建调用 Token"), description: $t('为了安全地调用 API,你需要创建一个消费者以及Token。'), - link: 'https://docs.apipark.com/docs/quick/suberscriber/application' + link: 'https://docs.apipark.com/docs/consumers' }, { title: $t("调用"), description: $t('现在你可以通过 Token 来调用这些 API。'), - link: 'https://docs.apipark.com/docs/quick/suberscriber/application' + link: 'https://docs.apipark.com/docs/call_api' } ] }, @@ -46,17 +46,17 @@ export default function Guide(){ { title: $t("创建 REST 服务和 API"), description: $t('创建 AI 类型的服务,并且你可以将 Prompt 提示词设置为一个 API,简化使用 AI 的流程。'), - link: 'https://docs.apipark.com/docs/tutorials/api-market/service' + link: 'https://docs.apipark.com/docs/services/rest_services' }, { title: $t("创建调用 Token"), description: $t('为了安全地调用 API,你需要创建一个消费者以及Token。'), - link: 'https://docs.apipark.com/docs/quick/suberscriber/subscribe' + link: 'https://docs.apipark.com/docs/consumers' }, { title: $t("调用"), description: $t('现在你可以通过 Token 来调用这些 API。'), - link: 'https://docs.apipark.com/docs/quick/provider/approve' + link: 'https://docs.apipark.com/docs/call_api' } ] }, @@ -66,7 +66,7 @@ export default function Guide(){ { title: $t("统计 API 调用情况"), description: $t('仪表盘中提供了多种统计图表,帮助我们了解 API 的运行情况。'), - link: 'https://docs.apipark.com/docs/quick/pre-work/monitor' + link: 'https://docs.apipark.com/docs/analysis' } ] } @@ -78,17 +78,17 @@ export default function Guide(){ { title: $t("账号与角色"), description: $t('邀请你的团队成员加入 APIPark,共同管理和调用 API。'), - link: 'https://docs.apipark.com/docs/quick/pre-work/team' + link: 'https://docs.apipark.com/docs/system_setting/account_role' }, { title: $t("团队"), description: $t('团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。'), - link: 'https://docs.apipark.com/docs/quick/provider/service' + link: 'https://docs.apipark.com/docs/teams' }, { title: $t("服务"), description: $t('服务内包含一组 API,并且可以发布到 API 市场被其他团队使用。'), - link: 'https://docs.apipark.com/docs/quick/suberscriber/application' + link: 'https://docs.apipark.com/docs/category/-%E6%9C%8D%E5%8A%A1' } ] }, @@ -98,12 +98,12 @@ export default function Guide(){ { title: $t("订阅服务"), description: $t('如果需要调用某个服务的 API,需要先订阅该服务,并且等待提供服务的团队审核后才可发起 API 请求。'), - link: 'https://docs.apipark.com/docs/tutorials/api-market/service' + link: 'https://docs.apipark.com/docs/developer_portal' }, { title: $t("审核订阅申请"), description: $t('提供服务的团队可以审核来自其他团队的订阅申请,审核通过后的消费者才可发起 API 请求。'), - link: 'https://docs.apipark.com/docs/quick/suberscriber/subscribe' + link: 'https://docs.apipark.com/docs/services/review_consumers' } ] }, @@ -113,7 +113,7 @@ export default function Guide(){ { title: $t("日志"), description: $t('APIPark 提供详尽的 API 调用日志,帮助企业监控、分析和审计 API 的运行状况。'), - link: 'https://docs.apipark.com/docs/quick/pre-work/monitor' + link: 'https://docs.apipark.com/docs/system_setting/log/' } ] } From 70f834e1cfcf46e3a42e70fd66caba2069dadb63 Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:52:48 +0800 Subject: [PATCH 86/91] fix: update translation --- .../components/aoplatform/MemberTransfer.tsx | 59 ++++--------------- .../common/src/locales/keyHashMap.json | 2 +- .../common/src/locales/scan/en-US.json | 3 +- .../common/src/locales/scan/ja-JP.json | 3 +- .../src/locales/scan/newJson/en-US.json | 4 +- .../src/locales/scan/newJson/ja-JP.json | 4 +- .../src/locales/scan/newJson/zh-CN.json | 1 + .../src/locales/scan/newJson/zh-TW.json | 4 +- .../src/locales/scan/oldJson/en-US.json | 1 + .../src/locales/scan/oldJson/ja-JP.json | 1 + .../src/locales/scan/oldJson/zh-CN.json | 1 + .../src/locales/scan/oldJson/zh-TW.json | 1 + .../common/src/locales/scan/zh-TW.json | 3 +- .../core/src/pages/team/TeamInsideMember.tsx | 2 +- 14 files changed, 35 insertions(+), 54 deletions(-) diff --git a/frontend/packages/common/src/components/aoplatform/MemberTransfer.tsx b/frontend/packages/common/src/components/aoplatform/MemberTransfer.tsx index 4945379c..7e549794 100644 --- a/frontend/packages/common/src/components/aoplatform/MemberTransfer.tsx +++ b/frontend/packages/common/src/components/aoplatform/MemberTransfer.tsx @@ -148,53 +148,20 @@ const generateTree = ( return (
} spinning={loading} className=''> - setSearchWord(e.target.value)} value={searchWord} /> - {setTargetKeys(e); - onSelect(((e as string[])?.filter(x=>disabledData.indexOf(x as string) === -1))||[])}} - onExpand={setExpandedKeys} - treeData={translatedDataSource} - blockNode - /> + setSearchWord(e.target.value)} value={searchWord} /> + {setTargetKeys(e); + onSelect(((e as string[])?.filter(x=>disabledData.indexOf(x as string) === -1))||[])}} + onExpand={setExpandedKeys} + treeData={translatedDataSource} + blockNode + /> - {/* { - memo = {}; - }} - listStyle={{width:'408px'}} - disabledData={disabledData} - filterOption={(inputValue: string, item: any) => handlerFilterOption(inputValue, item)} - targetKeys={targetKeys} - dataSource={transferDataSource} - className="tree-transfer" - render={(item) => item.title!} - showSelectAll={false} - onChange={onChange} - titles={['','']} - > - {({ direction, onItemSelect, selectedKeys,onItemSelectAll ,filteredItems}) => { - const treeProps = { - dataSource:translatedDataSource, direction, onItemSelect, selectedKeys,onItemSelectAll ,filteredItems,token,tableHeight,targetKeys,disabledData - } - if (direction === 'left') { - const checkedKey = [...selectedKeys, ...targetKeys as string[]]; - return ( - - ); - } - if(direction === 'right'){ - const checkedKey = [...selectedKeys,...targetKeys as string[]]; - return ( - - ); - } - }} - */}
); diff --git a/frontend/packages/common/src/locales/keyHashMap.json b/frontend/packages/common/src/locales/keyHashMap.json index 89227607..16b77da7 100644 --- a/frontend/packages/common/src/locales/keyHashMap.json +++ b/frontend/packages/common/src/locales/keyHashMap.json @@ -546,7 +546,7 @@ "移除成员": "K395acc14", "添加成员": "Kec46a57f", "输入姓名查找": "K48724410", - "搜索用户名、邮箱": "Kb9052305", + "输入名称查找用户": "Kf5fd27ed", "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。": "K4c72fb6f", "添加团队": "K510cdd27", "输入名称、ID、负责人查找团队": "K9244ae14", diff --git a/frontend/packages/common/src/locales/scan/en-US.json b/frontend/packages/common/src/locales/scan/en-US.json index d3c8158a..a0d345e6 100644 --- a/frontend/packages/common/src/locales/scan/en-US.json +++ b/frontend/packages/common/src/locales/scan/en-US.json @@ -678,5 +678,6 @@ "K1644b775": "Add", "Kc8ee3e62": "Non-Existence", "K1e97dbd8": "Existence", - "Kec91f0db": "Applicant Consumer" + "Kec91f0db": "Applicant Consumer", + "Kf5fd27ed": "Enter Name to Search User" } diff --git a/frontend/packages/common/src/locales/scan/ja-JP.json b/frontend/packages/common/src/locales/scan/ja-JP.json index b9f63dd8..4e0e0b0f 100644 --- a/frontend/packages/common/src/locales/scan/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/ja-JP.json @@ -700,5 +700,6 @@ "K1644b775": "追加", "Kc8ee3e62": "存在しない", "K1e97dbd8": "存在する", - "Kec91f0db": "申請側コンシューマー" + "Kec91f0db": "申請側コンシューマー", + "Kf5fd27ed": "名前を入力してユーザーを検索" } diff --git a/frontend/packages/common/src/locales/scan/newJson/en-US.json b/frontend/packages/common/src/locales/scan/newJson/en-US.json index 9e26dfee..ddcaee31 100644 --- a/frontend/packages/common/src/locales/scan/newJson/en-US.json +++ b/frontend/packages/common/src/locales/scan/newJson/en-US.json @@ -1 +1,3 @@ -{} \ No newline at end of file +{ + "Kf5fd27ed": "输入名称查找用户" +} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json index 9e26dfee..ddcaee31 100644 --- a/frontend/packages/common/src/locales/scan/newJson/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/newJson/ja-JP.json @@ -1 +1,3 @@ -{} \ No newline at end of file +{ + "Kf5fd27ed": "输入名称查找用户" +} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json index b98863ab..44f232eb 100644 --- a/frontend/packages/common/src/locales/scan/newJson/zh-CN.json +++ b/frontend/packages/common/src/locales/scan/newJson/zh-CN.json @@ -21,6 +21,7 @@ "K78b1ca25": "地址", "K1644b775": "新增", "Kec91f0db": "申请方消费者", + "Kf5fd27ed": "输入名称查找用户", "Kc3b7bfa8": "暂无消费者描述", "K3a6f905d": "输入名称、ID 查找消费者" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json index 9e26dfee..ddcaee31 100644 --- a/frontend/packages/common/src/locales/scan/newJson/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/newJson/zh-TW.json @@ -1 +1,3 @@ -{} \ No newline at end of file +{ + "Kf5fd27ed": "输入名称查找用户" +} \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/oldJson/en-US.json b/frontend/packages/common/src/locales/scan/oldJson/en-US.json index 08de42fa..8b7a4c95 100644 --- a/frontend/packages/common/src/locales/scan/oldJson/en-US.json +++ b/frontend/packages/common/src/locales/scan/oldJson/en-US.json @@ -1,3 +1,4 @@ { + "Kb9052305": "Search Username, Email", "K40a89bd8": "Enter Name, ID to Search Member" } \ No newline at end of file diff --git a/frontend/packages/common/src/locales/scan/oldJson/ja-JP.json b/frontend/packages/common/src/locales/scan/oldJson/ja-JP.json index b5c29e42..552991b2 100644 --- a/frontend/packages/common/src/locales/scan/oldJson/ja-JP.json +++ b/frontend/packages/common/src/locales/scan/oldJson/ja-JP.json @@ -5,6 +5,7 @@ "K9bdd8403": "API を安全に呼び出すためには、アプリケーションとトークンを作成する必要があります。", "Kc8239422": "チームにはユーザー、アプリケーション、サービスが含まれ、異なるチームのアプリケーションとサービスのデータは分離されています。企業内の部門/プロジェクトグループ/チームの管理に使用できます。", "Ka0a8840a": "他のアプリケーションのサブスクリプション申請をレビューし、承認後に API リクエストが発行できます。", + "Kb9052305": "ユーザー名またはメールを検索", "K5ece3bac": "チームとメンバーを設定してから、チーム内でサービスとアプリケーションを作成し、API をサブスクライブできます。メンバーは所属チーム内のサービスとアプリケーションのみを表示できます。", "K1512e983": "アプリケーション呼び出し統計", "Kb4d2007f": "Application を選択", diff --git a/frontend/packages/common/src/locales/scan/oldJson/zh-CN.json b/frontend/packages/common/src/locales/scan/oldJson/zh-CN.json index 35fb722a..d2364570 100644 --- a/frontend/packages/common/src/locales/scan/oldJson/zh-CN.json +++ b/frontend/packages/common/src/locales/scan/oldJson/zh-CN.json @@ -5,6 +5,7 @@ "K9bdd8403": "为了安全地调用 API,你需要创建一个消费者以及Token。", "Kc8239422": "团队中包含了人员、消费者和服务,不同团队之间的消费者和服务数据是隔离的,可用于管理企业内部不同的部门/项目组/团队。", "Ka0a8840a": "审核其他消费者的订阅申请,审核通过后的才可发起 API 请求。", + "Kb9052305": "搜索用户名、邮箱", "K5ece3bac": "设置团队和成员,然后你可以在团队内创建服务和消费者、订阅API,成员只能看到所属团队内的服务和消费者。", "K1512e983": "消费者调用统计", "Kb4d2007f": "请选择消费者", diff --git a/frontend/packages/common/src/locales/scan/oldJson/zh-TW.json b/frontend/packages/common/src/locales/scan/oldJson/zh-TW.json index adfc47cc..7ac8fd66 100644 --- a/frontend/packages/common/src/locales/scan/oldJson/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/oldJson/zh-TW.json @@ -5,6 +5,7 @@ "K9bdd8403": "為了安全地調用 API,你需要創建一個應用以及Token。", "Kc8239422": "團隊中包含了人員、應用程式和服務,不同團隊之間的應用程式和服務數據是隔離的,可用於管理企業內部不同的部門/項目組/團隊。", "Ka0a8840a": "審核其他應用程式的訂閱申請,審核通過後的才可發起 API 請求。", + "Kb9052305": "搜索用戶名、電郵", "K5ece3bac": "設置團隊和成員,然後你可以在團隊內創建服務和應用程式、訂閱API,成員只能看到所屬團隊內的服務和應用程式。", "K1512e983": "應用程式調用統計", "Kb4d2007f": "請選擇應用程式", diff --git a/frontend/packages/common/src/locales/scan/zh-TW.json b/frontend/packages/common/src/locales/scan/zh-TW.json index 0c12871f..72373d12 100644 --- a/frontend/packages/common/src/locales/scan/zh-TW.json +++ b/frontend/packages/common/src/locales/scan/zh-TW.json @@ -700,5 +700,6 @@ "K1644b775": "新增", "Kc8ee3e62": "不存在匹配", "K1e97dbd8": "存在匹配", - "Kec91f0db": "申請方消費者" + "Kec91f0db": "申請方消費者", + "Kf5fd27ed": "輸入名稱查找使用者" } diff --git a/frontend/packages/core/src/pages/team/TeamInsideMember.tsx b/frontend/packages/core/src/pages/team/TeamInsideMember.tsx index 81836fb1..35c11e4e 100644 --- a/frontend/packages/core/src/pages/team/TeamInsideMember.tsx +++ b/frontend/packages/core/src/pages/team/TeamInsideMember.tsx @@ -333,7 +333,7 @@ const TeamInsideMember:FC = ()=>{ onSelect={(selectedData: Set) => { setAddMemberBtnDisabled((selectedData.length === 0)); }} - searchPlaceholder={$t("搜索用户名")} + searchPlaceholder={$t("输入名称查找用户")} /> From 85971447e160beabe66e79f815258474e26db4ac Mon Sep 17 00:00:00 2001 From: Liujian <824010343@qq.com> Date: Tue, 29 Oct 2024 14:19:36 +0800 Subject: [PATCH 87/91] update i18n --- resources/locale/i18n/en-US.json | 42 +++++++++++++++++--------------- resources/locale/i18n/ja-JP.json | 36 ++++++++++++++------------- resources/locale/i18n/zh-TW.json | 36 ++++++++++++++------------- 3 files changed, 60 insertions(+), 54 deletions(-) diff --git a/resources/locale/i18n/en-US.json b/resources/locale/i18n/en-US.json index 12c793a1..c9f6adff 100644 --- a/resources/locale/i18n/en-US.json +++ b/resources/locale/i18n/en-US.json @@ -1,44 +1,46 @@ { + "account": "Account", "ai provider": "AI Provider", - "api market": "API Portal", + "analysis": "Analysis Report", + "api": "API", "api doc": "API Documentation", - "application": "Application", - "application admin": "Application Administrator", - "application developer": "Application Developer", - "authorization": "Authorization", - "cluster": "Cluster", - "dashboard": "Dashboard", + "api gateway": "API Gateway", + "api portal": "API Portal", + "authorization": "Access Authorization", + "consumer": "Consumer", + "consumer admin": "Consumer Admin", + "consumer developer": "Consumer Developer", + "create": "Create", "data source": "Data Source", - "devops": "DevOps", - "devops admin": "DevOps Administrator", + "devops admin": "DevOps Admin", "general": "General Settings", "general member": "General Member", - "guest": "Guest", "log configuration": "Log Configuration", "manager": "Manager", + "manager all consumer": "Manage All Consumers", + "manager subscribed services": "Manage Subscribed Services", "member": "Member", - "organization": "Organization Management", "release": "Release", "role": "Role", - "router": "Router", "run view": "Run View", "service": "Service", - "service admin": "Service Administrator", - "service classification": "Service Directory", + "service admin": "Service Admin", "service developer": "Service Developer", + "service intro": "Service Documentation", "ssl certificate": "SSL Certificate", - "subscription management": "Subscription Management", + "allow subscribe service": "Allow Subscribe Service", + "subscription review": "Subscription Review", "subscription service": "Subscription Service", - "super admin": "Super Administrator", + "super admin": "Super Admin", "system settings": "System Settings", "team": "Team", - "team admin": "Team Administrator", + "team settings": "Team Settings", + "team admin": "Team Admin", "upstream": "Upstream", "view": "View", - "view all application": "View All Applications", + "view all consumer": "View All Consumers", "view all service": "View All Services", "view all team": "View All Teams", - "view system role": "View System Roles", - "view team role": "View Team Roles", + "view subscribed services": "View Subscribed Services", "workspace": "Workspace" } diff --git a/resources/locale/i18n/ja-JP.json b/resources/locale/i18n/ja-JP.json index a6c81be1..a7f00ec6 100644 --- a/resources/locale/i18n/ja-JP.json +++ b/resources/locale/i18n/ja-JP.json @@ -1,44 +1,46 @@ { + "account": "アカウント", "ai provider": "AIプロバイダー", - "api market": "APIマーケット", + "analysis": "分析レポート", + "api": "API", "api doc": "APIドキュメント", - "application": "アプリケーション", - "application admin": "アプリケーション管理者", - "application developer": "アプリケーション開発者", - "authorization": "認証", - "cluster": "クラスター", - "dashboard": "ダッシュボード", + "api gateway": "APIゲートウェイ", + "api portal": "APIポータル", + "authorization": "アクセス許可", + "consumer": "消費者", + "consumer admin": "消費者管理者", + "consumer developer": "消費者開発者", + "create": "作成", "data source": "データソース", - "devops": "DevOps", "devops admin": "DevOps管理者", "general": "一般設定", "general member": "一般メンバー", - "guest": "ゲスト", "log configuration": "ログ設定", "manager": "管理者", + "manager all consumer": "すべての消費者を管理", + "manager subscribed services": "購読したサービスを管理", "member": "メンバー", - "organization": "組織管理", "release": "リリース", "role": "役割", - "router": "ルーター", "run view": "実行ビュー", "service": "サービス", "service admin": "サービス管理者", - "service classification": "サービスディレクトリ", "service developer": "サービス開発者", + "service intro": "サービスドキュメント", "ssl certificate": "SSL証明書", - "subscription management": "サブスクリプション管理", - "subscription service": "サブスクリプションサービス", + "allow subscribe service": "サービスの購読を許可", + "subscription review": "購読レビュー", + "subscription service": "購読サービス", "super admin": "スーパ管理者", "system settings": "システム設定", "team": "チーム", + "team settings": "チーム設定", "team admin": "チーム管理者", "upstream": "アップストリーム", "view": "表示", - "view all application": "すべてのアプリケーションを表示", + "view all consumer": "すべての消費者を表示", "view all service": "すべてのサービスを表示", "view all team": "すべてのチームを表示", - "view system role": "システム役割を表示", - "view team role": "チーム役割を表示", + "view subscribed services": "購読したサービスを表示", "workspace": "ワークスペース" } diff --git a/resources/locale/i18n/zh-TW.json b/resources/locale/i18n/zh-TW.json index 5b35ad94..fc537d7f 100644 --- a/resources/locale/i18n/zh-TW.json +++ b/resources/locale/i18n/zh-TW.json @@ -1,44 +1,46 @@ { - "ai provider": "AI供應商", - "api market": "API市場", + "account": "帳號", + "ai provider": "AI模型供應商", + "analysis": "分析報告", + "api": "API", "api doc": "API文檔", - "application": "應用", - "application admin": "應用管理員", - "application developer": "應用開發者", - "authorization": "授權", - "cluster": "集群", - "dashboard": "儀表盤", + "api gateway": "API網關", + "api portal": "API門戶", + "authorization": "訪問授權", + "consumer": "消費者", + "consumer admin": "消費者管理員", + "consumer developer": "消費者開發者", + "create": "創建", "data source": "數據源", - "devops": "運維", "devops admin": "運維管理員", "general": "常規設置", "general member": "普通成員", - "guest": "訪客", "log configuration": "日誌配置", "manager": "管理", + "manager all consumer": "管理所有消費者", + "manager subscribed services": "管理已訂閱的服務", "member": "成員", - "organization": "組織管理", "release": "發布", "role": "角色", - "router": "路由", "run view": "運行視圖", "service": "服務", "service admin": "服務管理員", - "service classification": "服務目錄", "service developer": "服務開發者", + "service intro": "服務文檔", "ssl certificate": "SSL證書", - "subscription management": "訂閱方管理", + "allow subscribe service": "允許訂閱服務", + "subscription review": "訂閱審核", "subscription service": "訂閱服務", "super admin": "超級管理員", "system settings": "系統設置", "team": "團隊", + "team settings": "團隊設置", "team admin": "團隊管理員", "upstream": "上游", "view": "查看", - "view all application": "查看所有應用", + "view all consumer": "查看所有消費者", "view all service": "查看所有服務", "view all team": "查看所有團隊", - "view system role": "查看系統角色", - "view team role": "查看團隊角色", + "view subscribed services": "查看已訂閱的服務", "workspace": "工作空間" } From 1080f33282adc1146bfd937f44bcae33b1631529 Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:12:43 +0800 Subject: [PATCH 88/91] fix: Modify member transfer icon and department --- .../src/components/aoplatform/MemberTransfer.tsx | 9 ++++++--- .../core/src/pages/member/MemberDropdownModal.tsx | 1 - .../core/src/pages/team/TeamInsideMember.tsx | 15 ++++++++++----- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/frontend/packages/common/src/components/aoplatform/MemberTransfer.tsx b/frontend/packages/common/src/components/aoplatform/MemberTransfer.tsx index 7e549794..b582fe5c 100644 --- a/frontend/packages/common/src/components/aoplatform/MemberTransfer.tsx +++ b/frontend/packages/common/src/components/aoplatform/MemberTransfer.tsx @@ -2,11 +2,10 @@ import { TransferProps, TreeDataNode, Tree, Spin, Input } from "antd"; import { DataNode } from "antd/es/tree"; import { Ref, forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react"; -import { LoadingOutlined } from "@ant-design/icons"; +import { ApartmentOutlined, LoadingOutlined, UserOutlined } from "@ant-design/icons"; import { ColumnsType } from "antd/es/table"; import { $t } from "@common/locales"; import { useGlobalContext } from "@common/contexts/GlobalStateContext"; -import Search from "antd/es/input/Search"; export type TransferTableProps = { request?:(k?:string)=>Promise<{data:T[],success:boolean}> @@ -107,20 +106,23 @@ const generateTree = ( ...item, title, disableCheckbox:disabledData.indexOf(item.key as string) !== -1, + icon:, children: loop(item.children as T[]) }; } return { ...item, title, + icon:, isLeaf:true, disableCheckbox:disabledData.indexOf(item.key as string) !== -1 }; }); - console.log(searchWord, dataSource) return loop(dataSource); },[dataSource, state.language, searchWord]) + console.log(dataSource) + const getInitExpandKeys = (data:T[], expandKeys:string[] = [])=>{ data.forEach((item)=>{ if(item.children?.length){ @@ -160,6 +162,7 @@ const generateTree = ( onExpand={setExpandedKeys} treeData={translatedDataSource} blockNode + showIcon /> diff --git a/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx b/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx index 5d4cbe52..58860ec0 100644 --- a/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx +++ b/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx @@ -6,7 +6,6 @@ import { MemberDropdownModalHandle, MemberDropdownModalProps, DepartmentListItem import WithPermission from "@common/components/aoplatform/WithPermission.tsx"; import { $t } from "@common/locales/index.ts"; import { useGlobalContext } from "@common/contexts/GlobalStateContext.tsx"; -import { DataNode } from "antd/es/tree/index"; export const MemberDropdownModal = forwardRef((props,ref)=>{ const { message} = App.useApp() diff --git a/frontend/packages/core/src/pages/team/TeamInsideMember.tsx b/frontend/packages/core/src/pages/team/TeamInsideMember.tsx index 35c11e4e..dedf4f37 100644 --- a/frontend/packages/core/src/pages/team/TeamInsideMember.tsx +++ b/frontend/packages/core/src/pages/team/TeamInsideMember.tsx @@ -100,23 +100,27 @@ const TeamInsideMember:FC = ()=>{ ] : [...departmentMap.get('_withoutDepartment') || []]; - + let allMemberSelectedFlag:boolean = true for(const [k,v] of departmentMap){ if(k !== '_withoutDepartment' && allMemberIds.length > 0 ){ // 筛选出部门内没被勾选的用户,如果不存在没勾选用户,需要将部门id放入ids中 if(v.filter(m => allMemberIds.indexOf(m.id) === -1).length === 0){ setAllMemberSelectedDepartIds((pre)=>[...pre, k]) + }else if(['unknown','disable'].indexOf(k) === -1){ + allMemberSelectedFlag = false } } } - - if(!finalData[0].children || finalData[0].children.filter(m => allMemberIds.indexOf(m.id) === -1).length === 0){ - setAllMemberSelectedDepartIds((pre)=>[...pre, topDepartmentId]) + + if(departmentMap.get('_withoutDepartment')?.filter(x=>allMemberIds.indexOf(x)!==-1).length === 0 && allMemberSelectedFlag){ + setAllMemberSelectedDepartIds((pre)=>[...pre, topDepartmentId]) } + return {data:finalData, success: true} }).catch(()=>({data:[], success:false})) } + const getMemberList = ()=>{ return fetchData>('team/members',{method:'GET',eoParams:{keyword:searchWord, team:teamId},eoTransformKeys:['attach_time','is_delete']}).then(response=>{ @@ -331,7 +335,8 @@ const TeamInsideMember:FC = ()=>{ disabledData={treeDisabledData} request={()=>getDepartmentMemberList()} onSelect={(selectedData: Set) => { - setAddMemberBtnDisabled((selectedData.length === 0)); + const memberKeyFromModal = Array.from(selectedData)?.filter(x => allMemberIds.indexOf(x) === -1 &&selectableMemberIds.has(x)) || []; + setAddMemberBtnDisabled((memberKeyFromModal.length === 0)); }} searchPlaceholder={$t("输入名称查找用户")} /> From 2b7c1ded152179e6f014c37898422410cf714c64 Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Tue, 29 Oct 2024 16:44:31 +0800 Subject: [PATCH 89/91] fix: Add psw to account --- .../packages/core/src/const/member/type.ts | 1 + .../src/pages/member/MemberDropdownModal.tsx | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/frontend/packages/core/src/const/member/type.ts b/frontend/packages/core/src/const/member/type.ts index 2acc8d34..12bef17d 100644 --- a/frontend/packages/core/src/const/member/type.ts +++ b/frontend/packages/core/src/const/member/type.ts @@ -35,6 +35,7 @@ export type MemberDropdownModalFieldType = { parent?:string email?:string departmentIds?:string[] + password:string }; export type MemberDropdownModalProps = { diff --git a/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx b/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx index 58860ec0..50be6ae1 100644 --- a/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx +++ b/frontend/packages/core/src/pages/member/MemberDropdownModal.tsx @@ -80,6 +80,15 @@ export const MemberDropdownModal = forwardRef{ + const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + let result = ''; + for (let i = 0; i < 8; i++) { + result += chars.charAt(Math.floor(Math.random() * chars.length)); + } + return result; + } + useEffect(() => { switch(type){ case 'addChild': @@ -89,7 +98,7 @@ export const MemberDropdownModal = forwardRefx.id)}) @@ -182,6 +191,13 @@ export const MemberDropdownModal = forwardRef + + label={$t("密码")} + name="password" + rules={[{required: type === 'addMember',whitespace:true }]} + > + + label={$t("部门")} name="departmentIds" From f9e6bc92d75b4ec31f5e8008d703dfee3c8219f7 Mon Sep 17 00:00:00 2001 From: HaoZhen Liu Date: Tue, 29 Oct 2024 17:28:41 +0800 Subject: [PATCH 90/91] update v1.2 translation --- .../common/src/locales/scan/en-US.json | 18 +++++++++--------- .../common/src/locales/scan/zh-CN.json | 4 +++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/frontend/packages/common/src/locales/scan/en-US.json b/frontend/packages/common/src/locales/scan/en-US.json index 7f32cdda..56257210 100644 --- a/frontend/packages/common/src/locales/scan/en-US.json +++ b/frontend/packages/common/src/locales/scan/en-US.json @@ -319,7 +319,7 @@ "Ka46b9b24": "Data Source Type", "Kbb0cdcd0": "Data Source Address", "Kd9dfb884": "Organization", - "K3e770a75": "Authentication Token", + "K3e770a75": "Credentials Token", "K8ef69ee2": "Key", "Kba3507d6": "Upload Key", "K93ac0f23": "Key file suffix is usually .key", @@ -365,7 +365,7 @@ "Kcef64f4d": "Default AI Provider", "Kcab588a9": "No AI model provider set,", "Kb9b56111": "Set Now", - "Kcf756b7a": "API Call Prefix", + "Kcf756b7a": "API Request Prefix", "K13edc043": "As a prefix for all APIs in the service, e.g., host/{service_name}/{api_path}, cannot be modified once saved.", "Kf52a584d": "Service Category", "K72b21be5": "Set the category in which the service will be displayed in the service marketplace", @@ -391,8 +391,8 @@ "K813e1c0a": "Team Name", "K692f5aa6": "Team ID", "K5de0bc2": "Team ID can be used to retrieve the team, cannot be modified once saved.", - "Ka63dd985": "Team Leader", - "Ka6bcd272": "The leader has management authority over the team, services, and members within the team", + "Ka63dd985": "Team Administrator", + "Ka6bcd272": "The Administrator has management authority over the team, services, and members within the team", "Ka2012bdd": "Delete Team", "Kbde1f3d": "Service data must be cleared before deletion", "K395acc14": "Remove", @@ -463,7 +463,7 @@ "Kd59290a2": "Search Category or Tag", "K6b75bdbc": "No API Data", "K4b15d6f5": "Application Reason", - "Kb71b5a13": "Authentication Type", + "Kb71b5a13": "Credentials Type", "K4d1465ee": "ISS", "K5dcd7ed8": "Signature Algorithm", "K5b0eedd3": "Secret", @@ -475,10 +475,10 @@ "K31418470": "SK", "Kbfeb5297": "API Key", "K1a78e6f0": "Expiration Time", - "Ke64e43a": "Hide Authentication Info", - "K217cb125": "Authentication Details", - "K2bb63eca": "Add Authentication", - "Kd74d69b7": "Edit Authentication", + "Ke64e43a": "Hide Credentials Info", + "K217cb125": "Credentials Details", + "K2bb63eca": "Add Credentials", + "Kd74d69b7": "Edit Credentials", "K9cbe1e0": "Modify", "Kb6e9328f": "Authorization", "Kd23d1716": "Add Authorization", diff --git a/frontend/packages/common/src/locales/scan/zh-CN.json b/frontend/packages/common/src/locales/scan/zh-CN.json index 9c33895e..52fc73e6 100644 --- a/frontend/packages/common/src/locales/scan/zh-CN.json +++ b/frontend/packages/common/src/locales/scan/zh-CN.json @@ -676,5 +676,7 @@ "K6e32a344": "订阅服务数量", "Ka701316": "鉴权数量", "K9eaa2eb6": "列表", - "Kfaec39e9": "块" + "Kfaec39e9": "块", + "Kc3b7bfa8": "暂无消费者描述", + "K3a6f905d": "输入名称、ID 查找消费者" } \ No newline at end of file From 9030cff8ba091092b20c228131647b2d5e990c5f Mon Sep 17 00:00:00 2001 From: maggieyyy <61950669+maggieyyy@users.noreply.github.com> Date: Tue, 29 Oct 2024 18:32:45 +0800 Subject: [PATCH 91/91] fix: Modify local path --- frontend/packages/businessEntry/index.html | 2 +- .../src/components/aoplatform/BasicLayout.tsx | 2 +- frontend/packages/core/index.html | 32 +++++++++++++++---- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/frontend/packages/businessEntry/index.html b/frontend/packages/businessEntry/index.html index 3f94bfbe..aa5cad3d 100644 --- a/frontend/packages/businessEntry/index.html +++ b/frontend/packages/businessEntry/index.html @@ -4,7 +4,7 @@ - APIPark + 2APIPark
diff --git a/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx b/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx index f4a96738..d0c80a86 100644 --- a/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx +++ b/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx @@ -243,7 +243,7 @@ const themeToken = {
)} logo={Logo} - pageTitleRender={()=>$t('APIPark - 企业API数据开放平台')} + pageTitleRender={()=>$t('APIPark')} menuFooterRender={(props) => { if (props?.collapsed) return undefined; }} diff --git a/frontend/packages/core/index.html b/frontend/packages/core/index.html index 701ad66b..1d0cbe88 100644 --- a/frontend/packages/core/index.html +++ b/frontend/packages/core/index.html @@ -1,16 +1,36 @@ - + - + - APIPark - +
- - +
- 接入所有主流 AI 供應商的 100+ 大模型 + 快速接入 100+ AI 模型 - 統一所有 AI API 的調用格式,無需額外適配工作 + 通過統一的 API 格式來調用所有 AI
- - API 服務廣場是 APIPark 的核心功能之一,旨在解決企業內部 API 分散、管理混亂的問題。透過 API 服務廣場,企業可以將所有的 API 服務集中展示在一個統一的平台上,讓不同部門和團隊能輕鬆找到並使用所需的 API 服務。 + + + +
+ 一鍵將 Prompt 提示詞封裝成 REST API + + 在團隊內快速共享 API 服務 +
+ + + +
+ 比肩 Nginx 的強大性能 + + 一站式完成 API 設計、發布、調用、下線 +
+ - API 全生命週期管理功能幫助企業規範 API 的管理流程,管理 API 的流量轉發與負載均衡,並管理所有 API 對外發佈的版本,提升 API 的品質與可維護性。透過這個功能,企業可以實現 API 的高效開發與穩定運營,從而支持業務的快速發展與創新。 -
- 組合 AI 模型與提示詞,形成新的 AI API - - 切換 AI 模型或修改提示詞不會影響你的應用程式或微服務 -
- - API 服務廣場是 APIPark 的核心功能之一,旨在解決企業內部 API 分散、管理混亂的問題。透過 API 服務廣場,企業可以將所有的 API 服務集中展示在一個統一的平台上,讓不同部門和團隊能輕鬆找到並使用所需的 API 服務。 - - - API 全生命週期管理功能幫助企業規範 API 的管理流程,管理 API 的流量轉發與負載均衡,並管理所有 API 對外發佈的版本,提升 API 的品質與可維護性。透過這個功能,企業可以實現 API 的高效開發與穩定運營,從而支持業務的快速發展與創新。 -
- 集中管理與展示所有 AI / REST API - - 覆蓋 API 從設計、發佈、運行、下線的全過程 -
- - API 服務廣場是 APIPark 的核心功能之一,旨在解決企業內部 API 分散、管理混亂的問題。透過 API 服務廣場,企業可以將所有的 API 服務集中展示在一個統一的平台上,讓不同部門和團隊能輕鬆找到並使用所需的 API 服務。 - - - API 全生命週期管理功能幫助企業規範 API 的管理流程,管理 API 的流量轉發與負載均衡,並管理所有 API 對外發佈的版本,提升 API 的品質與可維護性。透過這個功能,企業可以實現 API 的高效開發與穩定運營,從而支持業務的快速發展與創新。
- 管理多個租戶,確保數據隔離與安全 + 審核租戶的 API 調用申請 - API 資源需先申請並通過審核後才能調用 + 多租戶管理
- - 多租戶管理功能為企業提供在同一平台上管理多個租戶的能力。每個租戶可以擁有獨立的資源、使用者與權限設置,確保數據與操作隔離,提升資源使用效率與管理便捷性。 - - APIPark 為所有 API 資源提供流程審核功能,避免違規或繞過平台來調用 API。調用方需先申請 API 資源,並等待服務方審核通過後才能正式調用 API。 + +
- 透過詳細的調用日誌,幫助排查 API 在任何時刻的訪問情況 + 詳細記錄所有 API 的調用日誌 - 豐富的統計報表* + 強大的數據分析
- API 調用日誌功能為企業提供全面的日誌記錄能力,詳細記錄每一次 API 調用的所有相關信息。透過這些日誌,企業可以快速追蹤與排查 API 調用中的問題,確保系統穩定運行與數據安全。 - 透過對歷史調用數據的分析,APIPark 能夠展示 API 長期的調用趨勢與性能變化,幫助企業在問題發生前進行預防性維護。