diff --git a/project/ui/qprof-ui.ipynb b/project/ui/qprof-ui.ipynb index 10d132ca..c57b5f07 100644 --- a/project/ui/qprof-ui.ipynb +++ b/project/ui/qprof-ui.ipynb @@ -466,16 +466,9 @@ "\n", "engine_tab_summary_1 = widgets.Output()\n", "\n", - "tags = sorted(qprof.get_qexecution_report(return_useful_cols=True))\n", "\n", "\n", "selected_checkboxes = [\"exec_time_us\", \"prod_rows\", \"proc_rows\", \"clock_time_us\"]\n", - "# Create checkboxes\n", - "checkboxes = [\n", - " widgets.Checkbox(value=(tag in selected_checkboxes), description=tag) \n", - " for tag in tags\n", - "]\n", - "\n", "\n", "# Function to update based on selections\n", "def on_checkbox_change(change):\n", @@ -498,10 +491,6 @@ " localplan_id=summary_localplan_id_dropdown.value, \n", " operator_name=summary_operator_name_dropdown.value)\n", "\n", - "# Attach the observer to each checkbox\n", - "for cb in checkboxes:\n", - " cb.observe(on_checkbox_change, names='value')\n", - "\n", "# Selecting the granularity of the summary table\n", "engine_table_granularity_switch = widgets.RadioButtons(\n", " options=['Across paths', 'Across nodes'],\n", @@ -794,12 +783,14 @@ " engine_table_detailed_widget = widgets.HTML(f\"
The following error occured:
{e}
\") \n", "\n", "engine_table_detailed_top = widgets.HBox([engine_table_summary_controls, engine_table_detailed_selection_title_switch])\n", + "global engine_table_detailed\n", "engine_table_detailed = widgets.VBox([\n", " engine_table_detailed_top,\n", - " widgets.HBox([engine_table_detailed_widget ,widgets.VBox(checkboxes)]),\n", + " engine_table_detailed_widget,\n", " # checkboxes, engine_table_detailed_widget\n", "])\n", "\n", + "\n", "engine_table_tab = widgets.Tab()\n", "engine_table_tab.children = [engine_tab_summary_all, engine_table_detailed]\n", "engine_table_tab.titles = [\"Summary\", \"Detailed\"]\n", @@ -859,7 +850,6 @@ " summary_operator_name_dropdown.options = ['All'] + sorted(summary_vdf[\"operator_name\"].distinct())\n", " summary_baseplan_id_dropdown.options = ['All'] + sorted(vdf_across_nodes[\"baseplan_id\"].distinct())\n", "\n", - "\n", " # Initial table updates\n", " display_vdf_across_paths()\n", " detailed_update_table()\n", @@ -876,6 +866,11 @@ " for cb in checkboxes:\n", " cb.observe(on_checkbox_change, names='value')\n", "\n", + " engine_table_detailed.children = [\n", + " engine_table_detailed_top,\n", + " widgets.HBox([engine_table_detailed_widget, widgets.VBox(checkboxes)]),\n", + " ]\n", + "\n", " except Exception as e:\n", " with engine_tab_summary_1:\n", " engine_tab_summary_1.clear_output(wait=True)\n",