Skip to content

feat: update usage statistics plugin with new features and improvements#5

Merged
grvpandey11 merged 2 commits intomainfrom
monthwise-stats-improvements
Jul 23, 2025
Merged

feat: update usage statistics plugin with new features and improvements#5
grvpandey11 merged 2 commits intomainfrom
monthwise-stats-improvements

Conversation

@grvpandey11
Copy link
Contributor

This pull request introduces several updates to the usage-statistics plugin for Backstage, including code formatting improvements, minor version bumps, and enhancements to functionality and documentation. Key changes include the addition of descriptions to statistics cards, refactoring of code for consistency, and updates to README files for better clarity.

Functional Enhancements:

  • Added descriptions to the TemplateUsageSummaryCard statistics cards, providing more context for metrics such as total runs, success count, failure count, and success rate ([[1]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-d20cce1da9fc7e039b1d7cc4d26211c0a39981784a271ea8b43d358d7c17db4dR83), [[2]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-d20cce1da9fc7e039b1d7cc4d26211c0a39981784a271ea8b43d358d7c17db4dR92), [[3]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-d20cce1da9fc7e039b1d7cc4d26211c0a39981784a271ea8b43d358d7c17db4dR101), [[4]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-d20cce1da9fc7e039b1d7cc4d26211c0a39981784a271ea8b43d358d7c17db4dR110)).
  • Updated the logic for determining the default year in TemplateMonthlyStatsCard to simplify and improve clarity ([plugins/usage-statistics/src/components/Templates/TemplateMonthlyStatsCard/TemplateMonthlyStatsCard.tsxL61-L75](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-e5d3000dcd4c7a051e9e5b1c689cd9ffdfece608906f17d5ed7ab5f266c484f4L61-L75)).

Codebase Consistency:

  • Standardized single quotes for imports across multiple files, including UsageStatisticsApi, UsageStatisticsClient, and others ([[1]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-8f85003816e705d5dfedbc813f72e6229350cfd352da2f2688b67434606599c7L1-R5), [[2]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-09038a61c3a31c0a865d4ea4cdbcb23ea458f4a9d8ef2fe84adc1c1f70dc8baaL1-R4), [[3]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-91d7cab40cecef1bb2268f230c1094bc6b62fbe754dea8eb50f292d3956ea3ffL1-R2), [[4]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-d20cce1da9fc7e039b1d7cc4d26211c0a39981784a271ea8b43d358d7c17db4dL1-R13), [[5]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-b737f198e36d39a95e61cbbccf7b139e68c069c54241598187064081468c8ab5L1-R4)).
  • Refactored SQL query formatting in DatabaseHandler for better readability ([plugins/usage-statistics-backend/src/DatabaseHandler.tsL47-R56](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-ecd8cfe31bfccad888aba81c5d95c3c561ed98446b46e165e48e1692d86af1abL47-R56)).

Documentation Improvements:

  • Enhanced the README.md files for both the backend and frontend plugins by adding links, improving formatting, and providing clearer instructions ([[1]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-54fb2946f02d06dbacf150828cb696526c30db9e251b1e7d190a578d249b3d94L26-R27), [[2]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-865b8eaae823b69fd7e8cac01922ef559d572317e62c95870ca063474424b7f5L5-R12), [[3]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-865b8eaae823b69fd7e8cac01922ef559d572317e62c95870ca063474424b7f5R22-R26), [[4]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-865b8eaae823b69fd7e8cac01922ef559d572317e62c95870ca063474424b7f5R58-R63)).

Version Updates:

  • Bumped the version of @codeverse-gp/plugin-usage-statistics and @codeverse-gp/plugin-usage-statistics-backend from 1.1.1 to 1.1.2 to reflect the changes ([[1]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-0b96afe8b6d46b1d561d403f05f1db8c186eec83480598e0f61536f4b1a05254L3-R3), [[2]](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-2fef09f0ef550716d08d61619caa859305eb2e3b44458b5fab005a451db760c1L3-R3)).

Miscellaneous:

  • Added a new prettier:fix script to package.json for formatting code ([package.jsonR23](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R23)).
  • Minor adjustments to logging and error handling in the backend router ([plugins/usage-statistics-backend/src/router.tsL74-R77](https://github.com/CodeVerse-GP/usage-statistics/pull/5/files#diff-6799292d58f9be0f8c2da8e61a680f91a692c1f671d27f65e2c25cdb04e4e966L74-R77)).

These changes collectively enhance the usability, maintainability, and clarity of the usage-statistics plugin.

Signed-off-by: Gaurav Pandey <grvpandey11@gmail.com>
Signed-off-by: Gaurav Pandey <grvpandey11@gmail.com>
@grvpandey11 grvpandey11 merged commit c19188b into main Jul 23, 2025
@grvpandey11 grvpandey11 deleted the monthwise-stats-improvements branch July 23, 2025 12:18
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