diff --git a/project/ui/conn.ipynb b/project/ui/conn.ipynb index 8f9c1320..26731414 100644 --- a/project/ui/conn.ipynb +++ b/project/ui/conn.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "id": "739353e9-44cd-4dbb-8891-f1dea998067f", "metadata": {}, "outputs": [], @@ -13,271 +13,54 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "id": "8ed8016c-dacf-437d-af27-7005b66f6739", "metadata": {}, "outputs": [], "source": [ - "host = widgets.Text(placeholder = \"Enter Host (default is 'verticadb')\")\n", - "port = widgets.Text(placeholder = \"Enter Port (default is 5433)\")\n", - "user = widgets.Text(placeholder = \"Enter User Name (default is 'dbadmin')\")\n", - "password = widgets.Text(placeholder = \"Enter Password (default is Empty)\")\n", - "database = widgets.Text(placeholder = \"Enter Database (default is 'demo')\")\n", - "name = widgets.Text(placeholder = \"Enter Name (default is 'VerticaDSN')\")\n", + "# style = {'description_width': '150px', 'width' : '400px'}\n", + "host = widgets.Text(description = \"Host\",placeholder = \"Enter Host (default is 'verticadb')\")\n", + "port = widgets.Text(description = \"Port\", placeholder = \"Enter Port (default is 5433)\")\n", + "user = widgets.Text(description = \"User name\", placeholder = \"Enter User Name (default is 'dbadmin')\")\n", + "password = widgets.Password(description = \"Password\", placeholder = \"Enter Password (default is Empty)\")\n", + "database = widgets.Text(description = \"Database\", placeholder = \"Enter Database (default is 'demo')\")\n", + "name = widgets.Text(description = \"Name\", placeholder = \"Enter Name (default is 'VerticaDSN')\")\n", "backup_server_node = [\"localhost\"]" ] }, { "cell_type": "markdown", - "id": "44057b5a-42f9-4230-8e5d-81ceae1bbe79", + "id": "e5731b71-031a-40ff-ac8e-7e88c2f5c170", "metadata": {}, "source": [ - "## Please Enter Host:" + "## Please enter connection details" ] }, { "cell_type": "code", - "execution_count": 3, - "id": "1dcd207c-f1da-45fc-9459-ac3572854586", + "execution_count": null, + "id": "1cdf1aa6-6310-4764-823c-c0aff71e396a", "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "83e21b5858e948fc8bd999b0a60711cf", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Text(value='', placeholder=\"Enter Host (default is 'verticadb')\")" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "host" - ] - }, - { - "cell_type": "markdown", - "id": "a0c1f0a3-7c1a-42fe-9f8b-5b0a1b28de5e", - "metadata": {}, - "source": [ - "## Please Enter Port:" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "2e7854f5-daf7-4ade-bbb9-bd088057156b", - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "2b97ba3f7a3c46b9bafaf992a0d20e4e", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Text(value='', placeholder='Enter Port (default is 5433)')" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "port" - ] - }, - { - "cell_type": "markdown", - "id": "98572ad4-80d0-4ad1-a20d-9e03841c12b6", - "metadata": {}, - "source": [ - "## Please Enter Username:" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "58e4fc79-d0bf-49ab-acef-2027aabb7560", - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "f1550dc18fa446b18b7382f2a618ec72", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Text(value='', placeholder=\"Enter User Name (default is 'dbadmin')\")" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "user" - ] - }, - { - "cell_type": "markdown", - "id": "9bca8992-ae00-4ed7-bff3-5f9906db0ef0", - "metadata": {}, - "source": [ - "## Please Enter Password:" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "44865d1f-f343-4854-b1da-208877d8480a", - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "d4c5d4d053014bc19bf8827bf2569dde", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Text(value='', placeholder='Enter Password (default is Empty)')" - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "password" - ] - }, - { - "cell_type": "markdown", - "id": "17302419-90bb-46b3-ac0f-fdb902d4985b", - "metadata": {}, - "source": [ - "## Please Enter Database" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "4a6e10ae-cec4-48d1-87fd-4ec1a5b13c9b", - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "8f4487d4ed68427ebe65d476ebe2cf97", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Text(value='', placeholder=\"Enter Database (default is 'demo')\")" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "database" - ] - }, - { - "cell_type": "markdown", - "id": "ff13f2c5-67e4-45de-be1d-67235a0516f4", - "metadata": {}, - "source": [ - "## Please Enter Name For The Connection" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "52c5b148-c302-4ce4-98db-d43fbd139382", - "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "aaea381af6ff4daabafa56f4b7a51f0f", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Text(value='', placeholder=\"Enter Name (default is 'VerticaDSN')\")" - ] - }, - "execution_count": 8, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ - "name" + "import ipywidgets as widgets\n", + "\n", + "display(widgets.VBox([\n", + " host,\n", + " port,\n", + " user,\n", + " password,\n", + " database,\n", + " name,\n", + "]))" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "id": "a70eb307-19eb-4ecd-866f-54864d981032", "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/usr/local/lib/python3.12/site-packages/vertica_highcharts/highcharts/highcharts.py:11: UserWarning: future library does not support Python 3.12 yet. The import is skipped.\n", - " warnings.warn('future library does not support Python 3.12 yet. The import is skipped.')\n", - "/usr/local/lib/python3.12/site-packages/vertica_highcharts/highmaps/highmaps.py:11: UserWarning: future library does not support Python 3.12 yet. The import is skipped.\n", - " warnings.warn('future library does not support Python 3.12 yet. The import is skipped.')\n", - "/usr/local/lib/python3.12/site-packages/vertica_highcharts/highstock/highstock.py:11: UserWarning: future library does not support Python 3.12 yet. The import is skipped.\n", - " warnings.warn('future library does not support Python 3.12 yet. The import is skipped.')\n" - ] - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "4d8f74df85a04ed88c8a5b1b4abb6728", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Button(description='Create a Connection', style=ButtonStyle())" - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "a116db0300ac439d903e9ca8e5ff7194", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "Output()" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "import verticapy as vp\n", "from IPython.display import display\n", @@ -305,6 +88,14 @@ "\n", "button.on_click(on_button_clicked)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "14cbb78c-bcfb-4cc4-946c-ad1ac566d119", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { @@ -323,7 +114,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.0" + "version": "3.10.12" } }, "nbformat": 4,