Skip to content

New Squaredup Dashboard Image Resource#129

Merged
shaswot77 merged 4 commits into
mainfrom
work/ss/image-uploads
May 19, 2025
Merged

New Squaredup Dashboard Image Resource#129
shaswot77 merged 4 commits into
mainfrom
work/ss/image-uploads

Conversation

@shaswot77
Copy link
Copy Markdown
Contributor

Description

  • Support for dashboard images

Checklist:

  • Added a label: bug-fix, feature, or enhancement
  • PR description written

@shaswot77 shaswot77 added the feature New Feature label Apr 29, 2025
@shaswot77 shaswot77 requested a review from Copilot April 29, 2025 20:57
Copy link
Copy Markdown

Copilot AI left a comment

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 introduces support for dashboard images by implementing a new resource that manages image uploads for dashboard tiles. Key changes include the addition of resource CRUD operations and its acceptance tests, updates to the provider registration and models, as well as corresponding documentation.

Reviewed Changes

Copilot reviewed 6 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/provider/resource_dashboard_image_test.go Added acceptance tests for the dashboard image resource.
internal/provider/resource_dashboard_image.go Implements the CRUD and state management for the dashboard image resource.
internal/provider/provider.go Registers the new dashboard image resource with the provider.
internal/provider/models.go Introduces models for handling dashboard image data.
internal/provider/client_dashboard_image.go Adds client functions for interacting with dashboard image endpoints.
docs/resources/dashboard_image.md Provides documentation and example usage of the new resource.
Files not reviewed (3)
  • cspell.json: Language not supported
  • examples/resources/squaredup_dashboard_image/import.sh: Language not supported
  • examples/resources/squaredup_dashboard_image/resource.tf: Language not supported
Comments suppressed due to low confidence (1)

internal/provider/resource_dashboard_image.go:34

  • The field 'WorkspacId' appears to be misspelled; consider renaming it to 'WorkspaceId' for consistency with the resource schema attribute.
WorkspacId         types.String `tfsdk:"workspace_id"`

@shaswot77 shaswot77 requested a review from Copilot April 29, 2025 21:02
Copy link
Copy Markdown

Copilot AI left a comment

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 support for dashboard image resources by implementing the dashboard image CRUD operations, updating the provider mapping, and adding acceptance tests and documentation.

  • Added acceptance tests for dashboard image operations.
  • Implemented core CRUD methods and client functions for dashboard image API.
  • Updated provider registration and resource documentation.

Reviewed Changes

Copilot reviewed 6 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/provider/resource_dashboard_image_test.go Acceptance tests for dashboard image resource including create, import, and update scenarios.
internal/provider/resource_dashboard_image.go CRUD implementation of the dashboard image resource using the SquaredUp client.
internal/provider/provider.go Registered the dashboard image resource with the provider.
internal/provider/models.go Added model definitions for DashboardImage and DashboardImageMetadata.
internal/provider/client_dashboard_image.go Implemented client methods for uploading, retrieving, and deleting dashboard images.
docs/resources/dashboard_image.md Added resource documentation and example usage for dashboard image resource.
Files not reviewed (3)
  • cspell.json: Language not supported
  • examples/resources/squaredup_dashboard_image/import.sh: Language not supported
  • examples/resources/squaredup_dashboard_image/resource.tf: Language not supported
Comments suppressed due to low confidence (1)

internal/provider/resource_dashboard_image_test.go:13

  • [nitpick] The local variable 'uuid' shadows the imported package name 'uuid'. Consider renaming it (e.g., to uniqueID) to avoid potential confusion in the test file.
uuid := uuid.NewRandom().String()

Comment thread docs/resources/dashboard_image.md Outdated
Comment thread docs/resources/dashboard_image.md Outdated
Comment thread docs/resources/dashboard_image.md Outdated
Comment thread internal/provider/resource_dashboard_image.go Outdated
Comment thread internal/provider/resource_dashboard_image.go Outdated
Co-Authored-By: Dave Clarke <3793131+clarkd@users.noreply.github.com>
@shaswot77 shaswot77 requested a review from clarkd May 7, 2025 15:44
@shaswot77 shaswot77 merged commit b4ebf77 into main May 19, 2025
8 checks passed
@shaswot77 shaswot77 deleted the work/ss/image-uploads branch May 19, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New Feature

Development

Successfully merging this pull request may close these issues.

3 participants