feat: toggle CIRA tab from server features API#3350
Draft
madhavilosetty-intel wants to merge 1 commit into
Draft
feat: toggle CIRA tab from server features API#3350madhavilosetty-intel wants to merge 1 commit into
madhavilosetty-intel wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an enterprise-only capability check (via the Console API) to control whether the CIRA navbar tab is shown, while keeping cloud (MPS+RPS) behavior unchanged.
Changes:
- Introduces a
ServerFeaturesmodel and aServerFeaturesServiceto callGET /api/v1/server/features. - Updates the navbar component to fetch server features on init (enterprise only) and conditionally render the CIRA link.
- Adds unit tests for the new service and for navbar enterprise/cloud branching behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/models/models.ts | Adds ServerFeatures interface used by the new features endpoint. |
| src/app/server-features.service.ts | New service to fetch server feature flags. |
| src/app/server-features.service.spec.ts | Unit tests covering success/error behavior for the new service. |
| src/app/core/navbar/navbar.component.ts | Fetches server features on init in enterprise mode and stores CIRA enabled state in a signal. |
| src/app/core/navbar/navbar.component.html | Conditionally renders the CIRA nav link based on ciraEnabled(). |
| src/app/core/navbar/navbar.component.spec.ts | Adds tests for cloud vs enterprise initialization and CIRA enable/disable behavior. |
eb9f048 to
fa48049
Compare
In the enterprise build, fetch GET /api/v1/server/features from the Console API on navbar init and show the CIRA tab only when ciraEnabled is true (driven by the server's APP_DISABLE_CIRA setting). The cloud (MPS+RPS) build is unchanged and continues to show the tab. Adds ServerFeaturesService and the ServerFeatures model, with specs for the service and the navbar's cloud/enterprise branches. Resolves #3200
fa48049 to
372b6c3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the enterprise build, fetch GET /api/v1/server/features from the Console API on navbar init and show the CIRA tab only when ciraEnabled is true (driven by the server's APP_DISABLE_CIRA setting). The cloud (MPS+RPS) build is unchanged and continues to show the tab.
Adds ServerFeaturesService and the ServerFeatures model, with specs for the service and the navbar's cloud/enterprise branches.
Resolves #3200
PR Checklist
What are you changing?
Anything the reviewer should know when reviewing this PR?
If the there are associated PRs in other repositories, please link them here (i.e. device-management-toolkit/repo#365 )