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 OMV integration / widget #1879

Merged
merged 6 commits into from
Feb 27, 2024
Merged

Add OMV integration / widget #1879

merged 6 commits into from
Feb 27, 2024

Conversation

hillaliy
Copy link
Contributor

@hillaliy hillaliy commented Feb 4, 2024

Category

Feature

Screenshot (if applicable)

Screenshot 2024-02-02 at 13 37 58

Copy link
Collaborator

@SeDemal SeDemal left a comment

Choose a reason for hiding this comment

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

Overall nice.
You need to incorporate translation in basically every file though.
Send me a message if you need help for the strings that have variables in them.

We try to not use one specific app name to designate 1 widget as that widget could be subject to update and further integration with other apps. As such it would be nice to rename the widget to something more common.

.env.example Outdated Show resolved Hide resolved
.vscode/settings.json Outdated Show resolved Hide resolved
src/server/api/routers/openmediavault.ts Outdated Show resolved Hide resolved
src/widgets/openmediavault/OpenMediaVaultCpu.tsx Outdated Show resolved Hide resolved
src/widgets/openmediavault/OpenMediaVaultCpu.tsx Outdated Show resolved Hide resolved
src/widgets/openmediavault/OpenMediaVaultFileSystem.tsx Outdated Show resolved Hide resolved
src/server/api/routers/openmediavault.ts Outdated Show resolved Hide resolved
src/server/api/routers/openmediavault.ts Outdated Show resolved Hide resolved
src/widgets/openmediavault/OpenMediaVaultCpu.tsx Outdated Show resolved Hide resolved
src/widgets/openmediavault/OpenMediaVaultCpu.tsx Outdated Show resolved Hide resolved
src/widgets/openmediavault/OpenMediaVaultCpu.tsx Outdated Show resolved Hide resolved
src/widgets/openmediavault/OpenMediaVaultFileSystem.tsx Outdated Show resolved Hide resolved
src/widgets/openmediavault/OpenMediaVaultMemory.tsx Outdated Show resolved Hide resolved
Comment on lines 43 to 47
const formatUptime = (uptime: number) => {
const days = Math.floor(uptime / 60 / 60 / 24);
const remainingHours = Math.floor((uptime % (days * 24 * 60 * 60)) / 60 / 60);
return `${days} days & ${remainingHours} hours`;
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Extract to a function in the helpers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would move this function outside the widgets to the tools. We have files with these kind of functions

src/widgets/openmediavault/OpenMediaVaultTile.tsx Outdated Show resolved Hide resolved
src/widgets/openmediavault/OpenMediaVaultTile.tsx Outdated Show resolved Hide resolved
src/widgets/openmediavault/OpenMediaVaultTile.tsx Outdated Show resolved Hide resolved
Copy link
Collaborator

@SeDemal SeDemal left a comment

Choose a reason for hiding this comment

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

Overall very good changes.
Thanks for all the hard work it's really coming together nicely.

{t('cpu.utilization')}: {info.cpuUtilization.toFixed(2)}%
</Text>
<Text fz="lg" tt="uppercase" fw={700} c="dimmed">
{fahrenheit
Copy link
Collaborator

Choose a reason for hiding this comment

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

There's an already existing function in the Weather widget you could use, "getPerferedUnit".
It works with your current parameters.
Not important though, just in case.
If you do end up using it, you would need to extract it to "tools" and modify the weather widget too so don't worry too much about it.

@hillaliy
Copy link
Contributor Author

hillaliy commented Feb 16, 2024

Hi @Tagaishi , I think you were right from the beginning, it is necessary to create a widget that will display data directly from the operating system and not from a certain integration

@SeDemal
Copy link
Collaborator

SeDemal commented Feb 16, 2024

Hi @Tagaishi , I think you were right from the beginning, it is necessary to create a widget that will display data directly from the operating system and not from a certain integration

Actually the idea that somenoperating system offer more monitoring through their API could be something interesting to pursue. We just have to find a way to make it fit the template.
Both your integration and the one for proxmox are interesting.
As it is I will have to transfer things over at one point, most likely to your widget as the base. And I will combine those widgets together dynamically.
If you've addressed everything in the comments we might be able to merge soon and then you can add dashdot.

@hillaliy
Copy link
Contributor Author

hillaliy commented Feb 16, 2024

The last commit includes all comments fix.
I want to make some changes so I'll commit it soon

@hillaliy
Copy link
Contributor Author

New design.
Screenshot 2024-02-17 at 13 44 59
Screenshot 2024-02-17 at 13 45 19
Screenshot 2024-02-17 at 13 45 37

@ajnart
Copy link
Owner

ajnart commented Feb 23, 2024

@hillaliy Is the PR good to go now ? I think we can start resolving the conflict to merge it

@hillaliy
Copy link
Contributor Author

I think you can merge

@hillaliy
Copy link
Contributor Author

hillaliy commented Feb 24, 2024

Screenshot 2024-02-24 at 15 36 37

This is The new disign
The updates and reboot will appear only if available / require.

manuel-rw
manuel-rw previously approved these changes Feb 25, 2024
.env.example Outdated Show resolved Hide resolved
.vscode/settings.json Outdated Show resolved Hide resolved
src/widgets/health-monitoring/HealthMonitoringCpu.tsx Outdated Show resolved Hide resolved
src/widgets/health-monitoring/HealthMonitoringMemory.tsx Outdated Show resolved Hide resolved
src/widgets/health-monitoring/HealthMonitoringMemory.tsx Outdated Show resolved Hide resolved
src/widgets/health-monitoring/HealthMonitoringMemory.tsx Outdated Show resolved Hide resolved
@SeDemal SeDemal merged commit b51fcdb into ajnart:dev Feb 27, 2024
2 checks passed
@hillaliy hillaliy deleted the openmediavault branch February 27, 2024 20:01
@dslatt
Copy link
Contributor

dslatt commented Mar 4, 2024

@hillaliy where are you seeing the cputemp rpc? i don't see it as part of the rpc supported by omv

https://github.com/openmediavault/openmediavault/tree/master/deb/openmediavault/usr/share/openmediavault/engined/rpc

was getting errors when testing on my omv instance

@hillaliy
Copy link
Contributor Author

hillaliy commented Mar 4, 2024

You need to install CPU temp from OMV plugins.
Can you report that everything works?

@dslatt
Copy link
Contributor

dslatt commented Mar 4, 2024

that makes sense. i'm running it as a vm so no actual temp data
i'll make the cputemp optional as part of #1903

truecharts-admin added a commit to truecharts/charts that referenced this pull request Mar 16, 2024
…caf77d7 by renovate (#19304)

This PR contains the following updates:

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

---

> [!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.2`](https://github.com/ajnart/homarr/releases/tag/v0.15.2)

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

> \[!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

#### v0.15.2: Hotfix, OMV 7 support

- Fixed an issue with the image where it would notify you to upgrade to
`0.15.1`, even though you were running `0.15.1`
-   Added support for OMV 7
-   Updated Crowdin translations

#### What's Changed

- chore: increase version by
[@&#8203;manuel-rw](https://github.com/manuel-rw) in
[ajnart/homarr#1960
- feat: OMV 7 support by
[@&#8203;hillaliy](https://github.com/hillaliy) in
[ajnart/homarr#1959
- feat: Apply translation automation from select option to multi-select…
by [@&#8203;Tagaishi](https://github.com/Tagaishi) in
[ajnart/homarr#1963
- chore: new Crowdin updates by
[@&#8203;ajnart](https://github.com/ajnart) in
[ajnart/homarr#1949
- core: increase version to 0.15.2 by
[@&#8203;manuel-rw](https://github.com/manuel-rw) in
[ajnart/homarr#1967

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

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

[Compare
Source](https://github.com/ajnart/homarr/compare/v0.15.0...v0.15.1)

> \[!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

#### Version 0.15.1: Fixes wih SSO, OMV integration and weekly weather
forecast

##### SSO fixes & improvements

- Added environment variable `AUTH_OIDC_SCOPE_OVERWRITE` to override the
OIDC scopes
-   Fixed redirection for OIDC logins
- Added the environment variable `AUTH_LDAP_SEARCH_SCOPE` to modify the
LDAP search scope between `base`, `one` or `sub`.
- Added debug information on the login page when authentication
providers are set incorrectly:

![310673082-a376bd01-e6bf-449b-93e8-f050da3fdef8](https://github.com/ajnart/homarr/assets/30572287/41c844b0-ce8b-43e4-80f8-526b20f2684b)

##### OMV widget

[@&#8203;hillaliy](https://github.com/hillaliy) has contributed a new
system health widget that integrates with
https://www.openmediavault.org/

![image](https://github.com/ajnart/homarr/assets/30572287/13ea31ef-85f3-401c-a2e6-ca89783cf3ce)

##### Weekly forecast

The weather widget can now display a weekly forecast:

![image](https://github.com/ajnart/homarr/assets/30572287/14fab53a-2caa-49be-8591-6f8b7afb9fb7)

##### Lithuanian and Estonian languange support

We have added Lithuanian and Estonian to Homarr. As always, our
community can translate Homarr into these languages:
https://crowdin.com/project/homarr

##### Improved torrent tile performance & ordering

Thanks to our contributors, the torrent widget now uses virtualization
to lower the required work on the client when rendering the list of
torrents. This results in more fluid scrolling and resizing of the
widget:

https://github.com/ajnart/homarr/assets/162878798/8a21eec2-2f6e-4b0b-8653-7cd730d7d697

Ordering columns is also now possible:

![](https://github.com/ajnart/homarr/assets/26098587/78e9636e-9ac5-44fe-aafc-d4df341ecf9b)

#### What's Changed

- feat: add environment variable to overwrite oidc scopes by
[@&#8203;Meierschlumpf](https://github.com/Meierschlumpf) in
[ajnart/homarr#1913
- fix: redirect OIDC by
[@&#8203;Meierschlumpf](https://github.com/Meierschlumpf) in
[ajnart/homarr#1911
- fix: set maximum size for indexer manager to 12 by
[@&#8203;Tagaishi](https://github.com/Tagaishi) in
[ajnart/homarr#1912
- feat: add OMV integration / widget by
[@&#8203;hillaliy](https://github.com/hillaliy) in
[ajnart/homarr#1879
- feat: add ldap search scope by
[@&#8203;Meierschlumpf](https://github.com/Meierschlumpf) in
[ajnart/homarr#1948
- feat: AUTH_PROVIDER log when incorrect and show error in login page by
[@&#8203;Tagaishi](https://github.com/Tagaishi) in
[ajnart/homarr#1943
- feat: add Lithuanian support by
[@&#8203;ajnart](https://github.com/ajnart) in
[ajnart/homarr#1935
- feat: Mention Emby on Jellyfin integration by
[@&#8203;Tagaishi](https://github.com/Tagaishi) in
[ajnart/homarr#1917
- feat: add weekly forecast to weather widget by
[@&#8203;hillaliy](https://github.com/hillaliy) in
[ajnart/homarr#1932
- feat: add Estonian language by
[@&#8203;ajnart](https://github.com/ajnart) in
[ajnart/homarr#1931
- chore: new Crowdin updates by
[@&#8203;ajnart](https://github.com/ajnart) in
[ajnart/homarr#1890
- fix: death links in readme by
[@&#8203;Meierschlumpf](https://github.com/Meierschlumpf) in
[ajnart/homarr#1953
- feat: Improve TorrentTile rendering performance by
[@&#8203;diederbert](https://github.com/diederbert) in
[ajnart/homarr#1951
- fix: death app links by
[@&#8203;Meierschlumpf](https://github.com/Meierschlumpf) in
[ajnart/homarr#1955
- feat: add column ordering in torrent widget by
[@&#8203;hillaliy](https://github.com/hillaliy) in
[ajnart/homarr#1952

#### New Contributors

- [@&#8203;diederbert](https://github.com/diederbert) made their first
contribution in
[ajnart/homarr#1951

**Full Changelog**:
ajnart/homarr@v0.15.0...v0.15.1

</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://github.com/renovatebot/renovate).

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

5 participants