Skip to content

Commit 5ea5257

Browse files
authored
Merge pull request #404 from actiontech/feature/sqle-issue-2561
Feature/sqle issue 2561
2 parents 84681c1 + 32921e6 commit 5ea5257

File tree

6 files changed

+381
-13
lines changed

6 files changed

+381
-13
lines changed

packages/shared/lib/api/sqle/service/common.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2225,7 +2225,7 @@ export interface IScheduledTaskDefaultOptionV1Rsp {
22252225
export interface ISource {
22262226
sql_source_desc?: string;
22272227

2228-
sql_source_id?: string;
2228+
sql_source_ids?: string[];
22292229

22302230
sql_source_type?: string;
22312231
}

packages/sqle/src/page/SqlAudit/List/index.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ describe('sqle/SqlAudit/List', () => {
138138
fuzzy_search_tags: 'test',
139139
page_index: 1,
140140
page_size: 20,
141-
filter_sql_audit_record_ids: ''
141+
filter_sql_audit_record_ids: undefined
142142
});
143143
});
144144

packages/sqle/src/page/SqlAudit/List/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ const SqlAuditList = () => {
5757
const searchStr = new URLSearchParams(location.search);
5858
if (searchStr.has(SQLAuditRecordListUrlParamsKey.SQLAuditRecordID)) {
5959
return (
60-
searchStr.get(SQLAuditRecordListUrlParamsKey.SQLAuditRecordID) ?? ''
60+
searchStr.get(SQLAuditRecordListUrlParamsKey.SQLAuditRecordID) ??
61+
undefined
6162
);
6263
}
63-
return '';
6464
}, [location.search]);
6565
const [filterStatus, setFilterStatus] = useState<
6666
getSQLAuditRecordsV1FilterSqlAuditStatusEnum | 'all'

packages/sqle/src/page/SqlManagement/component/SQLEEIndex/__snapshots__/index.test.tsx.snap

Lines changed: 326 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3505,7 +3505,8 @@ exports[`page/SqlManagement/SQLEEIndex render table data 1`] = `
35053505
class="ant-table-cell"
35063506
>
35073507
<a
3508-
href="/sqle/project/700300/sql-management-conf/123?active=mysql_slow_log"
3508+
href="/sqle/project/700300/sql-management-conf/123"
3509+
target="_blank"
35093510
>
35103511
慢日志
35113512
</a>
@@ -3896,7 +3897,8 @@ exports[`page/SqlManagement/SQLEEIndex render table data 1`] = `
38963897
class="ant-table-cell"
38973898
>
38983899
<a
3899-
href="/sqle/project/700300/sql-management-conf/123?active=mysql_slow_log"
3900+
href="/sqle/project/700300/sql-management-conf/123"
3901+
target="_blank"
39003902
>
39013903
慢日志
39023904
</a>
@@ -4256,7 +4258,8 @@ exports[`page/SqlManagement/SQLEEIndex render table data 1`] = `
42564258
class="ant-table-cell"
42574259
>
42584260
<a
4259-
href="/sqle/project/700300/sql-management-conf/123?active=mysql_slow_log"
4261+
href="/sqle/project/700300/sql-management-conf/123"
4262+
target="_blank"
42604263
>
42614264
慢日志
42624265
</a>
@@ -4422,6 +4425,326 @@ exports[`page/SqlManagement/SQLEEIndex render table data 1`] = `
44224425
</div>
44234426
</td>
44244427
</tr>
4428+
<tr
4429+
class="ant-table-row ant-table-row-level-0"
4430+
data-row-key="1150087"
4431+
>
4432+
<td
4433+
class="ant-table-cell ant-table-selection-column"
4434+
>
4435+
<label
4436+
class="ant-checkbox-wrapper css-dev-only-do-not-override-bj9uhl"
4437+
>
4438+
<span
4439+
class="ant-checkbox css-dev-only-do-not-override-bj9uhl"
4440+
>
4441+
<input
4442+
class="ant-checkbox-input"
4443+
type="checkbox"
4444+
/>
4445+
<span
4446+
class="ant-checkbox-inner"
4447+
/>
4448+
</span>
4449+
</label>
4450+
</td>
4451+
<td
4452+
class="ant-table-cell ellipsis-column-width"
4453+
>
4454+
<div
4455+
class="actiontech-sql-snippet-renderer-wrapper css-dz7fl9"
4456+
>
4457+
<div
4458+
class="ant-typography ant-typography-ellipsis ant-typography-ellipsis-multiple-line margin-bottom-0 css-dev-only-do-not-override-bj9uhl"
4459+
>
4460+
<span>
4461+
<span
4462+
class="hljs-keyword"
4463+
>
4464+
SELECT
4465+
</span>
4466+
?
4467+
</span>
4468+
</div>
4469+
<div
4470+
class="actiontech-copy-icon actiontech-sql-renderer-copy-icon css-1s8kb8e"
4471+
>
4472+
<span
4473+
aria-label="copy"
4474+
class="anticon anticon-copy"
4475+
role="img"
4476+
>
4477+
<svg
4478+
aria-hidden="true"
4479+
data-icon="copy"
4480+
fill="currentColor"
4481+
focusable="false"
4482+
height="1em"
4483+
viewBox="64 64 896 896"
4484+
width="1em"
4485+
>
4486+
<path
4487+
d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"
4488+
/>
4489+
</svg>
4490+
</span>
4491+
</div>
4492+
</div>
4493+
</td>
4494+
<td
4495+
class="ant-table-cell ellipsis-column-width"
4496+
>
4497+
<div
4498+
class="actiontech-sql-snippet-renderer-wrapper css-dz7fl9"
4499+
>
4500+
<div
4501+
class="ant-typography ant-typography-ellipsis ant-typography-ellipsis-multiple-line margin-bottom-0 css-dev-only-do-not-override-bj9uhl"
4502+
>
4503+
<span>
4504+
<span
4505+
class="hljs-keyword"
4506+
>
4507+
SELECT
4508+
</span>
4509+
4510+
<span
4511+
class="hljs-number"
4512+
>
4513+
1
4514+
</span>
4515+
;
4516+
</span>
4517+
</div>
4518+
<div
4519+
class="actiontech-copy-icon actiontech-sql-renderer-copy-icon css-1s8kb8e"
4520+
>
4521+
<span
4522+
aria-label="copy"
4523+
class="anticon anticon-copy"
4524+
role="img"
4525+
>
4526+
<svg
4527+
aria-hidden="true"
4528+
data-icon="copy"
4529+
fill="currentColor"
4530+
focusable="false"
4531+
height="1em"
4532+
viewBox="64 64 896 896"
4533+
width="1em"
4534+
>
4535+
<path
4536+
d="M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"
4537+
/>
4538+
</svg>
4539+
</span>
4540+
</div>
4541+
</div>
4542+
</td>
4543+
<td
4544+
class="ant-table-cell"
4545+
>
4546+
<a
4547+
href="/sqle/project/700300/sql-audit?SQLAuditRecordID=123"
4548+
target="_blank"
4549+
>
4550+
SQL审核
4551+
</a>
4552+
</td>
4553+
<td
4554+
class="ant-table-cell"
4555+
>
4556+
<div
4557+
class="audit-result-wrapper"
4558+
>
4559+
<div
4560+
class=" css-1v03opz"
4561+
>
4562+
<div
4563+
class="css-1avyf41"
4564+
>
4565+
<span
4566+
class="icon-wrapper"
4567+
>
4568+
<svg
4569+
height="20"
4570+
viewBox="0 0 20 20"
4571+
width="20"
4572+
xmlns="http://www.w3.org/2000/svg"
4573+
>
4574+
<path
4575+
d="M10 18.333a8.333 8.333 0 1 1 0-16.666 8.333 8.333 0 1 1 0 16.666m-.83-5 5.89-5.892-1.177-1.178-4.714 4.714-2.357-2.358-1.179 1.179z"
4576+
fill="#41BF9A"
4577+
/>
4578+
</svg>
4579+
</span>
4580+
<span
4581+
class="text-wrapper"
4582+
>
4583+
白名单
4584+
</span>
4585+
</div>
4586+
</div>
4587+
</div>
4588+
</td>
4589+
<td
4590+
class="ant-table-cell"
4591+
>
4592+
MYSQL_3307
4593+
</td>
4594+
<td
4595+
class="ant-table-cell"
4596+
>
4597+
db1
4598+
</td>
4599+
<td
4600+
class="ant-table-cell"
4601+
>
4602+
-
4603+
</td>
4604+
<td
4605+
class="ant-table-cell"
4606+
>
4607+
<div
4608+
class="ant-avatar-group css-dev-only-do-not-override-bj9uhl"
4609+
>
4610+
<div
4611+
class="ant-space css-dev-only-do-not-override-bj9uhl ant-space-horizontal ant-space-align-center basic-tooltips-wrapper css-4jbtl9"
4612+
>
4613+
<div
4614+
class="ant-space-item"
4615+
>
4616+
<span
4617+
class="ant-avatar ant-avatar-circle action-avatar css-1wq79dc css-dev-only-do-not-override-bj9uhl"
4618+
>
4619+
<span
4620+
class="ant-avatar-string"
4621+
style="transform: scale(1) translateX(-50%);"
4622+
>
4623+
T
4624+
</span>
4625+
</span>
4626+
</div>
4627+
</div>
4628+
<div
4629+
class="ant-space css-dev-only-do-not-override-bj9uhl ant-space-horizontal ant-space-align-center basic-tooltips-wrapper css-4jbtl9"
4630+
>
4631+
<div
4632+
class="ant-space-item"
4633+
>
4634+
<span
4635+
class="ant-avatar ant-avatar-circle action-avatar css-1wq79dc css-dev-only-do-not-override-bj9uhl"
4636+
>
4637+
<span
4638+
class="ant-avatar-string"
4639+
style="transform: scale(1) translateX(-50%);"
4640+
>
4641+
T
4642+
</span>
4643+
</span>
4644+
</div>
4645+
</div>
4646+
</div>
4647+
</td>
4648+
<td
4649+
class="ant-table-cell"
4650+
>
4651+
-
4652+
</td>
4653+
<td
4654+
class="ant-table-cell"
4655+
>
4656+
<span
4657+
class="ant-tag ant-tag-red basic-tag-wrapper basic-small-tag-wrapper css-xyvxme css-dev-only-do-not-override-bj9uhl"
4658+
>
4659+
未处理
4660+
</span>
4661+
</td>
4662+
<td
4663+
class="ant-table-cell ellipsis-column-width"
4664+
>
4665+
<button
4666+
class="ant-btn css-dev-only-do-not-override-9n8g17 ant-btn-default ant-btn-sm ant-btn-icon-only has-icon-primary basic-button-wrapper css-geipcv"
4667+
type="button"
4668+
>
4669+
<span
4670+
class="ant-btn-icon"
4671+
>
4672+
<svg
4673+
class="custom-icon"
4674+
color="currentColor"
4675+
height="16"
4676+
viewBox="0 0 16 16"
4677+
width="16"
4678+
xmlns="http://www.w3.org/2000/svg"
4679+
>
4680+
<path
4681+
d="M6.162 12.667H14V14H2v-2.829l6.6-6.6 2.828 2.83zm3.38-9.038 1.415-1.414a.667.667 0 0 1 .942 0L13.785 4.1a.667.667 0 0 1 0 .942l-1.414 1.414z"
4682+
fill="currentColor"
4683+
/>
4684+
</svg>
4685+
</span>
4686+
</button>
4687+
</td>
4688+
<td
4689+
class="ant-table-cell actiontech-table-actions-column ant-table-cell-fix-right ant-table-cell-fix-right-first"
4690+
style="position: sticky; right: 0px;"
4691+
>
4692+
<div
4693+
class="css-new95e"
4694+
>
4695+
<div
4696+
class="ant-space css-dev-only-do-not-override-bj9uhl ant-space-horizontal ant-space-align-center"
4697+
>
4698+
<div
4699+
class="ant-space-item"
4700+
style="margin-right: 8px;"
4701+
>
4702+
<button
4703+
class="ant-btn css-dev-only-do-not-override-9n8g17 ant-btn-default ant-btn-sm actiontech-table-actions-button basic-button-wrapper css-geipcv"
4704+
type="button"
4705+
>
4706+
<span>
4707+
指派负责人
4708+
</span>
4709+
</button>
4710+
</div>
4711+
<div
4712+
class="ant-space-item"
4713+
>
4714+
<button
4715+
class="ant-btn css-dev-only-do-not-override-9n8g17 ant-btn-default ant-btn-sm actiontech-table-actions-button basic-button-wrapper css-geipcv"
4716+
type="button"
4717+
>
4718+
<span>
4719+
变更状态
4720+
</span>
4721+
</button>
4722+
</div>
4723+
</div>
4724+
<button
4725+
class="ant-btn css-dev-only-do-not-override-9n8g17 ant-btn-default ant-btn-sm ant-btn-icon-only actiontech-table-actions-button actiontech-table-actions-more-button basic-button-wrapper css-geipcv"
4726+
type="button"
4727+
>
4728+
<span
4729+
class="ant-btn-icon"
4730+
>
4731+
<svg
4732+
color="currentColor"
4733+
height="16"
4734+
viewBox="0 0 16 16"
4735+
width="16"
4736+
xmlns="http://www.w3.org/2000/svg"
4737+
>
4738+
<path
4739+
d="M3.333 6.667C2.6 6.667 2 7.267 2 8s.6 1.333 1.333 1.333c.734 0 1.334-.6 1.334-1.333s-.6-1.333-1.334-1.333m9.334 0c-.734 0-1.334.6-1.334 1.333s.6 1.333 1.334 1.333C13.4 9.333 14 8.733 14 8s-.6-1.333-1.333-1.333M8 6.667c-.733 0-1.333.6-1.333 1.333S7.267 9.333 8 9.333 9.333 8.733 9.333 8 8.733 6.667 8 6.667"
4740+
fill="currentColor"
4741+
/>
4742+
</svg>
4743+
</span>
4744+
</button>
4745+
</div>
4746+
</td>
4747+
</tr>
44254748
</tbody>
44264749
</table>
44274750
</div>

0 commit comments

Comments
 (0)