- Implemented a new logs page with filters for level, source, and date range. - Added a data table to display logs with pagination and sorting capabilities. - Created backend functionality to fetch logs data based on filters. - Introduced a new Logs class for handling log data operations. - Added a new database migration for the logs table. - Enhanced UI with custom checkbox styles for better user experience. - Updated navigation to include a link to the logs page.
15 lines
559 B
SQL
15 lines
559 B
SQL
CREATE TABLE IF NOT EXISTS `logs` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`level` varchar(20) NOT NULL DEFAULT 'info',
|
|
`source` varchar(120) NOT NULL DEFAULT '',
|
|
`client_id` int(11) DEFAULT NULL,
|
|
`message` text NOT NULL,
|
|
`context_json` longtext DEFAULT NULL,
|
|
`date_add` datetime NOT NULL DEFAULT current_timestamp(),
|
|
PRIMARY KEY (`id`),
|
|
KEY `idx_logs_level` (`level`),
|
|
KEY `idx_logs_source` (`source`),
|
|
KEY `idx_logs_client` (`client_id`),
|
|
KEY `idx_logs_date` (`date_add`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
|