Update app.py
Browse files
app.py
CHANGED
|
@@ -326,10 +326,7 @@ def preview_chunks(chunks_dict):
|
|
| 326 |
def accordion_query_view(chart_visualization, query_stack):
|
| 327 |
ui_accordion_part_2_2 = mo.accordion(
|
| 328 |
{
|
| 329 |
-
# "Query": query_stack
|
| 330 |
-
# "Query": mo.hstack([query_stack, chart_visualization], justify="space-around", align="center", widths=[0.3,0.65])
|
| 331 |
"Query": mo.vstack([query_stack, mo.hstack([chart_visualization])], align="center", gap=3)
|
| 332 |
-
# "Query": mo.vstack([query_stack, chart_visualization], justify="start", align="center")
|
| 333 |
}
|
| 334 |
)
|
| 335 |
ui_accordion_part_2_2
|
|
@@ -405,7 +402,21 @@ def instantiation_status(
|
|
| 405 |
|
| 406 |
@app.cell
|
| 407 |
def client_selector(deployment_client, project_client):
|
| 408 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 409 |
return (client_selector,)
|
| 410 |
|
| 411 |
|
|
|
|
| 326 |
def accordion_query_view(chart_visualization, query_stack):
|
| 327 |
ui_accordion_part_2_2 = mo.accordion(
|
| 328 |
{
|
|
|
|
|
|
|
| 329 |
"Query": mo.vstack([query_stack, mo.hstack([chart_visualization])], align="center", gap=3)
|
|
|
|
| 330 |
}
|
| 331 |
)
|
| 332 |
ui_accordion_part_2_2
|
|
|
|
| 402 |
|
| 403 |
@app.cell
|
| 404 |
def client_selector(deployment_client, project_client):
|
| 405 |
+
if deployment_client is not None:
|
| 406 |
+
client_options = {"Deployment Client":deployment_client}
|
| 407 |
+
|
| 408 |
+
elif project_client is not None:
|
| 409 |
+
client_options = {"Project Client":project_client}
|
| 410 |
+
|
| 411 |
+
elif project_client is not None and deployment_client is not None:
|
| 412 |
+
client_options = {"Project Client":project_client,"Deployment Client":deployment_client}
|
| 413 |
+
|
| 414 |
+
else:
|
| 415 |
+
client_options = {"No Client": "Instantiate a Client"}
|
| 416 |
+
|
| 417 |
+
default_client = next(iter(client_options))
|
| 418 |
+
client_selector = mo.ui.dropdown(client_options, value=default_client, label="**Select your active client:**")
|
| 419 |
+
|
| 420 |
return (client_selector,)
|
| 421 |
|
| 422 |
|