diff --git a/.github/agents/code-quality.agent.md b/.github/agents/code-quality.agent.md index 0c93293..02aa9f3 100644 --- a/.github/agents/code-quality.agent.md +++ b/.github/agents/code-quality.agent.md @@ -1,7 +1,7 @@ --- description: "This Custom agent acts as a quality assurance specialist, focusing on code quality, best practices, and maintainability." name: "Code Quality Specialist" -tools: ["search/codebase", "edit/editFiles", "web/githubRepo", "vscode/extensions", "execute/getTerminalOutput", "web"] +tools: ['vscode/extensions', 'execute/testFailure', 'execute/getTerminalOutput', 'execute/getTaskOutput', 'execute/runInTerminal', 'execute/runTests', 'read', 'edit/createFile', 'edit/editFiles', 'search', 'web'] model: "Claude Sonnet 4.5" --- diff --git a/.github/agents/mysql-mariadb.agent.md b/.github/agents/mysql-mariadb.agent.md index 4ab939b..ee4a602 100644 --- a/.github/agents/mysql-mariadb.agent.md +++ b/.github/agents/mysql-mariadb.agent.md @@ -1,7 +1,7 @@ --- description: "This custom agent assits with enhancements, troubleshooting, and management of MySQL and MariaDB databases." name: "MySQL/ MariaDB Database Administrator" -tools: ["search/codebase", "edit/editFiles", "web/githubRepo", "vscode/extensions", "execute/getTerminalOutput", "web"] +tools: ['vscode/extensions', 'execute/testFailure', 'execute/getTerminalOutput', 'execute/getTaskOutput', 'execute/runInTerminal', 'execute/runTests', 'read', 'edit/createFile', 'edit/editFiles', 'search', 'web'] model: "Claude Sonnet 4.5" --- diff --git a/.github/agents/php-devloper.agent.md b/.github/agents/php-devloper.agent.md index 1992350..4153ea3 100644 --- a/.github/agents/php-devloper.agent.md +++ b/.github/agents/php-devloper.agent.md @@ -1,7 +1,7 @@ --- description: "This custom agent acts as a PHP developer, assisting with PHP code development, debugging, and optimization." name: "PHP Developer" -tools: ["search/codebase", "edit/editFiles", "web/githubRepo", "vscode/extensions", "execute/getTerminalOutput", "web"] +tools: ['vscode/extensions', 'execute/testFailure', 'execute/getTerminalOutput', 'execute/getTaskOutput', 'execute/runInTerminal', 'execute/runTests', 'read', 'edit/createFile', 'edit/editFiles', 'search', 'web'] model: "Claude Sonnet 4.5" --- diff --git a/CHANGELOG.md b/CHANGELOG.md index a167219..6e4c403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * issue: If the audit log does not exist or is not set, set it and create it * issue: Audit assumes that all selected_items are numeric resulting in fatal error * feature: Support for Cacti 1.3 +* Refactor: Migrats JS functions to functions.js --- 1.2 --- diff --git a/audit.php b/audit.php index a433376..0b3f895 100644 --- a/audit.php +++ b/audit.php @@ -338,54 +338,6 @@ function audit_log() { '> - - + 0) { + width = 400; + } else { + width = 700; + } + $('body').append('
'); + $('#audit').dialog({ + minWidth: width, + position: { + my: 'left', + at: 'right', + of: $('span[id="event'+id+'"]') + } + }); + }); +} + +/** + * Close audit dialog + */ +function audit_close_dialog() { + if ($('#audit').length) { + if (typeof $('#audit').dialog() === 'function') { + $('#audit').dialog('close'); + } + $('#audit').remove(); + } +} + +/** + * Initialize audit event handlers on document ready + */ +$(function() { + // Filter change event handlers + $('#event_page, #user_id, #rows').change(function() { + audit_applyFilter(); + }); + + $('#refresh').click(function() { + audit_applyFilter(); + }); + + $('#clear').click(function() { + audit_clearFilter(); + }); + + $('#purge').click(function() { + strURL = 'audit.php?action=purge&header=false'; + loadPageNoHeader(strURL); + }); + + $('#export').click(function() { + document.location = 'audit.php?action=export' + + '&filter='+$('#filter').val()+ + '&event_page='+$('#event_page').val()+ + '&user_id='+$('#user_id').val(); + }); + + $('#form_audit').submit(function(event) { + event.preventDefault(); + audit_applyFilter(); + }); + + // Hover event handlers for audit event details + $('span[id^="event"]').hover(function() { + audit_close_dialog(); + + id = $(this).attr('id').replace('event', ''); + + if (auditTimer != null) { + clearTimeout(auditTimer); + } + + auditTimer = setTimeout(function() { audit_open_dialog(id); }, 400); + }, + function() { + if (auditTimer != null) { + clearTimeout(auditTimer); + } + + $('#dialog').hover(function() { + clearTimeout(auditTimer); + }, function() { + auditTimer = setTimeout(function() { audit_close_dialog(); }, 400); + }); + }); +});