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

feat(cloudwatch): add TableWidget #29078

Merged
merged 3 commits into from Feb 13, 2024
Merged

feat(cloudwatch): add TableWidget #29078

merged 3 commits into from Feb 13, 2024

Conversation

humanzz
Copy link
Contributor

@humanzz humanzz commented Feb 12, 2024

Issue # (if applicable)

closes #28975.

Reason for this change

add support for table widget https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/add_remove_table_dashboard.html

Description of changes

add a new TableWidget and its supporting property classes/interfaces

Description of how you validated changes

added both unit/integ tests

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added admired-contributor [Pilot] contributed between 13-24 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 labels Feb 12, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team February 12, 2024 12:07
@humanzz
Copy link
Contributor Author

humanzz commented Feb 12, 2024

I've asked the cloudwatch team to provide updates to https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/CloudWatch-Dashboard-Body-Structure.html to reflect the new table widget support.

I went ahead with this implementation based on

And right after sending this PR, I got access to an internal draft doc update. PR Reviewer, plz let me know if you'd like access to that doc.

@humanzz humanzz changed the title feat(cloudwatch): add TableWidget feat(cloudwatch): add TableWidget Feb 12, 2024
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 12, 2024
Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

Hi @humanzz, this all looks pretty reasonable and you've got a nice looking README + unit tests. Just a few minor things and then I'm ready to ship

export interface TableSummaryProps {
/**
* Summary columns
* @see TableSummary
Copy link
Contributor

Choose a reason for hiding this comment

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

@see expects a link

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed it

* Thresholds for highlighting cells in TableWidget
*/
export class TableThreshold {

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

Comment on lines 755 to 759
private readonly props: TableWidgetProps;

private readonly metrics: IMetric[];

constructor(props: TableWidgetProps) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
private readonly props: TableWidgetProps;
private readonly metrics: IMetric[];
constructor(props: TableWidgetProps) {
private readonly metrics: IMetric[];
constructor(private readonly props: TableWidgetProps) {

Copy link
Contributor

Choose a reason for hiding this comment

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

Did you fully deploy this integ test and confirm in the console that the dashboard looks as expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've only generated the snapshots, but haven't really looked in console.
let me do that as part of addressing the other comments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here are a couple of screenshots for the dashboard/metrics deployed

Screenshot 2024-02-13 at 19 19 10 Screenshot 2024-02-13 at 19 19 40 Screenshot 2024-02-13 at 19 20 15

Copy link
Contributor

Choose a reason for hiding this comment

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

I assume that is what you expected!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes... given that it's not a real existing metric

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 13, 2024
@mergify mergify bot dismissed kaizencc’s stale review February 13, 2024 19:19

Pull request has been modified.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 13, 2024
Copy link
Contributor

@kaizencc kaizencc left a comment

Choose a reason for hiding this comment

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

Nice! Thanks @humanzz. The API looks good to me, happy to send this one off

Copy link
Contributor

mergify bot commented Feb 13, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 13, 2024
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 200532b
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 4599aa3 into aws:main Feb 13, 2024
12 checks passed
Copy link
Contributor

mergify bot commented Feb 13, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

GavinZZ pushed a commit that referenced this pull request Feb 22, 2024
### Issue # (if applicable)

closes #28975.

### Reason for this change

add support for table widget https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/add_remove_table_dashboard.html

### Description of changes

add a new `TableWidget` and its supporting property classes/interfaces

### Description of how you validated changes

added both unit/integ tests

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admired-contributor [Pilot] contributed between 13-24 PRs to the CDK effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cloudwatch: support the new data table widget
3 participants