Files
3cloud-backend/streamlit_server.py

36 lines
1.4 KiB
Python

import streamlit as st
from streamlit_server.utils.session import init_session_state
# Define pages with icons
pages = {
"Your account": [
st.Page("streamlit_server/views/dashboard.py", title="📊 Dashboard"),
st.Page("streamlit_server/views/hosts.py", title="🖥️ Hosts"),
st.Page("streamlit_server/views/images.py", title="🖼️ Images"),
st.Page("streamlit_server/views/networks.py", title="🌐 Networks"),
st.Page("streamlit_server/views/projects.py", title="📂 Projects"),
st.Page("streamlit_server/views/universes.py", title="🌌 Universes"),
st.Page("streamlit_server/views/regions.py", title="🗺️ Regions"),
st.Page("streamlit_server/views/virtual_data_centers.py", title="🏢 Virtual Data Centers"),
st.Page("streamlit_server/views/websocket.py", title="🔌 Active websockets"),
],
"Workloads": [
st.Page("streamlit_server/views/workload_hosts.py", title="🖥️ Workload Hosts"),
st.Page("streamlit_server/views/containers.py", title="📦 Containers"),
st.Page("streamlit_server/views/virtual_machines.py", title="💻 Virtual Machines"),
],
}
# Set page config
st.set_page_config(
page_title="IaaS Management Portal",
page_icon="🌐",
layout="wide"
)
# Initialize session state
init_session_state()
# Run navigation
pg = st.navigation(pages)
pg.run()