Skip to content

Commit

Permalink
Merge pull request #238 from vertica/update_nocode_ui
Browse files Browse the repository at this point in the history
Fix Download Button + Add Version Details
  • Loading branch information
roypaulin authored Mar 20, 2024
2 parents 5e7ddfd + b42965d commit d938f11
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 2,727 deletions.
72 changes: 71 additions & 1 deletion project/ui/conn.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,12 @@
"cell_type": "code",
"execution_count": 6,
"id": "14e6b51c-72d8-4611-b991-47f9aeaa1473",
"metadata": {},
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
}
},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -269,6 +274,71 @@
"# Display buttons\n",
"display(widgets.HBox([html_button1, html_button2]))\n"
]
},
{
"cell_type": "markdown",
"id": "32f3c37b-1446-4114-99a0-8dc62998ac5d",
"metadata": {},
"source": [
"____"
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "dd19b4c5-f99f-4467-b885-3cc34a58a7ae",
"metadata": {},
"outputs": [],
"source": [
"from verticapy._utils._sql._vertica_version import vertica_version\n",
"\n",
"button_version = widgets.Button(description=\"Click to refresh\")\n",
"output_version = widgets.Output()\n",
"\n",
"def on_button_clicked_version(b):\n",
" output_version.clear_output(wait=True) # Clear the output\n",
" with output_version:\n",
" print(\"Vertica version:\", vertica_version()[0], \".\", vertica_version()[1], \".\", vertica_version()[2], \".\", vertica_version()[3])\n",
" print(\"VerticaPy version:\", vp.__version__)\n",
" print(\"VerticaPy long version:\", vp.__long_version__)\n",
"button_version.on_click(on_button_clicked_version)\n",
"version_details = widgets.VBox([button_version, output_version])"
]
},
{
"cell_type": "code",
"execution_count": 27,
"id": "db3e615b-7ed6-4b14-a508-432a0e6735a5",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2100538297184c6494d87fa467acb6f5",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Accordion(children=(VBox(children=(Button(description='Click to display', style=ButtonStyle()), Output(outputs…"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"accordion = widgets.Accordion(children=[version_details], titles=('Version Details',))\n",
"accordion"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c7e6ed2f-af31-48a8-80fc-f5a9402647b4",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Loading

0 comments on commit d938f11

Please sign in to comment.