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: indexer manager widget #1057

Merged
merged 7 commits into from
Sep 7, 2024
Merged

feat: indexer manager widget #1057

merged 7 commits into from
Sep 7, 2024

Conversation

hillaliy
Copy link
Contributor

@hillaliy hillaliy commented Sep 2, 2024

Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>


Homarr

Thank you for your contribution. Please ensure that your pull request meets the following pull request:

  • Builds without warnings or errors (pnpm buid, autofix with pnpm format:fix)
  • Pull request targets dev branch
  • Commits follow the conventional commits guideline
  • No shorthand variable names are used (eg. x, y, i or any abbrevation)

Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>

<br/>
<div align="center">
  <img src="https://homarr.dev/img/logo.png" height="80" alt="" />
  <h3>Homarr</h3>
</div>

**Thank you for your contribution. Please ensure that your pull request meets the following pull request:**

- [ ] Builds without warnings or errors (``pnpm buid``, autofix with ``pnpm format:fix``)
- [ ] Pull request targets ``dev`` branch
- [ ] Commits follow the [conventional commits guideline](https://www.conventionalcommits.org/en/v1.0.0/)
- [ ] No shorthand variable names are used (eg. ``x``, ``y``, ``i`` or any abbrevation)
@hillaliy hillaliy requested a review from a team as a code owner September 2, 2024 15:00
@hillaliy hillaliy changed the title fix(deps): update tanstack-query monorepo to ^5.53.2 (#1055) indexer manager widget Sep 2, 2024
Copy link

deepsource-io bot commented Sep 2, 2024

Here's the code health analysis summary for commits e88854c..25e428e. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@hillaliy hillaliy self-assigned this Sep 2, 2024
Copy link

github-actions bot commented Sep 2, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 39.45% 12357 / 31322
🔵 Statements 39.45% 12357 / 31322
🔵 Functions 35.11% 308 / 877
🔵 Branches 71.11% 1108 / 1558
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/api/src/router/widgets/index.ts 0% 0% 0% 0% 1-11, 13-24
packages/api/src/router/widgets/indexer-manager.ts 0% 0% 0% 0% 1-2, 4, 6-7, 9-10, 12-25, 27-34, 36-57, 59-75
packages/cron-jobs/src/index.ts 0% 0% 0% 0% 1-8, 10-11, 13-23
packages/cron-jobs/src/jobs/integrations/indexer-manager.ts 0% 0% 0% 0% 1-5, 7, 9-28, 30-42
packages/definitions/src/widget.ts 100% 100% 100% 100%
packages/integrations/src/index.ts 100% 100% 100% 100%
packages/integrations/src/types.ts 0% 0% 0% 0% 1-4
packages/integrations/src/prowlarr/prowlarr-integration.ts 9.41% 100% 0% 9.41% 8, 10-19, 21-30, 32-33, 35-46, 48, 50-56, 58-59, 62-67, 69-74, 77, 79-93, 95-98
packages/old-import/src/widgets/options.ts 79.79% 100% 0% 79.79% 104-110, 112-124
packages/old-import/src/widgets/definitions/index.ts 95.23% 100% 0% 95.23% 76
packages/translation/src/lang/en.ts 100% 100% 100% 100%
packages/widgets/src/index.tsx 78% 100% 0% 78% 60-61, 63-68, 70-72
packages/widgets/src/indexer-manager/component.tsx 0% 0% 0% 0% 1, 3-5, 7, 9, 12, 14-25, 27, 29-40, 42-59, 61, 63-79, 81-83, 85
packages/widgets/src/indexer-manager/index.ts 100% 100% 0% 100%
packages/widgets/src/indexer-manager/serverData.ts 0% 0% 0% 0% 1, 3, 7-12, 14-17, 19-27
Generated in workflow #2812

@hillaliy hillaliy changed the title indexer manager widget feat: indexer manager widget Sep 2, 2024
@hillaliy
Copy link
Contributor Author

hillaliy commented Sep 2, 2024

Screenshot 2024-09-02 at 17 27 07

Copy link
Member

@manuel-rw manuel-rw left a comment

Choose a reason for hiding this comment

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

Looks pretty good. Congratulations. Your code is improving a lot 🙌🎉

packages/api/src/router/widgets/indexer-manager.ts Outdated Show resolved Hide resolved
packages/api/src/router/widgets/indexer-manager.ts Outdated Show resolved Hide resolved
packages/translation/src/lang/en.ts Outdated Show resolved Hide resolved
packages/translation/src/lang/en.ts Outdated Show resolved Hide resolved
packages/widgets/src/indexer-manager/component.tsx Outdated Show resolved Hide resolved
@manuel-rw
Copy link
Member

Also, please make sure that Deepsource and all other builds pass before you mark as ready for review

@manuel-rw manuel-rw requested a review from a team September 2, 2024 15:25
@hillaliy
Copy link
Contributor Author

hillaliy commented Sep 2, 2024

Also, please make sure that Deepsource and all other builds pass before you mark as ready for review

The DeepSource error is because I didn't add default to "switch" but we don't need default the widget will support only two integrations (Prowlarr & Jackett)

@manuel-rw
Copy link
Member

Also, please make sure that Deepsource and all other builds pass before you mark as ready for review

The DeepSource error is because I didn't add default to "switch" but we don't need default the widget will support only two integrations (Prowlarr & Jackett)

This is untrue. You should always have a default case in a switch.
It's good practice to throw an error there because it should never run that code - and if it does something critical went wrong.
But as @Meierschlumpf mentioned, you can remove this switch anyway if you use the typesafe method he suggested.

@hillaliy hillaliy added the enhancement New feature or request label Sep 4, 2024
@SeDemal
Copy link
Collaborator

SeDemal commented Sep 6, 2024

Also, please make sure that Deepsource and all other builds pass before you mark as ready for review

The DeepSource error is because I didn't add default to "switch" but we don't need default the widget will support only two integrations (Prowlarr & Jackett)

This is untrue. You should always have a default case in a switch. It's good practice to throw an error there because it should never run that code - and if it does something critical went wrong. But as @Meierschlumpf mentioned, you can remove this switch anyway if you use the typesafe method he suggested.

Does it matter? Once dl widget gets merged we can implement the selector function meier made to all the widgets anyway.
Already handles errors too.

Meierschlumpf
Meierschlumpf previously approved these changes Sep 7, 2024
@Meierschlumpf Meierschlumpf merged commit 08d4472 into dev Sep 7, 2024
10 checks passed
@Meierschlumpf Meierschlumpf deleted the indexer-manager-widget branch September 7, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants