Skip to content

Conversation

@MWG-Logan
Copy link
Member

No description provided.

MWG-Logan and others added 13 commits July 12, 2025 13:04
- Deleted unused CSS file _Layout.cshtml.css to clean up styles.
- Removed _ValidationScriptsPartial.cshtml as validation scripts are no longer needed.
- Eliminated _ViewImports.cshtml and _ViewStart.cshtml to streamline view imports and layout settings.
- Added launch.json for Visual Studio Code to facilitate debugging and launching of the application.
- Created launchSettings.json to define profiles for running the Signal9 platform.
- Introduced Web Functions API documentation for CRUD operations on tenants and devices.
- Added DTOs for web functions to handle requests and responses for tenants and agents.
- Implemented App.razor for Blazor routing and layout management.
- Developed Dashboard.razor for displaying key metrics and recent devices.
- Created _Layout.cshtml for the main layout of the web application.
- Added _Host.cshtml for hosting the Blazor application.
- Implemented _Imports.razor for shared imports across pages.
- Developed MainLayout.razor for consistent layout structure.
- Created NavMenu.razor for navigation within the application.
- Added layout.css for custom styles related to the layout.
- Created startup scripts (start-platform.bat and start-platform.ps1) for easy service management.
… update appsettings and launch settings

feat: Implement Tenant Management Page with CRUD functionality

- Added Tenants.razor page for managing tenants, including search and filter options.
- Integrated modal for creating and editing tenant details.
- Implemented loading state and error handling for tenant data retrieval.
- Created SignalRService for real-time updates and notifications.
- Updated staticwebapp.config.json for API routing and security settings.
- Added appsettings.Development.json for local API configuration.
- Enhanced index.html with necessary styles and scripts for the application.

fix: BLAZOR CONVERTED TO WASM AND WORKING IN SWA

feat: Update tenant representation and search functionality

- Changed tenant display from Code to Slug in Tenants.razor
- Updated filtering logic to use Slug instead of Code
- Adjusted tenant form model to map Slug to Code
- Modified create tenant request to use Slug instead of Code

feat: Introduce new DTOs for core entities

- Added AgentCommandDto to represent commands sent to agents
- Created AgentDto for managed endpoints in the Signal9 RMM system
- Implemented TagDto for organizational labels
- Developed TelemetryDataDto for performance metrics from agents
- Introduced TenantDto for organizational units in the system
- Centralized exports in index.ts for easy access to core DTOs

test: Add sample tenant data for testing

- Created test-tenant.json with sample tenant information

Refactor DTOs and Services for Agent Management

- Removed required Guid Id properties from various DTOs in Monitoring, Network, Remote Management, Security, and System namespaces.
- Simplified AlertRuleResponse, NotificationResponse, and other related DTOs by removing CreatedAt and LastModified properties.
- Updated IAgentService interface to return object types instead of specific DTOs for agent-related methods.
- Introduced new AgentHeartbeatRequest, AgentQueryRequest, AgentRegistrationRequest, and AgentUpdateRequest DTOs for better agent management.
- Added TelemetryDataDto to represent performance and system metrics from agents.
- Updated AgentFunctions to reflect changes in DTOs and service methods.
- Introduced GlobalUsings for cleaner code organization.

refactor: Remove TelemetryDataDto and update global usings

feat: Implement unified hierarchy DTO architecture and fix Swagger "Key: id" error
- Refactored DTOs to inherit from BaseDto<Guid> for improved type safety.
- Simplified code in AgentHub.cs for generating agent configurations.
- Added configuration files for Azure Static Web Apps CLI and service dependencies.
- Updated package references, including Microsoft.AspNetCore.App and Microsoft.NETCore.App to version 9.0.7.
- Enhanced visual representation in CodeMap.dgml with new assembly aliases and paths.
- Restructured solution file to include new project sections.
- Introduced new extension methods in AgentExtensions.cs for better DTO mapping.
This commit refactors the logging mechanism across multiple classes to use constructor-injected `ILogger` instances, enhancing consistency and testability. The `_logger` fields in `AgentCommunicationFunctions.cs`, `AgentHubService.cs`, `RelationalDataService.cs`, `TableStorageService.cs`, and `SignalRService.cs` have been removed in favor of constructor parameters.

Additionally, several DTOs and records have been updated to initialize collections with empty arrays instead of using `new()`, reflecting modern C# practices. The namespaces for various DTOs have also been changed to `Signal9.Shared.DTOs.Core`, indicating a restructuring for better organization. Overall, these changes improve code readability and maintainability.
Updated session-state progress to reflect task completion.
Modified .gitignore for local development.
Replaced TenantId with ParentId in multiple files to align with the new architecture.
Enhanced JSON serialization in Program.cs and added Azure storage packages in the project file.
Updated DTOs and service interfaces for better data handling.
Improved CRUD operations in TenantFunctions and added new functions in DashboardFunctions.
Reflected changes in Razor components and added necessary namespaces.
Created DtoExtensions for mapping between request and response DTOs.
- Updated AppHost.cs to include Azure Functions project references.
- Refactored AgentCommunicationFunctions.cs to use dependency injection for logging.
- Modified serviceDependencies.json and serviceDependencies.local.json to add new dependencies for secrets and SQL connections.
- Updated Signal9.Agent.Functions.csproj with new package references and version updates.
- Changed several DTOs to use arrays instead of dictionaries for improved consistency.
- Refactored SignalRService.cs to utilize constructor injection for better testability.
- Added OpenAPI attributes in AnalyticsFunctions.cs for improved API documentation.
- General code cleanup to enhance maintainability and design.
- Introduced new features and planned enhancements for analytics and reporting.
- Updated project structure with new files and configurations, including AgentExtensions.cs for mapping operations.
Refactored logging to use a consistent pattern, replaced legacy list initialization with modern syntax, and improved string interpolation. Updated entity relationships to use `ParentId` instead of `TenantId` for better hierarchy modeling. Enhanced DTOs and interfaces to use `Guid` for IDs, ensuring type safety.

Simplified `AgentService` and introduced `AgentConfigurationResponse` with validation attributes. Improved tenant management, telemetry handling, and OpenAPI documentation. Updated database schema, adjusted indexes, and optimized query filters.

Enhanced error handling, validation, and logging for better traceability. Removed legacy code, adopted modern C# features, and improved code readability. Updated Razor components and project files to align with modern standards. Improved testability and consistency across the codebase.
Transitioned AgentId and ParentId from string to Guid across the codebase for improved type safety and consistency. Updated DTOs, interfaces, services, and database entities to reflect this change. Refactored telemetry collection methods to use synchronous versions for memory and disk metrics. Adjusted logging, method signatures, and null handling for compatibility. Replaced TenantId references with ParentId for better alignment with the new structure.
@MWG-Logan MWG-Logan marked this pull request as ready for review November 28, 2025 22:32
@MWG-Logan MWG-Logan requested a review from Copilot November 28, 2025 22:47
Copy link

Copilot AI left a 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 implements a comprehensive first pass at CRUD (Create, Read, Update, Delete) operations for the Signal9 RMM platform, establishing core infrastructure for tenant and agent management with a Blazor WebAssembly frontend, Azure Functions backend, and Entity Framework Core data layer.

Key Changes:

  • Migrated from .NET 9 to .NET 10 across all projects with updated package references
  • Restructured solution from src/ folder hierarchy to flat root-level project structure
  • Implemented full CRUD operations for tenants and agents with pagination, filtering, and sorting
  • Added Blazor WebAssembly web portal with modern UI components and SignalR real-time communication
  • Established data access layer with Entity Framework Core, Azure Table Storage, and in-memory fallbacks

Reviewed changes

Copilot reviewed 113 out of 232 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/DTO-Architecture.md Comprehensive documentation of DTO system architecture, validation patterns, and usage guidelines
docs/API-Integration.md API integration documentation covering endpoints, configuration, and development workflow
azure.yaml Updated Azure deployment configuration with flat project paths and Static Web App hosting
Signal9.sln/Signal9.slnx Restructured solution files removing nested folder structure and adding AppHost/ServiceDefaults projects
Signal9.Web/* Complete Blazor WebAssembly application with pages, services, layouts, and styling
Signal9.Web.Functions/* Azure Functions implementing tenant/agent/system/analytics CRUD operations
Signal9.Shared/* Shared library with models, services, DTOs, and data access implementations
Comments suppressed due to low confidence (1)

Signal9.Web.Functions/DashboardFunctions.cs:1

  • Duplicate using statement for Microsoft.Extensions.Logging. Remove one of these duplicate imports.
using Microsoft.Azure.Functions.Worker;

Comment on lines +673 to +674
if (!string.IsNullOrEmpty(request.ContactEmail))
errors.Add("Invalid email format");
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This validation always adds an error if ContactEmail is not empty, regardless of whether the email format is valid. The logic should validate the email format and only add an error if the format is invalid, not if the field has a value.

Copilot uses AI. Check for mistakes.
Comment on lines +692 to +693
if (!string.IsNullOrEmpty(request.ContactEmail))
errors.Add("Invalid email format");
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This validation always adds an error if ContactEmail is not empty, regardless of whether the email format is valid. The logic should validate the email format and only add an error if the format is invalid, not if the field has a value.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants