File size: 1,857 Bytes
6b85b68
 
594f2c9
acc0243
6b85b68
acc0243
 
 
6b85b68
acc0243
 
 
 
6b85b68
594f2c9
acc0243
 
6b85b68
594f2c9
acc0243
594f2c9
acc0243
 
 
 
 
 
 
594f2c9
acc0243
 
 
594f2c9
acc0243
 
 
 
 
 
594f2c9
 
acc0243
594f2c9
acc0243
 
 
 
 
594f2c9
acc0243
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8e4018d
 
acc0243
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import streamlit as st
import sys
import os
from pathlib import Path

# Add the app directory to Python path
app_dir = Path(__file__).parent
sys.path.insert(0, str(app_dir))

from pages.dashboard import create_dashboard_page
from pages.settings import create_settings_page
from utils.config import load_config
from utils.logging import setup_logging, get_logger

# Initialize logging
setup_logging()
logger = get_logger(__name__)

def main():
    """Main application entry point"""
    try:
        # Configure Streamlit page
        st.set_page_config(
            page_title="MONA - Monitoring & Analytics",
            page_icon="📊",
            layout="wide",
            initial_sidebar_state="expanded"
        )
        
        # Load configuration
        config = load_config()
        logger.info("Application started successfully")
        
        # Create sidebar navigation
        st.sidebar.title("MONA Dashboard")
        page = st.sidebar.selectbox(
            "Navigate to:",
            ["Dashboard", "Settings", "About"]
        )
        
        # Route to appropriate page
        if page == "Dashboard":
            create_dashboard_page()
        elif page == "Settings":
            create_settings_page()
        elif page == "About":
            create_about_page()
            
    except Exception as e:
        logger.error(f"Application error: {str(e)}")
        st.error(f"An error occurred: {str(e)}")

def create_about_page():
    """Create the about page"""
    st.title("About MONA")
    st.write("""
    MONA (Monitoring & Analytics) is a comprehensive dashboard application 
    for data visualization and monitoring.
    
    **Features:**
    - Real-time data monitoring
    - Interactive dashboards
    - Data analytics and reporting
    - Customizable settings
    """)

if __name__ == "__main__":
    main()