Pervyh commited on
Commit
082cc8b
·
verified ·
1 Parent(s): bcd6226

Добавь страницу настройки подключения к базам данных. - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +114 -0
index.html CHANGED
@@ -121,6 +121,10 @@
121
  <i class="fas fa-users mr-3"></i>
122
  <span>Users</span>
123
  </li>
 
 
 
 
124
  <li class="py-3 px-4 hover:bg-gray-700 cursor-pointer flex items-center">
125
  <i class="fas fa-cog mr-3"></i>
126
  <span>Settings</span>
@@ -600,6 +604,115 @@
600
  </div>
601
  </div>
602
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
603
  </div>
604
  </div>
605
  </div>
@@ -825,6 +938,7 @@
825
  'Request Logs': 'logs-content',
826
  'API Keys': 'keys-content',
827
  'Users': 'users-content',
 
828
  'Settings': 'settings-content'
829
  };
830
 
 
121
  <i class="fas fa-users mr-3"></i>
122
  <span>Users</span>
123
  </li>
124
+ <li class="py-3 px-4 hover:bg-gray-700 cursor-pointer flex items-center">
125
+ <i class="fas fa-database mr-3"></i>
126
+ <span>Database Connections</span>
127
+ </li>
128
  <li class="py-3 px-4 hover:bg-gray-700 cursor-pointer flex items-center">
129
  <i class="fas fa-cog mr-3"></i>
130
  <span>Settings</span>
 
604
  </div>
605
  </div>
606
  </div>
607
+ </div>
608
+ <!-- Database Connections Content -->
609
+ <div id="db-connections-content" class="hidden">
610
+ <div class="p-6">
611
+ <h1 class="text-2xl font-bold mb-6">Database Connection Settings</h1>
612
+
613
+ <div class="bg-white rounded-lg shadow mb-8">
614
+ <div class="p-4 border-b">
615
+ <h2 class="text-lg font-semibold">Current Connections</h2>
616
+ </div>
617
+ <div class="p-4">
618
+ <div class="overflow-x-auto">
619
+ <table class="min-w-full">
620
+ <thead class="bg-gray-50">
621
+ <tr>
622
+ <th class="py-3 px-4 text-left">Name</th>
623
+ <th class="py-3 px-4 text-left">Type</th>
624
+ <th class="py-3 px-4 text-left">Host</th>
625
+ <th class="py-3 px-4 text-left">Database</th>
626
+ <th class="py-3 px-4 text-left">Status</th>
627
+ <th class="py-3 px-4 text-left">Actions</th>
628
+ </tr>
629
+ </thead>
630
+ <tbody class="divide-y">
631
+ <tr>
632
+ <td class="py-3 px-4 font-medium">Primary DB</td>
633
+ <td class="py-3 px-4">PostgreSQL</td>
634
+ <td class="py-3 px-4">localhost:5432</td>
635
+ <td class="py-3 px-4">app_production</td>
636
+ <td class="py-3 px-4">
637
+ <span class="bg-green-100 text-green-800 py-1 px-2 rounded-full text-xs">Connected</span>
638
+ </td>
639
+ <td class="py-3 px-4 space-x-2">
640
+ <button class="p-1 text-blue-500 hover:text-blue-700">
641
+ <i class="fas fa-edit"></i>
642
+ </button>
643
+ <button class="p-1 text-red-500 hover:text-red-700">
644
+ <i class="fas fa-trash"></i>
645
+ </button>
646
+ <button class="p-1 text-gray-500 hover:text-gray-700">
647
+ <i class="fas fa-sync-alt"></i>
648
+ </button>
649
+ </td>
650
+ </tr>
651
+ </tbody>
652
+ </table>
653
+ </div>
654
+ </div>
655
+ </div>
656
+
657
+ <div class="bg-white rounded-lg shadow">
658
+ <div class="p-4 border-b">
659
+ <h2 class="text-lg font-semibold">Add New Connection</h2>
660
+ </div>
661
+ <div class="p-4">
662
+ <form class="space-y-4">
663
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
664
+ <div>
665
+ <label class="block text-sm font-medium text-gray-700 mb-1">Connection Name</label>
666
+ <input type="text" class="w-full p-2 border rounded focus:ring-2 focus:ring-primary">
667
+ </div>
668
+ <div>
669
+ <label class="block text-sm font-medium text-gray-700 mb-1">Database Type</label>
670
+ <select class="w-full p-2 border rounded focus:ring-2 focus:ring-primary">
671
+ <option>PostgreSQL</option>
672
+ <option>MySQL</option>
673
+ <option>SQL Server</option>
674
+ <option>Oracle</option>
675
+ <option>SQLite</option>
676
+ </select>
677
+ </div>
678
+ <div>
679
+ <label class="block text-sm font-medium text-gray-700 mb-1">Host</label>
680
+ <input type="text" placeholder="localhost" class="w-full p-2 border rounded focus:ring-2 focus:ring-primary">
681
+ </div>
682
+ <div>
683
+ <label class="block text-sm font-medium text-gray-700 mb-1">Port</label>
684
+ <input type="number" placeholder="5432" class="w-full p-2 border rounded focus:ring-2 focus:ring-primary">
685
+ </div>
686
+ <div>
687
+ <label class="block text-sm font-medium text-gray-700 mb-1">Database Name</label>
688
+ <input type="text" class="w-full p-2 border rounded focus:ring-2 focus:ring-primary">
689
+ </div>
690
+ <div>
691
+ <label class="block text-sm font-medium text-gray-700 mb-1">Username</label>
692
+ <input type="text" class="w-full p-2 border rounded focus:ring-2 focus:ring-primary">
693
+ </div>
694
+ <div>
695
+ <label class="block text-sm font-medium text-gray-700 mb-1">Password</label>
696
+ <input type="password" class="w-full p-2 border rounded focus:ring-2 focus:ring-primary">
697
+ </div>
698
+ <div class="md:col-span-2">
699
+ <label class="block text-sm font-medium text-gray-700 mb-1">Connection String</label>
700
+ <input type="text" placeholder="postgresql://user:pass@host:port/db" class="w-full p-2 border rounded focus:ring-2 focus:ring-primary">
701
+ </div>
702
+ </div>
703
+ <div class="flex items-center space-x-4 pt-4">
704
+ <button type="button" class="px-4 py-2 bg-primary text-white rounded-md hover:bg-secondary">
705
+ Test Connection
706
+ </button>
707
+ <button type="submit" class="px-4 py-2 bg-success text-white rounded-md hover:bg-green-700">
708
+ Save Connection
709
+ </button>
710
+ </div>
711
+ </form>
712
+ </div>
713
+ </div>
714
+ </div>
715
+ </div>
716
  </div>
717
  </div>
718
  </div>
 
938
  'Request Logs': 'logs-content',
939
  'API Keys': 'keys-content',
940
  'Users': 'users-content',
941
+ 'Database Connections': 'db-connections-content',
942
  'Settings': 'settings-content'
943
  };
944