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

Add Proxmox integration/widget #1903

Merged
merged 12 commits into from
Mar 23, 2024
Merged

Conversation

dslatt
Copy link
Contributor

@dslatt dslatt commented Feb 16, 2024

Thank you for contributing to Homarr! So that your Pull Request can be handled effectively, please populate the following fields (delete sections that are not applicable)

Category

Feature

Overview

Comments

  • I added the 'ingnore certificate errors' option because proxmox only supports https and includes a self signed cert by default. The API won't work unless you account for that. Obviously, its better to not just ignore certs but for a good user experience I think it's worth handling that in code by default.
  • Sorry for the long list of screenshots, but I figured more it better
  • Thanks for taking a look!

Issue Number (if applicable)

Related issue: #889

Screenshot (if applicable)

Basic View
Screenshot from 2024-02-15 20-43-40

Integration
Screenshot from 2024-02-15 20-44-16

Settings
Screenshot from 2024-02-15 20-44-59
Screenshot from 2024-02-15 20-45-08
Screenshot from 2024-02-15 20-45-19

Filter by node name (to not show the entire cluster if you want; by default its the whole thing)
Screenshot from 2024-02-15 20-45-38
Screenshot from 2024-02-15 20-45-43
Screenshot from 2024-02-15 20-46-02

Lists of 'items' in the cluster. Nodes, VMs, LXCs, and storage
Screenshot from 2024-02-15 20-46-16
Screenshot from 2024-02-15 20-46-23
Screenshot from 2024-02-15 20-46-29
Screenshot from 2024-02-15 20-46-36

On-click detail (node)
Screenshot from 2024-02-15 20-46-49

On-click detail (VM)
Screenshot from 2024-02-15 20-46-59

On-click detail (LXC)
Screenshot from 2024-02-15 20-47-11
Screenshot from 2024-02-15 20-47-16
Screenshot from 2024-02-15 20-47-21

On-click detail (storage)
Screenshot from 2024-02-15 20-47-30
Screenshot from 2024-02-15 20-47-37
Screenshot from 2024-02-15 20-47-41

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hi 👋. Thank you for making your first contribution to Homarr. Please ensure that you've completed all the points in the TODO checklist. We'll review your changes shortly.

@SeDemal
Copy link
Collaborator

SeDemal commented Feb 16, 2024

I'm a bit torn on that one, this looks like something that could just expend on another PR #1879.
But I think for now we can just put them side by side and combine them later on.
Generally that would make a system health monitoring widget, which the one for OMV has already been renamed to.

I'll take a look at the code later on. Just leaving that first thought here.

@dslatt
Copy link
Contributor Author

dslatt commented Feb 29, 2024

I get where you're coming from with the OMV widget, they do have some information overlap after all. I could see merging the dash. one with that, at least for just showing basic system info but I assume you would lose the graphing in that case.

For proxmox, you could probably use the OMV widget ui to show cpu/ram in one row, nodes/vms/lxcs in another, and storage in the final row. I think the progress circle icons would need some labels in that case though. The few challenges I see would be:

  • Scaling that UI to handle the amount of stuff proxmox can show. Since you can (and often do) and multiple nodes in a proxmox cluster each running their own vms/containers/storage you end up with a lot more info than the OMV widget can handle right now.
  • Making the extra proxmox details (this widgets more details screen) available cleanly. You would need to expand a table or something on clicking on the OMV progress icon things that list the individual nodes/etc. Maybe that fits in the widget but could get messy. You could use a popover but that looses the ability to see anything but the top-level of data without an extra click which I don't love. I like having the vms tab open by default personally so I can see what's up without having to click. IDK
  • Widget settings. You would want to dynamically adjust the settings based on what integrations you have I think. Showing all the proxmox vm/nodes/lxc stuff would overkill if the user isn't using it.

Right course depends on what you all want I guess. I'm sure its possible to merge and make it work, it just feels complicated because all the extra proxmox stuff would have to live alongside the simpler data from the 'system' widget .

Open to any ideas really.

@SeDemal
Copy link
Collaborator

SeDemal commented Mar 3, 2024

Alright, since the OMV widget was there before and was already intended for dashdot in the future, I was wondering if you could integrate to that widget instead?
You could just add all your elements into that widget as is and make them appear only when the linked app is proxmox, meaning you wouldn't loose any of the elements you integrated.
It makes it a bit confusing in the options because of how the system is right now but since we're changing the system in the future, we will have a way to hide those options later.
Any elements that extend further than the available space can simply be handled in a scrollview.

@dslatt dslatt reopened this Mar 4, 2024
@dslatt
Copy link
Contributor Author

dslatt commented Mar 4, 2024

still have some refinement to do, but basic merge is done

@SeDemal
Copy link
Collaborator

SeDemal commented Mar 5, 2024

I saw your comment on the OMV integration PR, you're right about making options toggleable.
Like the current dashdot widget where each and every stats is toggleable.
Tell us when you think you're done, eager to check it out. And thanks again for your efforts.

@dslatt
Copy link
Contributor Author

dslatt commented Mar 5, 2024

Ready to be checked whenever

Merged my proxmox widget into the system health one. If both integrations are present, they are split into separate tabs. If only one is used, then no tabs are used.

Only thing I changed in the existing omv widget was to make the cputemp rpc optional; it relies on a plugin not installed by default and was causing errors.

Screenshot from 2024-03-05 14-36-09
Screenshot from 2024-03-05 14-36-19
Screenshot from 2024-03-05 14-40-34

src/server/api/routers/health-monitoring/openmediavault.ts Outdated Show resolved Hide resolved
src/server/api/routers/health-monitoring/openmediavault.ts Outdated Show resolved Hide resolved
src/widgets/health-monitoring/HealthMonitoringTile.tsx Outdated Show resolved Hide resolved
src/widgets/health-monitoring/HealthMonitoringTile.tsx Outdated Show resolved Hide resolved
src/widgets/health-monitoring/HealthMonitoringTile.tsx Outdated Show resolved Hide resolved
src/widgets/health-monitoring/HealthMonitoringTile.tsx Outdated Show resolved Hide resolved
src/widgets/health-monitoring/HealthMonitoringTile.tsx Outdated Show resolved Hide resolved
/>
<Stack align="center" justify="center" spacing={0}>
<Text>{t('cluster.summary.cpu')}</Text>
<Text>{cpu.toFixed(1)}%</Text>
Copy link
Collaborator

Choose a reason for hiding this comment

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

