-
Notifications
You must be signed in to change notification settings - Fork 4
The DUI
This page explains how to develop and test Tweetboards with the Development User-Interface (DUI), a simple graphical user-interface.
Note: The DUI may behave erratically on MacOS. See Prequisites.
The DUI can be started with the following command
python DUI.py
You will then see the window below
If you haven’t done so already, start your browser. Go to the URL http://localhost:7737/fourgadgetdemo.html. You should see the contents of fourgadgetdemo.html; out-of-the-box you should see a page with title "Twitter Dashboard" and header "Demo Twitter Dashboard for M1.1".
An ECA file is the file that contains the specification of the ECA rules and the visualization. You can load an ECA file in the DUI using the menu "ECA file" or the buttons in the "ECA file controls" box. The abovementioned index.html belongs to ECA-file fourgadgetdemo.ECA. Load this one for a first-time check and demo.
It is useful to give the same name to the HTML-file as well as the ECA-file as they form a tightly coupled pair.
The rule engine simulates a twitter feed by one-by-one take a tweet, creating the associated new_tweet event, and triggering the associated ECA rules. You can optionally set a start time (indicating with which tweet to start), stop time and a simulation speed; this is the speed with which the tweets produce new_tweet events.
If these have been set and an ECA file is loaded, you can click "Start the rule engine". You should see in your browser the visualization initialized and dynamically changing according to the rules specified in the ECA file. In the DUI, you should see messages "Rule engine working" and "Working… NN%", and the progress bar sliding.
Usually you try to execute your set-up in the manner described above, find some error, correct it and would like to try it again. A handy way of re-initializing and restarting is to
-
If the rule engine is still running, click on Stop the rule engine.
-
Click on Refresh in your browser. You should see a rather empty page again with only a title and some other stuff you put in your HTML-file, but no gadgets.
-
When you have modified your ECA-file, click on Reload ECA file.
-
Click on Start the rule engine again.
The connection that is made between the browser and the ECA Rule Engine is known to uncer certain circumstances not always establish successfully. See Known problems for more details.