Skip to content

Commit

Permalink
Merge pull request #426 from actiontech/feature/version-management
Browse files Browse the repository at this point in the history
Feature/version management
  • Loading branch information
LZS911 authored Sep 24, 2024
2 parents 3392595 + d634a53 commit b1e5307
Show file tree
Hide file tree
Showing 18 changed files with 833 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/base/src/locale/zh-CN/dmsMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default {
sqlManagementConf: 'SQL管控配置',
pushRuleConfiguration: '推送规则',
pipelineConfiguration: '流水线配置',
versionManagement: '版本管理',

projectSelector: {
recentlyOpenedProjects: '最近打开的项目',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,19 @@ exports[`test genMenuItemsWithMenuStructTree should match snapshot 6`] = `
</Link>,
"structKey": "exec-workflow",
},
{
"icon": <FileVersionOutlined
height={18}
width={18}
/>,
"key": "sqle/project/projectID/version-management",
"label": <Link
to="/sqle/project/600300/version-management"
>
版本管理
</Link>,
"structKey": "version-management",
},
],
"label": "SQL上线",
"type": "group",
Expand Down Expand Up @@ -586,6 +599,19 @@ exports[`test genMenuItemsWithMenuStructTree should match snapshot 7`] = `
</Link>,
"structKey": "exec-workflow",
},
{
"icon": <FileVersionOutlined
height={18}
width={18}
/>,
"key": "sqle/project/projectID/version-management",
"label": <Link
to="/sqle/project/600300/version-management"
>
版本管理
</Link>,
"structKey": "version-management",
},
],
"label": "SQL上线",
"type": "group",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const menuStruct: MenuStructTreeType = [
{
type: 'group',
label: t('dmsMenu.groupLabel.SQLExecute'),
group: ['exec-workflow']
group: ['exec-workflow', 'version-management']
},
{
type: 'group',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ export type MenuStructTreeKey =
| 'sqle-log'
| 'sql-management-conf'
| 'push-rule-configuration'
| 'pipeline-configuration';
| 'pipeline-configuration'
| 'version-management';
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const sideMenuData = (
{
type: 'group',
label: t('dmsMenu.groupLabel.SQLExecute'),
group: ['exec-workflow']
group: ['exec-workflow', 'version-management']
},
{
type: 'group',
Expand Down
17 changes: 15 additions & 2 deletions packages/base/src/page/Nav/SideMenu/MenuList/menus/sqle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import {
BriefcaseFilled,
PlanFilled,
GearFilled,
PipelineOutlined
PipelineOutlined,
FileVersionOutlined
} from '@actiontech/icons';

const projectOverviewMenuItem: GenerateMenuItemType = (projectID) => ({
Expand Down Expand Up @@ -192,6 +193,17 @@ const pipelineConfiguration: GenerateMenuItemType = (projectID) => ({
structKey: 'pipeline-configuration'
});

const versionManagement: GenerateMenuItemType = (projectID) => ({
label: (
<Link to={`/sqle/project/${projectID}/version-management`}>
{t('dmsMenu.versionManagement')}
</Link>
),
icon: <FileVersionOutlined width={18} height={18} />,
key: `sqle/project/${SIDE_MENU_DATA_PLACEHOLDER_KEY}/version-management`,
structKey: 'version-management'
});

const sqleMenusCollection = [
projectOverviewMenuItem,
dashboardMenuItem,
Expand All @@ -208,7 +220,8 @@ const sqleMenusCollection = [
sqlManagementConf,
pushRuleConfiguration,
sqlManagementException,
pipelineConfiguration
pipelineConfiguration,
versionManagement
];

export default sqleMenusCollection;
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,24 @@ exports[`base/router-sqle-ce render sqle route data snap 1`] = `
"key": "pipelineConfiguration",
"path": ":projectID/pipeline-configuration",
},
{
"children": [
{
"element": <div>
VersionManagementList
</div>,
"key": "VersionManagementList",
"path": "",
},
],
"element": <div
data-test-parent-id="versionManagement"
>
<Outlet />
</div>,
"key": "versionManagement",
"path": ":projectID/version-management",
},
{
"element": <div>
projectRedirect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,24 @@ exports[`base/router-sqle-ee render sqle route data snap 1`] = `
"key": "pipelineConfiguration",
"path": ":projectID/pipeline-configuration",
},
{
"children": [
{
"element": <div>
VersionManagementList
</div>,
"key": "VersionManagementList",
"path": "",
},
],
"element": <div
data-test-parent-id="versionManagement"
>
<Outlet />
</div>,
"key": "versionManagement",
"path": ":projectID/version-management",
},
{
"element": <div>
projectRedirect
Expand Down
7 changes: 7 additions & 0 deletions packages/icons/docs/icon/Data.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ import { ExceptionFileOutlined } from '@actiontech/icons';
export default () => <ExceptionFileOutlined width={32} height={32} />
```

## FileVersionOutlined
```jsx
import { FileVersionOutlined } from '@actiontech/icons';

export default () => <FileVersionOutlined width={32} height={32} />
```

## HorizontalTripleLineOutlined
```jsx
import { HorizontalTripleLineOutlined } from '@actiontech/icons';
Expand Down
23 changes: 23 additions & 0 deletions packages/icons/src/outlined/Data/FileVersionOutlined.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { SVGProps } from 'react';
const FileVersionOutlined = (props: SVGProps<SVGSVGElement>) => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width={16}
height={16}
className="FileVersionOutlined_svg__icon"
viewBox="0 0 1024 1024"
{...props}
>
<path
fill={props.color ? 'currentColor' : '#8A8F99'}
d="M527.1 887.6H220.8v-751h361.6v187.1c0 19.9 16.1 36 36 36h187.4v88.6c0 19.9 16.1 36 36 36s36-16.1 36-36V323.6c0-9.6-3.8-18.7-10.6-25.5l-223.3-223c-.6-.6-1.2-1.1-1.8-1.6l-.4-.4-1.8-1.5s-.1-.1-.2-.1l-1.8-1.2-.6-.3c-.6-.4-1.3-.8-2-1.1-.1 0-.2-.1-.2-.1-.6-.3-1.2-.6-1.9-.9l-.6-.3c-.7-.3-1.4-.6-2.1-.8-.1 0-.1 0-.2-.1-.7-.2-1.4-.5-2.1-.7-.2-.1-.4-.1-.6-.2-.7-.2-1.5-.4-2.3-.5-.7-.1-1.5-.3-2.3-.4-.2 0-.4-.1-.6-.1-.7-.1-1.4-.2-2.2-.2H202.1c-29.4 0-53.3 23.9-53.3 53.3v788.4c0 29.4 23.9 53.3 53.3 53.3h325c19.9 0 36-16.1 36-36s-16.1-36-36-36m127.4-599.9V187.5l100.2 100.2z"
/>
<path
fill={props.color ? 'currentColor' : '#8A8F99'}
d="M768.1 547c-105.5 0-191 85.5-191 191s85.5 191 191 191 191-85.5 191-191-85.5-191-191-191M885 816.5c-4.1 0-8.2-.7-12.3-2.2l-115.9-42.2c-14.3-4.8-24.6-18.3-24.6-34.1V613.7c0-19.9 16.1-36 36-36s36 16.1 36 36v99.1l93.1 33.9c18.7 6.8 28.3 27.5 21.5 46.1-5.3 14.7-19.1 23.7-33.8 23.7"
/>
</svg>
);
};
export default FileVersionOutlined;
1 change: 1 addition & 0 deletions packages/icons/src/outlined/Data/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export { default as DoubleDatabaseOutlined } from './DoubleDatabaseOutlined';
export { default as ExceptionFileOutlined } from './ExceptionFileOutlined';
export { default as FileVersionOutlined } from './FileVersionOutlined';
export { default as HorizontalTripleLineOutlined } from './HorizontalTripleLineOutlined';
export { default as PanelCardOutlined } from './PanelCardOutlined';
export { default as RiseSquareOutlined } from './RiseSquareOutlined';
Expand Down
1 change: 1 addition & 0 deletions packages/icons/svg/outlined/Data/FileVersionOutlined.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b1e5307

Please sign in to comment.