Skip to content

Commit

Permalink
Merge pull request #288 from vertica/nocode_ui_pages_update_16
Browse files Browse the repository at this point in the history
  • Loading branch information
oualib authored Aug 24, 2024
2 parents 66a06f9 + 769c8fe commit 980e308
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 5 additions & 1 deletion project/ui/conn.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@
"left_section = widgets.VBox([left_heading, connection_and_accordian_vbox, button, output])\n",
"\n",
"def on_button_clicked(b):\n",
" button.disabled = True\n",
" output.clear_output(wait=True) # Clear the output\n",
" global ssl_context\n",
" if dropdown.value ==\"TLS\" and (tls_params==\"Verify-Full\" or tls_params==\"Verify-CA\"):\n",
Expand All @@ -284,6 +285,7 @@
" auto = True,\n",
" overwrite = True,)\n",
" print(\"Successfully connected to the database:\", vp.current_connection().options['database'])\n",
" button.disabled = False\n",
"button.on_click(on_button_clicked)"
]
},
Expand All @@ -310,12 +312,14 @@
"right_section = widgets.VBox([right_heading, selectionvbox,button_select, output_2])\n",
"\n",
"def on_button_clicked_select(b):\n",
" button_select.disabled = True\n",
" output_2.clear_output(wait=True) # Clear the output\n",
" with output_2:\n",
" vp.connect(selection.value)\n",
" change_auto_connection(selection.value)\n",
" logging.info(f\"\"\"[Connection Page] Trying to connect to the following connection: {selection.value},\"\"\")\n",
" print(\"Successfully connected to the database:\", vp.current_connection().options['database'])\n",
" button_select.disabled = False\n",
"button_select.on_click(on_button_clicked_select)"
]
},
Expand Down Expand Up @@ -449,7 +453,7 @@
"</head>\n",
"<body>\n",
" <div class=\"version\">\n",
" Page version update date: 5/30/2024\n",
" Page version update date: 8/23/2024\n",
" </div>\n",
"</body>\n",
"</html>\n"
Expand Down
10 changes: 8 additions & 2 deletions project/ui/qprof_main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,13 @@
"conn_output = widgets.Output(layout={\"margin\" :\"0px 50px 0px 50px\"})\n",
"with conn_output:\n",
" try:\n",
" print(\"\\033[1mDatabase\\033[0m:\", vp.current_connection().options['database'], \" \\033[1mUsername\\033[0m:\", vp.current_connection().options['user'])\n",
" vdf_test_sandbox = vp.vDataFrame(\"select distinct sandbox from nodes where node_state='UP' and sandbox is not NULL;\")\n",
" if vdf_test_sandbox[0] is None or vdf_test_sandbox[0][0] =='':\n",
" print(\"\\033[1mDatabase\\033[0m:\", vp.current_connection().options['database'], \" \\033[1mUsername\\033[0m:\", vp.current_connection().options['user'])\n",
" else:\n",
" print(\"\\033[1mDatabase\\033[0m:\", vp.current_connection().options['database'],\n",
" \" \\033[1mUsername\\033[0m:\", vp.current_connection().options['user'],\n",
" \" \\033[1mSandbox\\033[0m:\", vdf_test_sandbox[0][0])\n",
" except ConnectionError:\n",
" print(\"\\033[91m\\033[1m WARNING: No database connection found. Please connect with a database to use this tool. \\033[0m\\033[0m\")\n",
"display(conn_output)\n",
Expand Down Expand Up @@ -788,7 +794,7 @@
"</head>\n",
"<body>\n",
" <div class=\"version\">\n",
" Page version update date: 8/9/2024\n",
" Page version update date: 8/23/2024\n",
" </div>\n",
"</body>\n",
"</html>"
Expand Down

0 comments on commit 980e308

Please sign in to comment.