Board index FlightGear Development New features

Webpanel Tutorial

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Webpanel Tutorial

Postby jonititan » Thu Nov 02, 2017 9:35 am

So after trying to follow the example set by Thorsten and failing I managed to create a working webpanel for the IDG-A33X.

It is still in progress so only a few variables update but it shows that it can be done.
Before I go too far down this road however it seems like there could be a better tutorial on how to create webpanels.

I'm happy to write this as long as i'm not showing people the wrong path.

My current way of replicating the aircraft panels in a browser is to basically Ctrl+c Ctrl+v the svg into html under an svg tag and then add the knockout data-bind calls anywhere I either need to bind the text to a value or animate a pointer.

For some reason I can't just keep the svg separate as when I use try to use an object tag to bring the file in the file renders but the data-bind bits don't work.
Joni P
Flight Data guy.
Ask me about artificial immune systems for health management of unmanned aircraft...
jonititan
 
Posts: 15
Joined: Fri Sep 29, 2017 2:04 pm

Re: Webpanel Tutorial

Postby jonititan » Tue Nov 21, 2017 10:55 am

Does anyone know what we are supposed to put in the config.json file so that webpanels actually appear under the Phi panel section?

When i click on it and go to inspect I see there is a 404 message
Code: Select all
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:8080/aircraft-dir/Phi/config.json

so it looks like it expects a directory called Phi in the aircraft directory and a file named config.json which presumably points to the webpanels and structures the list.

Wiki only mentions putting your webpanels in a Webpanel directory in the aircraft dir. I followed this and so my panels are accessed via
Code: Select all
http://localhost:8080/aircraft-dir/WebPanel/IDG-A33X-Upper-ECAM-webpanel.html


However I would like to improve it so anyone using Phi can see panels are available and can be used rather than having to know of their existence a priori and manually putting in a link instead of just clicking to open them.
Joni P
Flight Data guy.
Ask me about artificial immune systems for health management of unmanned aircraft...
jonititan
 
Posts: 15
Joined: Fri Sep 29, 2017 2:04 pm


Return to New features

Who is online

Users browsing this forum: No registered users and 6 guests