Skip to content

Commit

Permalink
Merge pull request #241 from vertica/qprof_ui_update_01
Browse files Browse the repository at this point in the history
QueryProfiler UI Update
  • Loading branch information
roypaulin authored Apr 9, 2024
2 parents c8fb0da + 1174b05 commit 5bde0bc
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 136 deletions.
4 changes: 2 additions & 2 deletions project/ui/conn.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@
"from IPython.display import display, HTML\n",
"\n",
"# Define the URLs for the links\n",
"url1 = \"http://127.0.0.1:8889/lab/workspaces/auto-3\"\n",
"url2 = \"http://127.0.0.1:8889/voila/render/ui/qprof_main.ipynb\"\n",
"url1 = \"/lab/\"\n",
"url2 = \"/voila/render/ui/qprof_main.ipynb\"\n",
"\n",
"# Define the button labels\n",
"button_label1 = \"Go to Home Page\"\n",
Expand Down
24 changes: 19 additions & 5 deletions project/ui/qprof-ui.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
" %store -r transaction_val\n",
" %store -r statement_val\n",
" %store -r file_val\n",
" %store -r target_schema_val_2\n",
" %store -r key_val_2\n",
" %store -r transaction_statement_list_val\n",
"\n",
" if \"file_val\" in globals():\n",
" qprof = QueryProfiler.import_profile(target_schema=target_schema_val,\n",
Expand All @@ -31,7 +34,7 @@
" )\n",
" qprof = QueryProfilerInterface(\n",
" target_schema = target_schema_val,\n",
" key_id = key_val,\n",
" key_id = key_val if \"key_val\" in globals() else None,\n",
" )\n",
" elif \"target_schema_val\" in globals():\n",
" qprof = QueryProfilerInterface(\n",
Expand All @@ -40,12 +43,23 @@
" )\n",
" elif \"query_val\" in globals():\n",
" qprof = QueryProfilerInterface(\n",
" query_val\n",
" query_val,\n",
" target_schema = target_schema_val_2 if \"target_schema_val_2\" in globals() else None,\n",
" key_id = key_val_2 if \"key_val_2\" in globals() else None, \n",
" )\n",
" elif \"transaction_val\" in globals():\n",
" qprof = QueryProfilerInterface(\n",
" transactions = (transaction_val, statement_val)\n",
" )"
" transactions = (transaction_val, statement_val),\n",
" target_schema = target_schema_val_2 if \"target_schema_val_2\" in globals() else None,\n",
" key_id = key_val_2 if \"key_val_2\" in globals() else None,\n",
" )\n",
"\n",
" elif \"transaction_statement_list_val\" in globals():\n",
" qprof = QueryProfilerInterface(\n",
" transactions = transaction_statement_list_val,\n",
" target_schema = target_schema_val_2 if \"target_schema_val_2\" in globals() else None,\n",
" key_id = key_val_2 if \"key_val_2\" in globals() else None,\n",
" )\n"
]
},
{
Expand Down Expand Up @@ -121,7 +135,7 @@
"outputs": [],
"source": [
"# Define the URLs for the links\n",
"url1 = \"http://127.0.0.1:8889/voila/render/ui/qprof_main.ipynb\"\n",
"url1 = \"/voila/render/ui/qprof_main.ipynb\"\n",
"# Define the button labels\n",
"button_label1 = \"Go Back\"\n",
"# Define HTML links for button\n",
Expand Down
Loading

0 comments on commit 5bde0bc

Please sign in to comment.