Skip to content

Add insights enablement check and hide InsightsCard when disabled#25

Merged
Theosakamg merged 3 commits into
masterfrom
pr/check-insights-enabled
Nov 27, 2025
Merged

Add insights enablement check and hide InsightsCard when disabled#25
Theosakamg merged 3 commits into
masterfrom
pr/check-insights-enabled

Conversation

@ralt

@ralt ralt commented Nov 13, 2025

Copy link
Copy Markdown
Contributor
  • Add checkInsightsEnabled() API method to check if insights are enabled for a service
  • Check insights status on component mount before fetching data
  • Hide entire InsightsCard component when insights are not enabled
  • Update refresh and time range handlers to respect insights status
  • Uses Fastly API endpoint: /enabled-products/v1/log_explorer_insights/services/{service_id}

🤖 Generated with Claude Code

- Add checkInsightsEnabled() API method to check if insights are enabled for a service
- Check insights status on component mount before fetching data
- Hide entire InsightsCard component when insights are not enabled
- Update refresh and time range handlers to respect insights status
- Uses Fastly API endpoint: /enabled-products/v1/log_explorer_insights/services/{service_id}

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@Theosakamg Theosakamg requested a review from Copilot November 17, 2025 09:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 insights enablement checks to prevent fetching insights data and displaying the InsightsCard component when insights are not enabled for a service.

Key Changes

  • Added checkInsightsEnabled() method to ProjectAPIService to verify insights availability via Fastly API
  • Implemented insights status checking on component mount before data fetching
  • Conditionally rendered InsightsCard component based on insights enablement status

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/components/project/project.service.ts Added API method to check if insights are enabled for a service
src/components/project/InsightsCard.vue Added insights enablement check and conditional rendering of the card component

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/project/InsightsCard.vue Outdated
Comment thread src/components/project/project.service.ts Outdated
@Theosakamg Theosakamg merged commit 21b059b into master Nov 27, 2025
2 checks passed
@Theosakamg Theosakamg deleted the pr/check-insights-enabled branch November 27, 2025 12:49
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.

3 participants