Skip to content

Commit

Permalink
QueryProfiler UI Pages - bugfix for explain plan
Browse files Browse the repository at this point in the history
Previously if the qprof did not work, then the entire page would fail. Now added try and except
  • Loading branch information
mail4umar committed Jun 12, 2024
1 parent 564ae99 commit d569760
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions project/ui/qprof-ui.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -615,10 +615,17 @@
"source": [
"button_run_explain_plan = widgets.Button(description=\"Run Explain Plan\")\n",
"explain_output = widgets.Output()\n",
"try:\n",
" explain_dropdown_options = [i for i in range(len(qprof.transactions))]\n",
" explain_dropdown_disabled = False\n",
"except Exception as e:\n",
" explain_dropdown_options = []\n",
" explain_dropdown_disabled = True\n",
" \n",
"explain_dropdown = widgets.Dropdown(\n",
" options=[i for i in range(len(qprof.transactions))],\n",
" options=explain_dropdown_options,\n",
" description='Select Query Index',\n",
" disabled=False,\n",
" disabled=explain_dropdown_disabled,\n",
" layout={'width': \"300px\"}\n",
")\n",
"explain_dropdown.style.description_width = '130px'\n",
Expand Down Expand Up @@ -684,11 +691,19 @@
"</head>\n",
"<body>\n",
" <div class=\"version\">\n",
" Page version update date: 6/10/2024\n",
" Page version update date: 6/11/2024\n",
" </div>\n",
"</body>\n",
"</html>"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e27fa1fc-df96-4059-884a-b665330c8000",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit d569760

Please sign in to comment.