diff --git a/ui/src/pages/query-profile/index.tsx b/ui/src/pages/query-profile/index.tsx index ccdf64ce26..bcd71b2ea0 100644 --- a/ui/src/pages/query-profile/index.tsx +++ b/ui/src/pages/query-profile/index.tsx @@ -18,7 +18,7 @@ */ import React, {useEffect, useRef, useState} from 'react'; -import {Button, Col, Row, Typography} from 'antd'; +import {Button, Col, Row, Typography, Space} from 'antd'; import {queryProfile} from 'Src/api/api'; import Table from 'Src/components/table'; import {useHistory} from 'react-router-dom'; @@ -75,6 +75,20 @@ export default function QueryProfile(params: any) { history.push('/QueryProfile/'); } + function download(profile) { + const blob = new Blob([JSON.stringify(profile)], { + type: "text/plain" + }); + const tagA = document.createElement("a"); + tagA.download = `profile_${(new Date()).valueOf()}.txt`; + tagA.style.display = "none"; + tagA.href = URL.createObjectURL(blob); + document.body.appendChild(tagA); + tagA.click(); + URL.revokeObjectURL(tagA.href); + document.body.removeChild(tagA); + } + return ( Finished Queries @@ -82,7 +96,12 @@ export default function QueryProfile(params: any) { This table lists the latest 100 queries - {profile ? : ''} + {profile ? + + + : ''} {