297 lines
8.8 KiB
HTML
297 lines
8.8 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Sriphat Data Platform</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
min-height: 100vh;
|
|
padding: 20px;
|
|
}
|
|
|
|
.container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.header {
|
|
text-align: center;
|
|
color: white;
|
|
margin-bottom: 40px;
|
|
padding: 20px;
|
|
position: relative;
|
|
}
|
|
|
|
.header h1 {
|
|
font-size: 2.5rem;
|
|
margin-bottom: 10px;
|
|
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
|
|
}
|
|
|
|
.header p {
|
|
font-size: 1.1rem;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.user-info {
|
|
position: absolute;
|
|
top: 20px;
|
|
right: 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 15px;
|
|
background: rgba(255,255,255,0.1);
|
|
padding: 10px 20px;
|
|
border-radius: 25px;
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
.user-info .username {
|
|
font-size: 0.95rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.logout-btn {
|
|
background: rgba(255,255,255,0.2);
|
|
color: white;
|
|
padding: 6px 15px;
|
|
border-radius: 15px;
|
|
text-decoration: none;
|
|
font-size: 0.9rem;
|
|
transition: background 0.3s ease;
|
|
}
|
|
|
|
.logout-btn:hover {
|
|
background: rgba(255,255,255,0.3);
|
|
}
|
|
|
|
.role-badge {
|
|
padding: 4px 12px;
|
|
border-radius: 12px;
|
|
font-size: 11px;
|
|
font-weight: bold;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
.role-admin {
|
|
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
|
|
color: white;
|
|
box-shadow: 0 2px 4px rgba(255,107,107,0.3);
|
|
}
|
|
.role-operation {
|
|
background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
|
|
color: white;
|
|
box-shadow: 0 2px 4px rgba(78,205,196,0.3);
|
|
}
|
|
|
|
.menu-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
gap: 20px;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.menu-card {
|
|
background: white;
|
|
border-radius: 12px;
|
|
padding: 25px;
|
|
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
|
|
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
|
cursor: pointer;
|
|
text-decoration: none;
|
|
color: inherit;
|
|
display: block;
|
|
}
|
|
|
|
.menu-card:hover {
|
|
transform: translateY(-5px);
|
|
box-shadow: 0 8px 15px rgba(0,0,0,0.2);
|
|
}
|
|
|
|
.menu-card.has-submenu {
|
|
cursor: default;
|
|
}
|
|
|
|
.menu-card .icon {
|
|
font-size: 2.5rem;
|
|
margin-bottom: 15px;
|
|
display: block;
|
|
}
|
|
|
|
.menu-card h3 {
|
|
color: #333;
|
|
margin-bottom: 10px;
|
|
font-size: 1.3rem;
|
|
}
|
|
|
|
.menu-card p {
|
|
color: #666;
|
|
font-size: 0.9rem;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.submenu {
|
|
margin-top: 15px;
|
|
padding-top: 15px;
|
|
border-top: 1px solid #eee;
|
|
display: none;
|
|
}
|
|
|
|
.submenu.active {
|
|
display: block;
|
|
}
|
|
|
|
.submenu-item {
|
|
display: block;
|
|
padding: 10px 15px;
|
|
margin: 5px 0;
|
|
background: #f8f9fa;
|
|
border-radius: 6px;
|
|
color: #495057;
|
|
text-decoration: none;
|
|
transition: background 0.2s ease;
|
|
}
|
|
|
|
.submenu-item:hover {
|
|
background: #e9ecef;
|
|
}
|
|
|
|
.submenu-toggle {
|
|
display: inline-block;
|
|
margin-left: 10px;
|
|
font-size: 0.8rem;
|
|
color: #667eea;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Color themes for different services */
|
|
.card-supabase { border-left: 4px solid #3ECF8E; }
|
|
.card-api { border-left: 4px solid #009688; }
|
|
.card-airflow { border-left: 4px solid #017CEE; }
|
|
.card-airbyte { border-left: 4px solid #615EFF; }
|
|
.card-data { border-left: 4px solid #FF6B6B; }
|
|
.card-dbt { border-left: 4px solid #FF694B; }
|
|
.card-superset { border-left: 4px solid #20A7C9; }
|
|
|
|
@media (max-width: 768px) {
|
|
.header h1 {
|
|
font-size: 2rem;
|
|
}
|
|
|
|
.menu-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="header">
|
|
<h1>🏥 Sriphat Data Platform</h1>
|
|
<p>Integrated Data Management & Analytics Platform</p>
|
|
|
|
{% if user %}
|
|
<div class="user-info">
|
|
<span class="username">👤 {{ user.name or user.username }}</span>
|
|
{% if user.roles %}
|
|
{% for role in user.roles %}
|
|
<span class="role-badge role-{{ role }}">{{ role }}</span>
|
|
{% endfor %}
|
|
{% endif %}
|
|
<a href="{{ root_path }}/auth/logout" class="logout-btn">Logout</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="menu-grid">
|
|
<!-- Supabase -->
|
|
<a href="https://ai.sriphat.com/supabase" class="menu-card card-supabase" target="_blank">
|
|
<span class="icon">🗄️</span>
|
|
<h3>Supabase</h3>
|
|
<p>PostgreSQL database with real-time capabilities and REST API</p>
|
|
</a>
|
|
|
|
<!-- API Docs -->
|
|
<a href="{{ root_path }}/docs" class="menu-card card-api">
|
|
<span class="icon">📚</span>
|
|
<h3>API Documentation</h3>
|
|
<p>Interactive API documentation and testing interface</p>
|
|
</a>
|
|
|
|
<!-- Airflow -->
|
|
<a href="https://ai.sriphat.com/airflow" class="menu-card card-airflow" target="_blank">
|
|
<span class="icon">🔄</span>
|
|
<h3>Airflow</h3>
|
|
<p>Workflow orchestration and data pipeline management</p>
|
|
</a>
|
|
|
|
<!-- Airbyte -->
|
|
<a href="https://ai.sriphat.com/airbyte" class="menu-card card-airbyte" target="_blank">
|
|
<span class="icon">🔌</span>
|
|
<h3>Airbyte</h3>
|
|
<p>Data integration and ETL platform</p>
|
|
</a>
|
|
|
|
<!-- Data Management -->
|
|
<div class="menu-card card-data has-submenu" onclick="toggleSubmenu(this)">
|
|
<span class="icon">📊</span>
|
|
<h3>Data Management <span class="submenu-toggle">▼</span></h3>
|
|
<p>Upload and manage data files</p>
|
|
<div class="submenu">
|
|
<a href="{{ root_path }}/data-management/finance" class="submenu-item">
|
|
💰 Finance Excel Upload
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- DBT -->
|
|
<a href="https://ai.sriphat.com/dbt" class="menu-card card-dbt" target="_blank">
|
|
<span class="icon">🔧</span>
|
|
<h3>DBT</h3>
|
|
<p>Data transformation and modeling</p>
|
|
</a>
|
|
|
|
<!-- Superset -->
|
|
<a href="https://ai.sriphat.com/superset" class="menu-card card-superset" target="_blank">
|
|
<span class="icon">📈</span>
|
|
<h3>Superset</h3>
|
|
<p>Business intelligence and data visualization</p>
|
|
</a>
|
|
|
|
<!-- User Management (Admin only) -->
|
|
{% if user and user.roles and 'admin' in user.roles %}
|
|
<a href="{{ root_path }}/admin/users" class="menu-card card-admin">
|
|
<span class="icon">👥</span>
|
|
<h3>User Management</h3>
|
|
<p>Manage users and roles (Admin only)</p>
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
function toggleSubmenu(card) {
|
|
const submenu = card.querySelector('.submenu');
|
|
const toggle = card.querySelector('.submenu-toggle');
|
|
|
|
if (submenu.classList.contains('active')) {
|
|
submenu.classList.remove('active');
|
|
toggle.textContent = '▼';
|
|
} else {
|
|
submenu.classList.add('active');
|
|
toggle.textContent = '▲';
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|