Commit Graph

291 Commits

Author SHA1 Message Date
nguyentrungthat d219e0145b UI improvements and bug fixes for line and switch controls
Enhanced CardLine layout and added user CLI usage indicator. Updated info_line font size for better readability. Improved DrawerControl to show 'DISCONNECTED' status when switch is unavailable. Fixed ModalTerminal issue mapping to handle undefined values. Commented out overflowX style in App for layout flexibility.
2025-11-27 13:34:42 +07:00
Truong Vo 449f9d71ef remove thanh scroll và chuyển SN xuống PID 2025-11-27 11:35:25 +07:00
Truong Vo 9af8f19986 show hover nội dung scenario bên phải 2025-11-27 11:22:55 +07:00
Truong Vo 18ce0145cc fix giao diện line 2025-11-27 11:20:10 +07:00
andrew.ng ca32a1df0b Merge pull request 'Refactor BottomToolBar and update user types' (#15) from that into main
Reviewed-on: #15
2025-11-27 14:36:59 +11:00
nguyentrungthat 1b9b18ce3b Refactor BottomToolBar and update user types
Improved BottomToolBar command line UI with better line selection and clearing logic. Updated TUser type to include 'id' and 'email' fields, and fixed DragTabs to support both 'userId' and 'id' for user key mapping.
2025-11-27 10:35:37 +07:00
Truong Vo b5bb90ca4e Fix giao diện select scebario và modal add/edit 2025-11-27 10:26:20 +07:00
andrew.ng 3fedaa33de Merge pull request 'Refactor CLI close logic and comment out debug log' (#14) from that into main
Reviewed-on: #14
2025-11-27 14:21:51 +11:00
nguyentrungthat 1ee447d2c7 Refactor CLI close logic and comment out debug log
Commented out the debug log in LineConnection's write method for cleaner output. Updated App.tsx to close CLI only for lines in the currently active station tab, improving accuracy when switching tabs.
2025-11-27 10:21:13 +07:00
andrew.ng dc28f7f2e1 Merge pull request 'Improve APC and switch control validation and logging' (#13) from that into main
Reviewed-on: #13
2025-11-27 14:01:10 +11:00
nguyentrungthat 68411ef611 Improve APC and switch control validation and logging
Added console logs for command and scenario execution in line_connection.ts for better traceability. Changed socket_io_provider.ts to save state every 10 seconds instead of 60. Updated DrawerControl.tsx to disable controls and show status messages when APC or switch IPs are unavailable or not connected, improving UI feedback and preventing invalid actions.
2025-11-27 10:00:45 +07:00
andrew.ng 3415af6eb0 Merge pull request 'Refactor BottomToolBar UI and remove debug log' (#12) from that into main
Reviewed-on: #12
2025-11-27 12:53:31 +11:00
nguyentrungthat f2a78c76d2 Refactor BottomToolBar UI and remove debug log
Removed a console.log statement from line_connection.ts to clean up debug output. Refactored BottomToolBar.tsx for improved layout, spacing, and usability, including changes to selected line display, button arrangement, and input handling for better user experience.
2025-11-27 08:53:06 +07:00
Truong Vo 065900f48b Update nút mở drawer add/edit scenario 2025-11-26 16:49:20 +07:00
andrew.ng df25b5db3f Merge pull request 'Add AI log analysis and history tracking for lines' (#11) from that into main
Reviewed-on: #11
2025-11-26 20:31:26 +11:00
nguyentrungthat e0725cc00f Add AI log analysis and history tracking for lines
Introduces AI-based log analysis to summarize issues and status in network device logs, storing results in the latestScenario.detectAI field. Implements history tracking for line inventory changes using Redis, with backend and socket.io support for retrieving and displaying history. Updates frontend components to show AI analysis results and improve control button states.
2025-11-26 16:30:53 +07:00
Truong Vo 6f785644be Update modal select scenario 2025-11-26 14:59:55 +07:00
joseph le 55bcc055ea change gitignore 2025-11-26 08:41:19 +07:00
andrew.ng d1d77a3d9a Merge pull request 'Update App.tsx' (#10) from that into main
Reviewed-on: #10
2025-11-25 20:13:15 +11:00
nguyentrungthat 1a77075145 Update App.tsx 2025-11-25 16:12:25 +07:00
andrew.ng b255b4e940 Merge pull request 'Update BottomToolBar.tsx' (#9) from that into main
Reviewed-on: #9
2025-11-25 19:59:30 +11:00
nguyentrungthat 608b63f203 Update BottomToolBar.tsx 2025-11-25 15:59:08 +07:00
andrew.ng 10af102bc2 Merge pull request 'Update BottomToolBar.tsx' (#8) from that into main
Reviewed-on: #8
2025-11-25 19:44:20 +11:00
nguyentrungthat e6e430e7ff Update BottomToolBar.tsx 2025-11-25 15:44:08 +07:00
joseph le 8fc6fa1d30 update 2025-11-25 15:25:31 +07:00
andrew.ng 603b4eb690 Merge pull request 'Update BottomToolBar.tsx' (#7) from that into main
Reviewed-on: #7
2025-11-25 19:03:47 +11:00
nguyentrungthat 6ac08c2d8b Update BottomToolBar.tsx 2025-11-25 15:03:16 +07:00
andrew.ng cd9eeb08b1 Merge pull request 'Improve UI logic and port name handling in components' (#6) from that into main
Reviewed-on: #6
2025-11-25 18:44:06 +11:00
nguyentrungthat 3c54ae3a21 Improve UI logic and port name handling in components
Updated DrawerControl to refine 'Select All' button logic and label. Adjusted FormAddEdit layout proportions for station info and lines. Enhanced ModalTerminal with normalized port name comparison and display. Improved TerminalXTerm loading state management and terminal reset behavior.
2025-11-25 14:40:48 +07:00
andrew.ng 55954d0bda Merge pull request 'Refactor log handling and improve output buffering' (#5) from that into main
Reviewed-on: #5
2025-11-25 15:32:24 +11:00
nguyentrungthat 36d7438055 Refactor log handling and improve output buffering
Updated log file naming to include station name and IP, and refactored appendLog to use new format. Enhanced frontend output buffering for lines to reduce UI update frequency. Improved connection retry logic for switch connections and adjusted socket.io provider timeouts. Updated DrawerLogs format description and removed unnecessary state changes in TerminalXTerm.
2025-11-25 11:32:07 +07:00
andrew.ng 612f44cdee Merge pull request 'Improve switch port handling and UI layout' (#4) from that into main
Reviewed-on: #4
2025-11-25 11:47:43 +11:00
nguyentrungthat dc47636c96 Improve switch port handling and UI layout
Added extra commands in getPorts for better terminal output handling. Updated socket_io_provider to allow empty username/password and relaxed connection validation. Refined DrawerControl port normalization and adjusted port display layout for improved clarity and alignment.
2025-11-25 07:46:52 +07:00
andrew.ng 3123262c7f Merge pull request 'Add baud rate management for line connections' (#3) from that into main
Reviewed-on: #3
2025-11-24 20:42:49 +11:00
nguyentrungthat e8f5a9f67a Add baud rate management for line connections
Introduces baud rate configuration and detection for line connections in both backend and frontend. Backend now supports setting and checking baud rates via socket events, and frontend provides UI controls for users to select or input baud rates. Real-time updates are handled through new socket events, improving line management and visibility.
2025-11-24 16:42:20 +07:00
andrew.ng 9d1be9e260 Merge pull request 'Update UI for CardLine and ModalTerminal components' (#2) from that into main
Reviewed-on: #2
2025-11-24 18:35:33 +11:00
nguyentrungthat a71f8ee27d Update UI for CardLine and ModalTerminal components
Removed ticket description from CardLine display and clipboard copy. Added buttonControl styles and applied them to control buttons in ModalTerminal. Improved internet status indicator logic and adjusted grid layout for better UI consistency.
2025-11-24 14:35:10 +07:00
andrew.ng 55e2115fdf Merge pull request 'Enhance port filtering and UI in DrawerControl' (#1) from that into main
Reviewed-on: #1
2025-11-24 15:18:05 +11:00
nguyentrungthat 580c415b97 Enhance port filtering and UI in DrawerControl
Added 'Config interface' filter option and refactored port filtering logic in DrawerControl. Improved UI layout with fieldsets and adjusted heights in App and BottomToolBar for better visual consistency.
2025-11-24 11:17:32 +07:00
nguyentrungthat 89498d43d6 Update socket_io_provider.ts 2025-11-24 10:33:12 +07:00
nguyentrungthat 002709e8e3 Update CardLine.tsx 2025-11-24 10:27:50 +07:00
nguyentrungthat e5bb81ef27 Refactor BottomToolBar expand state handling
Moved the expand state management for BottomToolBar from internal state to props, allowing parent components to control its expanded state. Also commented out an unused conditional in DrawerControl.
2025-11-24 10:09:52 +07:00
nguyentrungthat de9e814305 Adjust connection and UI timeout durations
Reduced sleep delay in socket reconnection logic and increased disable timeout in ModalTerminal from 5s to 10s. These changes aim to improve responsiveness and user experience during connection and UI interactions.
2025-11-22 10:11:44 +07:00
nguyentrungthat f695062ec4 Enhance switch and APC controls, UI improvements
Refactored switch port restart logic to use turnPortOff/on methods. Improved socket communication for switch port status and clear line actions. Updated DrawerControl and ModalTerminal to streamline APC and switch controls, added filtering and persistent view options for switch ports, and improved UI consistency. Fixed ticket creation logic and enhanced terminal and toolbar layouts for better usability.
2025-11-20 14:39:38 +07:00
nguyentrungthat 1e058636b2 Sync line config updates and improve APC control
Added socket event handling to update line configuration in real time between frontend and backend. Improved APC outlet control in the terminal modal, including validation and user feedback. Refactored BottomToolBar and related components to share active tab state, and fixed command formatting. Minor bug fixes and UI improvements for terminal and scenario actions.
2025-11-19 16:50:12 +07:00
nguyentrungthat c36b9f69df Enhance ticket handling and UI interactions
Backend: Added lineId to ticket creation, improved ticket update logic, and switched ticket update route to POST. Added 'update_ticket' event to socket.io provider. Frontend: Integrated 'motion' for animated bottom toolbar, added expand/collapse functionality, improved ticket creation and update flows, and ensured terminal focus on CLI open. Adjusted delays in ButtonDPELP, improved ticket info copy, and enhanced input handling in ModalTerminal. Updated dependencies to include 'motion'.
2025-11-19 13:57:52 +07:00
nguyentrungthat d908cf204c Add ticket management to lines and improve UI
Backend changes add a tickets relationship to lines and preload tickets (ordered by updated_at) when fetching stations. The frontend now displays ticket information in CardLine, adds ticket history and management (create, update, close, issue) in ModalTerminal, and introduces new types for tickets. Various UI improvements include consistent button font weights, port name normalization, and enhanced log/tooltips. Obsolete takeover logic was removed from App and ModalTerminal.
2025-11-18 16:59:27 +07:00
nguyentrungthat cbc4a8c9b0 Add ticket management API and update baud rate handling
Introduces a new TicketsController and Ticket model to support ticket CRUD operations via new /api/ticket routes. Updates line_connection service to improve baud rate command sequence. Adjusts CardLine component to include stationId when emitting set_baud events. Minor improvements to socket_io_provider for safer disconnect handling.
2025-11-17 16:25:40 +07:00
nguyentrungthat c2d68c685c Enhance user tracking and UI adjustments across app
Backend now logs user information during command/script execution and adds retry logic for command sending. Frontend adjusts button/menu sizes, input widths, and scenario button font sizes for better UI consistency. ModalLog now highlights user log entries, and minor style tweaks are applied throughout.
2025-11-17 13:36:21 +07:00
nguyentrungthat abfae279da Refactor BottomToolBar and DrawerControl UI layout
Improved the BottomToolBar layout by wrapping it in a Grid and adjusting tab styles and heights for better alignment. Updated DrawerControl to refine port group rendering, including scrollable areas for large groups, reduced card widths, and minor style tweaks for consistency and usability.
2025-11-14 16:29:35 +07:00