Skip to content
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

Feature branding aware configuration #2181

Merged
merged 29 commits into from
May 21, 2024

Conversation

andrewbrazzatti
Copy link
Contributor

@andrewbrazzatti andrewbrazzatti commented May 20, 2024

This PR introduces a branding-aware configuration feature, enhancing the application's flexibility in handling multiple branding contexts. Key changes include:

Configuration Service: Added new service to manage branded app configurations.
API Endpoints: Introduced REST API endpoints for managing app configurations.
UI Enhancements: Implemented Angular components for configuration management, including a new app configuration screen. The Angular application uses Formly to generate forms using JSON Schema.
Configuration Storage: Configuration is stored in the database defined by config model objects. These config model objects are used to generate JSON Schema using the json-schema package.
Accessing Configurations: You can access the branding-aware configuration using sails.config.brandingAware(branding).
Testing: Added unit tests for the new services and components.

The first branding aware configuration implemented as a proof of concept is to add support for self-service system messages by administrator users

andrewbrazzatti and others added 25 commits August 23, 2022 05:59
Added AppConfig model and service to handle retrieval and persistence.
Added bootstrap.js handler to initialise object and to bind convenience function to sails.config
Copy link

codecov bot commented May 20, 2024

Codecov Report

Attention: Patch coverage is 67.44186% with 70 lines in your changes are missing coverage. Please review.

Project coverage is 52.75%. Comparing base (a788eb0) to head (780ff38).

Current head 780ff38 differs from pull request most recent head 715dd87

Please upload reports for the commit 715dd87 to get more accurate results.

Files Patch % Lines
typescript/api/services/ConfigService.ts 22.58% 22 Missing and 2 partials ⚠️
...ript/api/controllers/webservice/AdminController.ts 0.00% 19 Missing ⚠️
typescript/api/controllers/AppConfigController.ts 63.15% 10 Missing and 4 partials ⚠️
.../api/controllers/webservice/AppConfigController.ts 70.37% 6 Missing and 2 partials ⚠️
typescript/api/services/AppConfigService.ts 95.06% 1 Missing and 3 partials ⚠️
typescript/api/configmodels/AppConfig.interface.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2181      +/-   ##
===========================================
+ Coverage    52.11%   52.75%   +0.64%     
===========================================
  Files          163      173      +10     
  Lines         8007     8264     +257     
  Branches      1147     1166      +19     
===========================================
+ Hits          4173     4360     +187     
- Misses        3403     3463      +60     
- Partials       431      441      +10     
Flag Coverage Δ
backend-mocha 48.81% <67.44%> (+0.57%) ⬆️
backend-newman 44.88% <63.25%> (+0.56%) ⬆️
frontend-app-config 97.87% <ø> (?)
frontend-core-lib 52.41% <ø> (ø)
frontend-dashboard 88.07% <ø> (ø)
frontend-export 100.00% <ø> (ø)
frontend-local-auth 100.00% <ø> (ø)
frontend-manage-roles 63.33% <ø> (ø)
frontend-manage-users 59.81% <ø> (ø)
frontend-report 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrewbrazzatti andrewbrazzatti changed the base branch from master to develop May 20, 2024 00:52
@andrewbrazzatti andrewbrazzatti merged commit c220904 into develop May 21, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant