@@ -24,19 +24,36 @@ def show(client):
2424
2525 df_containers = pd .DataFrame (container_data )
2626
27- containerCols = st .columns ((1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ,1 ))
27+ action = st .selectbox (
28+ "Container Actions" ,
29+ [
30+ "Select action..." ,
31+ "🔍 Inspect" ,
32+ "🔗 Show Links" ,
33+ "📝 View Logs" ,
34+ "📄 Generate Quadlet" ,
35+ "▶️ Execute Command" ,
36+ "▶️ Start" ,
37+ "⏸️ Pause" ,
38+ "⏹️ Stop" ,
39+ "🗑️ Remove" ,
40+ "🧹 Prune" ,
41+ "🔄 Refresh"
42+ ]
43+ )
2844
29- inspect = container_buttons .show_inspect (containerCols [0 ])
30- show_links = container_buttons .show_links (containerCols [1 ])
31- logs = container_buttons .show_logs (containerCols [2 ])
32- generate_quadlet = container_buttons .show_generate_quadlet (containerCols [3 ])
33- container_exec = container_buttons .show_exec (containerCols [4 ])
34- start = container_buttons .show_start (containerCols [5 ])
35- pause = container_buttons .show_pause (containerCols [6 ])
36- stop = container_buttons .show_stop (containerCols [7 ])
37- remove = container_buttons .show_remove (containerCols [8 ])
38- prune = container_buttons .show_prune (containerCols [9 ])
39- refresh = container_buttons .show_refresh (containerCols [10 ])
45+ # Convert dropdown selection to button clicks
46+ inspect = action == "🔍 Inspect"
47+ show_links = action == "🔗 Show Links"
48+ logs = action == "📝 View Logs"
49+ generate_quadlet = action == "📄 Generate Quadlet"
50+ container_exec = action == "▶️ Execute Command"
51+ start = action == "▶️ Start"
52+ pause = action == "⏸️ Pause"
53+ stop = action == "⏹️ Stop"
54+ remove = action == "🗑️ Remove"
55+ prune = action == "🧹 Prune"
56+ refresh = action == "🔄 Refresh"
4057
4158 edited_containers_df = st .data_editor (
4259 df_containers ,
@@ -49,7 +66,7 @@ def show(client):
4966 ),
5067 },
5168 column_order = ["Selected" , "Name" ,"ID" , "Status" , "Image" , "Ports" , "Created" ],
52- use_container_width = True
69+ width = 'stretch'
5370 )
5471
5572 selected_containers = edited_containers_df [edited_containers_df ['Selected' ]]
0 commit comments