kloudlite / web

Kloudlite Web
http://kloudlite.io
GNU Affero General Public License v3.0
2 stars 1 forks source link

Update changes in image discovery and infra cluster listing #321

Closed nxtCoder19 closed 1 month ago

nxtCoder19 commented 1 month ago

Summary by Sourcery

Update the image discovery interface with a tabbed view for script and cURL commands, and add a new GraphQL query for listing global VPN devices. Clean up the codebase by removing unused code and improve the CodeView component to conditionally show the copy icon.

New Features:

Enhancements:

Chores:

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request updates image discovery functionality, adds VPN device listing, modifies cluster resource management, and makes various UI and code improvements across multiple components.

ER diagram for VPN Devices Query

erDiagram
    infra_listGlobalVPNDevices {
        String gvpn
        CursorPaginationIn pagination
    }
    infra_listGlobalVPNDevices ||--o{ edges : contains
    edges {
        String cursor
        node node
    }
    node {
        String accountName
        createdBy createdBy
        String creationMethod
        String creationTime
        String displayName
        String globalVPNName
        String id
        String ipAddr
        lastUpdatedBy lastUpdatedBy
        Boolean markedForDeletion
        metadata metadata
        String privateKey
        String publicEndpoint
        String publicKey
        String recordVersion
        String updateTime
        wireguardConfig wireguardConfig
    }
    createdBy {
        String userEmail
        String userId
        String userName
    }
    lastUpdatedBy {
        String userEmail
        String userId
        String userName
    }
    metadata {
        String annotations
        String creationTimestamp
        String deletionTimestamp
        String generation
        String labels
        String name
        String namespace
    }
    wireguardConfig {
        String value
        String encoding
    }
    infra_listGlobalVPNDevices ||--o{ pageInfo : contains
    pageInfo {
        String endCursor
        Boolean hasNextPage
        Boolean hasPrevPage
        String startCursor
    }

Class diagram for RegistryImageInstruction component

classDiagram
    class RegistryImageInstruction {
        +show: boolean
        +onClose: function
        +data: object
        +error: string
        +active: 'url' | 'script-url' | NonNullableString
        +setActive: function
    }
    class ExtendedFilledTab {
        +value: string
        +onChange: function
        +items: array
    }
    RegistryImageInstruction --> ExtendedFilledTab : uses
    RegistryImageInstruction --> CodeView : uses
    RegistryImageInstruction --> Popup : uses
    RegistryImageInstruction --> LoadingPlaceHolder : uses

File-Level Changes

Change Details Files
Improved image discovery UI and functionality
  • Added tabs for 'Script' and 'cURL Command' options
  • Updated UI layout and styling
  • Implemented dynamic rendering of multiple URLs
  • Changed popup header text
  • Removed commented-out code
src/apps/console/routes/_main+/$account+/settings+/images/handle-image-discovery.tsx
Added VPN device listing functionality
  • Implemented new GraphQL query for listing VPN devices
  • Added corresponding CLI query for VPN devices
  • Updated GraphQL schema to include VPN device listing
src/apps/auth/server/gql/cli-queries.ts
gql-queries-generator/doc/queries.graphql
Refactored cluster resource management
  • Modified ExtraButton component to always include delete option
  • Removed conditional logic for BYOK resources
  • Simplified options array construction
src/apps/console/routes/_main+/$account+/infra+/clusters/cluster-resources-v2.tsx
Updated CodeView component
  • Made copy button conditional based on 'copy' prop
  • Reordered import statements
src/apps/console/components/code-view.tsx
Cleaned up user management code
  • Removed commented-out code for team members and owners
  • Simplified component structure
src/apps/console/routes/_main+/$account+/settings+/user-management/route.tsx
Updated Docker image naming convention
  • Modified IMAGE variable to include 'kloudlite' in the path
Taskfile.yaml

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](https://app.sourcery.ai) 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 - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).