Merge branch 'feature/v1.2' into 'main'

Feature/v1.2

See merge request apipark/APIPark!39
This commit is contained in:
杨梦洁
2024-10-24 13:52:16 +08:00
14 changed files with 335 additions and 122 deletions
@@ -132,6 +132,7 @@ export const TranslateWord = ()=>{
{$t('每小时')}
{$t('每天')}
{$t('每周')}
{$t('上线结果')}
</>
)
@@ -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",
@@ -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, APIParks 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"
}
@@ -0,0 +1,3 @@
{
"K93c2696e": "上线结果"
}
@@ -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": "接入消费者数量"
}
@@ -0,0 +1,3 @@
{
"K93c2696e": "上线结果"
}
@@ -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": "接入消费者数量"
}
@@ -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"
}
@@ -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": "申請元-アプリケーション"
}
@@ -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": "申请方-消费者"
}
@@ -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": "申請方-應用程式"
}
@@ -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": "接入消费者数量"
}
@@ -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:<AiSettingModalContent ref={modalRef} entity={data.provider} readOnly={!checkAccess('system.devops.ai_provider.edit', accessData)}/>,
content:<AiSettingModalContent ref={modalRef} entity={{...data.provider,defaultLlm:entity.defaultLlm}} readOnly={!checkAccess('system.devops.ai_provider.edit', accessData)}/>,
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<DefaultOptionType[]>([])
const [loading, setLoading] = useState<boolean>(false)
const [defaultLlm, setDefaultLlm] = useState<string>(provider.defaultLlm)
const getLlmList = ()=>{
if(options.length > 0) return
setLoading(true)
fetchData<BasicResponse<{llms:AiProviderLlmsItems[]}>>(`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:<span className="w-full truncate">{x.id}</span>,
value:x.id})))
}else{
message.error(msg || $t(RESPONSE_TIPS.error))
}
}).finally(()=>{
setLoading(false)
})
}
const changeDefaultModel = (value: string, entity:AiSettingListItem) => {
setLoading(true)
return fetchData<BasicResponse<null>>(`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 (
<Card title={
<div className="flex items-center justify-between">
<div className="flex items-center gap-[4px]">
<div className="flex w-full items-center justify-between gap-[4px]">
<div className="flex flex-1 overflow-hidden items-center gap-[4px]">
<span className=" flex items-center h-[22px] ai-setting-svg-container" dangerouslySetInnerHTML={{ __html: provider.logo }} ></span>
<span className="font-normal">{provider.name}</span>
<span className="font-normal truncate">{provider.name}</span>
</div>
<Tag bordered={false} color={provider.configured ? 'green' : undefined} className="h-[22px] px-[4px] text-center">
{provider.configured ? $t('已配置') : $t('未配置')}
@@ -178,18 +141,7 @@ const AiSettingList = ()=>{
<div className="flex flex-col justify-between h-full gap-btnbase ">
<div className="flex items-center w-full h-[32px] flex-1">{
provider.configured && <><label className="text-nowrap">{$t('默认')}</label>
<WithPermission access="system.devops.ai_provider.edit">
<Select
value={defaultLlm}
variant="borderless"
className="flex-1 overflow-hidden"
// style={{ width: '100%' }}
onChange={(value)=>changeDefaultModel(value, provider)}
options={options}
onFocus={()=> getLlmList()}
loading={loading }
/>
</WithPermission>
<span className="flex-1 overflow-hidden truncate">{provider.defaultLlm}</span>
</>
}
@@ -248,8 +200,8 @@ const AiSettingList = ()=>{
aiSettingList.filter((item)=>!item.configured).length > 0 && <>
<Divider style={{margin:'20px 0 !important;'}} />
<p className="text-[14px] text-[#666] mb-[4px] mt-[20px] font-bold">{$t('未配置')}</p>
<ModelCardArea modelList={aiSettingList.filter((item)=>!item.configured) || [] }/>
</>
<ModelCardArea modelList={aiSettingList.filter((item)=>!item.configured) || [] }/>
</>
}
</div>:<Empty image={Empty.PRESENTED_IMAGE_SIMPLE}/>}
</Spin>
@@ -1,15 +1,14 @@
import WithPermission from "@common/components/aoplatform/WithPermission";
import { BasicResponse, STATUS_CODE, RESPONSE_TIPS } from "@common/const/const";
import { BasicResponse, STATUS_CODE, RESPONSE_TIPS, PLACEHOLDER } from "@common/const/const";
import { useFetch } from "@common/hooks/http";
import { $t } from "@common/locales";
import { App } from "antd";
import { App, Form, Select, Tag } from "antd";
import { forwardRef, useEffect, useImperativeHandle, useState } from "react";
import { AiProviderConfig } from "./AiSettingList";
import { AiProviderConfig, AiProviderLlmsItems } from "./AiSettingList";
import { Codebox } from "@common/components/postcat/api/Codebox";
export type AiSettingModalContentProps = {
entity:AiProviderConfig
entity:AiProviderConfig & {defaultLlm:string}
readOnly:boolean
}
@@ -17,31 +16,65 @@ export type AiSettingModalContentHandle = {
save:()=>Promise<boolean|string>
}
type AiSettingModalContentField = {
config:string
defaultLlm:string
}
const AiSettingModalContent = forwardRef<AiSettingModalContentHandle,AiSettingModalContentProps>((props,ref)=>{
const [form] = Form.useForm();
const { message } = App.useApp()
const {entity,readOnly} = props
const {fetchData} = useFetch()
const [code, setCode] = useState<string>()
const [llmList, setLlmList] = useState<AiProviderLlmsItems[]>()
const [loading, setLoading] = useState<boolean>(false)
const getLlmList = ()=>{
setLoading(true)
fetchData<BasicResponse<{llms:AiProviderLlmsItems[]}>>(`ai/provider/llms`,{method:'GET',eoParams:{provider:entity.id}}).then(response=>{
const {code,data,msg} = response
if(code === STATUS_CODE.SUCCESS){
setLlmList(data.llms)
}else{
message.error(msg || $t(RESPONSE_TIPS.error))
}
}).finally(()=>{
setLoading(false)
})
}
useEffect(() => {
getLlmList()
try{
entity!.config && setCode(JSON.stringify(JSON.parse(entity!.config),null,2))
form.setFieldsValue({
defaultLlm:entity.defaultLlm,
config:entity!.config ? JSON.stringify(JSON.parse(entity!.config),null,2) : ''
})
}catch(e){
setCode('')
form.setFieldsValue({
defaultLlm:entity.defaultLlm,
config: ''
})
}
}, []);
const save: ()=>Promise<boolean | string> = ()=>{
return fetchData<BasicResponse<null>>('ai/provider/config',{method:'PUT',eoParams:{provider:entity?.id}, eoBody:({config:code})}).then(response=>{
const {code,msg} = response
if(code === STATUS_CODE.SUCCESS){
message.success(msg || $t(RESPONSE_TIPS.success))
return Promise.resolve(true)
}else{
message.error(msg || $t(RESPONSE_TIPS.error))
return Promise.reject(msg || $t(RESPONSE_TIPS.error))
}
}).catch((errorInfo)=> Promise.reject(errorInfo))
return new Promise((resolve, reject)=>{
form.validateFields().then((value)=>{
fetchData<BasicResponse<null>>('ai/provider/config',{method:'PUT',eoParams:{provider:entity?.id}, eoBody:value, eoTransformKeys:['defaultLlm']}).then(response=>{
const {code,msg} = response
if(code === STATUS_CODE.SUCCESS){
message.success(msg || $t(RESPONSE_TIPS.success))
resolve(true)
}else{
message.error(msg || $t(RESPONSE_TIPS.error))
reject(msg || $t(RESPONSE_TIPS.error))
}
}).catch((errorInfo)=> reject(errorInfo))
}).catch((errorInfo)=> reject(errorInfo))
})
}
useImperativeHandle(ref, ()=>({
@@ -50,8 +83,44 @@ const AiSettingModalContent = forwardRef<AiSettingModalContentHandle,AiSettingMo
)
return (
<Codebox editorTheme="vs-dark" readOnly={readOnly}
value={code} onChange={setCode} width="100%" height="300px" language='json' enableToolbar={false} />
<Form
layout='vertical'
labelAlign='left'
scrollToFirstError
form={form}
className="mx-auto flex flex-col h-full"
name="aiServiceInsideRouterModalConfig"
autoComplete="off"
>
<Form.Item<AiSettingModalContentField>
label={$t("模型")}
name="defaultLlm"
rules={[{ required: true }]}
>
<Select className="w-INPUT_NORMAL"
placeholder={$t(PLACEHOLDER.select)}
loading={loading}
options={llmList?.map(x=>({
value:x.id,
label:<div className="flex items-center gap-[10px]">
<span>{x.id}</span>
{x?.scopes?.map(s=><Tag >{s?.toLocaleUpperCase()}</Tag>)}
</div>}))}
onChange={(e)=>{
form.setFieldValue('config',llmList?.find(x=>x.id===e)?.config)
}}>
</Select>
</Form.Item>
<Form.Item<AiSettingModalContentField>
label={$t("参数")}
name="config"
>
<Codebox editorTheme="vs-dark" readOnly={readOnly}
width="100%" height="300px" language='json' enableToolbar={false} />
</Form.Item>
</Form>
)
})