diff --git a/.github/workflows/pushdocker.yml b/.github/workflows/pushdocker.yml index edac3b8cd..dea932014 100644 --- a/.github/workflows/pushdocker.yml +++ b/.github/workflows/pushdocker.yml @@ -49,8 +49,6 @@ jobs: cd chat2db-client yarn install yarn run build:web:prod --app_version=${{ steps.chat2db_version.outputs.substring }} - mkdir -p ../chat2db-server/chat2db-server-web-start/src/main/resources/static/ - mkdir -p ../chat2db-server/chat2db-server-web-start/src/main/resources/thymeleaf/ cp -r dist ../chat2db-server/chat2db-server-start/src/main/resources/static/front cp -r dist/index.html ../chat2db-server/chat2db-server-start/src/main/resources/thymeleaf/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 11589df0c..80a30bd6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## 3.1.17 + +`2023-12-27` + +**Changelog** + +- ⭐【New Features】Connection replicable +- ⚡️【Optimize】Select the table to view the DDL of the table in Information on the right expansion bar +- 🐞【Fixed】Home connection cannot switch pages +- 🐞【Fixed】Columns cannot be viewed or edited in some tables of the Oracle database + ## 3.1.16 `2023-12-25` diff --git a/CHANGELOG_CN.md b/CHANGELOG_CN.md index 2409d1f9b..ee5d0a374 100644 --- a/CHANGELOG_CN.md +++ b/CHANGELOG_CN.md @@ -1,3 +1,16 @@ +## 3.1.17 + +`2023-12-27` + +**更新日志** + +- ⭐【新功能】连接可复制 +- ⚡️【优化】选中表可直接在右侧拓展栏的“信息”中查看表DDL +- 🐞【修复】Oracle数据库部分表无法查看列、无法编辑问题 +- 🐞【修复】团队管理归属连接无法切换分页 + + + ## 3.1.16 `2023-12-25` diff --git a/chat2db-client/src/assets/font/demo_index.html b/chat2db-client/src/assets/font/demo_index.html index 2fc44bb84..e0a058f85 100644 --- a/chat2db-client/src/assets/font/demo_index.html +++ b/chat2db-client/src/assets/font/demo_index.html @@ -54,6 +54,12 @@
@font-face@font-face {
font-family: 'iconfont';
- src: url('iconfont.woff2?t=1702019801419') format('woff2'),
- url('iconfont.woff?t=1702019801419') format('woff'),
- url('iconfont.ttf?t=1702019801419') format('truetype');
+ src: url('iconfont.woff2?t=1703676613329') format('woff2'),
+ url('iconfont.woff?t=1703676613329') format('woff'),
+ url('iconfont.ttf?t=1703676613329') format('truetype');
}
第二步:定义使用 iconfont 的样式
@@ -1258,6 +1264,15 @@ 第三步:挑选相应图标并获取字体编码,应用于页面
+ -
+
+
+ 305信息-线性圆框
+
+ .icon-xinxi-xianxingyuankuang
+
+
+
-
@@ -3022,6 +3037,14 @@
第二步:挑选相应图标并获取类名,应用于页面:
+ -
+
+ 305信息-线性圆框
+ #icon-xinxi-xianxingyuankuang
+
+
-
{/* {tableDataTotal > 1000 && (
)} */}
diff --git a/chat2db-client/src/pages/main/workspace/components/WorkspaceExtend/GlobalExtendComponents/index.less b/chat2db-client/src/pages/main/workspace/components/WorkspaceExtend/GlobalExtendComponents/index.less
new file mode 100644
index 000000000..36a353dd5
--- /dev/null
+++ b/chat2db-client/src/pages/main/workspace/components/WorkspaceExtend/GlobalExtendComponents/index.less
@@ -0,0 +1,22 @@
+.viewDDLBox {
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ .viewDDLHeader {
+ flex-shrink: 0;
+ line-height: 32px;
+ padding: 0px 10px;
+ border-bottom: 1px solid var(--color-border);
+ font-weight: bold;
+ }
+ .viewDDL {
+ flex: 1;
+ }
+}
+
+.noInformation{
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
diff --git a/chat2db-client/src/pages/main/workspace/components/WorkspaceExtend/GlobalExtendComponents/index.tsx b/chat2db-client/src/pages/main/workspace/components/WorkspaceExtend/GlobalExtendComponents/index.tsx
new file mode 100644
index 000000000..464061572
--- /dev/null
+++ b/chat2db-client/src/pages/main/workspace/components/WorkspaceExtend/GlobalExtendComponents/index.tsx
@@ -0,0 +1,25 @@
+import React from 'react';
+import { useWorkspaceStore } from '@/pages/main/workspace/store';
+import { GlobalComponents } from '../config';
+import ViewDDL from '@/components/ViewDDL';
+import styles from './index.less';
+
+const GlobalExtendComponents = () => {
+ const { currentWorkspaceGlobalExtend } = useWorkspaceStore((state) => {
+ return {
+ currentWorkspaceGlobalExtend: state.currentWorkspaceGlobalExtend,
+ };
+ });
+
+ switch (currentWorkspaceGlobalExtend?.code) {
+ case GlobalComponents.view_ddl:
+ return
+ {`${currentWorkspaceGlobalExtend.uniqueData.tableName}-DDL`}
+ ;
+
+ default:
+ return No information;
+ }
+};
+
+export default GlobalExtendComponents;
diff --git a/chat2db-client/src/pages/main/workspace/components/WorkspaceExtend/WorkspaceExtendBody/index.tsx b/chat2db-client/src/pages/main/workspace/components/WorkspaceExtend/WorkspaceExtendBody/index.tsx
index f1e7a7283..bea37f607 100644
--- a/chat2db-client/src/pages/main/workspace/components/WorkspaceExtend/WorkspaceExtendBody/index.tsx
+++ b/chat2db-client/src/pages/main/workspace/components/WorkspaceExtend/WorkspaceExtendBody/index.tsx
@@ -1,4 +1,4 @@
-import { useMemo } from 'react';
+import React, { useMemo } from 'react';
import {extendConfig} from '../config';
import {useWorkspaceStore} from '@/pages/main/workspace/store';
@@ -9,9 +9,9 @@ export default () => {
currentWorkspaceExtend: state.currentWorkspaceExtend,
}
});
- const component = useMemo(() => {
- return extendConfig.find((item) => item.code === currentWorkspaceExtend)?.components
+ const Component = useMemo(() => {
+ return extendConfig.find((item) => item.code === currentWorkspaceExtend)?.components
}, [currentWorkspaceExtend]);
- return component
+ return Component ? : false
};
diff --git a/chat2db-client/src/pages/main/workspace/components/WorkspaceExtend/config.tsx b/chat2db-client/src/pages/main/workspace/components/WorkspaceExtend/config.tsx
index c51387b25..9b5a0cb4f 100644
--- a/chat2db-client/src/pages/main/workspace/components/WorkspaceExtend/config.tsx
+++ b/chat2db-client/src/pages/main/workspace/components/WorkspaceExtend/config.tsx
@@ -1,7 +1,8 @@
-import React from 'react';
import i18n from '@/i18n';
import Output from '@/components/Output';
+import GlobalExtendComponents from './GlobalExtendComponents';
import SaveList from '../SaveList';
+import ViewDDL from '@/components/ViewDDL';
interface IToolbar {
code: string;
@@ -10,23 +11,37 @@ interface IToolbar {
components: any;
}
+export enum GlobalComponents {
+ view_ddl = 'viewDDL',
+ executive_log = 'executiveLog',
+ save_list = 'saveList'
+}
+
+export const globalComponents: {
+ [key in GlobalComponents]: any;
+} = {
+ [GlobalComponents.view_ddl]: ViewDDL,
+ [GlobalComponents.executive_log]: Output,
+ [GlobalComponents.save_list]: SaveList
+}
+
export const extendConfig: IToolbar[] = [
- // {
- // code: 'ai',
- // title: 'AI',
- // icon: '\ue8ad',
- // components: ai,
- // },
+ {
+ code: 'info',
+ title: i18n('common.title.info'),
+ icon: '\ue8e8',
+ components: GlobalExtendComponents,
+ },
{
code: 'executiveLog',
title: i18n('common.title.executiveLogging'),
icon: '\ue8ad',
- components: ,
+ components: globalComponents.executiveLog,
},
{
code: 'saveList',
title: i18n('workspace.title.savedConsole'),
icon: '\ue619',
- components: ,
+ components: globalComponents.saveList,
},
];
diff --git a/chat2db-client/src/pages/main/workspace/store/common.ts b/chat2db-client/src/pages/main/workspace/store/common.ts
index ac9bbac3c..c3da941d6 100644
--- a/chat2db-client/src/pages/main/workspace/store/common.ts
+++ b/chat2db-client/src/pages/main/workspace/store/common.ts
@@ -1,14 +1,19 @@
import { IConnectionListItem } from '@/typings/connection';
-import { useWorkspaceStore } from './index'
+import { useWorkspaceStore } from './index';
export interface ICommonStore {
currentConnectionDetails: IConnectionListItem | null;
currentWorkspaceExtend: string | null;
+ currentWorkspaceGlobalExtend: {
+ code: string,
+ uniqueData: any,
+ } | null;
}
export const initCommonStore: ICommonStore = {
currentConnectionDetails: null,
currentWorkspaceExtend: null,
+ currentWorkspaceGlobalExtend: null,
}
export const setCurrentConnectionDetails = (connectionDetails: ICommonStore['currentConnectionDetails']) => {
@@ -18,3 +23,7 @@ export const setCurrentConnectionDetails = (connectionDetails: ICommonStore['cur
export const setCurrentWorkspaceExtend = (workspaceExtend: ICommonStore['currentWorkspaceExtend']) => {
return useWorkspaceStore.setState({ currentWorkspaceExtend: workspaceExtend });
}
+
+export const setCurrentWorkspaceGlobalExtend = (workspaceGlobalExtend: ICommonStore['currentWorkspaceGlobalExtend']) => {
+ return useWorkspaceStore.setState({ currentWorkspaceGlobalExtend: workspaceGlobalExtend });
+}
diff --git a/chat2db-client/src/service/connection.ts b/chat2db-client/src/service/connection.ts
index 91aa44477..ee681cc3f 100644
--- a/chat2db-client/src/service/connection.ts
+++ b/chat2db-client/src/service/connection.ts
@@ -53,7 +53,7 @@ const update = createRequest('/api/connection/datasour
const remove = createRequest<{ id: number }, void>('/api/connection/datasource/:id', { method: 'delete' });
-const clone = createRequest<{ id: number }, void>('/api/connection/datasource/clone', { method: 'post' });
+const clone = createRequest<{ id: number }, number>('/api/connection/datasource/clone', { method: 'post' });
const getDatabaseList = createRequest<{ dataSourceId: number; refresh?: boolean }, any>('/api/rdb/database/list', {
method: 'get',