NUT Dashboard Widget (2.1.4)
-
… hit the plus sign, add these files and submit a pull request for review...
Can i use various git tools (clone and then pull commits), or should i use on github "+" & "pull" if i nearly newbie to git. And should i put all modified files to "widget" tree, although not all these files from that path?
-
Put the new files in the places they need to go in the final install - /usr/local/www/widgets/widgets /usr/local/www/widgets/include
Edit other files in the place they are already.
For this you can just use GitHub online, click the pencil to edit, the plus to add a new file. It will make a repository for you. It will do a commit every time you do something - so you end up with a few commits then make a pull request. It looks a bit messier having individual commits, but for small changes it is easy to do all online - no need to learn about git clone and so on.
If you mess it all up you cam always delete your repository and start again apply the changes until you have a clean set of commits, then do the pull request. -
I recently installed 2000W Enterprise UPS with 648 Watt/Hours of battery at each site where I have pfsense running for my personal use to keep the modems, switches and pfsense up during outages. (Very very long outages). I hope these GUI changes become available as part of a normal package in pfsense. It would be very convenient.
-
Sent request to merge changes to main project repository.
-
Is there any progress on SunStroke's merge request? I'm currently unaware of where I can track it & check on the status. I'm eager to see this widget in a release.
-
Is there any progress on SunStroke's merge request? I'm currently unaware of where I can track it & check on the status. I'm eager to see this widget in a release.
No, my commits was not merged till now. You can install "System Patches" package and try to apply my patches individually. I done it for myself.
NUT widget (add main file) - http://github.com/pfsense/pfsense/commit/d9fcbc2048041285690cc28159753acdb0bbb7a3.patch
NUT widget (add 'inc' file) - http://github.com/pfsense/pfsense/commit/4dda40b25ee72d899add9fb18e41310dfcc53a17.patch
NUT widget ajax callback - http://github.com/pfsense/pfsense/commit/5c5e2a846b4c98cb67fe7828ddb131054d71a644.patch
NUT widget update func. - http://github.com/pfsense/pfsense/commit/225ea5746d83b6e79b96904e3f3dfb7c7b7defd4.patch -
No, my commits was not merged till now. You can install "System Patches" package and try to apply my patches individually. I done it for myself.
NUT widget (add main file) - http://github.com/pfsense/pfsense/commit/d9fcbc2048041285690cc28159753acdb0bbb7a3.patch
NUT widget (add 'inc' file) - http://github.com/pfsense/pfsense/commit/4dda40b25ee72d899add9fb18e41310dfcc53a17.patch
NUT widget ajax callback - http://github.com/pfsense/pfsense/commit/5c5e2a846b4c98cb67fe7828ddb131054d71a644.patch
NUT widget update func. - http://github.com/pfsense/pfsense/commit/225ea5746d83b6e79b96904e3f3dfb7c7b7defd4.patchThank's god, finally. Will test for sure as time allows.
General note: People, when you are doing some patches, please post diffs. Do not describe what to edit where. Total waste of time and error prone like hell.
Edit: Seems to work pretty well…
-
Same thing here.
Well done !!
-
No, my commits was not merged till now. You can install "System Patches" package and try to apply my patches individually. I done it for myself.
NUT widget (add main file) - http://github.com/pfsense/pfsense/commit/d9fcbc2048041285690cc28159753acdb0bbb7a3.patch
NUT widget (add 'inc' file) - http://github.com/pfsense/pfsense/commit/4dda40b25ee72d899add9fb18e41310dfcc53a17.patch
NUT widget ajax callback - http://github.com/pfsense/pfsense/commit/5c5e2a846b4c98cb67fe7828ddb131054d71a644.patch
NUT widget update func. - http://github.com/pfsense/pfsense/commit/225ea5746d83b6e79b96904e3f3dfb7c7b7defd4.patchWhen patching will be done, you need to remove "/usr/local/www/javascript/index/ajax.js.orig". Cos "/usr/local/www/index.php" load all scripts from "/usr/local/www/javascript/index/" directory and updates are not working.
-
Sorry, perhaps a dumb question, but … is the only way to install (add 4 patches)?
Just trying to understand - this looks very good!
Thanks.
-
Sorry, perhaps a dumb question, but … is the only way to install (add 4 patches)?
Just trying to understand - this looks very good!
Thanks.
Yes. At this moment add 4 pathes is the only way to install widget. If anyone (maybe i) restructures code to make standalone package, it will be included in main package repository.
-
Works well, thanks! Just a couple minor comments,
- it would be good to have the title "UPS Status" to link to the appropriate page (like other widgets do)
- my UPS shows up fine, all works … but Status shows as "ERROR"?
Thanks again!
-
Works well, thanks! Just a couple minor comments,
- it would be good to have the title "UPS Status" to link to the appropriate page (like other widgets do)
- my UPS shows up fine, all works … but Status shows as "ERROR"?
Thanks again!
- about link - it is already done in my repository, patch links slightly outdated
- about "ERROR" - what error description is in "Model" column (screenshot, maybe?)?
-
Sounds good on the link, thanks!
As for model / details, here you go (copy / paste, sorry) …
Monitoring Model Status
Local UPS UPS CP600 On Line
Battery Charge Time Remain Battery Voltage
left barred bargray barright bar
100% 0h 52m 0s 13.3 V
Load Input Voltage Output Voltage
left barred bargray barright bar
20% 121.0 V 121.0 V
Monitoring Model Status
Local UPS OL ERRORThanks again - this is great!
-
…..
Monitoring Model Status
Local UPS UPS CP600 On Line
Battery Charge Time Remain Battery Voltage
left barred bargray barright bar
100% 0h 52m 0s 13.3 V
Load Input Voltage Output Voltage
left barred bargray barright bar
20% 121.0 V 121.0 V
Monitoring Model Status
Local UPS OL ERRORIf being seen this also.
But then I discovered something strange with
/usr/local/www/widgets/widgets/ups.widget.php
It contained twice all the instructions !!
It start with/* $Id$ Copyright 2008 Seth Mos Part of pfSense widgets (www.pfsense.com) ....
If you find the same sequence half way the file, you have everything doubled … and the widget tries to show something that doesn't exists.
I removed this second part - and the error disappeared.
-
Yep, that fixes it - thanks!
Sounds like some feedback for the person generating the patches - minor mod needed.
Awesome!
-
The patches are just fine. You applied the same patch twice.
-
Hmmm … I did test and then apply, but I could have double clicked. That is possible, won't say it's not ... :).
But a patch should fail if applied twice, no?
Thanks!
-
But a patch should fail if applied twice, no?
Hmmm, no, not with a patch on non-existent file.
-
Agreed! I guess the patch is just "adding" - makes sense.
Thanks!