-
Notifications
You must be signed in to change notification settings - Fork 65
Feat: Features update #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Features update #14
Conversation
…d detailed results
…with hashed passwords from backup
- Updated SlaveNode interface to include sync configuration and metrics. - Implemented database migration for slave nodes and sync logs. - Created API endpoints for registering, updating, deleting, and syncing slave nodes. - Added middleware for validating slave API keys. - Developed service layer for handling slave node operations. - Implemented query options for fetching slave nodes and their statuses. - Enhanced mock data for slave nodes to include new fields.
- Introduced SystemConfig interface in types for managing node configurations. - Created migration for system_configs table with necessary fields and enum for node modes. - Implemented system configuration controller with endpoints to get, update, connect, disconnect, and test connection to master node. - Added routes for system configuration management. - Developed service methods for API interactions related to system configuration. - Implemented query options for fetching system configuration with automatic refetching.
…nd ACLs for clarity; remove unused URL validation utility
…rvice checks, dependency updates, and health checks
… before generating Prisma client and running migrations; streamline logging
…rectly and enhance logging for Prisma client generation, migrations, and seeding
…te script; streamline backend and frontend build processes
…from Prisma schema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive master-slave node synchronization functionality to the Nginx Love UI system, allowing distributed configuration management across multiple nginx nodes.
Key changes:
- Implements dual-mode operation (Master/Slave) for distributed configuration management
- Adds real-time node synchronization with hash-based change detection
- Creates comprehensive node management interfaces with health monitoring
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/update.sh | Complete deployment script with service management and health checks |
| apps/web/src/types/index.ts | Extended SlaveNode interface with new sync/metrics fields and added SystemConfig type |
| apps/web/src/services/system-config.service.ts | Service layer for system configuration and master-slave connection management |
| apps/web/src/services/slave.service.ts | Service layer for slave node operations and sync management |
| apps/web/src/queries/*.ts | React Query configuration for data fetching with appropriate cache intervals |
| apps/web/src/mocks/data.ts | Updated mock data to support new SlaveNode interface |
| apps/web/src/components/pages/SlaveNodes.tsx | Complete rewrite to dual-mode tabbed interface for master/slave operations |
| apps/api/src/utils/slave-status-checker.ts | Background service for monitoring slave node health status |
| apps/api/src/routes/*.ts | New API routes for slave management, system config, and node synchronization |
| apps/api/src/middleware/slaveAuth.ts | Authentication middleware for slave node API access |
| apps/api/src/controllers/*.ts | Controllers for slave operations, system config, and sync functionality |
| apps/api/prisma/schema.prisma | Database schema additions for slave nodes, system config, and sync logging |
| apps/api/prisma/migrations/*.sql | Database migrations for new tables and enums |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| # Seed database | ||
| log "Seeding database..." | ||
| cd "${BACKEND_DIR}" | ||
| pnpm ts-node prisma/seed.ts >> "$LOG_FILE" 2>&1 || warn "Failed to seed database (this is normal if data already exists)" |
Copilot
AI
Oct 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an extra space between 'pnpm' and 'ts-node' which should be removed for consistency.
| pnpm ts-node prisma/seed.ts >> "$LOG_FILE" 2>&1 || warn "Failed to seed database (this is normal if data already exists)" | |
| pnpm ts-node prisma/seed.ts >> "$LOG_FILE" 2>&1 || warn "Failed to seed database (this is normal if data already exists)" |
|
Please retry analysis of this Pull-Request directly on SonarQube Cloud |
* Feat: Update Features Backup & Restore (#12) * feat: Update Features Backup & Restore * Feat: Slave Mode (#13) * feat: Update Features Backup & Restore * Feat: Features update (#14) * feat: Update software * Features update version and update noti Change Password (#15) * feat: Update Features Backup & Restore * Fix frontend error (#16) * Refactor services to use centralized API module and token storage * Feat: Enhance Slave Mode UI with mode switch button and update node mode mutation * feat: Improve SSLDialog layout with enhanced text wrapping for certificate fields * refactor: replace js-cookie with localStorage for token management (#17) * feat: add syncInterval and lastSyncHash columns to system_configs table (#18) * feat: Update project goal description and remove security recommendation * feat: Update project goal description and remove security recommendation * About readme (#21) * feat: Update project goal description and remove security recommendation * Refactor be (#22) * Refactor code structure for improved readability and maintainability * style: limit max height of certificate, private key, and chain input fields (#23) --------- Co-authored-by: SangND <dacsang97@gmail.com>
No description provided.