Commit Graph
45 Commits
Author SHA1 Message Date
baodev0andClaude Sonnet 5.5 62596d9063 feat(vm): hoàn tiền khi cấp VM lỗi, theo dõi job queue, uuid dịch vụ cho ticket, chuẩn hoá RAM addon
- VmProvisionException/VmProvisionRefund xử lý lỗi cấp phát VM
- QueueJobInspector + QueueMonitorController xem chi tiết job
- Thêm service uuid cho ticket, thời lượng cho activity_logs
- Migration chuẩn hoá RAM addon sang MB, trạng thái deleting cho snapshot

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 11:54:05 +07:00
baodev0andClaude Sonnet 5.5 6315a392c0 feat(service): custom product, lịch sử giám sát VM và mã hoá response theo phiên
- Dịch vụ custom: bảng custom_products + services.custom_product_id; createService nhận
  custom{} thay product_id, giá = đơn giá tháng x số tháng chu kỳ (1/3/6/12/24/36),
  gia hạn tính theo cùng đơn giá, ServiceClientDetailResource trả custom_product và specs.
- Giám sát VM: GET v1/system/vm-metrics/history gom lịch sử về tối đa 240 điểm;
  lỗi lấy dung lượng đĩa không còn làm hỏng cả thẻ metrics.
- SealResponse: AES-256-GCM theo khoá phiên do proxy Next cấp qua header x-seal-key
  (HMAC của session id). Client opt-in bằng x-seal; chi tiết dịch vụ, mật khẩu VM và
  console ticket luôn được mã hoá. Body gửi lên dạng {enc} được giải mã trước validate;
  khoá lệch trả 428 để client lấy khoá mới. Đây là che mắt DevTools, không phải bảo mật
  chống chính chủ tài khoản.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 13:58:50 +07:00
