diff --git a/frontend/src/business/components/api/test/model/JMX.js b/frontend/src/business/components/api/test/model/JMX.js index 5a4018e4fa..0df2cad08f 100644 --- a/frontend/src/business/components/api/test/model/JMX.js +++ b/frontend/src/business/components/api/test/model/JMX.js @@ -229,6 +229,7 @@ export class HTTPSamplerProxy extends DefaultTestElement { this.stringProp("HTTPSampler.protocol", this.request.protocol.split(":")[0]); this.stringProp("HTTPSampler.path", this.request.pathname); this.stringProp("HTTPSampler.method", this.request.method); + this.stringProp("HTTPSampler.contentEncoding", this.request.encoding, "UTF-8"); if (!this.request.port) { this.stringProp("HTTPSampler.port", ""); } else { diff --git a/frontend/src/business/components/project/MsProject.vue b/frontend/src/business/components/project/MsProject.vue index e4249a72e4..f2640e214d 100644 --- a/frontend/src/business/components/project/MsProject.vue +++ b/frontend/src/business/components/project/MsProject.vue @@ -69,10 +69,11 @@ import MsTableHeader from "../common/components/MsTableHeader"; import MsTableOperator from "../common/components/MsTableOperator"; import MsDialogFooter from "../common/components/MsDialogFooter"; - import {_sort, getCurrentUser} from "../../../common/js/utils"; + import {_sort, getCurrentOrganizationId, getCurrentUser, refreshSessionAndCookies} from "../../../common/js/utils"; import MsContainer from "../common/components/MsContainer"; import MsMainContainer from "../common/components/MsMainContainer"; import MsDeleteConfirm from "../common/components/MsDeleteConfirm"; + import {DEFAULT} from "../../../common/js/constants"; export default { name: "MsProject", @@ -179,9 +180,20 @@ this.$refs.deleteConfirm.open(project); }, _handleDelete(project) { - this.$get('/project/delete/' + project.id, () => { - Message.success(this.$t('commons.delete_success')); - this.list(); + this.$confirm(this.$t('project.delete_tip'), '', { + confirmButtonText: this.$t('commons.confirm'), + cancelButtonText: this.$t('commons.cancel'), + type: 'warning' + }).then(() => { + this.$get('/project/delete/' + project.id, () => { + Message.success(this.$t('commons.delete_success')); + this.list(); + }); + }).catch(() => { + this.$message({ + type: 'info', + message: this.$t('commons.delete_cancelled') + }); }); }, search() { diff --git a/frontend/src/business/components/settings/organization/OrganizationMember.vue b/frontend/src/business/components/settings/organization/OrganizationMember.vue index aedd75c32b..2ec1d4d600 100644 --- a/frontend/src/business/components/settings/organization/OrganizationMember.vue +++ b/frontend/src/business/components/settings/organization/OrganizationMember.vue @@ -15,7 +15,7 @@ - + diff --git a/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue b/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue index 66b1c6489e..237e3d8e4f 100644 --- a/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue +++ b/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue @@ -14,7 +14,7 @@ - + @@ -159,7 +159,12 @@ import MsTableOperator from "../../common/components/MsTableOperator"; import MsTableOperatorButton from "../../common/components/MsTableOperatorButton"; import MsDialogFooter from "../../common/components/MsDialogFooter"; - import {getCurrentUser, getCurrentWorkspaceId, refreshSessionAndCookies} from "../../../../common/js/utils"; + import { + getCurrentOrganizationId, + getCurrentUser, + getCurrentWorkspaceId, + refreshSessionAndCookies + } from "../../../../common/js/utils"; import MsDeleteConfirm from "../../common/components/MsDeleteConfirm"; export default { @@ -212,16 +217,28 @@ this.$refs.deleteConfirm.open(workspace); }, _handleDelete(workspace) { - this.$get('/workspace/delete/' + workspace.id, () => { - let lastWorkspaceId = getCurrentWorkspaceId(); - let sourceId = workspace.id; - if (lastWorkspaceId === sourceId) { - let sign = DEFAULT; - refreshSessionAndCookies(sign, sourceId); - } - this.$success(this.$t('commons.delete_success')); - this.list(); + this.$confirm(this.$t('organization.delete_confirm'), '', { + confirmButtonText: this.$t('commons.confirm'), + cancelButtonText: this.$t('commons.cancel'), + type: 'warning' + }).then(() => { + this.$get('/workspace/delete/' + workspace.id, () => { + let lastWorkspaceId = getCurrentWorkspaceId(); + let sourceId = workspace.id; + if (lastWorkspaceId === sourceId) { + let sign = DEFAULT; + refreshSessionAndCookies(sign, sourceId); + } + this.$success(this.$t('commons.delete_success')); + this.list(); + }); + }).catch(() => { + this.$message({ + type: 'info', + message: this.$t('commons.delete_cancelled') + }); }); + }, list() { let url = '/workspace/list/' + this.currentPage + '/' + this.pageSize; diff --git a/frontend/src/business/components/settings/system/Organization.vue b/frontend/src/business/components/settings/system/Organization.vue index ccdba1a9b3..fdd26d5e5f 100644 --- a/frontend/src/business/components/settings/system/Organization.vue +++ b/frontend/src/business/components/settings/system/Organization.vue @@ -318,18 +318,29 @@ }); }, handleDelete(organization) { - this.$refs.deleteConfirm.open(organization); + this.$refs.deleteConfirm.open(organization); }, _handleDelete(organization) { - this.result = this.$get(this.deletePath + organization.id, () => { - let lastOrganizationId = getCurrentOrganizationId(); - let sourceId = organization.id; - if (lastOrganizationId === sourceId) { - let sign = DEFAULT; - refreshSessionAndCookies(sign, sourceId); - } - this.$success(this.$t('commons.delete_success')); - this.initTableData(); + this.$confirm(this.$t('organization.delete_confirm'), '', { + confirmButtonText: this.$t('commons.confirm'), + cancelButtonText: this.$t('commons.cancel'), + type: 'warning' + }).then(() => { + this.result = this.$get(this.deletePath + organization.id, () => { + let lastOrganizationId = getCurrentOrganizationId(); + let sourceId = organization.id; + if (lastOrganizationId === sourceId) { + let sign = DEFAULT; + refreshSessionAndCookies(sign, sourceId); + } + this.$success(this.$t('commons.delete_success')); + this.initTableData(); + }); + }).catch(() => { + this.$message({ + type: 'info', + message: this.$t('commons.delete_cancelled') + }); }); }, delMember(row) { diff --git a/frontend/src/business/components/settings/system/SystemWorkspace.vue b/frontend/src/business/components/settings/system/SystemWorkspace.vue index f3f6bac586..ce5f1ec08c 100644 --- a/frontend/src/business/components/settings/system/SystemWorkspace.vue +++ b/frontend/src/business/components/settings/system/SystemWorkspace.vue @@ -17,7 +17,7 @@ - + @@ -199,7 +199,12 @@ import MsTableOperator from "../../common/components/MsTableOperator"; import MsTableOperatorButton from "../../common/components/MsTableOperatorButton"; import MsDialogFooter from "../../common/components/MsDialogFooter"; - import {getCurrentUser, getCurrentWorkspaceId, refreshSessionAndCookies} from "../../../../common/js/utils"; + import { + getCurrentOrganizationId, + getCurrentUser, + getCurrentWorkspaceId, + refreshSessionAndCookies + } from "../../../../common/js/utils"; import {DEFAULT, WORKSPACE} from "../../../../common/js/constants"; import MsDeleteConfirm from "../../common/components/MsDeleteConfirm"; @@ -373,15 +378,26 @@ this.$refs.deleteConfirm.open(workspace); }, _handleDelete(workspace) { - this.$get('/workspace/special/delete/' + workspace.id, () => { - let lastWorkspaceId = getCurrentWorkspaceId(); - let sourceId = workspace.id; - if (lastWorkspaceId === sourceId) { - let sign = DEFAULT; - refreshSessionAndCookies(sign, sourceId); - } - Message.success(this.$t('commons.delete_success')); - this.list(); + this.$confirm(this.$t('workspace.delete_confirm'), '', { + confirmButtonText: this.$t('commons.confirm'), + cancelButtonText: this.$t('commons.cancel'), + type: 'warning' + }).then(() => { + this.$get('/workspace/special/delete/' + workspace.id, () => { + let lastWorkspaceId = getCurrentWorkspaceId(); + let sourceId = workspace.id; + if (lastWorkspaceId === sourceId) { + let sign = DEFAULT; + refreshSessionAndCookies(sign, sourceId); + } + Message.success(this.$t('commons.delete_success')); + this.list(); + }); + }).catch(() => { + this.$message({ + type: 'info', + message: this.$t('commons.delete_cancelled') + }); }); }, delMember(row) { diff --git a/frontend/src/business/components/settings/system/TestResourcePool.vue b/frontend/src/business/components/settings/system/TestResourcePool.vue index 4c50fc6b0b..56de2ecb33 100644 --- a/frontend/src/business/components/settings/system/TestResourcePool.vue +++ b/frontend/src/business/components/settings/system/TestResourcePool.vue @@ -34,7 +34,7 @@ {{ scope.row.updateTime | timestampFormatDate }} - + diff --git a/frontend/src/business/components/settings/workspace/WorkspaceMember.vue b/frontend/src/business/components/settings/workspace/WorkspaceMember.vue index 085218e99a..bcf1b72a35 100644 --- a/frontend/src/business/components/settings/workspace/WorkspaceMember.vue +++ b/frontend/src/business/components/settings/workspace/WorkspaceMember.vue @@ -15,7 +15,7 @@ - +