Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .devcontainer/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ RUN echo 'source /root/.ble.sh/out/ble.sh' >> /root/.bashrc && \
echo 'export FZF_DEFAULT_OPTS="--layout=reverse --preview '\''bat --color=always {}'\''"' >> /root/.bashrc && \
echo 'export FZF_CTRL_T_COMMAND="find . -type f -not -path '\''./.git/*'\''"' >> /root/.bashrc && \
echo 'export FZF_CTRL_T_OPTS="--height 100% --preview '\''bat --color=always {}'\''"' >> /root/.bashrc && \
echo 'export FZF_CTRL_R_OPTS="--height 100% --preview '\''echo {}'\'' --preview-window up:3:wrap"' >> /root/.bashrc
echo 'export FZF_CTRL_R_OPTS="--height 100% --preview '\''echo {}'\'' --preview-window up:3:wrap"' >> /root/.bashrc && \
echo 'clear' >> /root/.bashrc

RUN microdnf install -y python3.12 python3.12-pip \
&& microdnf clean all \
Expand All @@ -84,7 +85,7 @@ ENV _ZO_DOCTOR=0 \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_NO_WARN_SCRIPT_LOCATION=on \
PIP_DEFAULT_TIMEOUT=100 \
POSH_THEME="/root/.posh-themes/powerlevel10k_lean.omp.json"
POSH_THEME="/root/.posh-themes/aliens.omp.json"

COPY /app/requirements.txt /app/requirements.txt
RUN pip install -r /app/requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"customizations": {
"vscode": {
"extensions": [
"ms-python.vscode-pylance"
"ms-python.python"
],
"settings": {
"python.defaultInterpreterPath": "/venv/bin/python"
Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python-envs.pythonProjects": []
}
43 changes: 30 additions & 13 deletions app/components/container_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,36 @@ def show(client):

df_containers = pd.DataFrame(container_data)

containerCols = st.columns((1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1))
action = st.selectbox(
"Container Actions",
[
"Select action...",
"🔍 Inspect",
"🔗 Show Links",
"📝 View Logs",
"📄 Generate Quadlet",
"▶️ Execute Command",
"▶️ Start",
"⏸️ Pause",
"⏹️ Stop",
"🗑️ Remove",
"🧹 Prune",
"🔄 Refresh"
]
)

inspect = container_buttons.show_inspect(containerCols[0])
show_links = container_buttons.show_links(containerCols[1])
logs = container_buttons.show_logs(containerCols[2])
generate_quadlet = container_buttons.show_generate_quadlet(containerCols[3])
container_exec = container_buttons.show_exec(containerCols[4])
start = container_buttons.show_start(containerCols[5])
pause = container_buttons.show_pause(containerCols[6])
stop = container_buttons.show_stop(containerCols[7])
remove = container_buttons.show_remove(containerCols[8])
prune = container_buttons.show_prune(containerCols[9])
refresh = container_buttons.show_refresh(containerCols[10])
# Convert dropdown selection to button clicks
inspect = action == "🔍 Inspect"
show_links = action == "🔗 Show Links"
logs = action == "📝 View Logs"
generate_quadlet = action == "📄 Generate Quadlet"
container_exec = action == "▶️ Execute Command"
start = action == "▶️ Start"
pause = action == "⏸️ Pause"
stop = action == "⏹️ Stop"
remove = action == "🗑️ Remove"
prune = action == "🧹 Prune"
refresh = action == "🔄 Refresh"

edited_containers_df = st.data_editor(
df_containers,
Expand All @@ -49,7 +66,7 @@ def show(client):
),
},
column_order=["Selected", "Name","ID", "Status", "Image", "Ports", "Created"],
use_container_width=True
width='stretch'
)

selected_containers = edited_containers_df[edited_containers_df['Selected']]
Expand Down
43 changes: 24 additions & 19 deletions app/components/image_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,29 @@ def show(client):

df_images = pd.DataFrame(image_data)

imageCols = st.columns((1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1))

with imageCols[0]:
inspect_all = st.button("🔍", help="Inspect Selected Images")

with imageCols[1]:
pull_all = st.button("📥", help="Pull Selected Images")

with imageCols[2]:
remove_all = st.button("🗑️", help="Remove Selected Images")

with imageCols[3]:
if st.button("✂️", help="Prune All Images"):
client.images.prune()
client.images.prune_builds()
st.rerun()
with imageCols[4]:
refresh_all = st.button("🔄", help="Refresh All Images")
action = st.selectbox(
"Image Actions",
[
"Select action...",
"🔍 Inspect",
"📥 Pull",
"🗑️ Remove",
"✂️ Prune",
"🔄 Refresh"
]
)

# Convert dropdown selection to button clicks
inspect_all = action == "🔍 Inspect"
pull_all = action == "📥 Pull"
remove_all = action == "🗑️ Remove"
prune_all = action == "✂️ Prune"
refresh_all = action == "🔄 Refresh"

if prune_all:
client.images.prune()
client.images.prune_builds()
st.rerun()

edited_images_df = st.data_editor(df_images,
hide_index=True,
Expand All @@ -96,7 +101,7 @@ def show(client):
help="Select images for actions"
)
},
use_container_width=True)
width="stretch")

selected_images = edited_images_df[edited_images_df['Selected']]

Expand Down
24 changes: 14 additions & 10 deletions app/components/network_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,20 @@ def show(client):

df_networks = pd.DataFrame(network_data)

networkCols = st.columns((1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1))
action = st.selectbox(
"Network Actions",
[
"Select action...",
"🔍 Inspect",
"🗑️ Remove",
"🔄 Refresh"
]
)

with networkCols[0]:
inspect_all = st.button("🔍", help="Inspect Selected Networks")

with networkCols[1]:
remove_all = st.button("🗑️", help="Remove Selected Networks")

with networkCols[2]:
refresh_all = st.button("🔄", help="Refresh All Networks")
# Convert dropdown selection to button clicks
inspect_all = action == "🔍 Inspect"
remove_all = action == "🗑️ Remove"
refresh_all = action == "🔄 Refresh"

edited_networks_df = st.data_editor(df_networks,
hide_index=True,
Expand All @@ -54,7 +58,7 @@ def show(client):
help="Select networks for actions"
)
},
use_container_width=True)
width="stretch")

selected_networks = edited_networks_df[edited_networks_df['Selected']]

Expand Down
52 changes: 27 additions & 25 deletions app/components/pod_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,32 @@ def show(client):

df_pods = pd.DataFrame(pod_data)

podCols = st.columns((1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1))

with podCols[0]:
inspect_all = st.button("🔍", help="Inspect Selected Pods")

with podCols[1]:
start_all = st.button("▶️", help="Start Selected Pods")

with podCols[2]:
pause_all = st.button("⏸️", help="Pause Selected Pods")

with podCols[3]:
stop_all = st.button("⏹️", help="Stop Selected Pods")

with podCols[4]:
remove_all = st.button("🗑️", help="Remove Selected Pods")

with podCols[5]:
if st.button("✂️", help="Prune All Pods"):
client.pods.prune()
st.rerun()

with podCols[6]:
refresh_all = st.button("🔄", help="Refresh All Pods")
action = st.selectbox(
"Pod Actions",
[
"Select action...",
"🔍 Inspect",
"▶️ Start",
"⏸️ Pause",
"⏹️ Stop",
"🗑️ Remove",
"✂️ Prune",
"🔄 Refresh"
]
)

# Convert dropdown selection to button clicks
inspect_all = action == "🔍 Inspect"
start_all = action == "▶️ Start"
pause_all = action == "⏸️ Pause"
stop_all = action == "⏹️ Stop"
remove_all = action == "🗑️ Remove"
prune_all = action == "✂️ Prune"
refresh_all = action == "🔄 Refresh"

if prune_all:
client.pods.prune()
st.rerun()

edited_pods_df = st.data_editor(df_pods,
hide_index=True,
Expand All @@ -74,7 +76,7 @@ def show(client):
help="Select pods for actions"
)
},
use_container_width=True)
width="stretch")

selected_pods = edited_pods_df[edited_pods_df['Selected']]

Expand Down
2 changes: 1 addition & 1 deletion app/components/secret_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ def show(client):
st.error(f"Error deleting secret: {str(e)}")

if secrets_list:
st.dataframe(secrets_list, use_container_width=True)
st.dataframe(secrets_list, width="stretch")
else:
st.info("No secrets found.")
29 changes: 16 additions & 13 deletions app/components/volume_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,22 @@ def show(client):

df_volumes = pd.DataFrame(volume_data)

volumeCols = st.columns((1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1))
action = st.selectbox(
"Volume Actions",
[
"Select action...",
"🔍 Inspect",
"🗑️ Remove",
"✂️ Prune",
"🔄 Refresh"
]
)

with volumeCols[0]:
inspect_all = st.button("🔍", help="Inspect Selected Volumes")

with volumeCols[1]:
remove_all = st.button("🗑️", help="Remove Selected Volumes")

with volumeCols[2]:
prune_all = st.button("✂️", help="Prune All Volumes")

with volumeCols[3]:
refresh_all = st.button("🔄", help="Refresh All Volumes")
# Convert dropdown selection to button clicks
inspect_all = action == "🔍 Inspect"
remove_all = action == "🗑️ Remove"
prune_all = action == "✂️ Prune"
refresh_all = action == "🔄 Refresh"

edited_volumes_df = st.data_editor(df_volumes,
hide_index=True,
Expand All @@ -57,7 +60,7 @@ def show(client):
help="Select volumes for actions"
)
},
use_container_width=True)
width="stretch")

selected_volumes = edited_volumes_df[edited_volumes_df['Selected']]

Expand Down
Loading