Dear developers
Please read here #23,#24:
Best regards
prtigger
Dear developers
Please read here #23,#24:
Best regards
prtigger
Sorry, dislikes with no comment are really helpful!
Regards
prtigger
prtigger1 I discovered the dashboard widgets are easy to modify so I hacked the "smart_status.yaml" file to bring back the disk temps.
Just ssh to your omv and...
then look for the line...
and change it to...
content: '{{ canonicaldevicefile }}<br>{{ temperature | notavailable }}{% if temperature %}°C{% endif %}'
Then update using
It should just come back with a command prompt when finished. If you mess up you will get a bunch of errors so you will need to fix the error in your file.
Then Ctl+Shift+R to refresh the browser and it should look like this.
You may just want to make a new file with a different file name in case you want to go back to just Status without disk temps. I had to change the id number of my new file so I wasn't identical to the other one.
If you are going to make that file, change the filename, id and title in the data section. Generate a new id with the uuid command from the command line.
If you are going to make that file, change the filename, id and title in the data section. Generate a new id with the uuid command from the command line.
Thanks, I was wondering where the id came from.
Hi vcruser
Thank you for your 'manual' for changing the code...
It's not my intention to 'hack' omv to create my own version. I use it like it is.
If i find something useful, i try to discuss about. I'm not a software developer anymore, it's to long ago and i'm not familiar with this stuff here...
I found the old version of the Smart widget really useful, but don't know what's going on (overhead traffic) behind.
Now i guess, the people here like it, how it is now...
Best regards
and thanks for comment
prtigger
It's not my intention to 'hack' omv to create my own version
This really isn't a hack. You are creating another widget just like I would for a plugin. If you don't want to, that is fine but there is little risk for this situation. If it stops working, delete the file.
Yes, "hack" was probably a poor choice of words on my part. Also, OMV users are not discouraged from creating their own widgets. Searching the forum you will find some instruction for creating widgets as well as in the OMV documentation. OMV 6.x documentation - dashboard.d
This is the widget code for "smart_info.yaml". I attached the file if interested.
version: "1.0"
type: dashboard-widget
data:
id: 5e518804-d1f7-11ee-966d-77e35ad4fd0d
type: grid
reloadPeriod: 60000
permissions:
role:
- admin
title: _("S.M.A.R.T. Info")
description: _("Displays the S.M.A.R.T. info of all monitored disk devices.")
# Text used in templates and therefore cannot be automatically extracted
# by i18n tools.
i18n:
- _("Good")
- _("Unknown")
- _("Device is being used outside design parameters.")
- _("Device was used outside of design parameters in the past.")
- _("Device has a few bad sectors.")
- _("Device has many bad sectors.")
grid:
item:
content: '{{ canonicaldevicefile }}<br>{{ temperature | notavailable }}{% if temperature %}°C{% endif %}'
class: 'omv-cursor-pointer omv-text-center omv-text-nowrap {% set overallStatusColor = { "BAD_ATTRIBUTE_NOW": "omv-background-color-pair-error", "BAD_ATTRIBUTE_IN_THE_PAST": "omv-background-color>
tooltip: '{% set overallStatusText = { "GOOD": "Good", "BAD_STATUS": "Unknown", "BAD_ATTRIBUTE_NOW": "Device is being used outside design parameters.", "BAD_ATTRIBUTE_IN_THE_PAST": "Device was us>
url: '/storage/smart/devices/details/{{ devicefile | encodeuricomponent }}'
emptyMessage: _("No monitored devices.")
store:
proxy:
service: Smart
get:
method: getListBg
params:
start: 0
limit: -1
task: true
sorters:
- prop: devicefile
dir: asc
filters:
- operator: "truthy"
arg0:
prop: "monitor"
Alles anzeigen
Hi folks
Yes, hack may be a wrong hard word for modifying the original sources. I'm new with OMV and like it very much.
Generating a new personal widget is an option and i have to check the manual or wiki to understand the uuid stuff...
Thanks for your work and informations
prtigger
How about adding a system wide option to display any temperatures in either Centigrade or Fahrenheit?
im on OMV 6 and this used to show. Its now gone on mine.
How about adding a system wide option to display any temperatures in either Centigrade or Fahrenheit?
Believe it or not, even being in the US, I would have to translate Fahrenheit to Celsius for any computer temps. I didn't even know the sensors command had a fahrenheit flag (-f) until I just looked right now.
im on OMV 6 and this used to show. Its now gone on mine.
It was changed in OMV 6 and 7. Creating the file from post 8 would bring it back.
It was changed in OMV 6 and 7. Creating the file from post 8 would bring it back.
I have the box still just says "No monitored devices"
I have the box still just says "No monitored devices"
Hi folks
with your great help, i could change some widgets to the settings i prefer (as new renamed widgets).
Only thing i need to know now:
How can i do the translation for the text changes (in the widget still English) to my language German.
Best regards
prtigger
How can i do the translation for the text changes (in the widget still English) to my language German.
That would require creating the locale files. Since you created the files, why not just change the text to German?
That would require creating the locale files. Since you created the files, why not just change the text to German?
Do i understand it correct, if i want to integrate translations for newly generated widgets, i have to modify parts of OMV
that may be overwritten by new OMV-updates with changes in this part?
I don´t know how OMV is handling the language selection...
I confirm, the easiest way is changing the language in the personal widgets ...
Best regards
prtigger
Do i understand it correct, if i want to integrate translations for newly generated widgets, i have to modify parts of OMV
that may be overwritten by new OMV-updates with changes in this part?
I don´t know how OMV is handling the language selection...
OMV looks at its own locale files to see if there is a translation for each string first. If it does not find it, then it will look at the plugin's locale files.
Since you are not creating a plugin, plugin locale files do not exist. So, your widgets are looking at the OMV locale files which most likely do not contain the string to translate. You would have to edit OMV locale files which will be overwritten with an OMV update.
I confirm, the easiest way is changing the language in the personal widgets ...
This is what I recommend doing.
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!