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

initalize visualization grafana plugin #1244

Merged
merged 7 commits into from
Jan 22, 2024
Merged

Conversation

cjrkoa
Copy link
Contributor

@cjrkoa cjrkoa commented Jan 21, 2024

No description provided.

Grafana strongly recommends creating a new repo and when I try to run it just launches OTT
@cjrkoa cjrkoa requested a review from dyc3 as a code owner January 21, 2024 18:30
Copy link
Contributor

coderabbitai bot commented Jan 21, 2024

Walkthrough

The project has undergone significant changes, introducing a suite of updates primarily focused on setting up and configuring development tools for a Grafana plugin called ott-visualizationprototype-panel. These changes include the introduction of new configurations for ESLint, Prettier, Jest, TypeScript, and Webpack, as well as Docker customization for development. Additionally, a new panel plugin has been scaffolded with initial components, options types, and a basic React component for visualization. The documentation has been enriched with READMEs, a CHANGELOG, and license information, enhancing the project's structure and clarity.

Changes

File Path Change Summary
.cprc.json, .config/.cprc.json, .config/webpack/constants.ts Introduced a configuration file with version "3.1.1" in both directories. Added constants for webpack configuration.
.config/.eslintrc, .eslintrc, .config/.prettierrc.js, .prettierrc.js, .config/types/custom.d.ts, .config/webpack/utils.ts Extended scaffolding configurations for ESLint, Prettier, and TypeScript. Introduced file type declarations and utility functions.
.config/Dockerfile, .config/README.md, .config/tsconfig.json, .config/jest-setup.js, .config/jest.config.js, .config/webpack/webpack.config.ts Added basic configurations for ESLint, Prettier, Jest, TypeScript, and Webpack. Customized Dockerfile for Grafana instance development. Provided instructions for extending tool configurations and customizing the Grafana docker image. Set up testing environment, mocks, utilities, and webpack configuration for the plugin's build process.
.gitignore, .config/.gitignore, .nvmrc, .config/.nvmrc Updated to exclude unnecessary files from Git tracking in both directories. Set Node version to "20" in both directories.
CHANGELOG.md, LICENSE, README.md (multiple locations) Added changelog, license information, and detailed READMEs for setup and development guidance.
cypress/integration/01-smoke.spec.ts, packages/ott-vis/cypress/integration/01-smoke.spec.ts Introduced a Cypress smoke test for the panel in both directories.
provisioning/README.md Included a link to a Grafana provisioning tutorial.
src/README.md, packages/ott-vis/src/README.md, packages/ott-vis/src/components/SimplePanel.tsx, packages/ott-vis/src/module.ts, packages/ott-vis/src/types.ts Created a template README, added a React functional component for basic visualization, and introduced a new panel plugin with customizable options and types.

🐇 "With code so neat and structure so grand,
🎨 A Grafana plugin takes a bold stand.
🛠️ Tools aligned in a developer's dance,
📊 Visualizing data with every glance."

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 34beeaf and 9ae73ca.
Files ignored due to path filters (8)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/cypress.json is excluded by: !**/*.json
  • balancer-visualization-prototype/ott-visualizationprototype-panel/docker-compose.yaml is excluded by: !**/*.yaml
  • balancer-visualization-prototype/ott-visualizationprototype-panel/package.json is excluded by: !**/*.json
  • balancer-visualization-prototype/ott-visualizationprototype-panel/provisioning/dashboards/dashboard.json is excluded by: !**/*.json
  • balancer-visualization-prototype/ott-visualizationprototype-panel/provisioning/dashboards/default.yaml is excluded by: !**/*.yaml
  • balancer-visualization-prototype/ott-visualizationprototype-panel/src/img/logo.svg is excluded by: !**/*.svg
  • balancer-visualization-prototype/ott-visualizationprototype-panel/src/plugin.json is excluded by: !**/*.json
  • balancer-visualization-prototype/ott-visualizationprototype-panel/tsconfig.json is excluded by: !**/*.json
