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

Servicebinding #335

Merged
merged 2 commits into from
Nov 29, 2024
Merged

Servicebinding #335

merged 2 commits into from
Nov 29, 2024

Conversation

tulsiojha
Copy link
Contributor

@tulsiojha tulsiojha commented Nov 29, 2024

  • added servicehost

Summary by Sourcery

Add a 'Service Host' field to the service binding resource view and enhance the 'SettingValues' component to dynamically generate file paths based on Helm chart names.

New Features:

  • Introduce a new 'Service Host' field in the service binding resource view, allowing users to view and copy the service host URL.

Enhancements:

  • Update the path handling logic in the 'SettingValues' component to dynamically generate file paths based on the parsed name of the Helm chart.

Copy link

sourcery-ai bot commented Nov 29, 2024

Reviewer's Guide by Sourcery

This PR implements service host functionality for service bindings. The changes include adding a new 'Service Host' column to display and copy service URLs, updating GraphQL queries to include the serviceHost field, and modifying helm chart file naming.

Sequence diagram for copying Service Host URL

sequenceDiagram
    actor User
    participant ListView
    participant ServiceView
    participant CopyContentToClipboard
    User->>ListView: View service list
    ListView->>ServiceView: Render serviceHost
    ServiceView->>CopyContentToClipboard: Copy service URL
    CopyContentToClipboard-->>User: Show toast message
Loading

ER diagram for Service Binding with Service Host

erDiagram
    SERVICE_BINDING {
        String serviceHost
    }
    SERVICE_BINDING ||--o{ SERVICE : "has"
    note for SERVICE_BINDING "Added serviceHost field"
Loading

Class diagram for Service Binding with Service Host

classDiagram
    class IServiceBinding {
        +String serviceHost
    }
    class ListView {
        +ListView(items: BaseType[], onAction: function)
    }
    class ServiceView {
        +ServiceView(service: String)
    }
    class CopyContentToClipboard {
        +CopyContentToClipboard(content: String, toastMessage: String)
    }
    ListView --> IServiceBinding : uses
    ListView --> ServiceView : uses
    ServiceView --> CopyContentToClipboard : uses
    note for IServiceBinding "Added serviceHost attribute"
Loading

File-Level Changes

Change Details Files
Added service host display functionality in the services resource view
  • Added a new 'Service Host' column to the service bindings list
  • Implemented a copy-to-clipboard feature for service URLs
  • Added serviceHost field to the item parser
  • Added debug logging for service binding items
src/apps/console/routes/_main+/$account+/env+/$environment+/services/services-resource-v2.tsx
Updated GraphQL queries to include serviceHost field
  • Added serviceHost field to service binding queries
  • Updated GraphQL schema definitions
gql-queries-generator/doc/queries.graphql
src/apps/console/server/gql/queries/service-binding-queries.ts
src/generated/gql/sdl.graphql
src/generated/gql/server.ts
Modified helm chart file naming convention
  • Updated file paths to include helm chart name in values and defaults files
  • Modified file path generation logic for both values and defaults files
src/apps/console/routes/_main+/$account+/env+/$environment+/workloads+/helm-chart+/$helmchart+/settings+/values/route.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @tulsiojha - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Please remove the console.log statement in the parseItem function before merging.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@tulsiojha tulsiojha merged commit 56d3e74 into release-v1.1.1 Nov 29, 2024
5 checks passed
@tulsiojha tulsiojha deleted the servicebinding branch November 29, 2024 10:34
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.

1 participant