diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 9766a8d5..040fe3ce 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -81,6 +81,16 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- - name: build
- run: cd scripts && ./docker_publish.sh ${{ secrets.DOCKER_USERNAME }} "backend"
+ - name: Setup qshell
+ uses: foxundermoon/setup-qshell@v5
+ with:
+ version: '2.9.0'
+
+ - name: build
+ env:
+ AccessKey: ${{ secrets.AK }}
+ SecretKey: ${{ secrets.SK }}
+ QINIU_BUCKET: ${{ secrets.QINIU_BUCKET }}
+ QINIU_NAME: ${{ secrets.QINIU_NAME }}
+ run: cd scripts && ./docker_publish.sh ${{ secrets.DOCKER_USERNAME }} "backend" "upload_qiniu"
diff --git a/controller/my_team/iml.go b/controller/my_team/iml.go
index a5438e8f..bbe9bccb 100644
--- a/controller/my_team/iml.go
+++ b/controller/my_team/iml.go
@@ -14,6 +14,10 @@ type imlTeamController struct {
module my_team.ITeamModule `autowired:""`
}
+func (c *imlTeamController) SimpleTeams(ctx *gin.Context, keyword string) ([]*team_dto.SimpleTeam, error) {
+ return c.module.SimpleTeams(ctx, keyword)
+}
+
func (c *imlTeamController) UpdateMemberRole(ctx *gin.Context, id string, input *team_dto.UpdateMemberRole) error {
return c.module.UpdateMemberRole(ctx, id, input)
}
@@ -23,7 +27,7 @@ func (c *imlTeamController) GetTeam(ctx *gin.Context, id string) (*team_dto.Team
}
func (c *imlTeamController) Search(ctx *gin.Context, keyword string) ([]*team_dto.Item, error) {
-
+
return c.module.Search(ctx, keyword)
}
@@ -31,8 +35,8 @@ func (c *imlTeamController) EditTeam(ctx *gin.Context, id string, team *team_dto
return c.module.Edit(ctx, id, team)
}
-func (c *imlTeamController) SimpleTeams(ctx *gin.Context, keyword string) ([]*team_dto.SimpleTeam, error) {
- return c.module.SimpleTeams(ctx, keyword)
+func (c *imlTeamController) MySimpleTeams(ctx *gin.Context, keyword string) ([]*team_dto.SimpleTeam, error) {
+ return c.module.MySimpleTeams(ctx, keyword)
}
func (c *imlTeamController) AddMember(ctx *gin.Context, id string, users *team_dto.UserIDs) error {
diff --git a/controller/my_team/team.go b/controller/my_team/team.go
index a755f67c..d6de899c 100644
--- a/controller/my_team/team.go
+++ b/controller/my_team/team.go
@@ -2,7 +2,7 @@ package my_team
import (
"reflect"
-
+
team_dto "github.com/APIParkLab/APIPark/module/my-team/dto"
"github.com/eolinker/go-common/autowire"
"github.com/gin-gonic/gin"
@@ -13,6 +13,7 @@ type ITeamController interface {
GetTeam(ctx *gin.Context, id string) (*team_dto.Team, error)
Search(ctx *gin.Context, keyword string) ([]*team_dto.Item, error)
EditTeam(ctx *gin.Context, id string, team *team_dto.EditTeam) (*team_dto.Team, error)
+ MySimpleTeams(ctx *gin.Context, keyword string) ([]*team_dto.SimpleTeam, error)
SimpleTeams(ctx *gin.Context, keyword string) ([]*team_dto.SimpleTeam, error)
AddMember(ctx *gin.Context, id string, users *team_dto.UserIDs) error
RemoveMember(ctx *gin.Context, id string, uuid string) error
diff --git a/frontend/packages/common/src/assets/layout-logo.png b/frontend/packages/common/src/assets/layout-logo.png
index f60191cc..a02984ea 100644
Binary files a/frontend/packages/common/src/assets/layout-logo.png and b/frontend/packages/common/src/assets/layout-logo.png differ
diff --git a/frontend/packages/common/src/assets/logo.png b/frontend/packages/common/src/assets/logo.png
index a6895b8c..5c6dc52d 100644
Binary files a/frontend/packages/common/src/assets/logo.png and b/frontend/packages/common/src/assets/logo.png differ
diff --git a/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx b/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx
index f1f4d321..34c003a6 100644
--- a/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx
+++ b/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx
@@ -2,7 +2,8 @@ import {
ConfigProvider,
Dropdown,
MenuProps,
- App} from 'antd';
+ App,
+ Button} from 'antd';
import Logo from '@common/assets/layout-logo.png';
import AvatarPic from '@common/assets/default-avatar.png'
import { routerKeyMap, TOTAL_MENU_ITEMS } from "./Navigation";
@@ -19,6 +20,8 @@ import { ResetPsw, ResetPswHandle } from './ResetPsw.tsx';
import { BasicResponse, STATUS_CODE } from '@common/const/const.ts';
import { UserInfoType, UserProfileHandle } from '@common/const/type.ts';
import { useFetch } from '@common/hooks/http.ts';
+import { QuestionCircleOutlined } from '@ant-design/icons';
+import { Icon } from '@iconify/react/dist/iconify.js';
const themeToken = {
bgLayout:'#17163E;',
@@ -125,18 +128,16 @@ const themeToken = {
{
key: '2',
label: (
- navigator('/userProfile/changepsw')}>
- 账号设置
-
- ),
+ )
},
{
key: '3',
label: (
-
- 退出登录
-
- ),
+ )
},
];
@@ -218,19 +219,19 @@ const themeToken = {
);
},
}}
- // actionsRender={(props) => {
- // if (props.isMobile) return [];
- // if (typeof window === 'undefined') return [];
- // return [
- //
- // ];
- // }}
+ actionsRender={(props) => {
+ if (props.isMobile) return [];
+ if (typeof window === 'undefined') return [];
+ return [
+
+ ];
+ }}
headerTitleRender={() => (

navigator(mainPage)}
/>
diff --git a/frontend/packages/common/src/components/aoplatform/ResetPsw.tsx b/frontend/packages/common/src/components/aoplatform/ResetPsw.tsx
index b45e71c6..f3eb8d32 100644
--- a/frontend/packages/common/src/components/aoplatform/ResetPsw.tsx
+++ b/frontend/packages/common/src/components/aoplatform/ResetPsw.tsx
@@ -73,7 +73,7 @@ export const ResetPsw = forwardRef
((props,ref)=>{
layout='vertical'
form={form}
scrollToFirstError
- className="mx-auto mt-mbase "
+ className="mx-auto mt-mbase ml-mbase"
name="resetPsw"
// labelCol={{ span: 8 }}
// wrapperCol={{ span: 10}}
diff --git a/frontend/packages/common/src/contexts/GlobalStateContext.tsx b/frontend/packages/common/src/contexts/GlobalStateContext.tsx
index 287bf3c2..d9c0480f 100644
--- a/frontend/packages/common/src/contexts/GlobalStateContext.tsx
+++ b/frontend/packages/common/src/contexts/GlobalStateContext.tsx
@@ -109,17 +109,22 @@ export const GlobalProvider: FC<{children:ReactNode}> = ({ children }) => {
const [pluginAccessDictionary, setPluginAccessDictionary] = useState<{[k:string]:string}>({})
const [teamDataFlushed, setTeamDataFlushed] = useState(false)
const [accessInit, setAccessInit] = useState(false)
+ let getGlobalAccessPromise: Promise> | null = null
const getGlobalAccessData = ()=>{
- fetchData>('profile/permission/system',{method:'GET'},).then(response=>{
+ getGlobalAccessPromise = new Promise((resolve, reject) => fetchData>('profile/permission/system',{method:'GET'},).then(response=>{
const {code,data,msg} = response
if(code === STATUS_CODE.SUCCESS){
setAccessInit(true)
setAccessData(prevData => new Map(prevData).set('system', data.access))
+ resolve(data.response)
}else{
message.error(msg || '操作失败')
+ reject(data.msg || '操作失败')
}
})
+ )
+ return getGlobalAccessData
}
const getTeamAccessData = (teamId:string)=>{
@@ -149,7 +154,13 @@ export const GlobalProvider: FC<{children:ReactNode}> = ({ children }) => {
setPluginAccessDictionary({})
}
- const checkPermission = (access:keyof typeof PERMISSION_DEFINITION[0] | Array)=>{
+ const checkPermission = async (access:keyof typeof PERMISSION_DEFINITION[0] | Array)=>{
+ if( !accessInit && getGlobalAccessPromise){
+ await getGlobalAccessPromise
+ }
+ if( !accessInit && !getGlobalAccessPromise){
+ await getGlobalAccessData()
+ }
let revs = false;
if (Array.isArray(access)) {
revs = access.some(item => checkAccess(item, accessData));
diff --git a/frontend/packages/core/public/favicon.ico b/frontend/packages/core/public/favicon.ico
index 541b7844..312a0fad 100644
Binary files a/frontend/packages/core/public/favicon.ico and b/frontend/packages/core/public/favicon.ico differ
diff --git a/frontend/packages/core/src/App.css b/frontend/packages/core/src/App.css
index 583b5ad5..db6ae5ce 100644
--- a/frontend/packages/core/src/App.css
+++ b/frontend/packages/core/src/App.css
@@ -80,7 +80,7 @@
.apipark-layout-layout{
.apipark-layout-layout-bg-list{
- background:#17163E;
+ background-image: radial-gradient(circle farthest-corner at 450px 350px, #050eb7, #17163e 500px);
}
.ant-layout-header.apipark-layout-layout-header{
backdrop-filter: unset !important;
diff --git a/frontend/packages/core/src/index.css b/frontend/packages/core/src/index.css
index c82b1ede..8707926c 100644
--- a/frontend/packages/core/src/index.css
+++ b/frontend/packages/core/src/index.css
@@ -732,11 +732,17 @@ p{
}
}
+
.ant-drawer-footer{
padding:16px 20px !important
}
}
+
+.ant-modal-body .pr-PAGE_INSIDE_X{
+ padding-right: 0 !important;
+}
+
.g6-tooltip {
padding: 10px 6px;
color: #444;
@@ -849,9 +855,10 @@ p{
}
}
-/* .ant-dropdown .ant-dropdown-menu{
- border-radius: 10px;
- padding: 10px;
+
+.ant-dropdown .ant-dropdown-menu{
+ /* border-radius: 10px;
+ padding: 10px; */
li.ant-dropdown-menu-item{
padding:0 !important;
>button.ant-btn{
@@ -861,13 +868,14 @@ p{
}
>span.ant-dropdown-menu-title-content{
padding:0px !important;
- min-width: 80px;
- /* padding:0px 12px !important;
+ /* min-width: 80px; */
+ /* padding:0px 12px !important; */
height:32px !important;
line-height: 32px !important;
.ant-btn{
width:100%;
padding:0px 12px !important;
+ justify-content:flex-start;
}
.ant-btn-default:not(:disabled):not(.ant-btn-disabled):hover{
color:var(--text-color) !important;
@@ -875,7 +883,7 @@ p{
}
}
-} */
+}
.ant-dropdown-button{
.ant-btn-link{
color:var(--text-color) !important;
diff --git a/frontend/packages/core/src/pages/system/SystemConfig.tsx b/frontend/packages/core/src/pages/system/SystemConfig.tsx
index 94f13f15..21c6bd34 100644
--- a/frontend/packages/core/src/pages/system/SystemConfig.tsx
+++ b/frontend/packages/core/src/pages/system/SystemConfig.tsx
@@ -20,6 +20,7 @@ import { getImgBase64 } from "@common/utils/dataTransfer.ts";
import { CategorizesType } from "@market/const/serviceHub/type.ts";
import WithPermission from "@common/components/aoplatform/WithPermission.tsx";
import { Icon } from "@iconify/react/dist/iconify.js";
+import { useGlobalContext } from "@common/contexts/GlobalStateContext.tsx";
const MAX_SIZE = 2 * 1024; // 1KB
@@ -38,6 +39,7 @@ const SystemConfig = forwardRef((_,ref) => {
const [tagOptionList, setTagOptionList] = useState([])
const [serviceClassifyOptionList, setServiceClassifyOptionList] = useState()
const [uploadLoading, setUploadLoading] = useState(false)
+ const {checkPermission} = useGlobalContext()
useImperativeHandle(ref, () => ({
save:onFinish
@@ -157,7 +159,8 @@ const SystemConfig = forwardRef((_,ref) => {
const getTeamOptionList = ()=>{
setTeamOptionList([])
- fetchData>('simple/teams/mine',{method:'GET',eoTransformKeys:['available_partitions']}).then(response=>{
+
+ fetchData>(!checkPermission('system.workspace.team.view_all') ?'simple/teams/mine' :'simple/teams',{method:'GET',eoTransformKeys:[]}).then(response=>{
const {code,data,msg} = response
if(code === STATUS_CODE.SUCCESS){
setTeamOptionList(data.teams?.map((x:MemberItem)=>{return {...x,
@@ -231,7 +234,7 @@ const SystemConfig = forwardRef((_,ref) => {
labelAlign='left'
scrollToFirstError
form={form}
- className="mx-auto pr-PAGE_INSIDE_X "
+ className="w-full pr-PAGE_INSIDE_X "
name="systemConfig"
onFinish={onFinish}
autoComplete="off"
@@ -256,7 +259,7 @@ const SystemConfig = forwardRef((_,ref) => {
label="API 调用前缀"
name="prefix"
- extra="选填,作为服务内所有服务的API的前缀,比如host/{sys_name}/{service_name}/{api_path},一旦保存无法修改"
+ extra="选填,作为服务内所有API的前缀,比如host/{service_name}/{api_path},一旦保存无法修改"
rules={[
{
validator: validateUrlSlash,
diff --git a/frontend/packages/core/src/pages/system/SystemList.tsx b/frontend/packages/core/src/pages/system/SystemList.tsx
index 3a6bbf77..d119387f 100644
--- a/frontend/packages/core/src/pages/system/SystemList.tsx
+++ b/frontend/packages/core/src/pages/system/SystemList.tsx
@@ -55,7 +55,7 @@ const SystemList:FC = ()=>{
}
const getTeamsList = ()=>{
- fetchData>('simple/teams/mine',{method:'GET'}).then(response=>{
+ fetchData>(!checkPermission('system.workspace.team.view_all') ?'simple/teams/mine' :'simple/teams',{method:'GET',eoTransformKeys:[]}).then(response=>{
const {code,data,msg} = response
setTeamList(data.teams)
if(code === STATUS_CODE.SUCCESS){
diff --git a/frontend/packages/core/src/pages/team/TeamConfig.tsx b/frontend/packages/core/src/pages/team/TeamConfig.tsx
index e582cd5d..13784150 100644
--- a/frontend/packages/core/src/pages/team/TeamConfig.tsx
+++ b/frontend/packages/core/src/pages/team/TeamConfig.tsx
@@ -1,5 +1,5 @@
import { forwardRef, useEffect, useImperativeHandle, useState} from "react";
-import {App, Button, Divider, Form, Input, Row, Select} from "antd";
+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'
@@ -125,7 +125,6 @@ const TeamConfig= forwardRef((props,ref) => {
setOnEdit(false);
form.setFieldsValue({id:uuidv4()}); // 清空 initialValues
}
- // setPageType(currentUrl.split('/')[1] === 'myteam'? 'myteam':'manage')
return (form.setFieldsValue({}))
}, [teamId]);
diff --git a/frontend/packages/core/src/pages/userProfile/ChangePsw.tsx b/frontend/packages/core/src/pages/userProfile/ChangePsw.tsx
index b7ac53fa..389ef969 100644
--- a/frontend/packages/core/src/pages/userProfile/ChangePsw.tsx
+++ b/frontend/packages/core/src/pages/userProfile/ChangePsw.tsx
@@ -38,7 +38,7 @@ const ChangePsw= () => {
labelAlign='left'
name="changePsw"
scrollToFirstError
- className="mx-auto "
+ className="mx-auto pl-[10px] "
autoComplete="off"
form={form}
onFinish={savePsw}
@@ -92,7 +92,7 @@ const ChangePsw= () => {