Skip to content

Commit

Permalink
tooltips for QueryProfiler Tree page
Browse files Browse the repository at this point in the history
  • Loading branch information
mail4umar committed Sep 3, 2024
1 parent e9c6494 commit 6860b2c
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions project/ui/qprof-ui.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,14 @@
"outputs": [],
"source": [
"display(HTML(html_code))\n",
"logging.info(f'[Query Profile Tree Page] Completed the script to automatically display the tree')"
"logging.info(f'[Query Profile Tree Page] Completed the script to automatically display the tree')\n",
"\n",
"def create_tooltip(text):\n",
" # Create an info icon using HTML\n",
" info_icon = widgets.HTML(\n",
" value=f'<span style=\"font-size: 25px; color: #007bff; cursor: pointer;\" title=\"{text}\">&#9432;</span>'\n",
" )\n",
" return info_icon"
]
},
{
Expand Down Expand Up @@ -531,7 +538,15 @@
" disabled=False\n",
")\n",
"granularity_level = 2\n",
"engine_table_granularity_switch_title = widgets.HTML('<b> Select granularity level:</b>')\n",
"engine_table_granularity_switch_title = widgets.HBox([widgets.HTML('<b> Select granularity level:</b>'), \n",
" create_tooltip(\"\"\"\n",
"The granularity level of the summary table. \n",
"Across paths: The summary table for each path. \n",
"Across nodes: The summary table for each node. All rows are summed and times are averaged\n",
"\"\"\"\n",
" )\n",
" ]\n",
")\n",
"def on_granularity_change(change):\n",
" if change['type'] == 'change' and change['name'] == 'value':\n",
" if change['new'] == 'Across nodes':\n",
Expand Down Expand Up @@ -709,7 +724,14 @@
"\n",
"\n",
"# Tab for detailed Executio Engine Table\n",
"engine_table_detailed_selection_title = widgets.HTML('<b> Select detailed view:</b>')\n",
"engine_table_detailed_selection_title = widgets.HBox([widgets.HTML('<b> Select detailed view:</b>'), \n",
" create_tooltip(\"\"\"\n",
"Pivot Table: The detailed view of the query execution engine with selected metrics.\n",
"Raw Table: The raw table of the EXECUTION_ENGINE_PROFILES.\n",
"\"\"\"\n",
" )\n",
" ]\n",
")\n",
"engine_table_detailed_selection_switch = widgets.RadioButtons(\n",
" options=['Pivot Table', 'Raw Table'],\n",
" value='Pivot Table',\n",
Expand Down

0 comments on commit 6860b2c

Please sign in to comment.