diff --git a/gui/app/(dashboard)/databases/page.tsx b/gui/app/(dashboard)/databases/page.tsx new file mode 100644 index 0000000000..6d7c355fc6 --- /dev/null +++ b/gui/app/(dashboard)/databases/page.tsx @@ -0,0 +1,61 @@ +import { Card, CardHeader, CardTitle } from '@/components/ui/card'; +import AddIcon from '/public/add.svg'; + +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue +} from '@radix-ui/react-select'; +import { listDatabase } from '../actions'; +import { DatabaseCard } from '../database-card'; +import { DatabaseCreatingDialog } from '../database-creating-dialog'; + +interface IDatabaseSelectProps { + placeholder?: string; + options: Array<{ label: string; value: string }>; +} + +export function DatabaseSelect({ placeholder, options }: IDatabaseSelectProps) { + return ( + + ); +} + +export default async function HomePage({ + searchParams +}: { + searchParams: { q: string; offset: string }; +}) { + const ret = await listDatabase(); + const search = searchParams.q ?? ''; + const offset = searchParams.offset ?? 0; + + return ( +
buffer_manager_size: {configs['buffer_manager_size']}
+cleanup_interval: {configs['cleanup_interval']}
+client_port: {configs['client_port']}
+compact_interval: {configs['compact_interval']}
+connection_pool_size: {configs['connection_pool_size']}
+cpu_limit: {configs['cpu_limit']}
+data_dir: {configs['data_dir']}
++ {' '} + delta_checkpoint_interval: { + configs['delta_checkpoint_interval'] + }{' '} +
++ {' '} + delta_checkpoint_threshold: { + configs['delta_checkpoint_threshold'] + }{' '} +
++ {' '} + full_checkpoint_interval: {configs['full_checkpoint_interval']}{' '} +
+http_port: {configs['http_port']}
+log_dir: {configs['log_dir']}
+log_file_max_size: {configs['log_file_max_size']}
+log_file_rotate_count: {configs['log_file_rotate_count']}
+log_filename: {configs['log_filename']}
+log_level: {configs['log_level']}
+log_to_stdout: {configs['log_to_stdout']}
+mem_index_capacity: {configs['mem_index_capacity']}
+optimize_interval: {configs['optimize_interval']}
+peer_ip: {configs['peer_ip']}
+peer_port: {configs['peer_port']}
++ {' '} + peer_server_connection_pool_size:{' '} + {configs['peer_server_connection_pool_size']}{' '} +
+postgres_port: {configs['postgres_port']}
+record_running_query: {configs['record_running_query']}
+resource_dir: {configs['resource_dir']}
+server_address: {configs['server_address']}
+temp_dir: {configs['temp_dir']}
+time_zone: {configs['time_zone']}
+version: {configs['version']}
+wal_compact_threshold: {configs['wal_compact_threshold']}
+wal_dir: {configs['wal_dir']}
+wal_flush: {configs['wal_flush']}
+active_txn_count: {variables['active_txn_count:']}
+active_wal_filename: {variables['active_wal_filename']}
+bg_task_count: {variables['bg_task_count']}
+buffer_object_count: {variables['buffer_object_count']}
+buffer_usage: {variables['buffer_usage']}
+cpu_usage: {variables['cpu_usage']}
+current_timestamp: {variables['current_timestamp']}
+delta_log_count: {variables['delta_log_count']}
+jeprof: {variables['jeprof']}
+next_transaction_id: {variables['next_transaction_id']}
+open_file_count: {variables['open_file_count']}
++ {' '} + profile_record_capacity: {variables['profile_record_capacity']}{' '} +
+query_count: {variables['query_count']}
+running_bg_task: {variables['running_bg_task']}
+running_compact_task: {variables['running_compact_task']}
+schedule_policy: {variables['schedule_policy']}
+session_count: {variables['session_count']}
+system_memory_usage: {variables['system_memory_usage']}
+total_commit_count: {variables['total_commit_count']}
+total_rollback_count: {variables['total_rollback_count']}
+unused_buffer_object: {variables['unused_buffer_object']}
+