baodev0andClaude Sonnet 5.5 3c7710f1de fix(client-service): hide service/vm ids, mask vm password, encrypt module_vmware.password
- detail response drops id and vm.id/vmware_id, password returns *****
- GET client-service/{uuid}/vm-password returns the decrypted password to the owner
- renew accepts service uuid
- EncryptedOrLegacy cast for module_vmware.password
- vps specs: addon ram is stored in MB, convert to GB

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 15:52:56 +07:00
baodev0andClaude Sonnet 5.5 25f23d541e feat(billing): renewals, coupons, VAT numbering, billing cycles and invoice payment tracking
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 16:37:56 +07:00
baodev0 ea9a53f742 feat(admin): improve payments and server settings 2026-10-19 07:59:23 +07:00
baodev0andClaude Sonnet 5.5 9ed77a85fd feat: VM metrics via portal-monitor integration
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 13:04:35 +07:00
baodev0andClaude Opus 5.5 c5115b52dd feat: nạp tiền thủ công mã 30 phút, gia hạn trừ số dư, đồng bộ domain từ Plesk
- Nạp tiền: mã thanh toán sống 30 phút (ManualDepositDraft), khôi phục/huỷ mã, lệnh dọn mã hết hạn; total_pending chỉ tính giao dịch đã nộp chứng từ, admin duyệt/từ chối/xoá giao dịch
- Gia hạn dịch vụ: phát hành invoice gia hạn trên order gốc và trừ số dư ngay
- Đồng bộ domain từ Plesk theo server, ServiceOrderRecorder tạo order/invoice cho dịch vụ admin dựng
- Danh sách dịch vụ trả field theo loại (service_plan, dns_records_count), đếm dịch vụ theo loại

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 23:07:51 +07:00
baodev0andClaude Opus 5.5 94614d9cb3 feat: khởi tạo/huỷ domain Plesk qua job, gửi mail hoá đơn qua queue, đính kèm triển khai
- ProvisionDnsDomainJob/SuspendDnsDomainJob: tạo domain admin lên Plesk, huỷ = suspend (is_created=3)
- Khách xem zone DNS được gán ở /dich-vu/domain, quản lý bản ghi A/AAAA/CNAME/TXT/MX/SRV
- send-mail hoá đơn đẩy SendInvoiceMailJob, preview + sửa nội dung, ghi mail.order_id
- invoice_attachments.type (payment_proof/deployment)
- CacheService xoá theo SCAN pattern, Redis không persistent mặc định
- Backfill transactions.public_code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 09:56:18 +07:00
baodev0 8651dde6b1 update 2026-10-08 11:25:28 +07:00
baodev0 82080b5b84 update fix deadcode, security 2026-09-28 08:26:29 +07:00
baodev0 3af59bd9c5 update rm deadcode 2026-09-27 11:42:40 +07:00
baodev0 82a71244ca update 2026-09-23 15:17:18 +07:00
baodev0 2365ef72e9 update email template 2026-09-09 16:56:22 +07:00
baodev0 c377c7e195 feat: add domain registration form and email notifications
- Create a new Blade view for domain registration (`registrant-tochuc.blade.php`) to capture organization and manager details.
- Implement email templates for new domain orders for both admin (`domain-order-new.blade.php`) and customers (`domain-order-received.blade.php`).
- Add CSV exports for client and domain data.
- Introduce tests for customer mass assignment, password reset, login throttling, and permission gating.
- Ensure service renewals use current pricing and validate ownership for virtual machines.
- Validate mass assignment behavior in service model.
2026-08-22 17:30:55 +07:00
baodev0 2deb4ad74e feat: Enhance service management and transaction handling
- Implemented client access token verification middleware to secure API endpoints.
- Updated ServiceController to fetch active hosting services for authenticated users.
- Refactored OrderController to ensure order retrieval is customer-specific.
- Improved error logging in VmController for unexpected vCenter responses.
- Disabled VNPay auto-deposit in TransactionController, switching to manual deposit flow.
- Enhanced ServiceClientDetailResource to include Plesk credentials for hosting accounts.
- Adjusted VpsServiceResource to dynamically set page type based on product type.
- Added logging for PowerShellService to capture errors in RDP port changes.
- Provisioning job now resolves service plans and logs relevant information for hosting accounts.
- Updated database migrations to add necessary fields for service plans and DNS servers.
- Refactored Service and ServicePlan models to establish relationships with hosting accounts and DNS servers.
2026-08-17 11:55:48 +07:00
baodev0 7314313198 Refactor order payment process and enhance invoice details
- Updated `payOrder` method in `OrderControllerRefactor` to accept `orderNum` instead of `id` for better clarity and functionality.
- Implemented `findByOrderNum` method in `OrderRepository` to retrieve orders based on order number and customer ID.
- Enhanced `InvoiceDetailResource` to include VMware details and removed unnecessary fields.
- Added `service_plan_id` to `ProductResource` and updated the `Product` model to establish a relationship with `ServicePlan`.
- Created `ServicePlan` and `ServicePlanPlesk` models along with their respective controllers and migrations for managing hosting service plans.
- Updated API routes to include endpoints for managing service plans.
- Modified email templates to standardize support phone number across various customer communications.
2026-08-11 10:12:25 +07:00
baodev0 3ed33ea7e4 Refactor VM creation and configuration process
- Updated VpsServiceResource to return product UUID instead of ID.
- Modified VirtualMachineService to utilize product data for CPU, RAM, and disk settings.
- Replaced AssignIpToGuestJob with UpdateVmConfigJob in CreateVirtualMachineJob to streamline VM configuration after cloning.
- Adjusted AssignIpToGuestJob to remove unnecessary UpdateVmConfigJob dispatch and focus on IP assignment.
- Enhanced UpdateVmConfigJob to handle CPU/RAM configuration and power cycling more effectively.
- Introduced ChangeIpVMJob for handling customer-initiated IP changes asynchronously.
- Updated InvoiceRepository to set invoice due date based on maximum months instead of a fixed 7 days.
- Improved web design quote PDF layout for better readability.
- Added Times-Roman font metrics for PDF generation.
2026-07-24 09:29:43 +07:00
baodev0 d9da3b5bb3 Add SnapshotActionMail class and email template for snapshot actions; implement email notifications for create, remove, and revert actions 2026-07-17 10:17:52 +07:00
baodev0 401dcc8783 update vm ticket 2026-07-14 17:03:38 +07:00
baodev0 f035730a44 Add username and password fields to VirtualMachines model and database migration; update related email templates to use config for frontend URL 2026-07-14 11:10:38 +07:00
baodev0 61c0e026c8 update 2026-07-09 11:19:50 +07:00
baodev0 3243473843 update logic 2026-06-15 09:11:57 +07:00
baodev0 9c68273b4a Add VM rebuild pipeline with isolated job chain and admin log API 2026-05-29 18:19:38 +07:00
baodev0 6bb4a47bfb Add stubs for various Laravel components and scaffolding
- Created stubs for JavaScript and SASS assets.
- Added stubs for channel, command, component, controller, event, factory, job, listener, mail, middleware, migration, model, notification, observer, policy, request, resource, route provider, seeder, and validation rule.
- Implemented scaffolding for configuration, service provider, and Vite integration.
- Included example views for module structure.
- Introduced a module loader for Vite to handle asset paths dynamically.
2026-05-29 09:28:08 +07:00
baodev0 520f21cb11 feat: add GeneratesUniqueSlug class for unique slug generation
feat: create PostCategoryFactory for generating post category data

feat: create PostFactory for generating post data

feat: add retry_requested_at column to services table

feat: add vcenter provisioning fields to products table

feat: add module_host_id to os table

feat: create email_notification_templates table for email templates

feat: add scenario and format fields to template table

feat: add admin fields to transactions table

