Skip to content

Commit

Permalink
Merge branches 'feature/issue-ee-958' and 'main' of https://github.co…
Browse files Browse the repository at this point in the history
…m/actiontech/sqle-ui into feature/issue-ee-958
  • Loading branch information
LZS911 committed Sep 21, 2023
2 parents 53e4306 + 30347ba commit 663ade7
Show file tree
Hide file tree
Showing 24 changed files with 1,219 additions and 22 deletions.
2 changes: 2 additions & 0 deletions src/locale/zh-CN/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import syncDataSource from './syncDataSource';
import operationRecord from './operationRecord';
import customRule from './customRule';
import ruleManager from './ruleManager';
import sqlManagement from './sqlManagement';
import sqlAudit from './sqlAudit';
import ruleKnowledge from './ruleKnowledge';

Expand Down Expand Up @@ -56,6 +57,7 @@ export default {
operationRecord,
customRule,
ruleManager,
sqlManagement,
sqlAudit,
ruleKnowledge,
},
Expand Down
1 change: 1 addition & 0 deletions src/locale/zh-CN/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ export default {
allInstanceType: '所有数据库类型',
syncDataSource: '外部数据源同步',
operationRecord: '操作记录',
sqlManagement: 'SQL管控',
sqlAudit: 'SQL审核',
};
2 changes: 2 additions & 0 deletions src/locale/zh-CN/sqlAudit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export default {
sqlFile: 'SQL文件',
xmlFile: 'Mybatis的XML文件',
zipFile: 'ZIP文件',
gitUrl: 'GIT地址',
gitUrlTips: '若为私有GIT仓库,则必须输入有读权限的账号密码',
},
auditButton: '审核',
formatterSQL: 'SQL美化',
Expand Down
57 changes: 57 additions & 0 deletions src/locale/zh-CN/sqlManagement.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/* eslint-disable import/no-anonymous-default-export */
export default {
pageTitle: 'SQL管控',
pageDesc: '您可以在此监控扫描任务和API审核中的SQL及其审核结果',
eeFeatureDescription:
'SQL管控为用户提供SQL全生命周期监控,面板将整合所有的业务SQL,用户可以在该面板中查看项目中采集并审核的所有SQL,暴露其中的问题SQL,同时支持用户解决问题SQL。',

statistics: {
SQLTotalNum: 'SQL总数',
problemSQlNum: '问题SQL数',
optimizedSQLNum: '已优化SQL数',
},

selectDictionary: {
auditPlan: '智能扫描',
apiAudit: 'SQL审核',

normal: '普通',
error: '错误',
warn: '告警',
notice: '提示',

unhandled: '未处理',
solved: '已解决',
ignored: '已忽略',
},

filterForm: {
SQLFingerprint: 'SQL指纹',
fuzzySearchPlaceholder: '请输入SQL指纹或负责人名称',
instanceName: '数据源',
source: '来源',
highAuditLevel: '最高审核等级',
status: '状态',
relatedToMe: '与我相关',
time: '时间范围',
},

table: {
SQLFingerprint: 'SQL指纹',
source: '来源',
instanceName: '数据源',
auditResult: '审核结果',
firstOccurrence: '初次出现时间',
lastOccurrence: '最后一次出现时间',
occurrenceCount: '出现数量',
personInCharge: '负责人',
status: '状态',
comment: '备注',

actions: {
batchAssignment: '批量指派',
batchSolve: '批量解决',
batchIgnore: '批量忽略',
},
},
};
11 changes: 7 additions & 4 deletions src/page/Order/AuditResult/RenderExecuteSql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import HighlightCode from '../../../utils/HighlightCode';
import { RenderExecuteSqlProps } from './index.type';
import CopyIcon from '../../../components/CopyIcon';

