Difference between revisions of "Web Interface"
(Created page with "this is the config line to set in ClientConfig.json : "enableWebManagement" : true, once that is on, you can talk to it runs in a browser we can make it connect to the web...") |
|||
Line 1: | Line 1: | ||
− | + | There is a web interface API. | |
− | + | You must enable it by setting this config line in ClientConfig.json : '''"enableWebManagement" : true''' | |
− | + | this config setting defines the port: "webManagementPort" : 8080, | |
+ | |||
+ | once that is on, you can talk to The API at port 8080 using a browser | ||
− | |||
+ | ==UI== | ||
you can have a tree view of all the stuff in the zone | you can have a tree view of all the stuff in the zone | ||
Line 26: | Line 28: | ||
otherwise it works the same as what is there now | otherwise it works the same as what is there now | ||
+ | ==code== | ||
Look in the WebContent directory of the client | Look in the WebContent directory of the client | ||
Line 31: | Line 34: | ||
that has js code which talks to those ports | that has js code which talks to those ports | ||
− | |||
− | |||
look especially at the files called MessageFactory.js, IndexInterface.js, PropertyDialog.js etc | look especially at the files called MessageFactory.js, IndexInterface.js, PropertyDialog.js etc | ||
Line 40: | Line 41: | ||
there is also a PropertyDialog.js | there is also a PropertyDialog.js | ||
− | CommandLineInterface.js can do things like invoke methods on objects | + | CommandLineInterface.js can do things like invoke methods on objects |
− | |||
− | |||
there is a Console.jsp page which sort of does something | there is a Console.jsp page which sort of does something | ||
Line 54: | Line 53: | ||
So there is some kind of API that a JS script running on the browser can use to send commands to that port? | So there is some kind of API that a JS script running on the browser can use to send commands to that port? | ||
− | you can make messages and send them | + | you can make messages and send them to the engine |
look at MessageFactory.js | look at MessageFactory.js | ||
you can Index what is there - look a IndexInterface.js | you can Index what is there - look a IndexInterface.js |
Revision as of 19:27, 19 May 2021
There is a web interface API.
You must enable it by setting this config line in ClientConfig.json : "enableWebManagement" : true
this config setting defines the port: "webManagementPort" : 8080,
once that is on, you can talk to The API at port 8080 using a browser
UI
you can have a tree view of all the stuff in the zone
and a JS fiddle like thing for the content of the nodes
the js methods and such
the "JS code" will just be an additional property on any object called "Code"
any JS inside that has access to the properties on the object
any JS methods listed in another property called CodeExposedInputs are available as ports on the object
CodeExposedOutputs - this is outputs. JS can call these outputs and they can be wired from
otherwise it works the same as what is there now
code
Look in the WebContent directory of the client
there you will find a folder called Hyperbe/js/classes (edited)
that has js code which talks to those ports
look especially at the files called MessageFactory.js, IndexInterface.js, PropertyDialog.js etc
oh and also the Realtime.js file
there is also a PropertyDialog.js
CommandLineInterface.js can do things like invoke methods on objects
there is a Console.jsp page which sort of does something
Does anything useful to a normal user happen if you open a browser on that port?
not really. maybe a command line from the console page I mentioned
So there is some kind of API that a JS script running on the browser can use to send commands to that port?
you can make messages and send them to the engine
look at MessageFactory.js
you can Index what is there - look a IndexInterface.js