Merge remote-tracking branch 'github-pro/main' into feature/translate

# Conflicts:
#	.github/ISSUE_TEMPLATE/bug_report.yml
#	.github/ISSUE_TEMPLATE/request_help.yml
This commit is contained in:
Liujian
2024-10-28 15:06:24 +08:00
48 changed files with 169 additions and 303 deletions
+1
View File
@@ -27,4 +27,5 @@ packages/core/public/tinymce/
*.sln
*.sw?
/pnpm-lock.yaml
+1 -8
View File
@@ -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: ['<rootDir>/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: ['<rootDir>/jest.setup.js'],
};
};
+1 -7
View File
@@ -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';
// import '@testing-library/jest-dom/extend-expect';
+1
View File
@@ -3,4 +3,5 @@
"packages/*"
],
"version": "independent"
}
@@ -6,7 +6,6 @@ yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
+1 -1
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/frontend/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>APIPark - 企业API数据开放平台</title>
<title>APIPark</title>
</head>
<body>
<div id="root"></div>
+1 -1
View File
@@ -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",
@@ -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': {},
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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';
+1 -6
View File
@@ -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': {},
@@ -48,27 +48,27 @@ const themeToken = {
getNavItem(<a>{$t('消费者')}</a>, 'consumer','/consumer',<Icon icon="ic:baseline-apps" width="18" height="18"/>,undefined,undefined,'all'),
getNavItem(<a>{$t('团队')}</a>, 'team','/team',<Icon icon="ic:baseline-people-alt" width="18" height="18"/>,undefined,undefined,'all'),
]),
getNavItem($t('API 市场'), 'serviceHub','/serviceHub',<Icon icon="ic:baseline-hub" width="18" height="18"/>,undefined,undefined,'system.workspace.api_market.view'),
getNavItem($t('API 市场'), 'serviceHub','/serviceHub',<Icon icon="ic:baseline-hub" width="18" height="18"/>,undefined,undefined,'system.api_portal.api_portal.view'),
getNavItem($t('仪表盘'), 'mainPage', APP_MODE === 'pro' ? '/analytics' : '/analytics/total',<Icon icon="ic:baseline-bar-chart" width="18" height="18"/>,[
getNavItem(<a >{$t('运行视图')}</a>, 'analytics',APP_MODE === 'pro' ? '/analytics' : '/analytics/total' ,<ProjectFilled />,undefined,undefined,'system.dashboard.run_view.view'),
getNavItem(<a >{$t('运行视图')}</a>, 'analytics',APP_MODE === 'pro' ? '/analytics' : '/analytics/total' ,<ProjectFilled />,undefined,undefined,'system.analysis.run_view.view'),
APP_MODE === 'pro' ? getNavItem(<a >{$t('系统拓扑图')}</a>, 'systemrunning','/systemrunning',<ProjectFilled />,undefined,undefined,'system.dashboard.systemrunning.view') : null,
],undefined,'system.dashboard.run_view.view'),
],undefined,'system.analysis.run_view.view'),
getNavItem($t('系统设置'), 'operationCenter','/commonsetting',<Icon icon="ic:baseline-settings" width="18" height="18"/>, [
getNavItem($t('系统'), 'serviceHubSetting','/commonsetting',null,[
getNavItem(<a>{$t('常规')}</a>, 'commonsetting','/commonsetting',<Icon icon="ic:baseline-hub" width="18" height="18"/>,undefined,undefined,'system.api_market.service_classification.view'),
getNavItem(<a>{$t('API 网关')}</a>, 'cluster','/cluster',<Icon icon="ic:baseline-device-hub" width="18" height="18"/>,undefined,undefined,'system.devops.cluster.view'),
getNavItem(<a>{$t('AI 模型')}</a>, 'aisetting','/aisetting',<Icon icon="hugeicons:ai-network" width="18" height="18"/>,undefined,undefined,'system.devops.cluster.view'),
getNavItem(<a>{$t('API 网关')}</a>, 'cluster','/cluster',<Icon icon="ic:baseline-device-hub" width="18" height="18"/>,undefined,undefined,'system.settings.api_gateway.view'),
getNavItem(<a>{$t('AI 模型')}</a>, 'aisetting','/aisetting',<Icon icon="hugeicons:ai-network" width="18" height="18"/>,undefined,undefined,'system.settings.api_gateway.view'),
],undefined,'system.api_market.service_classification.view'),
getNavItem($t('用户'), 'organization','/member',null,[
getNavItem(<a>{$t('账号')}</a>, 'member','/member',<Icon icon="ic:baseline-people-alt" width="18" height="18"/>,undefined,undefined,'system.organization.member.view'),
getNavItem(<a>{$t('账号')}</a>, 'member','/member',<Icon icon="ic:baseline-people-alt" width="18" height="18"/>,undefined,undefined,'system.settings.account.view'),
getNavItem(<a>{$t('角色')}</a>, 'role','/role',<Icon icon="ic:baseline-verified-user" width="18" height="18"/>,undefined,undefined,'system.organization.role.view'),
],undefined,''),
getNavItem($t('集成'), 'maintenanceCenter','/datasourcing', null, [
getNavItem(<a>{$t('数据源')}</a>, 'datasourcing','/datasourcing',<Icon icon="ic:baseline-monitor-heart" width="18" height="18"/>,undefined,undefined,'system.devops.data_source.view'),
getNavItem(<a>{$t('证书')}</a>, 'cert','/cert',<Icon icon="ic:baseline-security" width="18" height="18"/>,undefined,undefined,'system.devops.ssl_certificate.view'),
getNavItem(<a>{$t('日志')}</a>, 'logsettings','/logsettings',<Icon icon="ic:baseline-sticky-note-2" width="18" height="18"/>,undefined,undefined,'system.devops.log_configuration.view'),
getNavItem(<a>{$t('数据源')}</a>, 'datasourcing','/datasourcing',<Icon icon="ic:baseline-monitor-heart" width="18" height="18"/>,undefined,undefined,'system.settings.data_source.view'),
getNavItem(<a>{$t('证书')}</a>, 'cert','/cert',<Icon icon="ic:baseline-security" width="18" height="18"/>,undefined,undefined,'system.settings.ssl_certificate.view'),
getNavItem(<a>{$t('日志')}</a>, 'logsettings','/logsettings',<Icon icon="ic:baseline-sticky-note-2" width="18" height="18"/>,undefined,undefined,'system.settings.log_configuration.view'),
APP_MODE === 'pro' ? getNavItem(<a>{$t('资源')}</a>, 'resourcesettings','/resourcesettings',null,undefined,undefined,'system.partition.self.view'):null,
APP_MODE === 'pro' ? getNavItem(<a>{$t('Open API')}</a>, 'openapi','/openapi',null,undefined,undefined,'system.openapi.self.view'):null,
]),
@@ -343,11 +343,6 @@ export const PUBLISH_APPROVAL_RECORD_INNER_TABLE_COLUMN : PageProColumns<Publish
dataIndex: 'status',
ellipsis:true,
},
{
title:('备注'),
dataIndex: 'comments',
ellipsis:true
},
{
title:('申请人'),
dataIndex: ['applicant','name'],
@@ -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": {
@@ -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
@@ -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 };
// };
+1 -6
View File
@@ -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;
+1 -6
View File
@@ -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,
+1 -6
View File
@@ -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': {},
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -137,7 +137,7 @@ const ServiceInsideDocument = ()=>{
<div className=" pl-[8px] py-btnbase ">
<div className="flex justify-between items-center">
<p className="text-[14px] leading-[20px] text-[#999999]"><span className="mr-[20px]">{$t('最近一次更新者')}{updater || '-'}</span><span>{$t('最近一次更新时间')}{updateTime || '-'}</span></p>
<WithPermission access="team.service.service.edit"><Button type="primary" className="mr-btnbase" onClick={save}>{$t('保存')}</Button></WithPermission>
<WithPermission access="team.service.service_intro.edit"><Button type="primary" className="mr-btnbase" onClick={save}>{$t('保存')}</Button></WithPermission>
</div>
</div>
</div>)
@@ -62,7 +62,7 @@ const AiServiceInsidePage:FC = ()=> {
[
getItem(<Link to="./route">{$t('API 路由')}</Link>, 'route',undefined,undefined,undefined,'team.service.router.view'),
getItem(<Link to="./api">{$t('API 文档')}</Link>, 'api',undefined,undefined,undefined,'team.service.api_doc.view'),
getItem(<Link to="./document">{$t('使用说明')}</Link>, 'document',undefined,undefined,undefined,''),
getItem(<Link to="./document">{$t('使用说明')}</Link>, 'document',undefined,undefined,undefined,'team.service.service_intro.view'),
getItem(<Link to="./publish">{$t('发布')}</Link>, 'publish',undefined,undefined,undefined,'team.service.release.view'),
],
'group'),
@@ -18,6 +18,7 @@ export type AiServiceRouterModelConfigProps = {
}
type AiServiceRouterModelConfigField = {
provider:string
id:string
config:string
}
@@ -57,6 +58,7 @@ const AiServiceRouterModelConfig = forwardRef<AiServiceRouterModelConfigHandle,
const {code,data,msg} = response
if(code === STATUS_CODE.SUCCESS){
setLlmList(data.llms)
console.log(data)
form.setFieldsValue({
id:data.provider.defaultLlm,
config:data.llms.find(x=>x.id===data.provider.defaultLlm)?.config})
@@ -70,6 +72,10 @@ const AiServiceRouterModelConfig = forwardRef<AiServiceRouterModelConfigHandle,
getLlmList(provider)
}
useEffect(()=>{
getLlmList(entity.provider)
},[])
return (
<Form
layout='vertical'
@@ -146,7 +146,7 @@ const AiSettingList = ()=>{
}
</div>
<WithPermission access="system.devops.ai_provider.view">
<WithPermission access="system.settings.ai_provider.view">
<Button block icon={<Icon icon="ic:outline-settings" width={18} height={18}/>} onClick={()=>openModal(provider)} classNames={{icon:'h-[18px]'}}>{$t('设置')}</Button>
</WithPermission>
</div>
@@ -45,7 +45,7 @@ const LogSettings = ()=>{
undefined,
undefined,
undefined,
'system.devops.log_configuration.view')
'system.settings.log_configuration.view')
})
return newMenu
},[state.language,menuItems])
@@ -47,7 +47,7 @@ const LogSettings = ()=>{
undefined,
undefined,
undefined,
'system.devops.log_configuration.view')
'system.settings.log_configuration.view')
})
return newMenu
},[state.language,menuItems])
@@ -292,7 +292,7 @@ const SystemConfig = forwardRef<SystemConfigHandle>((_,ref) => {
return (
<>
<WithPermission access={onEdit ? 'team.service.service.edit' :''}>
<WithPermission access={onEdit ? ['team.service.service.edit'] :''}>
<Form
layout='vertical'
labelAlign='left'
@@ -460,7 +460,7 @@ const SystemConfig = forwardRef<SystemConfigHandle>((_,ref) => {
<Row className="mb-[10px]"
// wrapperCol={{ offset: 5, span: 19 }}
>
<WithPermission access={onEdit ? 'team.service.service.edit' :''}>
<WithPermission access={onEdit ? ['team.service.service.edit'] :''}>
<Button type="primary" htmlType="submit">
{$t('保存')}
</Button>
@@ -468,11 +468,11 @@ const SystemConfig = forwardRef<SystemConfigHandle>((_,ref) => {
</Row></>}
</div>
{onEdit && <>
<WithPermission access="team.service.service.delete" showDisabled={false}>
<WithPermission access={["team.service.service.delete"]} showDisabled={false}>
<div className="bg-[rgb(255_120_117_/_5%)] rounded-[10px] mt-[50px] p-btnrbase pb-0">
<p className="text-left"><span className="font-bold">{$t('删除服务')}</span>{$t('删除操作不可恢复,请谨慎操作!')}</p>
<div className="text-left">
<WithPermission access="team.service.service.delete">
<WithPermission access={["team.service.service.delete"]}>
<Button className="m-auto mt-[16px] mb-[20px]" type="default" danger={true} onClick={deleteSystemModal}>{$t('删除服务')}</Button>
</WithPermission>
</div>
@@ -137,7 +137,7 @@ const ServiceInsideDocument = ()=>{
<div className=" pl-[8px] py-btnbase ">
<div className="flex justify-between items-center">
<p className="text-[14px] leading-[20px] text-[#999999]"><span className="mr-[20px]">{$t('最近一次更新者')}{updater || '-'}</span><span>{$t('最近一次更新时间')}{updateTime || '-'}</span></p>
<WithPermission access="team.service.service.edit"><Button type="primary" className="mr-btnbase" onClick={save}>{$t('保存')}</Button></WithPermission>
<WithPermission access="team.service.service_intro.edit"><Button type="primary" className="mr-btnbase" onClick={save}>{$t('保存')}</Button></WithPermission>
</div>
</div>
</div>)
@@ -62,7 +62,7 @@ const SystemInsidePage:FC = ()=> {
getItem(<Link to="./route">{$t('API 路由')}</Link>, 'route',undefined,undefined,undefined,'team.service.router.view'),
getItem(<Link to="./api">{$t('API 文档')}</Link>, 'api',undefined,undefined,undefined,'team.service.api_doc.view'),
getItem(<Link to="./upstream">{$t('上游')}</Link>, 'upstream',undefined,undefined,undefined,'team.service.upstream.view'),
getItem(<Link to="./document">{$t('使用说明')}</Link>, 'document',undefined,undefined,undefined,''),
getItem(<Link to="./document">{$t('使用说明')}</Link>, 'document',undefined,undefined,undefined,'team.service.service_intro.view'),
getItem(<Link to="./publish">{$t('发布')}</Link>, 'publish',undefined,undefined,undefined,'team.service.release.view'),
],
'group'),
@@ -3,7 +3,7 @@ import {App, Button, Form, Input, Row, Select} from "antd";
import {Link, useLocation, useNavigate, useParams} from "react-router-dom";
import {RouterParams} from "@core/components/aoplatform/RenderRoutes.tsx";
import { v4 as uuidv4 } from 'uuid'
import {BasicResponse, PLACEHOLDER, RESPONSE_TIPS, STATUS_CODE, VALIDATE_MESSAGE} from "@common/const/const.tsx";
import {BasicResponse, PLACEHOLDER, RESPONSE_TIPS, STATUS_CODE} from "@common/const/const.tsx";
import {MemberItem} from "@common/const/type.ts";
import {useFetch} from "@common/hooks/http.ts";
import {DefaultOptionType} from "antd/es/cascader";
@@ -37,7 +37,7 @@ const TeamConfig= forwardRef<TeamConfigHandle,TeamConfigProps>((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<boolean>(false)
@@ -197,7 +197,7 @@ const TeamConfig= forwardRef<TeamConfigHandle,TeamConfigProps>((props,ref) => {
<p className="text-left"><span className="font-bold">{$t('删除团队')}</span>{$t('删除操作不可恢复,请谨慎操作!')}</p>
<div className="text-left">
<WithPermission access="system.organization.team.delete" disabled={!canDelete} tooltip={canDelete ? '':$t('服务数据清除后,方可删除')}>
<Button className="m-auto mt-[16px] mb-[20px]" type="default" danger onClick={()=>deleteTeam(entity!)}>{$t('删除')}</Button>
<Button className="m-auto mt-[16px] mb-[20px]" type="default" danger onClick={()=>deleteTeam()}>{$t('删除')}</Button>
</WithPermission>
</div>
</div>
@@ -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<TeamTableListItem>[] =[
{
title: COLUMNS_TITLE.operate,
key: 'option',
fixed:'right',
btnNums:2,
valueType: 'option',
render: (_: React.ReactNode, entity: TeamTableListItem) => [
<TableBtnWithPermission access="" key="view" btnType="view" navigateTo={`../inside/${entity.id}/setting`} btnTitle="查看"/>,
<Divider type="vertical" className="mx-0" key="div2"/>,
<TableBtnWithPermission access="system.organization.team.delete" key="delete" btnType="delete" disabled={!entity.canDelete} tooltip="服务数据清除后,方可删除" onClick={()=>{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})}
>
<TeamConfig ref={teamConfigRef} inModal entity={modalType === 'add' ? undefined : curTeam} />
<TeamConfig ref={teamConfigRef} entity={modalType === 'add' ? undefined : curTeam} />
</Modal>
</InsidePage>
)
+1 -6
View File
@@ -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';
+1 -6
View File
@@ -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 {
@@ -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': {},
@@ -231,9 +231,9 @@ const MonitorTotalPage = (props:MonitorTotalPageProps) => {
}
return (
<div className={`h-full overflow-hidden pb-btnybase flex flex-col bg-[#fff]`}>
<div className={`h-full overflow-hidden pb-btnybase flex flex-col bg-[#fff] `}>
<ScrollableSection>
<div className="flex items-center flex-wrap pb-[10px] px-btnbase content-before bg-MAIN_BG">
<div className="flex items-center flex-wrap pb-[10px] px-btnbase content-before bg-MAIN_BG pr-PAGE_INSIDE_X ">
<TimeRangeSelector
labelSize="small"
initialTimeButton={timeButton}
@@ -247,7 +247,7 @@ const MonitorTotalPage = (props:MonitorTotalPageProps) => {
</div>
<Spin wrapperClassName={`flex-1 ${totalEmpty ?'':'overflow-auto'}`} indicator={<LoadingOutlined style={{ fontSize: 24 }} spin/>} spinning={queryBtnLoading}>
{totalEmpty ?<Empty className="mt-[100px]" image={Empty.PRESENTED_IMAGE_SIMPLE} />:
<div className=" h-full scroll-area">
<div className=" h-full scroll-area pr-PAGE_INSIDE_X ">
{/* 图表区域 */}
<div className=" px-btnbase mt-[12px] mb-[16px] grid gap-[20px]" style={{ gridTemplateColumns: 'repeat(auto-fill, minmax(570px, 1fr))'}}>
{/* 请求统计饼图 */}
@@ -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()
@@ -47,7 +46,7 @@ export default function Dashboard(){
return (
<>
<Spin wrapperClassName="h-full w-full pr-PAGE_INSIDE_X pb-PAGE_INSIDE_B " indicator={<LoadingOutlined style={{ fontSize: 24 }} spin/>} spinning={loading}>
<Spin wrapperClassName="h-full w-full pb-PAGE_INSIDE_B " indicator={<LoadingOutlined style={{ fontSize: 24 }} spin/>} spinning={loading}>
{
!loading && <>
{
@@ -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 {
+1 -6
View File
@@ -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': {},
@@ -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)
+1 -6
View File
@@ -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': {},
+1 -6
View File
@@ -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 {
@@ -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': {},
@@ -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 {
+2 -1
View File
@@ -1,2 +1,3 @@
packages:
- "packages/*"
- "packages/*"
+1 -6
View File
@@ -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 = {
+1
View File
@@ -11,4 +11,5 @@
},
"include": ["**/*.test.ts", "**/*.test.tsx", "jest.setup.js"],
"exclude": ["node_modules"]
}