This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new a77e9fbc99 (chores)(ui) download profile filename add profile_id
(#23065)
a77e9fbc99 is described below
commit a77e9fbc9928cd28a712b48578c93f37fb8c0dcf
Author: Jeffrey <[email protected]>
AuthorDate: Thu Aug 17 09:11:01 2023 +0800
(chores)(ui) download profile filename add profile_id (#23065)
---
ui/src/pages/query-profile/index.tsx | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/ui/src/pages/query-profile/index.tsx
b/ui/src/pages/query-profile/index.tsx
index a5bb13b204..a71698cec4 100644
--- a/ui/src/pages/query-profile/index.tsx
+++ b/ui/src/pages/query-profile/index.tsx
@@ -83,7 +83,8 @@ export default function QueryProfile(params: any) {
.column_names
) {
download(
- profileDetailRes.data
+ profileDetailRes.data,
+ row['Profile ID']
);
}
}
@@ -125,13 +126,13 @@ export default function QueryProfile(params: any) {
history.push('/QueryProfile/');
}
- function download(profile: string) {
+ function download(profile: string, profileId: string) {
const profileTxt = replaceToTxt(profile);
const blob = new Blob([profileTxt], {
type: 'text/plain',
});
const tagA = document.createElement('a');
- tagA.download = `profile_${new Date().valueOf()}.txt`;
+ tagA.download = `profile_${profileId}.txt`;
tagA.style.display = 'none';
tagA.href = URL.createObjectURL(blob);
document.body.appendChild(tagA);
@@ -167,7 +168,8 @@ export default function QueryProfile(params: any) {
</Button>
<Button
onClick={() => {
- download(profile);
+ const path = getLastPath();
+ download(profile, path as string);
}}
>
Download
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]