Skip to content

Commit

Permalink
Added info box with instructions to initiate first display of the tree.
Browse files Browse the repository at this point in the history
  • Loading branch information
mail4umar committed Sep 24, 2024
1 parent f65a05e commit cd4499b
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions project/ui/qprof-ui.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,41 @@
" drop_down_query_select = widgets.HTML(f\"<p style='color:red'>The following error occured: </p> <p> {e}</p>\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "57dec0ac-048c-400a-a0fa-32347a2f6982",
"metadata": {},
"outputs": [],
"source": [
"# Info/Warning Box\n",
"import ipywidgets as widgets\n",
"\n",
"def show_notification():\n",
" close_button = widgets.Button(\n",
" description=\"x\",\n",
" button_style=\"danger\",\n",
" layout={'width': '30px', 'height': '30px', 'margin': '0 0 0 10px'}\n",
" )\n",
"\n",
" def close_notification(_):\n",
" notification.close()\n",
" close_button.close()\n",
"\n",
" close_button.on_click(close_notification)\n",
"\n",
" notification = widgets.HTML(\n",
" value=\"<div style='background-color: #ffc107; padding: 10px; border-radius: 5px; display: flex; align-items: center;'>\"\n",
" \"<strong>Important:</strong>&nbsp;If you do not see the trees, please click on the tab 'Tree Style' and then click on 'Apply'. This will refresh the tree.\"\n",
" \"</div>\",\n",
" layout={'margin': '10px 0'}\n",
" )\n",
"\n",
" display(widgets.HBox([notification, close_button]))\n",
"\n",
"show_notification()"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down

0 comments on commit cd4499b

Please sign in to comment.