Skip to content

Commit

Permalink
refine: make table format as default to show execution plan
Browse files Browse the repository at this point in the history
  • Loading branch information
baurine committed Aug 11, 2023
1 parent df52e24 commit 0b0b5b5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,21 @@ function DetailPage() {
{t('slow_query.detail.plan.title')}
</Space>
<Tabs
defaultActiveKey="text_plan"
defaultActiveKey="binary_plan_table"
onTabClick={(key) =>
telemetry.clickPlanTabs(key, data.digest!)
}
>
{binaryPlanObj && !binaryPlanObj.discardedDueToTooLong && (
<Tabs.TabPane
tab={t('slow_query.detail.plan.table')}
key="binary_plan_table"
>
<BinaryPlanTable data={binaryPlanObj} />
<div style={{ height: 24 }} />
</Tabs.TabPane>
)}

<Tabs.TabPane
tab={t('slow_query.detail.plan.text')}
key="text_plan"
Expand Down Expand Up @@ -212,16 +222,6 @@ function DetailPage() {
</Descriptions>
</Tabs.TabPane>

{binaryPlanObj && !binaryPlanObj.discardedDueToTooLong && (
<Tabs.TabPane
tab={t('slow_query.detail.plan.table')}
key="binary_plan_table"
>
<BinaryPlanTable data={binaryPlanObj} />
<div style={{ height: 24 }} />
</Tabs.TabPane>
)}

{binaryPlanObj && !binaryPlanObj.discardedDueToTooLong && (
<Tabs.TabPane
tab={t('slow_query.detail.plan.visual')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,23 @@ function PlanDetail({ query }: IPlanDetailProps) {
</Space>

<Tabs
defaultActiveKey="text_plan"
defaultActiveKey="binary_plan_table"
onTabClick={(key) =>
telemetry.clickPlanTabs(key, data.digest!)
}
>
{binaryPlanObj && !binaryPlanObj.discardedDueToTooLong && (
<Tabs.TabPane
tab={t(
'statement.pages.detail.desc.plans.execution.table'
)}
key="binary_plan_table"
>
<BinaryPlanTable data={binaryPlanObj} />
<div style={{ height: 24 }} />
</Tabs.TabPane>
)}

<Tabs.TabPane
tab={t('statement.pages.detail.desc.plans.execution.text')}
key="text_plan"
Expand Down Expand Up @@ -218,18 +230,6 @@ function PlanDetail({ query }: IPlanDetailProps) {
</Descriptions>
</Tabs.TabPane>

{binaryPlanObj && !binaryPlanObj.discardedDueToTooLong && (
<Tabs.TabPane
tab={t(
'statement.pages.detail.desc.plans.execution.table'
)}
key="binary_plan_table"
>
<BinaryPlanTable data={binaryPlanObj} />
<div style={{ height: 24 }} />
</Tabs.TabPane>
)}

{binaryPlanObj && !binaryPlanObj.main.discardedDueToTooLong && (
<Tabs.TabPane
tab={t(
Expand Down

0 comments on commit 0b0b5b5

Please sign in to comment.