Skip to content

Commit 6e96d0a

Browse files
authored
Merge pull request #695 from actiontech/temporary/sql-insights
Temporary/sql insights
2 parents a5c1904 + ca94cf6 commit 6e96d0a

File tree

97 files changed

+12265
-16
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+12265
-16
lines changed

.apiforgerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@
3333
"serviceAlias": "@actiontech/shared/lib/api/base/service"
3434
}
3535
}
36-
}
36+
}

packages/base/src/hooks/useThemeStyleData/__snapshots__/index.test.tsx.snap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,10 @@ exports[`test base/hooks/useThemeStyleData should match snapshot 3`] = `
923923
},
924924
"loadingColor": "#4583ff",
925925
},
926+
"sqlInsight": {
927+
"dataMarkerColor": "#ff4d4f",
928+
"regionFillColor": "rgba(197, 212, 235, 0.6)",
929+
},
926930
"statistics": {
927931
"auditRateStatus": {
928932
"error": {

packages/base/src/locale/zh-CN/dmsMenu.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,6 @@ export default {
7878
availabilityZone: {
7979
switchAvailabilityZone: '切换可用区将重新加载数据,是否确认?',
8080
pleaseSelect: '请选择'
81-
}
81+
},
82+
sqlPerformanceInsights: '性能洞察'
8283
};

packages/base/src/page/Nav/SideMenu/MenuList/menus/__tests__/__snapshots__/common.test.tsx.snap

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,20 @@ exports[`test genMenuItemsWithMenuStructTree should match snapshot 4`] = `
301301
"structKey": "sql-management-conf",
302302
"to": "/sqle/project/600300/sql-management-conf",
303303
},
304+
{
305+
"icon": <DashboardOutlined
306+
height={20}
307+
width={20}
308+
/>,
309+
"key": "sqle/project/projectID/sql-insights",
310+
"label": <ForwardRef(TypedLink)
311+
to="/sqle/project/600300/sql-insights"
312+
>
313+
性能洞察
314+
</ForwardRef(TypedLink)>,
315+
"structKey": "sql-insights",
316+
"to": "/sqle/project/600300/sql-insights",
317+
},
304318
],
305319
"label": "SQL管控",
306320
"permission": undefined,

packages/base/src/page/Nav/SideMenu/MenuList/menus/__tests__/common.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const menuStruct: MenuTreeTranslated[] = [
3838
{
3939
type: 'group',
4040
label: t('dmsMenu.groupLabel.SQLManagement'),
41-
groups: ['sql-management', 'sql-management-conf']
41+
groups: ['sql-management', 'sql-management-conf', 'sql-insights']
4242
},
4343
{ type: 'divider' },
4444
{

packages/base/src/page/Nav/SideMenu/MenuList/menus/index.type.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,5 @@ type SqleMenuStructTreeKey =
7373
| 'push-rule-configuration'
7474
| 'pipeline-configuration'
7575
| 'version-management'
76-
| 'data-source-comparison';
76+
| 'data-source-comparison'
77+
| 'sql-insights';

packages/base/src/page/Nav/SideMenu/MenuList/menus/menu.data.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const SQLE_MENU_STRUCT: MenuTreeI18n[] = [
3232
{
3333
type: 'group',
3434
groupLabelKey: 'dmsMenu.groupLabel.SQLManagement',
35-
groups: ['sql-management', 'sql-management-conf']
35+
groups: ['sql-management', 'sql-insights', 'sql-management-conf']
3636
},
3737
{ type: 'divider' },
3838
{

packages/base/src/page/Nav/SideMenu/MenuList/menus/sqle.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import {
1818
GearFilled,
1919
PipelineOutlined,
2020
FileVersionOutlined,
21-
ComparisonOutlined
21+
ComparisonOutlined,
22+
DashboardOutlined
2223
} from '@actiontech/icons';
2324
import { PERMISSIONS } from '@actiontech/shared/lib/features';
2425
import { parse2ReactRouterPath } from '@actiontech/shared';
@@ -197,6 +198,15 @@ const dataSourceComparison: GenerateMenuItemI18nConfig = (projectID) => ({
197198
key: `sqle/project/${SIDE_MENU_DATA_PLACEHOLDER_KEY}/data-source-comparison`,
198199
structKey: 'data-source-comparison'
199200
});
201+
const sqlPerformanceInsights: GenerateMenuItemI18nConfig = (projectID) => ({
202+
label: 'dmsMenu.sqlPerformanceInsights',
203+
to: parse2ReactRouterPath(ROUTE_PATHS.SQLE.SQL_INSIGHTS.index, {
204+
params: { projectID: projectID }
205+
}),
206+
icon: <DashboardOutlined width={20} height={20} />,
207+
key: `sqle/project/${SIDE_MENU_DATA_PLACEHOLDER_KEY}/sql-insights`,
208+
structKey: 'sql-insights'
209+
});
200210

201211
const sqleMenusCollection = [
202212
projectOverviewMenuItem,
@@ -215,7 +225,8 @@ const sqleMenusCollection = [
215225
sqlManagementException,
216226
pipelineConfiguration,
217227
versionManagement,
218-
dataSourceComparison
228+
dataSourceComparison,
229+
sqlPerformanceInsights
219230
];
220231

221232
export default sqleMenusCollection;

packages/base/src/router/test/__snapshots__/router.base.test.tsx.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,13 @@ exports[`base/router-base-ee render base route data snap 1`] = `
476476
"key": "sqlManagementConf",
477477
"path": ":projectID/sql-management-conf",
478478
},
479+
{
480+
"element": <div>
481+
sqlInsights
482+
</div>,
483+
"key": "sqlInsights",
484+
"path": ":projectID/sql-insights",
485+
},
479486
{
480487
"children": [
481488
{

packages/base/src/router/test/__snapshots__/router.ce.base.test.tsx.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,13 @@ exports[`base/router-base-ce render base route data snap 1`] = `
340340
"key": "sqlManagementConf",
341341
"path": ":projectID/sql-management-conf",
342342
},
343+
{
344+
"element": <div>
345+
sqlInsights
346+
</div>,
347+
"key": "sqlInsights",
348+
"path": ":projectID/sql-insights",
349+
},
343350
{
344351
"children": [
345352
{

0 commit comments

Comments
 (0)