Spaces:
Running
Running
Добавь страницу аутентификации и страницу пользователей - Follow Up Deployment
Browse files148 unmodified lines149150151152153154155156239 unmodified lines39639739839940040198 unmodified lines500501502503504505506507508509510511512513514515516517518519520148 unmodified lines</div></header><!-- Dashboard Content --><div class="p-6"><!-- Status Cards --><div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"><div class="bg-white p-6 rounded-lg shadow">239 unmodified lines</div></div></div></div></div></div>98 unmodified lines// Initialize tab switchingconst sidebarItems = document.querySelectorAll('.sidebar li');sidebarItems.forEach(item => {item.addEventListener('click', function() {sidebarItems.forEach(i => i.classList.remove('active'));this.classList.add('active');// In a real app, we would load the appropriate content for each tabconst title = this.querySelector('span').textContent;document.querySelector('header + .p-6').innerHTML = `<div class="bg-white p-6 rounded-lg shadow text-center"><h1 class="text-2xl font-bold mb-4">${title}</h1><p class="text-gray-600">Content for ${title} would be displayed here</p></div>`;});});});</script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Pervyh/api-manager" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>148 unmodified lines149150151152153154155156157158239 unmodified lines39839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671798 unmodified lines816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879148 unmodified lines</div></header><!-- Tab Content Container --><div id="tab-content" class="p-6"><!-- Dashboard Content --><div id="dashboard-content"><!-- Status Cards --><div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"><div class="bg-white p-6 rounded-lg shadow">239 unmodified lines</div></div></div></div><!-- Database Tables Content --><div id="tables-content" class="hidden"><div class="p-6"><div class="flex justify-between items-center mb-6"><h1 class="text-2xl font-bold">Database Tables</h1><button class="px-4 py-2 bg-primary text-white rounded-md hover:bg-secondary">Create New Table</button></div><div class="bg-white rounded-lg shadow overflow-hidden mb-8"><div class="p-4 border-b flex justify-between items-center"><h2 class="text-lg font-semibold">Available Tables</h2><input type="text" placeholder="Search tables..." class="p-2 border rounded-lg w-64"></div><div class="overflow-x-auto"><table class="min-w-full"><thead class="bg-gray-50"><tr><th class="py-3 px-4 text-left">Table Name</th><th class="py-3 px-4 text-left">Columns</th><th class="py-3 px-4 text-left">API Endpoint</th><th class="py-3 px-4 text-left">Status</th><th class="py-3 px-4 text-left">Actions</th></tr></thead><tbody class="divide-y"><tr><td class="py-3 px-4 font-medium">users</td><td class="py-3 px-4">5</td><td class="py-3 px-4 font-mono">/api/users</td><td class="py-3 px-4"><span class="bg-green-100 text-green-800 py-1 px-2 rounded-full text-xs">Active</span></td><td class="py-3 px-4 space-x-2"><button class="p-1 text-blue-500 hover:text-blue-700 edit-table-btn" data-table="users"><i class="fas fa-edit"></i></button><button class="p-1 text-red-500 hover:text-red-700"><i class="fas fa-trash"></i></button></td></tr><tr><td class="py-3 px-4 font-medium">products</td><td class="py-3 px-4">6</td><td class="py-3 px-4 font-mono">/api/products</td><td class="py-3 px-4"><span class="bg-green-100 text-green-800 py-1 px-2 rounded-full text-xs">Active</span></td><td class="py-3 px-4 space-x-2"><button class="p-1 text-blue-500 hover:text-blue-700 edit-table-btn" data-table="products"><i class="fas fa-edit"></i></button><button class="p-1 text-red-500 hover:text-red-700"><i class="fas fa-trash"></i></button></td></tr><tr><td class="py-3 px-4 font-medium">orders</td><td class="py-3 px-4">6</td><td class="py-3 px-4 font-mono">/api/orders</td><td class="py-3 px-4"><span class="bg-yellow-100 text-yellow-800 py-1 px-2 rounded-full text-xs">Draft</span></td><td class="py-3 px-4 space-x-2"><button class="p-1 text-blue-500 hover:text-blue-700 edit-table-btn" data-table="orders"><i class="fas fa-edit"></i></button><button class="p-1 text-red-500 hover:text-red-700"><i class="fas fa-trash"></i></button></td></tr></tbody></table></div></div></div></div><div id="api-config-content"><!-- API Configuration Content --><div id="api-config-content" ><div class="p-6"><h1 class="text-2xl font-bold mb-6">API Configuration</h1><div class="grid grid-cols-1 md:grid-cols-2 gap-8"><!-- Global Settings --><div class="bg-gray-50 p-6 rounded-lg"><h2 class="text-lg font-semibold mb-4 border-b pb-2">Global Settings</h2><div class="space-y-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Base Path</label><input type="text" value="/api" class="w-full p-2 border rounded focus:ring-2 focus:ring-primary focus:border-transparent"><p class="text-xs text-gray-500 mt-1">The base path for all API endpoints</p></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Default Limit</label><input type="number" value="100" class="w-full p-2 border rounded focus:ring-2 focus:ring-primary focus:border-transparent"><p class="text-xs text-gray-500 mt-1">Default number of items returned per request</p></div><div class="flex items-center"><input type="checkbox" id="enable-caching" class="h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded" checked><label for="enable-caching" class="ml-2 block text-sm text-gray-700">Enable Response Caching</label></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Cache Duration (seconds)</label><input type="number" value="300" class="w-full p-2 border rounded focus:ring-2 focus:ring-primary focus:border-transparent"></div></div></div><!-- Security Settings --><div class="bg-gray-50 p-6 rounded-lg"><h2 class="text-lg font-semibold mb-4 border-b pb-2">Security Settings</h2><div class="space-y-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Authentication Method</label><select class="w-full p-2 border rounded focus:ring-2 focus:ring-primary focus:border-transparent"><option>JWT</option><option>API Key</option><option>OAuth 2.0</option><option>Basic Auth</option><option>None</option></select></div><div><label class="block text-sm font-medium text-gray-700 mb-1">CORS Origins</label><input type="text" value="*" class="w-full p-2 border rounded focus:ring-2 focus:ring-primary focus:border-transparent"><p class="text-xs text-gray-500 mt-1">Comma-separated list of allowed origins</p></div><div class="flex items-center"><input type="checkbox" id="enable-https" class="h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded" checked><label for="enable-https" class="ml-2 block text-sm text-gray-700">Require HTTPS</label></div><div class="flex items-center"><input type="checkbox" id="enable-rate-limiting" class="h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded" checked><label for="enable-rate-limiting" class="ml-2 block text-sm text-gray-700">Enable Rate Limiting</label></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Rate Limit (requests/minute)</label><input type="number" value="1000" class="w-full p-2 border rounded focus:ring-2 focus:ring-primary focus:border-transparent"></div></div></div><!-- Logging Settings --><div class="bg-gray-50 p-6 rounded-lg"><h2 class="text-lg font-semibold mb-4 border-b pb-2">Logging & Monitoring</h2><div class="space-y-4"><div class="flex items-center"><input type="checkbox" id="enable-request-logging" class="h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded" checked><label for="enable-request-logging" class="ml-2 block text-sm text-gray-700">Enable Request Logging</label></div><div class="flex items-center"><input type="checkbox" id="enable-error-logging" class="h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded" checked><label for="enable-error-logging" class="ml-2 block text-sm text-gray-700">Enable Error Logging</label></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Log Retention (days)</label><input type="number" value="30" class="w-full p-2 border rounded focus:ring-2 focus:ring-primary focus:border-transparent"></div></div></div><!-- Response Settings --><div class="bg-gray-50 p-6 rounded-lg"><h2 class="text-lg font-semibold mb-4 border-b pb-2">Response Settings</h2><div class="space-y-4"><div class="flex items-center"><input type="checkbox" id="enable-pretty-print" class="h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded" checked><label for="enable-pretty-print" class="ml-2 block text-sm text-gray-700">Pretty Print JSON</label></div><div class="flex items-center"><input type="checkbox" id="include-timestamps" class="h-4 w-4 text-primary focus:ring-primary border-gray-300 rounded"><label for="include-timestamps" class="ml-2 block text-sm text-gray-700">Include Timestamps</label></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Default Response Format</label><select class="w-full p-2 border rounded focus:ring-2 focus:ring-primary focus:border-transparent"><option>JSON</option><option>XML</option></select></div></div></div></div><div class="mt-8 flex justify-end space-x-4"><button class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 bg-white hover:bg-gray-50">Reset to Defaults</button><button class="px-4 py-2 bg-primary text-white rounded-md hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">Save Changes</button></div></div></div></div></div></div><!-- Edit Table Modal --><div id="edit-table-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"><div class="bg-white rounded-lg shadow-xl w-full max-w-2xl"><div class="p-4 border-b flex justify-between items-center"><h3 class="text-lg font-semibold">Edit Table: <span id="edit-table-name"></span></h3><button id="close-edit-modal" class="text-gray-500 hover:text-gray-700"><i class="fas fa-times"></i></button></div><div class="p-6"><div class="mb-6"><h4 class="font-medium mb-3">Table Settings</h4><div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div><label class="block text-sm font-medium text-gray-700 mb-1">Table Name</label><input type="text" class="w-full p-2 border rounded" value="users"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">API Endpoint</label><input type="text" class="w-full p-2 border rounded" value="/api/users"></div><div><label class="block text-sm font-medium text-gray-700 mb-1">Status</label><select class="w-full p-2 border rounded"><option>Active</option><option>Draft</option><option>Disabled</option></select></div></div></div><div class="mb-6"><div class="flex justify-between items-center mb-3"><h4 class="font-medium">Columns</h4><button class="text-sm text-primary hover:text-secondary"><i class="fas fa-plus mr-1"></i> Add Column</button></div><div class="overflow-x-auto"><table class="min-w-full"><thead class="bg-gray-50"><tr><th class="py-2 px-3 text-left">Name</th><th class="py-2 px-3 text-left">Type</th><th class="py-2 px-3 text-left">Nullable</th><th class="py-2 px-3 text-left">Default</th><th class="py-2 px-3 text-left">Actions</th></tr></thead><tbody class="divide-y"><tr><td class="py-2 px-3"><input type="text" class="p-1 border rounded w-full" value="id"></td><td class="py-2 px-3"><select class="p-1 border rounded w-full"><option>integer</option><option selected>serial</option><option>varchar</option><option>text</option><option>boolean</option><option>timestamp</option></select></td><td class="py-2 px-3"><input type="checkbox" class="h-4 w-4" checked></td><td class="py-2 px-3"><input type="text" class="p-1 border rounded w-full" placeholder="None"></td><td class="py-2 px-3"><button class="text-red-500 hover:text-red-700"><i class="fas fa-trash"></i></button></td></tr><tr><td class="py-2 px-3"><input type="text" class="p-1 border rounded w-full" value="username"></td><td class="py-2 px-3"><select class="p-1 border rounded w-full"><option>integer</option><option>serial</option><option selected>varchar(50)</option><option>text</option><option>boolean</option><option>timestamp</option></select></td><td class="py-2 px-3"><input type="checkbox" class="h-4 w-4"></td><td class="py-2 px-3"><input type="text" class="p-1 border rounded w-full" placeholder="None"></td><td class="py-2 px-3"><button class="text-red-500 hover:text-red-700"><i class="fas fa-trash"></i></button></td></tr></tbody></table></div></div><div class="flex justify-end space-x-3"><button class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 bg-white hover:bg-gray-50">Cancel</button><button class="px-4 py-2 bg-primary text-white rounded-md hover:bg-secondary">Save Changes</button></div></div></div></div>98 unmodified lines// Initialize tab switchingconst sidebarItems = document.querySelectorAll('.sidebar li');const tabContents = {'Dashboard': 'dashboard-content','Database Tables': 'tables-content','API Configuration': 'api-config-content','Authentication': 'auth-content','API Documentation': 'docs-content','Request Logs': 'logs-content','API Keys': 'keys-content','Users': 'users-content','Settings': 'settings-content'};sidebarItems.forEach(item => {item.addEventListener('click', function() {sidebarItems.forEach(i => i.classList.remove('active'));this.classList.add('active');const tabName = this.querySelector('span').textContent;const contentId = tabContents[tabName];// Hide all contentdocument.querySelectorAll('#tab-content > div').forEach(div => {div.classList.add('hidden');});// Show selected contentif (contentId) {document.getElementById(contentId).classList.remove('hidden');}});});// Initialize with dashboard visibledocument.getElementById('dashboard-content').classList.remove('hidden');// Table edit modal handlingconst editModal = document.getElementById('edit-table-modal');const editTableName = document.getElementById('edit-table-name');const closeEditModal = document.getElementById('close-edit-modal');document.querySelectorAll('.edit-table-btn').forEach(btn => {btn.addEventListener('click', function() {const tableName = this.getAttribute('data-table');editTableName.textContent = tableName;editModal.classList.remove('hidden');});});closeEditModal.addEventListener('click', function() {editModal.classList.add('hidden');});// Close modal when clicking outsideeditModal.addEventListener('click', function(e) {if (e.target === editModal) {editModal.classList.add('hidden');}});});</script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Pervyh/api-manager" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
index.html+369-10