In [Arabic](https://en.wikipedia.org/wiki/Arabic_language), the percent sign follows the number; as Arabic is written from [right to left](https://en.wikipedia.org/wiki/Right_to_left), this means that the percent sign is to the left of the number, usually without a space.

https://en.wikipedia.org/wiki/Percent_sign

Copy link
Contributor Author

@dslatt dslatt Mar 12, 2024

Choose a reason for hiding this comment

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

Good to know.

I feel like that should be handle at a global level vs per module. I see the same issue in a few other places as well (torrents widget, dns hole summary widget, etc).

Maybe modify the existing formatPercentage() method to provide translation using an entry in the 'common' or 'tools' module. Any thoughts on that?

Feels like it might be too much to require a translation entry for every language but not sure what other good options would be.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I wouldn't write an extra function for that since it doesn't add much value to wrap a simple translation function. I also dislike namespaces like common and tools due to their generic nature. I think we'll leave it "untranslated" for now and implement a proper solution since we are refactoring code for the new breaking 1.0 update soon anway.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Gotta rewrite my comment because it wasnt sent.

rtl and ltr isn't our only concern when it comes to ordering the numbers and signs that accompanies them.
We were made aware of this mostly thanks to Chinese but other Asian languages might be subject to the same problem.
Making a function for it would be overly complicated and would remove the power to correct it easily from the hands of the ones that do know better: the translators.
Since the issue was only risen recently, we've only made the change were it was specifically requested and made to be added in new PR's, but we will take it into consideration for v1.
Our benevolent translators have proven to be adapting to this really well until now so I don't think it is too much for them to handle.

manuel-rw
manuel-rw previously approved these changes Mar 13, 2024
Copy link
Collaborator

@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.

lgtm, I'll merge this now. Can you write some documentation for this as well? https://github.com/homarr-labs/documentation
I'm unable to test this / write documentation because I'm not running Promox.

@manuel-rw
Copy link
Collaborator

@dslatt can you fix the build errors before I merge this?

@dslatt
Copy link
Contributor Author

dslatt commented Mar 13, 2024

i'll add some documentation soon

@dslatt dslatt mentioned this pull request Mar 16, 2024
4 tasks
@manuel-rw
Copy link
Collaborator

PR still has merge conflicts. Can you resolve them? Planning to merge this soon

@dslatt
Copy link
Contributor Author

dslatt commented Mar 18, 2024

will do, was just waiting on final omv stuff to merge

@manuel-rw manuel-rw merged commit 0677271 into ajnart:dev Mar 23, 2024
2 checks passed
truecharts-admin added a commit to truecharts/charts that referenced this pull request May 8, 2024
…c270b55 by renovate (#21754)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [ghcr.io/ajnart/homarr](https://togithub.com/ajnart/homarr) | patch |
`0.15.2` -> `0.15.3` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>ajnart/homarr (ghcr.io/ajnart/homarr)</summary>

### [`v0.15.3`](https://togithub.com/ajnart/homarr/releases/tag/v0.15.3)

[Compare
Source](https://togithub.com/ajnart/homarr/compare/v0.15.2...v0.15.3)

> \[!NOTE]\
> We've been working actively on working torwards version 1.0 which will
include many improvements to performance, security and the overall look
& feel of Homarr. It will greatly overhaul the technical architecture of
Homarr. This work is done by volunteers. Please consider supporting our
work via donations at https://opencollective.com/homarr

#### Support for generic Home Assistant switches (lights, fans, ...)

Want to toggle your kitchen lights or shut off the music? Using the
brand new support for generic switches you can toggle now almost
anything:

![homeassistant-lights](https://togithub.com/ajnart/homarr/assets/30572287/2cd79222-ca7d-4773-95e8-845cb382468c)

#### Promox integration

Homarr now features a Promox widget that can display CPU, RAM and more
information directly on your dashboard:

![305290159-b6ed7b8a-335b-41d0-b5c8-8edb736db3ee](https://togithub.com/ajnart/homarr/assets/30572287/cfc6f949-16f8-4add-a4eb-668c258c3305)

#### Tdarr widget

Homarr now also integrates with Tdarr to display the status of your
workers and the queue:

![Untitled](https://togithub.com/ajnart/homarr/assets/30572287/b368c4ae-7b6e-42d7-9bfc-58a110646dbe)

#### Add placeholder for dynamic URLs

When using advanced reverse proxy setups, sometimes the hostname is not
known yet.
We have added a new feature that enables you to replace certain
placeholders: <img width="598"
alt="326171056-a55c3e49-9cd6-4523-90cf-16e91b2c7502"
src="https://github.com/ajnart/homarr/assets/30572287/53cf7469-586a-4fda-9dbf-3651cf3e2189">

#### Usability improvements to the torrent widget

The torrent widget has received a major upgrade and should scale now
better on most devices with improved customizability:


![image](https://togithub.com/ajnart/homarr/assets/30572287/8dbcd786-03ed-49da-b4ef-8a7b5b5bdd46)

![image](https://togithub.com/ajnart/homarr/assets/26098587/325ec664-c0cc-4cfa-bfb5-717d3674bda4)

#### Other bugfixes

-   Fixed overlapping of the grid elements and the navbar
-   Fixed video playback for iOS and Apple devices
- Fixed issues with the certificates for the avatars (this will also
resolve issues with the page being shown as "not secure")

#### What's Changed

- fix: health monitoring hotfix by
[@&#8203;hillaliy](https://togithub.com/hillaliy) in
[ajnart/homarr#1970
- fix: change media request TV poster and movie name by
[@&#8203;SeDemal](https://togithub.com/SeDemal) in
[ajnart/homarr#1983
- fix: weather widget does not refresh automatically by
[@&#8203;hillaliy](https://togithub.com/hillaliy) in
[ajnart/homarr#1981
- fix: [#&#8203;1976](https://togithub.com/ajnart/homarr/issues/1976)
lower debounce time by
[@&#8203;manuel-rw](https://togithub.com/manuel-rw) in
[ajnart/homarr#1979
- chore: new Crowdin updates by
[@&#8203;ajnart](https://togithub.com/ajnart) in
[ajnart/homarr#1968
- feat: add Proxmox integration/widget by
[@&#8203;dslatt](https://togithub.com/dslatt) in
[ajnart/homarr#1903
- feat: columns customize by
[@&#8203;hillaliy](https://togithub.com/hillaliy) in
[ajnart/homarr#1975
- feat: added playsInline to VideoBackground by
[@&#8203;spkesDE](https://togithub.com/spkesDE) in
[ajnart/homarr#1996
- fix: ping indicators floating above header in board customization page
by [@&#8203;krishnamuppaneni](https://togithub.com/krishnamuppaneni) in
[ajnart/homarr#1998
- fix: OIDC Timeout by
[@&#8203;catrielmuller](https://togithub.com/catrielmuller) in
[ajnart/homarr#2002
- fix: Pass axios error into log call for proxmox. Please include in
v0.15.3 by [@&#8203;dslatt](https://togithub.com/dslatt) in
[ajnart/homarr#2012
- feat: add romanian language support by
[@&#8203;Meierschlumpf](https://togithub.com/Meierschlumpf) in
[ajnart/homarr#2017
- fix: missing romanian language in next-i18next.config.js by
[@&#8203;Meierschlumpf](https://togithub.com/Meierschlumpf) in
[ajnart/homarr#2018
- feat: add Tdarr integration and widget by
[@&#8203;jbruell](https://togithub.com/jbruell) in
[ajnart/homarr#1882
- feat: torrent widget: polishing UI and improve popover interactions by
[@&#8203;SeDemal](https://togithub.com/SeDemal) in
[ajnart/homarr#2016
- fix: Modals titles nested headers and edit mode nested buttons errors
by [@&#8203;SeDemal](https://togithub.com/SeDemal) in
[ajnart/homarr#2019
- fix: Avatar host by [@&#8203;SeDemal](https://togithub.com/SeDemal) in
[ajnart/homarr#2027
- feat: Home Assistant entity generic toggle by
[@&#8203;tuggan](https://togithub.com/tuggan) in
[ajnart/homarr#2015
- feat: add logout callback URL and session expiration environment
variables by [@&#8203;SeDemal](https://togithub.com/SeDemal) in
[ajnart/homarr#2023
- fix: ldap filters by [@&#8203;SeDemal](https://togithub.com/SeDemal)
in
[ajnart/homarr#2033
- chore: new Crowdin updates by
[@&#8203;ajnart](https://togithub.com/ajnart) in
[ajnart/homarr#1984
- feat: add `[homarr_base]` replacement for external urls by
[@&#8203;j3lte](https://togithub.com/j3lte) in
[ajnart/homarr#2024
- core: increase version to 0.15.3 by
[@&#8203;Meierschlumpf](https://togithub.com/Meierschlumpf) in
[ajnart/homarr#2007

#### New Contributors

- [@&#8203;dslatt](https://togithub.com/dslatt) made their first
contribution in
[ajnart/homarr#1903
- [@&#8203;krishnamuppaneni](https://togithub.com/krishnamuppaneni) made
their first contribution in
[ajnart/homarr#1998
- [@&#8203;catrielmuller](https://togithub.com/catrielmuller) made their
first contribution in
[ajnart/homarr#2002
- [@&#8203;jbruell](https://togithub.com/jbruell) made their first
contribution in
[ajnart/homarr#1882
- [@&#8203;j3lte](https://togithub.com/j3lte) made their first
contribution in
[ajnart/homarr#2024

**Full Changelog**:
ajnart/homarr@v0.15.2...v0.15.3

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNDkuMyIsInVwZGF0ZWRJblZlciI6IjM3LjM0OS4zIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbImF1dG9tZXJnZSIsInVwZGF0ZS9kb2NrZXIvZ2VuZXJhbC9ub24tbWFqb3IiXX0=-->
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.

None yet

3 participants