OPNsense Forum

English Forums => 24.7, 24.10 Legacy Series => Topic started by: chemlud on July 16, 2024, 04:59:32 PM

Title: Dashboard re-write - Which plugins do survive?
Post by: chemlud on July 16, 2024, 04:59:32 PM
Hy!

Read the release notes for 24.7.RC1 and found this gem:

Quoteo The dashboard has been replaced. Widgets from the old format are no longer supported and need to be rewritten by the respective authors.

Is there an overview, which widgets are available as of now? Who are the maintainers of the remaining widgets and are there any re-writes to be expected? Timelines, maybe, at least preliminary? ;-)
Title: Re: Dashboard re-write - Which plugins do survive?
Post by: franco on July 16, 2024, 05:03:35 PM
As of now these are not converted:

% git grep widgets.include
dns/rfc2136/src/www/widgets/widgets/rfc2136.widget.php:require_once("widgets/include/rfc2136.inc");
net/wol/src/www/widgets/widgets/wake_on_lan.widget.php:require_once("widgets/include/wake_on_lan.inc");
sysutils/apcupsd/src/www/widgets/widgets/apcupsd.widget.php:require_once("widgets/include/apcupsd.inc");
sysutils/dmidecode/src/www/widgets/widgets/dmidecode.widget.php:require_once("widgets/include/dmidecode.inc");
sysutils/smart/src/www/widgets/widgets/smart_status.widget.php:require_once('widgets/include/smart_status.inc');

Core should replace all previous used widgets... if not feel free to complain loudly stating your use case. ;)


Cheers,
Franco
Title: Re: Dashboard re-write - Which plugins do survive?
Post by: Monviech (Cedrik) on July 16, 2024, 05:14:10 PM
For Core I have rewritten the IPsec widgets.
And for my Caddy plugin I have written new widgets.
Title: Re: Dashboard re-write - Which plugins do survive?
Post by: chemlud on July 16, 2024, 05:20:00 PM
Thanks for reply!

The SMART thing is fun, but optional... WOL dito.

:-)
Title: Re: Dashboard re-write - Which plugins do survive?
Post by: franco on July 16, 2024, 05:27:53 PM
Might look into one of these plugins after initial 24.7. Tickets welcome of course.


Cheers,
Franco
Title: Re: Dashboard re-write - Which plugins do survive?
Post by: chemlud on July 16, 2024, 06:00:12 PM
Quote from: franco on July 16, 2024, 05:27:53 PM
Might look into one of these plugins after initial 24.7. Tickets welcome of course.


Cheers,
Franco

Lufthansa? Where do you want to travel?  :-*
Title: Re: Dashboard re-write - Which plugins do survive?
Post by: franco on July 16, 2024, 07:23:26 PM
:P I mean https://github.com/opnsense/plugins/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=
Title: Re: Dashboard re-write - Which plugins do survive?
Post by: franciz on July 27, 2024, 05:47:40 PM
Since last 24.7 update, I cannot see nor enable the smart widget on dashboard.
Do I have to do something else?
Title: Re: Dashboard re-write - Which plugins do survive?
Post by: franco on July 29, 2024, 08:51:05 AM
For better or worse: that is the expected behaviour for the time being.


Cheers,
Franco
Title: Re: Dashboard re-write - Which plugins do survive?
Post by: franciz on August 08, 2024, 06:58:20 PM
@franco
Is there a template or an already made widget for POST plugins?
I am not a coder, but, I can read the code and adapt it accordingly.

I was able to get the S.M.A.R.T results from command line by calling the API.
I need the widget because I always use old HDDs for the routers :)

EDIT: On curl it is working correctly, testin REST API I always get "invalid device name" doesn't matter what I try
Post
POST /api/smart/service/info?type=j HTTP/2
Host: 10.10.200.100
Content-Type: application/json
Authorization: Basic base64encode($key:$secret)
Content-Length: 6

type=j


ReceiveHTTP/2 200 OK
Set-Cookie: PHPSESSID=e58a4c0fa3a40c2d1abb2655f864e631; path=/; secure; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Content-Type: application/json; charset=UTF-8
Date: Thu, 08 Aug 2024 18:28:00 GMT
Server: OPNsense

{"message":"Invalid device name"}


EDIT2:
Stupid me, has to be in JSON format  :-X
"{"type": "H","device": "ada0"}"