diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 00000000..da994f4f
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,63 @@
+name: "Bug Report"
+description: Report a bug to help improve the project.
+title: "bug: "
+body:
+ - type: markdown
+ attributes:
+ value: |
+ Thank you for taking the time to report this bug!
+
+ _The more information you share, the faster we can identify and fix the bug._
+
+ Prior to opening the issue, please make sure that you:
+
+ - Use English to communicate.
+ - Search the [open issues](https://github.com/APIParkLab/APIPark/issues) and [discussion forum](https://github.com/APIParkLab/APIPark/discussions) to avoid duplicating the issue.
+
+ - type: textarea
+ id: current-behavior
+ attributes:
+ label: Current Behavior
+ description: Describe the issue you are facing.
+ placeholder: |
+ What is the issue with the current behavior?
+ validations:
+ required: true
+ - type: textarea
+ id: expected-behavior
+ attributes:
+ label: Expected Behavior
+ description: Describe what you expected to happen.
+ placeholder: |
+ What did you expect to happen instead?
+ validations:
+ required: false
+ - type: textarea
+ id: error
+ attributes:
+ label: Error Logs
+ description: Paste the error logs if any.
+ validations:
+ required: false
+ - type: textarea
+ id: steps
+ attributes:
+ 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. ...
+ validations:
+ required: true
+ - 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`):
+ - Operating system (run `uname -a`):
+ validations:
+ required: true
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 00000000..05531c1e
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,5 @@
+blank_issues_enabled: false
+contact_links:
+ - name: APIPark Discussion Forum
+ url: https://github.com/APIParkLab/APIPark/discussions
+ about: Please ask and answer questions here.
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/docs_issue.yml b/.github/ISSUE_TEMPLATE/docs_issue.yml
new file mode 100644
index 00000000..e14c4876
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/docs_issue.yml
@@ -0,0 +1,33 @@
+name: "Documentation Issue"
+description: Issues related to documentation.
+title: "docs: "
+labels: [doc]
+body:
+ - type: markdown
+ attributes:
+ value: |
+ _The more information you share, the faster we can help you._
+
+ Prior to opening the issue, please make sure that you:
+
+ - Use English to communicate.
+ - Search the [open issues](https://github.com/APIParkLab/APIPark/issues) and [discussion forum](https://github.com/APIParkLab/APIPark/discussions) to avoid duplicating the issue.
+
+ - type: textarea
+ id: current-state
+ attributes:
+ label: Current State
+ description: Describe the current state of the documentation.
+ placeholder: |
+ The documentation for the API in this page (url) is missing ...
+ validations:
+ required: true
+ - type: textarea
+ id: desired-state
+ attributes:
+ label: Desired State
+ description: Describe the desired state the documentation should be in.
+ placeholder: |
+ There should be line mentioning how the API behaves when ...
+ validations:
+ required: true
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
new file mode 100644
index 00000000..d08cecf9
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -0,0 +1,23 @@
+name: "Feature Request"
+description: Suggest an enhancement to APINTO.
+title: "feat: As a user, I want to ..., so that ..."
+body:
+ - type: markdown
+ attributes:
+ value: |
+ _The more information you share, the faster we can help you._
+
+ Prior to opening the issue, please make sure that you:
+
+ - Use English to communicate.
+ - Search the [open issues](https://github.com/APIParkLab/APIPark/issues) and [discussion forum](https://github.com/APIParkLab/APIPark/discussions) to avoid duplicating the issue.
+
+ - type: textarea
+ id: description
+ attributes:
+ label: Description
+ description: Describe the feature you would like to see.
+ placeholder: |
+ As a user, I want to ..., so that...
+ 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
new file mode 100644
index 00000000..076cbb92
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/request_help.yml
@@ -0,0 +1,31 @@
+name: "Request Help"
+description: Stuck? Ask for help!
+title: "help request: "
+body:
+ - type: markdown
+ attributes:
+ value: |
+ _The more information you share, the faster we can help you._
+
+ Prior to opening the issue, please make sure that you:
+
+ - Use English to communicate.
+ - Search the [open issues](https://github.com/APIParkLab/APIPark/issues) and [discussion forum](https://github.com/APIParkLab/APIPark/discussions) to avoid duplicating the issue.
+
+ - type: textarea
+ id: description
+ attributes:
+ label: Description
+ description: Describe the issue you are facing and what you need help with.
+ validations:
+ required: true
+ - type: textarea
+ id: environment
+ attributes:
+ label: Environment
+ description: Share your environment details. Reports without proper environment details will likely be closed.
+ value: |
+ - APIPark version (run `apinto dashboard version`):
+ - Operating system (run `uname -a`):
+ validations:
+ required: true
\ No newline at end of file
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
new file mode 100644
index 00000000..9766a8d5
--- /dev/null
+++ b/.github/workflows/release.yaml
@@ -0,0 +1,86 @@
+name: release
+#触发机制,当创建tag时
+on:
+ release:
+ types:
+ - published
+jobs:
+ frontend-builder:
+ name: frontend-builder
+ runs-on: ubuntu-latest
+ steps:
+ - name: SetOutput
+ id: vars
+ run: echo "tag=${GITHUB_REF#refs/*/v}" >> $GITHUB_OUTPUT
+ - name: Checkout #Checkout代码
+ uses: actions/checkout@v3
+ - name: Set up Node
+ uses: actions/setup-node@v3.0.0
+ with:
+ node-version: '18.12'
+ - name: Pnpm install and build
+ run: |
+ npm install -g pnpm
+ pnpm install --registry https://registry.npmmirror.com --dir ./frontend
+ echo "Build frontend..."
+ cd ./frontend && pnpm run build
+ - name: upload frontend release
+ uses: actions/upload-artifact@v2
+ with:
+ name: frontend-package
+ path: frontend/dist
+ release:
+ needs: [frontend-builder]
+ name: release
+ runs-on: ubuntu-latest
+ steps:
+ - name: SetOutput #处理Tag字符串并存进outputs
+ id: vars
+ run: |
+ echo "tag=${GITHUB_REF#refs/*/v}" >> $GITHUB_OUTPUT
+ - name: Checkout #Checkout代码
+ uses: actions/checkout@v3
+ - name: download frontend release
+ uses: actions/download-artifact@v2
+ with:
+ name: frontend-package
+ path: frontend/dist
+ - name: Set up Go
+ uses: actions/setup-go@v3
+ with:
+ go-version: '1.21.1'
+ - name: Go tidy
+ run: |
+ go mod tidy
+ echo "GOVERSION=$(go version)" >> $GITHUB_ENV
+ - name: Create archives on Release #创建各种系统架构下的二进制包并上传至release assets
+ uses: goreleaser/goreleaser-action@v3.1.0
+ with:
+ version: 1.9.2
+ args: release --rm-dist
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ docker-push:
+ needs: [frontend-builder]
+ name: docker-push
+ runs-on: ubuntu-latest
+ steps:
+ - name: SetOutput
+ id: vars
+ run: echo "tag=${GITHUB_REF#refs/*/v}" >> $GITHUB_OUTPUT
+ - uses: actions/checkout@v3
+
+ - name: download frontend release
+ uses: actions/download-artifact@v2
+ with:
+ name: frontend-package
+ path: frontend/dist
+ - name: Login Docker #登录docker
+ uses: docker/login-action@v1
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_TOKEN }}
+
+ - name: build
+ run: cd scripts && ./docker_publish.sh ${{ secrets.DOCKER_USERNAME }} "backend"
+
diff --git a/.gitignore b/.gitignore
index b0f3cbe2..17943495 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
*.DS_Store
/.idea/
/config.yml
+/build/
+/apipark
diff --git a/controller/dynamic-module/dynamic-module.go b/controller/dynamic-module/dynamic-module.go
index 820216bd..2c26549c 100644
--- a/controller/dynamic-module/dynamic-module.go
+++ b/controller/dynamic-module/dynamic-module.go
@@ -16,8 +16,8 @@ type IDynamicModuleController interface {
List(ctx *gin.Context, module string, keyword string, cluster string, page string, pageSize string) ([]map[string]interface{}, *dynamic_module_dto.PluginInfo, int64, error)
Render(ctx *gin.Context, module string) (*dynamic_module_dto.PluginBasic, map[string]interface{}, error)
ModuleDrivers(ctx *gin.Context, group string) ([]*dynamic_module_dto.ModuleDriver, error)
- Online(ctx *gin.Context, module string, id string, partitionInput *dynamic_module_dto.ClusterInput) error
- Offline(ctx *gin.Context, module string, id string, partitionInput *dynamic_module_dto.ClusterInput) error
+ Online(ctx *gin.Context, module string, id string) error
+ Offline(ctx *gin.Context, module string, id string) error
//PartitionStatuses(ctx *gin.Context, module string, keyword string, page string, pageSize string) (map[string]map[string]string, error)
//PartitionStatus(ctx *gin.Context, module string, id string) (*dynamic_module_dto.OnlineInfo, error)
}
diff --git a/controller/dynamic-module/iml.go b/controller/dynamic-module/iml.go
index 3c51cd73..fa6ce0e1 100644
--- a/controller/dynamic-module/iml.go
+++ b/controller/dynamic-module/iml.go
@@ -15,12 +15,12 @@ type imlDynamicModuleController struct {
module dynamic_module.IDynamicModuleModule `autowired:""`
}
-func (i *imlDynamicModuleController) Online(ctx *gin.Context, module string, id string, partitionInput *dynamic_module_dto.ClusterInput) error {
- return i.module.Online(ctx, module, id, partitionInput)
+func (i *imlDynamicModuleController) Online(ctx *gin.Context, module string, id string) error {
+ return i.module.Online(ctx, module, id)
}
-func (i *imlDynamicModuleController) Offline(ctx *gin.Context, module string, id string, partitionInput *dynamic_module_dto.ClusterInput) error {
- return i.module.Offline(ctx, module, id, partitionInput)
+func (i *imlDynamicModuleController) Offline(ctx *gin.Context, module string, id string) error {
+ return i.module.Offline(ctx, module, id)
}
//func (i *imlDynamicModuleController) PartitionStatuses(ctx *gin.Context, module string, keyword string, page string, pageSize string) (map[string]map[string]string, error) {
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/package.json b/frontend/package.json
index bcd484ac..3ab17211 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -29,6 +29,7 @@
"@vitejs/plugin-react": "^4.2.0",
"autoprefixer": "^10.4.16",
"dayjs": "^1.11.10",
+ "dompurify": "^3.1.6",
"js-base64": "^3.7.5",
"moment": "^2.29.4",
"postcss": "^8.4.31",
diff --git a/frontend/packages/businessEntry/tsconfig.json b/frontend/packages/businessEntry/tsconfig.json
index 4bc7c38f..bfb0e8fa 100644
--- a/frontend/packages/businessEntry/tsconfig.json
+++ b/frontend/packages/businessEntry/tsconfig.json
@@ -28,6 +28,6 @@
"@businessEntry/*": ["./src/*"],
},
},
- "include": ["src", "public/iconpark_eolink.js", "public/iconpark_apinto.js", "../common/src/component/aoplatform/EditableTableWithModal.tsx", "../common/src/components/aoplatform/TransferTable.tsx", "../common/src/components/aoplatform/TreeWithMore.tsx", "../common/src/components/aoplatform/DatePicker.tsx", "../common/src/components/aoplatform/TimeRangeSelector.tsx", "../common/src/components/aoplatform/TimePicker.tsx", "../common/src/components/aoplatform/MemberTransfer.tsx", "../common/src/components/aoplatform/Navigation.tsx", "../common/src/components/aoplatform/PageList.tsx", "../common/src/components/aoplatform/GroupTree.tsx", "../common/src/components/aoplatform/ErrorBoundary.tsx", "../common/src/components/aoplatform/ScrollableSection.tsx", "../common/src/utils/postcat.tsx", "../common/src/utils/curl.ts", "../common/src/components/aoplatform/ResetPsw.tsx", "../common/src/components/aoplatform/SubscribeApprovalModalContent.tsx", "../common/src/components/aoplatform/InsidePageForHub.tsx", "src/components/aoplatform/RenderRoutes.tsx", "../common/src/components/aoplatform/PublishApprovalModalContent.tsx", "../common/src/components/aoplatform/InsidePage.tsx", "../common/src/const/type.ts", "../common/src/components/aoplatform/intelligent-plugin", "../common/src/const/domain"],
+ "include": ["src", "public/iconpark_eolink.js", "public/iconpark_apinto.js", "../common/src/component/aoplatform/EditableTableWithModal.tsx", "../common/src/components/aoplatform/TransferTable.tsx", "../common/src/components/aoplatform/TreeWithMore.tsx", "../common/src/components/aoplatform/DatePicker.tsx", "../common/src/components/aoplatform/TimeRangeSelector.tsx", "../common/src/components/aoplatform/TimePicker.tsx", "../common/src/components/aoplatform/MemberTransfer.tsx", "../common/src/components/aoplatform/Navigation.tsx", "../common/src/components/aoplatform/PageList.tsx", "../common/src/components/aoplatform/GroupTree.tsx", "../common/src/components/aoplatform/ErrorBoundary.tsx", "../common/src/components/aoplatform/ScrollableSection.tsx", "../common/src/utils/postcat.tsx", "../common/src/utils/curl.ts", "../common/src/components/aoplatform/ResetPsw.tsx", "../common/src/components/aoplatform/SubscribeApprovalModalContent.tsx", "src/components/aoplatform/RenderRoutes.tsx", "../common/src/components/aoplatform/PublishApprovalModalContent.tsx", "../common/src/components/aoplatform/InsidePage.tsx", "../common/src/const/type.ts", "../common/src/components/aoplatform/intelligent-plugin", "../common/src/const/domain"],
"references": [{ "path": "./tsconfig.node.json" }]
}
diff --git a/frontend/packages/common/src/assets/avatar_default.svg b/frontend/packages/common/src/assets/avatar_default.svg
deleted file mode 100644
index 44331dce..00000000
--- a/frontend/packages/common/src/assets/avatar_default.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-
diff --git a/frontend/packages/common/src/assets/default-avatar.png b/frontend/packages/common/src/assets/default-avatar.png
new file mode 100644
index 00000000..62f745ec
Binary files /dev/null and b/frontend/packages/common/src/assets/default-avatar.png differ
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 256f4eaa..34c003a6 100644
--- a/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx
+++ b/frontend/packages/common/src/components/aoplatform/BasicLayout.tsx
@@ -2,9 +2,10 @@ import {
ConfigProvider,
Dropdown,
MenuProps,
- App} from 'antd';
+ App,
+ Button} from 'antd';
import Logo from '@common/assets/layout-logo.png';
-import AvatarPic from '@common/assets/avatar_default.svg'
+import AvatarPic from '@common/assets/default-avatar.png'
import { routerKeyMap, TOTAL_MENU_ITEMS } from "./Navigation";
import {Outlet, useLocation, useNavigate} from "react-router-dom";
import {useEffect, useMemo, useRef, useState} from "react";
@@ -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;',
@@ -122,13 +125,19 @@ const themeToken = {
}
const items: MenuProps['items'] = [
+ {
+ key: '2',
+ label: (
+ )
+ },
{
key: '3',
label: (
-
- 退出登录
-
- ),
+ )
},
];
@@ -210,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)}
/>
@@ -259,7 +268,7 @@ const themeToken = {
collapsed={false}
collapsedButtonRender={false}
>
-
+
diff --git a/frontend/packages/common/src/components/aoplatform/DrawerWithFooter.tsx b/frontend/packages/common/src/components/aoplatform/DrawerWithFooter.tsx
index 87531dac..bc392c79 100644
--- a/frontend/packages/common/src/components/aoplatform/DrawerWithFooter.tsx
+++ b/frontend/packages/common/src/components/aoplatform/DrawerWithFooter.tsx
@@ -34,8 +34,11 @@ export function DrawerWithFooter(props:DrawerWithFooterProps){
width="60%"
destroyOnClose={true}
maskClosable={false}
+ classNames={
+ {footer:'text-right'}
+ }
footer={
-
+
{showOkBtn &&