1
Development and Code Review / Re: APC UPS new plugin
« on: August 07, 2024, 05:39:10 pm »
Droid999, thank you for this, I've really missed this widget since update!
The culprit was this line in my case:
I've simply commented the line out and now the widget works perfectly fine!
You can try to determine the culprit in your case by opening dev console, which might have an error similar to the one I had:
I followed the instructions but I get "Failed to load widget" showing in the widget frame.
The culprit was this line in my case:
Code: [Select]
rows.push([this.translations['t_int_temp'], this.data['status']['ITEMP']['value']]);
Apcupsd status page does not report the ITEMP metric, which leads to js error.I've simply commented the line out and now the widget works perfectly fine!
You can try to determine the culprit in your case by opening dev console, which might have an error similar to the one I had:
Code: [Select]
Failed to load content for widget: Apcupsd, Error:
TypeError: undefined is not an object (evaluating 'this.data['status']['ITEMP']['value']')
In this case, open the Apcupsd.js, find the line mentioned in the error message and remove / comment it out.