const RenderExecuteSql: React.FC<RenderExecuteSqlProps> = ({ sql }) => {
const RenderExecuteSql: React.FC<RenderExecuteSqlProps> = ({
sql,
rows = 10,
}) => {
if (!sql) {
return null;
}
Expand All @@ -17,10 +20,10 @@ const RenderExecuteSql: React.FC<RenderExecuteSqlProps> = ({ sql }) => {
title: <pre className="pre-warp-break-all">{sql}</pre>,
placement: 'topLeft',
overlayInnerStyle: {
width: '30vw'
}
width: '30vw',
},
},
rows: 10,
rows,
}}
className="margin-bottom-0"
>
Expand Down
1 change: 1 addition & 0 deletions src/page/Order/AuditResult/index.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,5 @@ export type MaintenanceTimeInfoType = Array<{

export type RenderExecuteSqlProps = {
sql?: string;
rows?: number;
};
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,52 @@ exports[`test ProjectManage/ProjectDetailLayout should render active menu by rou
</a>
</span>
</li>
<li
class="ant-menu-item"
data-menu-id="rc-menu-uuid-test-SQLManagement"
role="menuitem"
style="padding-left: 24px;"
tabindex="-1"
title="menu.sqlManagement"
>
<span
aria-label="console-sql"
class="anticon anticon-console-sql ant-menu-item-icon"
role="img"
>
<svg
aria-hidden="true"
data-icon="console-sql"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<defs>
<style />
</defs>
<path
d="M301.3 496.7c-23.8 0-40.2-10.5-41.6-26.9H205c.9 43.4 36.9 70.3 93.9 70.3 59.1 0 95-28.4 95-75.5 0-35.8-20-55.9-64.5-64.5l-29.1-5.6c-23.8-4.7-33.8-11.9-33.8-24.2 0-15 13.3-24.5 33.4-24.5 20.1 0 35.3 11.1 36.6 27h53c-.9-41.7-37.5-70.3-90.3-70.3-54.4 0-89.7 28.9-89.7 73 0 35.5 21.2 58 62.5 65.8l29.7 5.9c25.8 5.2 35.6 11.9 35.6 24.4.1 14.7-14.5 25.1-36 25.1z"
/>
<path
d="M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"
/>
<path
d="M828.5 486.7h-95.8V308.5h-57.4V534h153.2zm-298.6 53.4c14.1 0 27.2-2 39.1-5.8l13.3 20.3h53.3L607.9 511c21.1-20 33-51.1 33-89.8 0-73.3-43.3-118.8-110.9-118.8s-111.2 45.3-111.2 118.8c-.1 73.7 43 118.9 111.1 118.9zm0-190c31.6 0 52.7 27.7 52.7 71.1 0 16.7-3.6 30.6-10 40.5l-5.2-6.9h-48.8L542 491c-3.9.9-8 1.4-12.2 1.4-31.7 0-52.8-27.5-52.8-71.2.1-43.6 21.2-71.1 52.9-71.1z"
/>
</svg>
</span>
<span
class="ant-menu-title-content"
>
<a
href="/project/test/sqlManagement"
>
menu.sqlManagement
</a>
</span>
</li>
<li
class="ant-menu-item"
data-menu-id="rc-menu-uuid-test-sqlAudit"
Expand Down Expand Up @@ -785,6 +831,52 @@ exports[`test ProjectManage/ProjectDetailLayout should render menu by user role
</a>
</span>
</li>
<li
class="ant-menu-item"
data-menu-id="rc-menu-uuid-test-SQLManagement"
role="menuitem"
style="padding-left: 24px;"
tabindex="-1"
title="menu.sqlManagement"
>
<span
aria-label="console-sql"
class="anticon anticon-console-sql ant-menu-item-icon"
role="img"
>
<svg
aria-hidden="true"
data-icon="console-sql"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<defs>
<style />
</defs>
<path
d="M301.3 496.7c-23.8 0-40.2-10.5-41.6-26.9H205c.9 43.4 36.9 70.3 93.9 70.3 59.1 0 95-28.4 95-75.5 0-35.8-20-55.9-64.5-64.5l-29.1-5.6c-23.8-4.7-33.8-11.9-33.8-24.2 0-15 13.3-24.5 33.4-24.5 20.1 0 35.3 11.1 36.6 27h53c-.9-41.7-37.5-70.3-90.3-70.3-54.4 0-89.7 28.9-89.7 73 0 35.5 21.2 58 62.5 65.8l29.7 5.9c25.8 5.2 35.6 11.9 35.6 24.4.1 14.7-14.5 25.1-36 25.1z"
/>
<path
d="M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"
/>
<path
d="M828.5 486.7h-95.8V308.5h-57.4V534h153.2zm-298.6 53.4c14.1 0 27.2-2 39.1-5.8l13.3 20.3h53.3L607.9 511c21.1-20 33-51.1 33-89.8 0-73.3-43.3-118.8-110.9-118.8s-111.2 45.3-111.2 118.8c-.1 73.7 43 118.9 111.1 118.9zm0-190c31.6 0 52.7 27.7 52.7 71.1 0 16.7-3.6 30.6-10 40.5l-5.2-6.9h-48.8L542 491c-3.9.9-8 1.4-12.2 1.4-31.7 0-52.8-27.5-52.8-71.2.1-43.6 21.2-71.1 52.9-71.1z"
/>
</svg>
</span>
<span
class="ant-menu-title-content"
>
<a
href="/project/test/sqlManagement"
>
menu.sqlManagement
</a>
</span>
</li>
<li
class="ant-menu-item"
data-menu-id="rc-menu-uuid-test-sqlAudit"
Expand Down Expand Up @@ -1185,6 +1277,52 @@ exports[`test ProjectManage/ProjectDetailLayout should render menu by user role
</a>
</span>
</li>
<li
class="ant-menu-item"
data-menu-id="rc-menu-uuid-test-SQLManagement"
role="menuitem"
style="padding-left: 24px;"
tabindex="-1"
title="menu.sqlManagement"
>
<span
aria-label="console-sql"
class="anticon anticon-console-sql ant-menu-item-icon"
role="img"
>
<svg
aria-hidden="true"
data-icon="console-sql"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<defs>
<style />
</defs>
<path
d="M301.3 496.7c-23.8 0-40.2-10.5-41.6-26.9H205c.9 43.4 36.9 70.3 93.9 70.3 59.1 0 95-28.4 95-75.5 0-35.8-20-55.9-64.5-64.5l-29.1-5.6c-23.8-4.7-33.8-11.9-33.8-24.2 0-15 13.3-24.5 33.4-24.5 20.1 0 35.3 11.1 36.6 27h53c-.9-41.7-37.5-70.3-90.3-70.3-54.4 0-89.7 28.9-89.7 73 0 35.5 21.2 58 62.5 65.8l29.7 5.9c25.8 5.2 35.6 11.9 35.6 24.4.1 14.7-14.5 25.1-36 25.1z"
/>
<path
d="M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"
/>
<path
d="M828.5 486.7h-95.8V308.5h-57.4V534h153.2zm-298.6 53.4c14.1 0 27.2-2 39.1-5.8l13.3 20.3h53.3L607.9 511c21.1-20 33-51.1 33-89.8 0-73.3-43.3-118.8-110.9-118.8s-111.2 45.3-111.2 118.8c-.1 73.7 43 118.9 111.1 118.9zm0-190c31.6 0 52.7 27.7 52.7 71.1 0 16.7-3.6 30.6-10 40.5l-5.2-6.9h-48.8L542 491c-3.9.9-8 1.4-12.2 1.4-31.7 0-52.8-27.5-52.8-71.2.1-43.6 21.2-71.1 52.9-71.1z"
/>
</svg>
</span>
<span
class="ant-menu-title-content"
>
<a
href="/project/test/sqlManagement"
>
menu.sqlManagement
</a>
</span>
</li>
<li
class="ant-menu-item"
data-menu-id="rc-menu-uuid-test-sqlAudit"
Expand Down Expand Up @@ -1585,6 +1723,52 @@ exports[`test ProjectManage/ProjectDetailLayout should render menu by user role
</a>
</span>
</li>
<li
class="ant-menu-item"
data-menu-id="rc-menu-uuid-test-SQLManagement"
role="menuitem"
style="padding-left: 24px;"
tabindex="-1"
title="menu.sqlManagement"
>
<span
aria-label="console-sql"
class="anticon anticon-console-sql ant-menu-item-icon"
role="img"
>
<svg
aria-hidden="true"
data-icon="console-sql"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<defs>
<style />
</defs>
<path
d="M301.3 496.7c-23.8 0-40.2-10.5-41.6-26.9H205c.9 43.4 36.9 70.3 93.9 70.3 59.1 0 95-28.4 95-75.5 0-35.8-20-55.9-64.5-64.5l-29.1-5.6c-23.8-4.7-33.8-11.9-33.8-24.2 0-15 13.3-24.5 33.4-24.5 20.1 0 35.3 11.1 36.6 27h53c-.9-41.7-37.5-70.3-90.3-70.3-54.4 0-89.7 28.9-89.7 73 0 35.5 21.2 58 62.5 65.8l29.7 5.9c25.8 5.2 35.6 11.9 35.6 24.4.1 14.7-14.5 25.1-36 25.1z"
/>
<path
d="M928 140H96c-17.7 0-32 14.3-32 32v496c0 17.7 14.3 32 32 32h380v112H304c-8.8 0-16 7.2-16 16v48c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-48c0-8.8-7.2-16-16-16H548V700h380c17.7 0 32-14.3 32-32V172c0-17.7-14.3-32-32-32zm-40 488H136V212h752v416z"
/>
<path
d="M828.5 486.7h-95.8V308.5h-57.4V534h153.2zm-298.6 53.4c14.1 0 27.2-2 39.1-5.8l13.3 20.3h53.3L607.9 511c21.1-20 33-51.1 33-89.8 0-73.3-43.3-118.8-110.9-118.8s-111.2 45.3-111.2 118.8c-.1 73.7 43 118.9 111.1 118.9zm0-190c31.6 0 52.7 27.7 52.7 71.1 0 16.7-3.6 30.6-10 40.5l-5.2-6.9h-48.8L542 491c-3.9.9-8 1.4-12.2 1.4-31.7 0-52.8-27.5-52.8-71.2.1-43.6 21.2-71.1 52.9-71.1z"
/>
</svg>
</span>
<span
class="ant-menu-title-content"
>
<a
href="/project/test/sqlManagement"
>
menu.sqlManagement
</a>
</span>
</li>
<li
class="ant-menu-item"
data-menu-id="rc-menu-uuid-test-sqlAudit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ Array [
</CustomLink>,
"title": "menu.projectOverview",
},
Object {
"icon": <ForwardRef(ConsoleSqlOutlined) />,
"key": "SQLManagement",
"label": <CustomLink
to="project/test/sqlManagement"
>
menu.sqlManagement
</CustomLink>,
"title": "menu.sqlManagement",
},
Object {
"icon": <ForwardRef(ConsoleSqlOutlined) />,
"key": "sqlAudit",
Expand Down Expand Up @@ -121,6 +131,16 @@ Array [
</CustomLink>,
"title": "menu.projectOverview",
},
Object {
"icon": <ForwardRef(ConsoleSqlOutlined) />,
"key": "SQLManagement",
"label": <CustomLink
to="project/test/sqlManagement"
>
menu.sqlManagement
</CustomLink>,
"title": "menu.sqlManagement",
},
Object {
"icon": <ForwardRef(ConsoleSqlOutlined) />,
"key": "sqlAudit",
Expand Down
Loading

0 comments on commit 663ade7

Please sign in to comment.