jks-prv / Beagle_SDR_GPS

KiwiSDR: BeagleBone web-accessible shortwave receiver and software-defined GPS (archived)
http://kiwisdr.com
484 stars 161 forks source link

Request for generic iframe extension #335

Closed OH1KK closed 4 years ago

OH1KK commented 4 years ago

I'd like to see generic iframe extension on KiwiSDR. It would be an extension which does not actually do anyhing deep with KiwiSDR, just load a contents of remote webpage and show it content in KiwiSDR gui.

Extension configuration page on KiwiSDR's admin could include items like

Then result would be something like this.

kiwisdr-iframe-extension

With this generic extension there would not no more need to alter actual kiwisdr code to make new extension.

OH1KK commented 4 years ago

I am working with this. I wrote proof-of-concept extension based on antenna switch extension and it seems to work on my kiwisdr. But extension quality is not good enough to make it public yet.

OH1KK commented 4 years ago

Not perfect, but works for me. https://github.com/OH1KK/KiwiSDR-iframe-extension

jks-prv commented 4 years ago

Why did you add code in {main,ext}.cpp and kiwi.h to set “have_iframe_ext”? It never gets used anyplace.

“have_ant_switch_ext” exists only for use by the code that shows the icon in /status (and hence sdr.hu http://sdr.hu/) when the antenna switch extensions is installed.

On Dec 30, 2019, at 1:46 AM, Kari Karvonen notifications@github.com wrote:

I'd like to see generic iframe extension on KiwiSDR. It would be an extension which does not actually do anyhing deep with KiwiSDR, just load a contents of remote webpage and show it content in KiwiSDR gui.

Extension configuration page on KiwiSDR's admin could include items like

Extension name: rotator Extension title: Rotator control Help description: Rotator control for ALA1530LN loop antenna iframe URL for content: http://www.mysite.org/rotator/ http://www.mysite.org/rotator/ Window width: 400px Window height: 400px Then result would be something like this.

https://user-images.githubusercontent.com/4292337/71557030-10bca880-2a49-11ea-9784-db4afd9d4b74.png With this generic extension there would not no more need to alter actual kiwisdr code to make new extension.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jks-prv/Beagle_SDR_GPS/issues/335?email_source=notifications&email_token=ABMD6GYAPZXDY6TGSQJ5CRDQ3CL33A5CNFSM4KA33JM2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IDDLKKA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMD6G424CLGGER2OUCVBGDQ3CL33ANCNFSM4KA33JMQ.

jks-prv commented 4 years ago

This extensions has just the “default" .cpp code. For extensions like this I need to figure out a way to load then automatically at Kiwi server start time so you don’t have to recompile the server. That is, you just put the extension .js/.css code in /root/extensions as usual and it gets discovered when the server starts up. I think this would be very useful.

Let me work on that..

On Dec 30, 2019, at 1:46 AM, Kari Karvonen notifications@github.com wrote:

I'd like to see generic iframe extension on KiwiSDR. It would be an extension which does not actually do anyhing deep with KiwiSDR, just load a contents of remote webpage and show it content in KiwiSDR gui.

Extension configuration page on KiwiSDR's admin could include items like

Extension name: rotator Extension title: Rotator control Help description: Rotator control for ALA1530LN loop antenna iframe URL for content: http://www.mysite.org/rotator/ http://www.mysite.org/rotator/ Window width: 400px Window height: 400px Then result would be something like this.

https://user-images.githubusercontent.com/4292337/71557030-10bca880-2a49-11ea-9784-db4afd9d4b74.png With this generic extension there would not no more need to alter actual kiwisdr code to make new extension.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jks-prv/Beagle_SDR_GPS/issues/335?email_source=notifications&email_token=ABMD6GYAPZXDY6TGSQJ5CRDQ3CL33A5CNFSM4KA33JM2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IDDLKKA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMD6G424CLGGER2OUCVBGDQ3CL33ANCNFSM4KA33JMQ.

OH1KK commented 4 years ago

Why did you add code in {main,ext}.cpp and kiwi.h to set “have_iframe_ext”? It never gets used anyplace. “have_ant_switch_ext” exists only for use by the code that shows the icon in /status (and hence sdr.hu http://sdr.hu/) when the antenna switch extensions is installed.

I just mimic ant_switch extension. I did not realize that those are not needed. I removed {main,ext}.cpp and kiwi.h modifications.

jks-prv commented 4 years ago

Okay, fair enough. I should have had a comment in the code saying what it was for, lol.

Your idea is very good. People have been asking for a similar thing to add chat features on the main interface. Maybe this will work for them.

On Dec 30, 2019, at 9:13 AM, Kari Karvonen notifications@github.com wrote:

Why did you add code in {main,ext}.cpp and kiwi.h to set “have_iframe_ext”? It never gets used anyplace. “have_ant_switch_ext” exists only for use by the code that shows the icon in /status (and hence sdr.hu http://sdr.hu/ http://sdr.hu/) when the antenna switch extensions is installed.

I just mimic and_switch extension. I did not realize that those are not need. I removed {main,ext}.cpp and kiwi.h modifications.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jks-prv/Beagle_SDR_GPS/issues/335?email_source=notifications&email_token=ABMD6G4WKGGZFDXSPH3ZGT3Q3EAHNA5CNFSM4KA33JM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHZHLRA#issuecomment-569537988, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMD6GYHKR2MDAOZ7M7UO23Q3EAHNANCNFSM4KA33JMQ.

jks-prv commented 4 years ago

This extension is very useful. So I think it makes sense to put it into the base Kiwi software rather than as a user-contributed extension that has to be downloaded.

What do you think?

OH1KK commented 4 years ago

I Agree. Feel free to adopt extension code into KiwiSDR.

jks-prv commented 4 years ago

Will be in v1.365