Files selected for processing (30)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/.cprc.json (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/.eslintrc (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/.prettierrc.js (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/Dockerfile (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/README.md (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/jest-setup.js (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/jest.config.js (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/jest/mocks/react-inlinesvg.tsx (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/jest/utils.js (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/tsconfig.json (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/types/custom.d.ts (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/webpack/constants.ts (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/webpack/utils.ts (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/webpack/webpack.config.ts (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.cprc.json (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.eslintrc (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.gitignore (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.nvmrc (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.prettierrc.js (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/CHANGELOG.md (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/LICENSE (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/README.md (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/cypress/integration/01-smoke.spec.ts (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/jest-setup.js (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/jest.config.js (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/provisioning/README.md (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/src/README.md (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/src/components/SimplePanel.tsx (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/src/module.ts (1 hunks)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/src/types.ts (1 hunks)
Files skipped from review due to trivial changes (16)
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/.cprc.json
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/.eslintrc
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/.prettierrc.js
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/README.md
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/jest-setup.js
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/jest/utils.js
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/tsconfig.json
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/types/custom.d.ts
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.config/webpack/constants.ts
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.cprc.json
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.gitignore
  • balancer-visualization-prototype/ott-visualizationprototype-panel/.prettierrc.js
  • balancer-visualization-prototype/ott-visualizationprototype-panel/LICENSE
  • balancer-visualization-prototype/ott-visualizationprototype-panel/jest-setup.js
  • balancer-visualization-prototype/ott-visualizationprototype-panel/jest.config.js
  • balancer-visualization-prototype/ott-visualizationprototype-panel/provisioning/README.md
Additional comments: 14
balancer-visualization-prototype/ott-visualizationprototype-panel/.nvmrc (1)
  • 1-1: The .nvmrc file specifies the Node version as 20. Ensure this version is compatible with all dependencies and the runtime environment where the Grafana plugin will be deployed.
balancer-visualization-prototype/ott-visualizationprototype-panel/.eslintrc (1)
  • 1-3: The .eslintrc file correctly extends the configuration from the .config/.eslintrc file. This is a standard practice for maintaining consistency in ESLint rules across projects.
balancer-visualization-prototype/ott-visualizationprototype-panel/CHANGELOG.md (1)
  • 1-5: The CHANGELOG.md file has been initialized with an entry for version 1.0.0 marked as unreleased. Before the final release, ensure that the version number and release date are updated accordingly.
balancer-visualization-prototype/ott-visualizationprototype-panel/src/types.ts (1)
  • 1-7: The types.ts file defines SimpleOptions interface with appropriate types for the plugin options. This is a good practice for type safety and maintainability.
balancer-visualization-prototype/ott-visualizationprototype-panel/cypress/integration/01-smoke.spec.ts (1)
  • 1-10: The Cypress smoke test is well-structured and follows best practices for E2E testing. It ensures that the Grafana home page is visible, which is a good initial smoke test.
balancer-visualization-prototype/ott-visualizationprototype-panel/.config/Dockerfile (1)
  • 1-16: The Dockerfile sets up a Grafana instance for development with appropriate environment variables for ease of access. However, ensure that these settings are not used in a production environment as they can pose security risks.
balancer-visualization-prototype/ott-visualizationprototype-panel/.config/jest/mocks/react-inlinesvg.tsx (1)
  • 1-25: The mock for react-inlinesvg is well-implemented to prevent errors during testing when fetching SVGs. This is a good practice to ensure clean test logs and reliable test results.
balancer-visualization-prototype/ott-visualizationprototype-panel/src/module.ts (1)
  • 1-40: The module.ts file correctly sets up the panel plugin with customizable options. The use of .setPanelOptions to define the plugin's configuration panel is in line with Grafana plugin development standards.
balancer-visualization-prototype/ott-visualizationprototype-panel/.config/jest.config.js (1)
  • 1-43: The jest.config.js file is scaffolded correctly and should not be edited directly as indicated by the comments. It is set up to handle various file types and transformations, which is necessary for a robust testing setup.
balancer-visualization-prototype/ott-visualizationprototype-panel/src/components/SimplePanel.tsx (1)
  • 1-61: The SimplePanel.tsx file defines a React functional component with proper use of Grafana UI hooks and CSS-in-JS styling. The component is structured to display the visualization panel with options and data series count.
balancer-visualization-prototype/ott-visualizationprototype-panel/.config/webpack/utils.ts (1)
  • 1-58: The utils.ts file in the webpack configuration directory contains utility functions to check for WSL, retrieve package.json and plugin.json, and determine if a README exists. These utilities are used to configure the webpack build process dynamically.
balancer-visualization-prototype/ott-visualizationprototype-panel/src/README.md (1)
  • 1-49: The src/README.md file provides a template for plugin documentation. Ensure that all comments are removed and the content is updated with actual plugin information before publishing.
balancer-visualization-prototype/ott-visualizationprototype-panel/README.md (1)
  • 1-114: The README.md file provides comprehensive instructions for setting up, developing, and distributing the Grafana panel plugin. Ensure that the instructions are kept up-to-date with the actual development and release process.
balancer-visualization-prototype/ott-visualizationprototype-panel/.config/webpack/webpack.config.ts (1)
  • 1-218: The webpack.config.ts file is scaffolded correctly and includes detailed configuration for the build process. It handles various file types, sets up plugins for development convenience, and configures the output for the Grafana plugin environment.

Copy link

codecov bot commented Jan 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (34beeaf) 61.5425% compared to head (d2ea3a8) 61.5425%.
Report is 1 commits behind head on master.

❗ Current head d2ea3a8 differs from pull request most recent head 24d617b. Consider uploading reports for the commit 24d617b to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             master      #1244   +/-   ##
===========================================
  Coverage   61.5425%   61.5425%           
===========================================
  Files           117        117           
  Lines          9413       9413           
  Branches       1155       1155           
===========================================
  Hits           5793       5793           
  Misses         3620       3620           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dyc3
Copy link
Owner

dyc3 commented Jan 21, 2024

when I try to run it just launches OTT

That's because this is a monorepo. The commands will work if you cd into the directory with the package.json. It needs to be added to the workspace packages. Read https://classic.yarnpkg.com/lang/en/docs/workspaces/

Copy link
Owner

@dyc3 dyc3 left a comment

Choose a reason for hiding this comment

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

Please move the package to packages/, like I asked in the previous PR. Other than that, this is fine.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 9ae73ca and 1b27f9e.
Files ignored due to path filters (8)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/cypress.json is excluded by: !**/*.json
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/docker-compose.yaml is excluded by: !**/*.yaml
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/package.json is excluded by: !**/*.json
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/provisioning/dashboards/dashboard.json is excluded by: !**/*.json
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/provisioning/dashboards/default.yaml is excluded by: !**/*.yaml
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/src/img/logo.svg is excluded by: !**/*.svg
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/src/plugin.json is excluded by: !**/*.json
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/tsconfig.json is excluded by: !**/*.json
Files selected for processing (29)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/.cprc.json (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/.eslintrc (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/.prettierrc.js (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/Dockerfile (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/README.md (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/jest-setup.js (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/jest.config.js (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/jest/mocks/react-inlinesvg.tsx (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/jest/utils.js (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/tsconfig.json (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/types/custom.d.ts (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/webpack/constants.ts (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/webpack/utils.ts (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/webpack/webpack.config.ts (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.cprc.json (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.eslintrc (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.gitignore (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.nvmrc (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.prettierrc.js (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/CHANGELOG.md (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/README.md (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/cypress/integration/01-smoke.spec.ts (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/jest-setup.js (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/jest.config.js (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/provisioning/README.md (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/src/README.md (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/src/components/SimplePanel.tsx (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/src/module.ts (1 hunks)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/src/types.ts (1 hunks)
Files skipped from review due to trivial changes (16)
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/.cprc.json
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/.eslintrc
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/.prettierrc.js
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/README.md
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/jest-setup.js
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/jest.config.js
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/jest/utils.js
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/tsconfig.json
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/types/custom.d.ts
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/webpack/constants.ts
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.cprc.json
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.gitignore
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.nvmrc
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/.prettierrc.js
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/jest.config.js
  • crates/ott-balancer-visualization/ott-visualizationprototype-panel/provisioning/README.md
Additional comments: 13
crates/ott-balancer-visualization/ott-visualizationprototype-panel/.eslintrc (1)
  • 1-3: The ESLint configuration correctly extends from a centralized configuration file. This is a good practice for maintaining consistency across multiple projects or parts of a larger project.
crates/ott-balancer-visualization/ott-visualizationprototype-panel/CHANGELOG.md (1)
  • 1-5: The initial entry in the CHANGELOG.md is marked as "Unreleased". Ensure that this status is updated to reflect the actual release status when the version is released.
crates/ott-balancer-visualization/ott-visualizationprototype-panel/jest-setup.js (1)
  • 1-2: The Jest setup file correctly imports its configuration from a centralized location, which is a good practice for maintainability and consistency.
crates/ott-balancer-visualization/ott-visualizationprototype-panel/src/types.ts (1)
  • 1-7: The SimpleOptions interface and SeriesSize type are well-defined and correctly exported. This will help ensure strong typing within the plugin's codebase.
crates/ott-balancer-visualization/ott-visualizationprototype-panel/cypress/integration/01-smoke.spec.ts (1)
  • 1-10: The smoke test is concise and checks for the visibility of a welcome message on Grafana's home page. This is a good starting point for end-to-end testing.
crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/Dockerfile (1)
  • 1-16: The Dockerfile is configured for development purposes with settings that should not be used in production. This is clearly documented, which is good practice. However, ensure that these settings are not inadvertently deployed to a production environment.
crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/jest/mocks/react-inlinesvg.tsx (1)
  • 1-25: The mock for react-inlinesvg is well-implemented to prevent errors during testing when the grafana/ui Icon component makes fetch requests. This should help maintain a clean console output during test runs.
crates/ott-balancer-visualization/ott-visualizationprototype-panel/src/module.ts (1)
  • 1-40: The panel plugin is initialized with a set of options that are well-defined and provide clear descriptions and default values. This is a good practice for usability and maintainability.
crates/ott-balancer-visualization/ott-visualizationprototype-panel/src/components/SimplePanel.tsx (1)
  • 1-61: The SimplePanel component is well-structured and makes good use of the useStyles2 and useTheme2 hooks from @grafana/ui for theming and styling. The component also correctly handles the options and data props to display the visualization and text options.
crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/webpack/utils.ts (1)
  • 1-58: The utility functions provided in utils.ts are well-implemented and serve a clear purpose, such as detecting the WSL environment, fetching package.json and plugin.json contents, and checking for the existence of a README file. These utilities will be useful in the Webpack configuration.
crates/ott-balancer-visualization/ott-visualizationprototype-panel/src/README.md (1)
  • 1-49: The README file within the src directory provides a comprehensive template for plugin documentation. Ensure that all comments are removed and the content is finalized before publishing to Grafana.com.
crates/ott-balancer-visualization/ott-visualizationprototype-panel/README.md (1)
  • 1-114: The README file provides clear instructions for setting up the development environment, building the plugin, running tests, and distributing the plugin. Ensure that all steps are verified and work as intended in the development setup.
crates/ott-balancer-visualization/ott-visualizationprototype-panel/.config/webpack/webpack.config.ts (1)
  • 1-218: The Webpack configuration is comprehensive and includes best practices such as caching, environment-specific settings, and external dependencies. It also correctly handles assets and uses plugins to manage file copying and replacements. Ensure that the configuration is tested and works as expected in both development and production builds.

Copy link
Owner

@dyc3 dyc3 left a comment

Choose a reason for hiding this comment

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

I have no idea why you moved it to crates, that's for rust crates, which this is not. Please move it to packages/ and fix the folder structure so that the name of the package's folder matches the name of the package, and so that the package is not double nested. The full path to the package.json should be packages/ott-vis/package.json.

Also, you still need to add the package to the workspace in the root package.json.

@cjrkoa
Copy link
Contributor Author

cjrkoa commented Jan 22, 2024

I have no idea why you moved it to crates, that's for rust crates, which this is not. Please move it to packages/ and fix the folder structure so that the name of the package's folder matches the name of the package, and so that the package is not double nested. The full path to the package.json should be packages/ott-vis/package.json.

Also, you still need to add the package to the workspace in the root package.json.

I didn't see a packages folder and figured you meant crates. My bad

@cjrkoa cjrkoa requested a review from dyc3 January 22, 2024 16:12
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 1

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 1b27f9e and d2ea3a8.
Files ignored due to path filters (9)
  • package.json is excluded by: !**/*.json
  • packages/ott-vis/cypress.json is excluded by: !**/*.json
  • packages/ott-vis/docker-compose.yaml is excluded by: !**/*.yaml
  • packages/ott-vis/package.json is excluded by: !**/*.json
  • packages/ott-vis/provisioning/dashboards/dashboard.json is excluded by: !**/*.json
  • packages/ott-vis/provisioning/dashboards/default.yaml is excluded by: !**/*.yaml
  • packages/ott-vis/src/img/logo.svg is excluded by: !**/*.svg
  • packages/ott-vis/src/plugin.json is excluded by: !**/*.json
  • packages/ott-vis/tsconfig.json is excluded by: !**/*.json
Files selected for processing (29)
  • packages/ott-vis/.config/.cprc.json (1 hunks)
  • packages/ott-vis/.config/.eslintrc (1 hunks)
  • packages/ott-vis/.config/.prettierrc.js (1 hunks)
  • packages/ott-vis/.config/Dockerfile (1 hunks)
  • packages/ott-vis/.config/README.md (1 hunks)
  • packages/ott-vis/.config/jest-setup.js (1 hunks)
  • packages/ott-vis/.config/jest.config.js (1 hunks)
  • packages/ott-vis/.config/jest/mocks/react-inlinesvg.tsx (1 hunks)
  • packages/ott-vis/.config/jest/utils.js (1 hunks)
  • packages/ott-vis/.config/tsconfig.json (1 hunks)
  • packages/ott-vis/.config/types/custom.d.ts (1 hunks)
  • packages/ott-vis/.config/webpack/constants.ts (1 hunks)
  • packages/ott-vis/.config/webpack/utils.ts (1 hunks)
  • packages/ott-vis/.config/webpack/webpack.config.ts (1 hunks)
  • packages/ott-vis/.cprc.json (1 hunks)
  • packages/ott-vis/.eslintrc (1 hunks)
  • packages/ott-vis/.gitignore (1 hunks)
  • packages/ott-vis/.nvmrc (1 hunks)
  • packages/ott-vis/.prettierrc.js (1 hunks)
  • packages/ott-vis/CHANGELOG.md (1 hunks)
  • packages/ott-vis/README.md (1 hunks)
  • packages/ott-vis/cypress/integration/01-smoke.spec.ts (1 hunks)
  • packages/ott-vis/jest-setup.js (1 hunks)
  • packages/ott-vis/jest.config.js (1 hunks)
  • packages/ott-vis/provisioning/README.md (1 hunks)
  • packages/ott-vis/src/README.md (1 hunks)
  • packages/ott-vis/src/components/SimplePanel.tsx (1 hunks)
  • packages/ott-vis/src/module.ts (1 hunks)
  • packages/ott-vis/src/types.ts (1 hunks)
Files skipped from review due to trivial changes (17)
  • packages/ott-vis/.config/.cprc.json
  • packages/ott-vis/.config/.eslintrc
  • packages/ott-vis/.config/.prettierrc.js
  • packages/ott-vis/.config/README.md
  • packages/ott-vis/.config/jest-setup.js
  • packages/ott-vis/.config/jest.config.js
  • packages/ott-vis/.config/jest/utils.js
  • packages/ott-vis/.config/tsconfig.json
  • packages/ott-vis/.config/types/custom.d.ts
  • packages/ott-vis/.config/webpack/constants.ts
  • packages/ott-vis/.cprc.json
  • packages/ott-vis/.eslintrc
  • packages/ott-vis/.gitignore
  • packages/ott-vis/.prettierrc.js
  • packages/ott-vis/CHANGELOG.md
  • packages/ott-vis/jest.config.js
  • packages/ott-vis/provisioning/README.md
Additional comments: 11
packages/ott-vis/.nvmrc (1)
  • 1-1: The .nvmrc file specifies Node version 20. Ensure this version is compatible with all dependencies and the runtime environment where the Grafana plugin will be deployed.
packages/ott-vis/jest-setup.js (1)
  • 1-2: The jest-setup.js file correctly imports the setup configuration from the .config/jest-setup. No action needed.
packages/ott-vis/src/types.ts (1)
  • 1-7: The types.ts file correctly defines SeriesSize and SimpleOptions. No action needed.
packages/ott-vis/cypress/integration/01-smoke.spec.ts (1)
  • 1-10: The Cypress smoke test is set up correctly and follows best practices for a basic visibility check of the Grafana instance.
packages/ott-vis/.config/Dockerfile (1)
  • 1-16: The Dockerfile is configured for development purposes with anonymous access and development mode enabled. Ensure these settings are not used in production environments.
packages/ott-vis/.config/jest/mocks/react-inlinesvg.tsx (1)
  • 1-25: The mock for react-inlinesvg is set up correctly to prevent failed fetch requests from displaying errors in the console during tests.
packages/ott-vis/src/module.ts (1)
  • 1-40: The module.ts file correctly sets up the panel plugin with customizable options. Ensure that the default values and option descriptions are appropriate for the plugin's intended functionality.
packages/ott-vis/src/components/SimplePanel.tsx (1)
  • 1-61: The SimplePanel component is implemented correctly, using best practices for styling and theming with Grafana's UI library.
packages/ott-vis/.config/webpack/utils.ts (1)
  • 1-58: The utility functions in utils.ts are set up correctly to assist with the Webpack configuration, including environment checks and file path resolutions.
packages/ott-vis/README.md (1)
  • 1-114: The README.md file provides a comprehensive guide for setting up the development environment, building, and testing the plugin. Ensure that the instructions are up-to-date and accurate.
packages/ott-vis/.config/webpack/webpack.config.ts (1)
  • 1-218: The webpack.config.ts file is scaffolded correctly and includes configurations for both development and production environments. Ensure that the build process is tested and that the output matches the expected structure for a Grafana plugin.

packages/ott-vis/src/README.md Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@dyc3
Copy link
Owner

dyc3 commented Jan 22, 2024

@coderabbitai Open an issue for updating the CI pipelines to add this package, and the release pipelines to sign the plugin

Copy link
Contributor

coderabbitai bot commented Jan 22, 2024

@dy3c, the issue for updating the CI pipelines to include the new ott-vis package and to adjust the release pipelines to sign the plugin has been successfully created. You can find it here: Issue #1247. Please add any additional details or requirements for this task in the issue comments.

Analysis chain

@dy3c, I will open an issue for updating the CI pipelines to include the new package and to adjust the release pipelines to sign the plugin. I'll provide the details and context in the issue to ensure clarity for the development team.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Open an issue using the GitHub CLI
gh issue create --title "Update CI/CD Pipelines for OTT Visualization Plugin" \
--body "We need to update the CI pipelines to add the new `ott-vis` package and modify the release pipelines to sign the plugin. This is in relation to the changes introduced in PR #1244.

The CI pipeline should be configured to include the new package in its build and test sequences. Additionally, the release pipeline must be updated to include the signing process for the new Grafana plugin.

PR URL: https://github.com/dyc3/opentogethertube/pull/1244
Comment URL: https://github.com/dyc3/opentogethertube/pull/1244#issuecomment-XXXXX

@dy3c, please provide any additional details or requirements for this task."

# Note: Replace XXXXX with the actual comment ID for the backlink.

Length of output: 826

Action performed

Review triggered.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between d2ea3a8 and 24d617b.
Files ignored due to path filters (6)
  • package.json is excluded by: !**/*.json
  • packages/ott-vis/docker-compose.yaml is excluded by: !**/*.yaml
  • packages/ott-vis/package.json is excluded by: !**/*.json
  • packages/ott-vis/provisioning/dashboards/dashboard.json is excluded by: !**/*.json
  • packages/ott-vis/src/plugin.json is excluded by: !**/*.json
  • yarn.lock is excluded by: !**/*.lock
Files selected for processing (2)
  • packages/ott-vis/.config/webpack/webpack.config.ts (1 hunks)
  • packages/ott-vis/README.md (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • packages/ott-vis/.config/webpack/webpack.config.ts
  • packages/ott-vis/README.md

@dyc3 dyc3 enabled auto-merge (squash) January 22, 2024 17:08
@dyc3 dyc3 merged commit 9e00d7f into dyc3:master Jan 22, 2024
12 of 14 checks passed
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.

2 participants