freifunk / openwrt-packages

Freifunk specific global OpenWrt Packages
Apache License 2.0
26 stars 33 forks source link

migrate luci-mod-freifunk to js #54

Closed andibraeu closed 2 years ago

andibraeu commented 3 years ago

missing or gone:

Signed-off-by: Andreas Bräu ab@andi95.de

andibraeu commented 3 years ago

cc: @SvenRoederer @pmelange

pmelange commented 3 years ago
* do we still want to show default route information on the status page?

Is this the default route when smartgw in olsrd is disabled? If so, then it would be "nice to have" but definitaley not a "need to have".

* does anyone use those freifunk widgets, that would be included via https://github.com/freifunk/openwrt-packages/blob/master/modules/luci-mod-freifunk/luasrc/view/freifunk/index.htm#L79

The Hedy and Falter firmwares both do not use freifunk-widgets. If other communities use them, I'm not sure. I would say to just leave them out.

* the OSM in Basic Settings will follow later

cc: @SvenRoederer @pmelange

andibraeu commented 3 years ago

The default routes thing look like that in the old view:

image

pmelange commented 3 years ago

I don't think it is needed. If I go to Status->Routes I see the following... Screenshot_2021-11-03_13-31-48

andibraeu commented 3 years ago

It's done so far. All the pages are migrated (as far it was possible). This should also solve some issues here.

However, we do have some leftovers in modules/luci-mod-freifunk/luasrc/controller/freifunk/freifunk.lua. We would need to know how to rebuild the zeroes testdownload. And the second one is about a pure JSON output. Maybe @jow- can help out or knows someone who could help us.

There are also some links to other modules, e.g. to show the OLSR menu in the unauthenticated freifunk module.

andibraeu commented 3 years ago

This PR should fix #23, #33 and #44

@SvenRoederer @pmelange

pmelange commented 3 years ago

as I am not active in the repo, and falter firmware doesn't use it, then I would prefer if @SvenRoederer merged this

SvenRoederer commented 3 years ago

Thanks for this rework.

I'll give it a short test on some device, but prefer merging and fix possible issues / add missing features later

andibraeu commented 3 years ago
  • OSM selection of location: done by acdb7b0, correct?

yes, correct.

I'll give it a short test on some device, but prefer merging and fix possible issues / add missing features later

👍

XDjackieXD commented 3 years ago
  • widgets: I'm also not aware of anyone who is using this, but my view is not complete. Maybe @XDjackieXD can also comment

I didn't even know they existed ^^' The few nodes that currently use OpenWRT in the FunkFeuer Vienna network only really care about publicly viewable OLSR (1 & 2) information and nickname + e-mail address of the owner (I'm currently working on bringing people back to OpenWRT but for this I'll have to write a setup wizard for FunkFeuer).

Are there any examples what could be done or has been done using the widgets?

andibraeu commented 3 years ago

I guess these are some examples for widgets: https://github.com/freifunk/openwrt-packages/tree/master/applications/luci-app-freifunk-widgets/luasrc/view/freifunk/widgets (I wasn't aware of those widgets, too)

But I'm not sure if we can use them in the shiny new js world as is. I would say not to support them anymore until someone who needs them will reimplement the widgets.

andibraeu commented 2 years ago

@SvenRoederer have you had a chance to test?

SvenRoederer commented 2 years ago

just gave it a short test with recent OpenWrt-snapshot. Seen some small issues when some data-fields are not filled, map-loading and others. But that are minor things, which should not block merging as this will fix the more critical issues (mentioned above)

One comment regarding #44 and dropping the permissions (https://github.com/freifunk/openwrt-packages/pull/44#issuecomment-988381655): Looks like the new code is not doing this explicitly like the old one, but as we now use the RPCd-acls it seems acceptable to do not.

I did not test OLSR or statistics, as they are not included in my test-build. But any issues found, can be fixed separately.

andibraeu commented 2 years ago

Access control is handled here: modules/luci-mod-freifunk/root/usr/share/rpcd/acl.d/luci-mod-freifunk-unauthenticated.json

OLSR and Statistics have not been part of this package, but the menu items. That's why there's still an old part is here

SvenRoederer commented 2 years ago

just pushed 7eb0703 to remove the widgets, that are now not supported anymore. Any concerns or let's merge this PR.

andibraeu commented 2 years ago

no concerns from me