fix: update ticket table columns and types

feat: add uuid to ticket table and backfill existing records

fix: make ticket_reply user_id nullable

feat: create notifications table for user notifications

fix: make ticket uuid nullable

feat: create post_categories table for blog categories

feat: create posts table for blog posts

feat: add invoice email template for PDF generation
2026-05-25 15:39:42 +07:00
pbao9 551c90d60b feat: implement system-wide activity logging with database persistence, repository patterns, and admin controller access. 2026-05-16 20:01:52 +07:00
pbao9 8a115c5175 refactor: implement centralized cache key management and add utility traits for vCenter SSH operations. 2026-05-16 16:52:21 +07:00
pbao9 96778e7bed feat: implement VM snapshot management, enhance client resource loading, and refactor deployment workflow for production 2026-05-11 11:09:55 +07:00
pbao9 5043bea79a feat: Add IP address and DNS fields to module_vmware table
- Introduced `ip` and `dns` columns to the `module_vmware` table to store assigned IP addresses and DNS configurations.
- Implemented `ChangePasswordViaSshJob` for secure password changes via SSH.
- Created `ChangePasswordJob` for handling password changes during VM provisioning.
- Developed `ChangePasswordViaVsphereJob` to reset VM guest OS passwords using PowerShell scripts executed on the vSphere host.
- Added `SendVmCredentialsEmailJob` to send final VM credentials to customers.
- Implemented `WaitVmReadyJob` to poll vSphere API until VMware Tools are running and guest IP is available.
- Created `VmProvisionService` for managing VM provisioning tasks, including password generation and updates.
- Developed `VsphereHostSshService` for executing PowerShell scripts on the vSphere host via SSH.
- Added `IpPoolSeeder` to populate IP pools for VM service initialization.
2026-04-16 23:21:27 +07:00
pbao9 bb73d6c5a2 Refactor vCenter snapshot handling and VM operations
- Introduced a new method `resolveVCenterFromProduct` in `SnapshotService` to streamline vCenter resolution from product data.
- Updated `CreateSnapshot`, `RemoveSnapshot`, and `RevertSnapshot` jobs to utilize the new vCenter resolution method.
- Enhanced the `VmController` to support UUID-based service identification for VM operations.
- Added new actions for changing VM IP and RDP port, encapsulating the logic for these operations.
- Improved error handling and logging for VM operations, including detailed responses for API consumers.
- Removed unnecessary relationships in model queries to optimize performance.
2026-04-15 23:38:38 +07:00
pbao9 64a9d603e2 Add service renewal functionality and command for expired services 2026-04-15 20:52:11 +07:00
pbao9 e0341363f6 feat: Implement client-facing service management API with UUID for services and bulk actions for product services. 2026-03-13 15:17:23 +07:00
pbao9 5160ac967a feat: Implement client payment history endpoint and add type filtering to product category API. 2026-03-13 10:38:56 +07:00
pbao9 1934be9a19 feat: standardize invoice number field, refine invoice creation logic, and update module foreign key constraints 2026-03-12 10:10:20 +07:00
pbao9 1e09ccf17b feat: Reimplement order and invoice management with new service and repository layers, introduce compression middleware, and update database schema. 2026-03-12 09:30:29 +07:00
pbao9 7b3c955d38 refactor: Remove extensive unused administrative UI, styling, and JavaScript assets, and introduce a new payment API controller. 2026-03-09 14:16:39 +07:00
pbao9 0c260a7e1c feat: Implement VM restart, auto-renew invoice functionality, and client invoice detail API, alongside admin UI improvements. 2026-03-02 10:26:01 +07:00
pbao9 1cfcaee871 feat: implement VMware vCenter integration, enhance product pricing display, and update order processing logic. 2026-03-01 23:10:35 +07:00
pbao9 75791d6257 feat: introduce ProductCategoryResource and refactor database migrations by deleting old tables and consolidating transaction schema. 2026-02-18 21:44:31 +07:00
pbao9 4510cdc8eb feat: Implement API endpoints for retrieving product categories and their associated products. 2026-02-15 18:42:41 +07:00
pbao9 ef53ea3207 feat: Integrate L5-Swagger for API documentation and enhance VM synchronization to include host-level details. 2026-02-15 12:31:06 +07:00
pbao9 f3a679d7f3 feat: Implement comprehensive product management, including categories, pricing, and integration into the order system. 2026-02-12 14:29:29 +07:00
pbao9 556b2c02e6 feat: Implement order and invoice management, enhance addon features, and remove the 'Type' module. 2026-02-11 17:02:07 +07:00
pbao9 8ecea7badc feat: Implement pagination for active services and introduce ServiceListResource for formatted API output. 2026-02-11 11:32:45 +07:00
pbao9 6b6385f441 update 2026-02-11 11:18:35 +07:00