Skip to content

Commit c2baf34

Browse files
authored
Merge pull request #299 from vertica/exlpain_plan_warning
QueryProfiler UI - Added Warning for Explain Plan button
2 parents 424aa3d + 088f6e6 commit c2baf34

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

project/ui/qprof-ui.ipynb

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,6 +1640,19 @@
16401640
},
16411641
"outputs": [],
16421642
"source": [
1643+
"explain_warning = widgets.HTML(\"\"\"\n",
1644+
"<style>\n",
1645+
".warning {\n",
1646+
" padding: 5px;\n",
1647+
" background-color: orange;\n",
1648+
" color: white;\n",
1649+
"}\n",
1650+
"</style>\n",
1651+
"<div class=\"warning\">\n",
1652+
" <strong>Warning:</strong> Correct EXPLAIN output depends on being connected to the same database where the query was run, or an equivalent database.\n",
1653+
"</div>\n",
1654+
"\"\"\")\n",
1655+
"\n",
16431656
"if comparison:\n",
16441657
" button_run_explain_plan_1 = widgets.Button(description=\"Run Explain Plan\")\n",
16451658
" explain_output_1 = widgets.Output()\n",
@@ -1710,6 +1723,7 @@
17101723
" </body>\n",
17111724
" \"\"\") \n",
17121725
" explain_plan_widget = widgets.HBox([left_side,vertica_border_line, right_side])\n",
1726+
" explain_plan_widget = widgets.VBox([explain_warning, explain_plan_widget])\n",
17131727
"else:\n",
17141728
" button_run_explain_plan = widgets.Button(description=\"Run Explain Plan\")\n",
17151729
" explain_output = widgets.Output()\n",
@@ -1735,7 +1749,7 @@
17351749
" qprof.get_qplan_explain()\n",
17361750
" \n",
17371751
" button_run_explain_plan.on_click(on_button_clicked_run_explain_plan)\n",
1738-
" explain_plan_widget = widgets.VBox([explain_dropdown, button_run_explain_plan, explain_output]) \n",
1752+
" explain_plan_widget = widgets.VBox([explain_warning, explain_dropdown, button_run_explain_plan, explain_output]) \n",
17391753
" "
17401754
]
17411755
},

0 commit comments

Comments
 (0)