mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d36c66371f | |||
| b7bb409e96 | |||
| 517007c941 | |||
| 4c685a9ec6 |
@@ -146,20 +146,11 @@ export const PublishApprovalModalContent = forwardRef<PublishApprovalModalHandle
|
||||
...x,
|
||||
title: typeof x.title === 'string' ? $t(x.title) : x.title,
|
||||
...(x.dataIndex === 'status' ? {
|
||||
render:(_,entity)=> {
|
||||
switch(entity.change){
|
||||
case 'none':
|
||||
return '-'
|
||||
case 'new':
|
||||
return $t('新建')
|
||||
case 'update':
|
||||
return $t('更新')
|
||||
case 'delete':
|
||||
return $t('删除')
|
||||
default:
|
||||
return '-'
|
||||
}
|
||||
}
|
||||
render:(_,entity)=> (
|
||||
<span className={`${ApprovalStatusColorClass[entity.change as keyof typeof ApprovalStatusColorClass]} truncate block`}>
|
||||
{$t(ChangeTypeEnum[entity.change as (keyof typeof ChangeTypeEnum)] || '-')}
|
||||
</span>
|
||||
)
|
||||
}:{})
|
||||
}
|
||||
}),[state.language])
|
||||
|
||||
@@ -486,17 +486,17 @@ export const PERMISSION_DEFINITION = [
|
||||
},
|
||||
"team.application.subscription.add": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.consumer.subscription.subscribe"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_all","team.consumer.subscription.subscribe"] }]
|
||||
}
|
||||
},
|
||||
"team.application.subscription.edit": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.consumer.subscription.manager_subscribed_services"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_all","team.consumer.subscription.manager_subscribed_services"] }]
|
||||
}
|
||||
},
|
||||
"team.application.subscription.delete": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.team.consumer.subscription.manager_subscribed_services"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_all","team.team.consumer.subscription.manager_subscribed_services"] }]
|
||||
}
|
||||
},
|
||||
"team.application.application.view": {
|
||||
@@ -506,47 +506,47 @@ export const PERMISSION_DEFINITION = [
|
||||
},
|
||||
"team.application.application.add": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al",'team.team.consumer.manager',"team.consumer.application.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_all",'team.team.consumer.manager',"team.consumer.application.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.application.application.edit": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al",'team.team.consumer.manager',"team.consumer.application.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_all",'team.team.consumer.manager',"team.consumer.application.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.application.application.delete": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al",'team.team.consumer.manager',"team.consumer.application.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_all",'team.team.consumer.manager',"team.consumer.application.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.consumer.authorization.view": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","system.workspace.application.view_all","team.consumer.authorization.view"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_all","system.workspace.application.view_all","team.consumer.authorization.view"] }]
|
||||
}
|
||||
},
|
||||
"team.application.authorization.add": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.consumer.authorization.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_all","team.consumer.authorization.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.application.authorization.edit": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.consumer.authorization.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_all","team.consumer.authorization.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.application.authorization.delete": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.consumer.authorization.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_all","team.consumer.authorization.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.application.authorization.cancelSubApply": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.consumer.authorization.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_all","team.consumer.authorization.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.application.authorization.cancelSub": {
|
||||
"granted": {
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_al","team.consumer.authorization.manager"] }]
|
||||
"anyOf": [{ "backend": ["system.workspace.application.manager_all","team.consumer.authorization.manager"] }]
|
||||
}
|
||||
},
|
||||
"team.team.team.view": {
|
||||
|
||||
@@ -88,7 +88,7 @@ const PartitionInsideDashboardSetting: FC = () => {
|
||||
pageTitle={$t('数据源')}
|
||||
description={$t("设置监控报表的数据来源,设置完成之后即可获得详细的API调用统计图表。")}
|
||||
showBorder={false}
|
||||
scrollPage={true}
|
||||
scrollPage={false}
|
||||
>
|
||||
<div className="flex flex-col overflow-auto pb-PAGE_INSIDE_B pr-PAGE_INSIDE_X">
|
||||
<Spin wrapperClassName="flex-1" indicator={<LoadingOutlined style={{ fontSize: 24 }} spin />} spinning={loading}>
|
||||
|
||||
@@ -77,7 +77,8 @@ export default defineConfig({
|
||||
target: 'http://172.18.166.219:8288/',
|
||||
changeOrigin: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
open: true
|
||||
},
|
||||
logLevel:'info'
|
||||
})
|
||||
|
||||
@@ -11,7 +11,7 @@ import { RouterParams } from "@core/components/aoplatform/RenderRoutes";
|
||||
import { SimpleTeamItem } from "@common/const/type";
|
||||
import { useTenantManagementContext } from "../../../contexts/TenantManagementContext";
|
||||
import { Icon } from "@iconify/react/dist/iconify.js";
|
||||
import { useGlobalContext } from "@common/contexts/GlobalStateContext";
|
||||
import { GlobalProvider, useGlobalContext } from "@common/contexts/GlobalStateContext";
|
||||
import { $t } from "@common/locales";
|
||||
import WithPermission from "@common/components/aoplatform/WithPermission";
|
||||
import InsidePage from "@common/components/aoplatform/InsidePage";
|
||||
@@ -149,7 +149,7 @@ export default function ServiceHubManagement() {
|
||||
switch (type){
|
||||
case 'add':
|
||||
title=$t('添加消费者')
|
||||
content=<ManagementConfig ref={addManagementRef} dataShowType={dataShowType} type={type} teamId={teamId!} />
|
||||
content=<GlobalProvider><ManagementConfig ref={addManagementRef} dataShowType={dataShowType} type={type} teamId={teamId!} /></GlobalProvider>
|
||||
break;
|
||||
// case 'edit':{
|
||||
// title='配置 Open Api'
|
||||
|
||||
@@ -3,9 +3,9 @@ package aksk
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
|
||||
auth_driver "github.com/APIParkLab/APIPark/module/application-authorization/auth-driver"
|
||||
|
||||
|
||||
application_authorization_dto "github.com/APIParkLab/APIPark/module/application-authorization/dto"
|
||||
)
|
||||
|
||||
@@ -26,8 +26,7 @@ type Config struct {
|
||||
}
|
||||
|
||||
func (a *Config) ID() string {
|
||||
//TODO implement me
|
||||
panic("implement me")
|
||||
return a.Ak
|
||||
}
|
||||
|
||||
func (a *Config) Valid() ([]byte, error) {
|
||||
|
||||
+1
-23
@@ -165,29 +165,7 @@ func (i *imlLogModule) Get(ctx context.Context, driver string) (*log_dto.LogSour
|
||||
}
|
||||
|
||||
func (i *imlLogModule) OnComplete() {
|
||||
drivers := log_driver.Drivers()
|
||||
if len(drivers) < 1 {
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
for _, driver := range drivers {
|
||||
factory, has := log_driver.GetFactory(driver)
|
||||
if !has {
|
||||
log_print.Errorf("driver %s not found", driver)
|
||||
continue
|
||||
}
|
||||
info, err := i.service.GetLogSource(ctx, driver)
|
||||
if err != nil {
|
||||
log_print.Errorf("get log source %s error: %s", driver, err)
|
||||
continue
|
||||
}
|
||||
d, _, err := factory.Create(info.Config)
|
||||
if err != nil {
|
||||
log_print.Errorf("create driver %s error: %s,config: %s", driver, err, info.Config)
|
||||
continue
|
||||
}
|
||||
log_driver.SetDriver(driver, d)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (i *imlLogModule) initGateway(ctx context.Context, clusterId string, clientDriver gateway.IClientDriver) error {
|
||||
|
||||
+25
-1
@@ -5,6 +5,8 @@ import (
|
||||
"errors"
|
||||
"time"
|
||||
|
||||
log_print "github.com/eolinker/eosc/log"
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
||||
log_driver "github.com/APIParkLab/APIPark/log-driver"
|
||||
@@ -25,7 +27,29 @@ type imlLogService struct {
|
||||
}
|
||||
|
||||
func (i *imlLogService) OnComplete() {
|
||||
|
||||
drivers := log_driver.Drivers()
|
||||
if len(drivers) < 1 {
|
||||
return
|
||||
}
|
||||
ctx := context.Background()
|
||||
for _, driver := range drivers {
|
||||
factory, has := log_driver.GetFactory(driver)
|
||||
if !has {
|
||||
log_print.Errorf("driver %s not found", driver)
|
||||
continue
|
||||
}
|
||||
info, err := i.GetLogSource(ctx, driver)
|
||||
if err != nil {
|
||||
log_print.Errorf("get log source %s error: %s", driver, err)
|
||||
continue
|
||||
}
|
||||
d, _, err := factory.Create(info.Config)
|
||||
if err != nil {
|
||||
log_print.Errorf("create driver %s error: %s,config: %s", driver, err, info.Config)
|
||||
continue
|
||||
}
|
||||
log_driver.SetDriver(driver, d)
|
||||
}
|
||||
}
|
||||
|
||||
func (i *imlLogService) UpdateLogSource(ctx context.Context, driver string, input *Save) error {
|
||||
|
||||
Reference in New Issue
Block a user