231 lines
11 KiB
HTML
231 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Admin Dashboard | Tractatus Framework</title>
|
|
<link rel="stylesheet" href="/css/tailwind.css?v=0.1.2.1773465731103">
|
|
<link rel="stylesheet" href="/css/tractatus-theme.min.css?v=0.1.2.1773465731103">
|
|
<script defer src="/js/admin/auth-check.js?v=0.1.2.1773465731103"></script>
|
|
</head>
|
|
<body class="bg-gray-50">
|
|
|
|
<!-- Navigation -->
|
|
<div id="admin-navbar" data-page-title="Dashboard" data-page-icon="dashboard"></div>
|
|
<script src="/js/components/navbar-admin.js?v=0.1.2.1773465731103"></script>
|
|
|
|
<!-- Main Content -->
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
|
|
<!-- Overview Section -->
|
|
<div id="overview-section">
|
|
<h2 class="text-2xl font-bold text-gray-900 mb-6">Dashboard Overview</h2>
|
|
|
|
<!-- Statistics Cards -->
|
|
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
|
|
<div class="bg-white rounded-lg shadow p-6">
|
|
<div class="flex items-center">
|
|
<div class="flex-shrink-0 bg-blue-100 rounded-md p-3">
|
|
<svg aria-hidden="true" class="h-6 w-6 text-blue-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
|
|
</svg>
|
|
</div>
|
|
<div class="ml-4">
|
|
<p class="text-sm font-medium text-gray-500">Total Documents</p>
|
|
<p id="stat-documents" class="text-2xl font-semibold text-gray-900">-</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-lg shadow p-6">
|
|
<div class="flex items-center">
|
|
<div class="flex-shrink-0 bg-yellow-100 rounded-md p-3">
|
|
<svg aria-hidden="true" class="h-6 w-6 text-yellow-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
</svg>
|
|
</div>
|
|
<div class="ml-4">
|
|
<p class="text-sm font-medium text-gray-500">Pending Review</p>
|
|
<p id="stat-pending" class="text-2xl font-semibold text-gray-900">-</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-lg shadow p-6">
|
|
<div class="flex items-center">
|
|
<div class="flex-shrink-0 bg-green-100 rounded-md p-3">
|
|
<svg aria-hidden="true" class="h-6 w-6 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
</svg>
|
|
</div>
|
|
<div class="ml-4">
|
|
<p class="text-sm font-medium text-gray-500">Published Posts</p>
|
|
<p id="stat-approved" class="text-2xl font-semibold text-gray-900">-</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-white rounded-lg shadow p-6">
|
|
<div class="flex items-center">
|
|
<div class="flex-shrink-0 bg-purple-100 rounded-md p-3">
|
|
<svg aria-hidden="true" class="h-6 w-6 text-purple-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z"/>
|
|
</svg>
|
|
</div>
|
|
<div class="ml-4">
|
|
<p class="text-sm font-medium text-gray-500">Total Users</p>
|
|
<p id="stat-users" class="text-2xl font-semibold text-gray-900">-</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Sync Health Card -->
|
|
<div class="bg-white rounded-lg shadow p-6 mb-8">
|
|
<div class="flex items-center justify-between">
|
|
<div class="flex items-center flex-1">
|
|
<div id="sync-icon-container" class="flex-shrink-0 bg-gray-100 rounded-md p-3">
|
|
<svg aria-hidden="true" class="h-6 w-6 text-gray-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"/>
|
|
</svg>
|
|
</div>
|
|
<div class="ml-4 flex-1">
|
|
<p class="text-sm font-medium text-gray-500">Database Sync Status</p>
|
|
<div class="flex items-center space-x-2 mt-1">
|
|
<p id="sync-status" class="text-lg font-semibold text-gray-900">Checking...</p>
|
|
<span id="sync-badge" class="px-2 py-1 text-xs rounded-full bg-gray-100 text-gray-800">Unknown</span>
|
|
</div>
|
|
<p id="sync-details" class="text-xs text-gray-500 mt-1">Loading sync health...</p>
|
|
</div>
|
|
</div>
|
|
<div class="ml-4">
|
|
<button id="sync-trigger-btn" data-action="triggerSync" class="px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed">
|
|
Sync Now
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Business Intelligence Feature Card -->
|
|
<div class="bg-gradient-to-r from-purple-50 to-blue-50 rounded-lg shadow-sm border-2 border-purple-200 p-6 mb-8">
|
|
<div class="flex items-start justify-between">
|
|
<div class="flex-1">
|
|
<div class="flex items-center mb-2">
|
|
<svg class="h-6 w-6 text-purple-600 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"/>
|
|
</svg>
|
|
<h3 class="text-lg font-bold text-gray-900">Business Intelligence Tools</h3>
|
|
<span class="ml-2 px-2 py-1 text-xs font-medium bg-purple-100 text-purple-800 rounded-full">Research Prototype</span>
|
|
</div>
|
|
<p class="text-sm text-gray-700 mb-3">
|
|
Transform governance logs into executive insights. Track cost avoidance, framework maturity, and team performance with real-time analytics.
|
|
</p>
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-3 mb-4">
|
|
<div class="bg-white rounded p-3 border border-purple-100">
|
|
<p class="text-xs font-medium text-gray-500">Cost Avoidance</p>
|
|
<p class="text-sm text-gray-900">Track financial value of violations prevented</p>
|
|
</div>
|
|
<div class="bg-white rounded p-3 border border-purple-100">
|
|
<p class="text-xs font-medium text-gray-500">Maturity Score</p>
|
|
<p class="text-sm text-gray-900">Measure organizational governance learning</p>
|
|
</div>
|
|
<div class="bg-white rounded p-3 border border-purple-100">
|
|
<p class="text-xs font-medium text-gray-500">Team Performance</p>
|
|
<p class="text-sm text-gray-900">Compare AI-assisted vs human-direct work</p>
|
|
</div>
|
|
</div>
|
|
<div class="flex items-center space-x-3">
|
|
<a href="/admin/audit-analytics.html" class="inline-flex items-center px-4 py-2 bg-purple-600 text-white text-sm font-medium rounded-md hover:bg-purple-700">
|
|
View Analytics Dashboard
|
|
<svg class="ml-2 h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7l5 5m0 0l-5 5m5-5H6"/>
|
|
</svg>
|
|
</a>
|
|
<a href="/docs/business-intelligence/governance-bi-tools.pdf" class="text-sm text-purple-600 hover:text-purple-800 font-medium">
|
|
Read Documentation →
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Recent Activity -->
|
|
<div class="bg-white rounded-lg shadow">
|
|
<div class="px-6 py-4 border-b border-gray-200">
|
|
<h3 class="text-lg font-medium text-gray-900">Recent Activity</h3>
|
|
</div>
|
|
<div id="recent-activity" class="px-6 py-4">
|
|
<div class="text-center py-12 text-gray-500">Loading activity...</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Moderation Queue Section -->
|
|
<div id="moderation-section" class="hidden">
|
|
<h2 class="text-2xl font-bold text-gray-900 mb-6">Moderation Queue</h2>
|
|
|
|
<div class="bg-white rounded-lg shadow">
|
|
<div class="px-6 py-4 border-b border-gray-200">
|
|
<div class="flex justify-between items-center">
|
|
<h3 class="text-lg font-medium text-gray-900">Pending Items</h3>
|
|
<select id="queue-filter" class="text-sm border-gray-300 rounded-md">
|
|
<option value="all">All Types</option>
|
|
<option value="document">Documents</option>
|
|
<option value="blog">Blog Posts</option>
|
|
<option value="case">Case Studies</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div id="moderation-queue" class="divide-y divide-gray-200">
|
|
<div class="px-6 py-8 text-center text-gray-500">Loading queue...</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Users Section -->
|
|
<div id="users-section" class="hidden">
|
|
<h2 class="text-2xl font-bold text-gray-900 mb-6">User Management</h2>
|
|
|
|
<div class="bg-white rounded-lg shadow">
|
|
<div class="px-6 py-4 border-b border-gray-200">
|
|
<div class="flex justify-between items-center">
|
|
<h3 class="text-lg font-medium text-gray-900">Users</h3>
|
|
<button id="add-user-btn" class="bg-blue-600 text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-blue-700">
|
|
Add User
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div id="users-list" class="divide-y divide-gray-200">
|
|
<div class="px-6 py-8 text-center text-gray-500">Loading users...</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Documents Section -->
|
|
<div id="documents-section" class="hidden">
|
|
<h2 class="text-2xl font-bold text-gray-900 mb-6">Document Management</h2>
|
|
|
|
<div class="bg-white rounded-lg shadow">
|
|
<div class="px-6 py-4 border-b border-gray-200">
|
|
<div class="flex justify-between items-center">
|
|
<h3 class="text-lg font-medium text-gray-900">All Documents</h3>
|
|
<button id="upload-doc-btn" class="bg-blue-600 text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-blue-700">
|
|
Upload Document
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div id="documents-list" class="divide-y divide-gray-200">
|
|
<div class="px-6 py-8 text-center text-gray-500">Loading documents...</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Modals -->
|
|
<div id="modal-container"></div>
|
|
|
|
<script src="/js/admin/dashboard.js?v=0.1.2.1773465731103"></script>
|
|
|
|
</body>
|
|
</html>
|