Skip to content
mnjuhn edited this page Jan 30, 2013 · 25 revisions

Prerequisites

Before getting started you'll need to install:

  1. [git - instructions for windows users ] (https://github.com/calpath/readMe/wiki/Installing-Command-Line-Git-for-Windows)
  2. [java] (https://github.com/calpath/readMe/wiki/Installing-Java) and [maven] (https://github.com/calpath/readMe/wiki/Installing-Maven-And-linking-it-to-Artifactory)
  3. [node.js and npm] (http://nodejs.org/) - npm comes with node.js
    [Here] (http://howtonode.org/how-to-install-nodejs) are instructions for installing node.js if the above package does not work.
  4. Install coffee-script using npm: sudo npm install -g coffee-script

In order to execute headless testing, you need to also [phantomjs] (http://phantomjs.org/download.html).

Getting the Scenario Editor

  1. git clone https://github.com/calpath/scenario-editor

  2. git checkout dev (dev is the development branch for the project)

  3. The app directory contains everything necessary to run the scenario-editor. In order to run the application do the following:

a) At command line, navigate to the src/main/webapp/app directory and type: mkdir -p js/vendor

b) In the src/main/webapp/lib directory, run "make" at the command-line. Note: you may have to run this twice the first time since it needs to create sub-directories.

c) "make" will compile all coffeescript files in the src/main/webapp/lib folder and copy the js files to the app directory.

a) Type the following maven command in the scenario-editor root directory to run the web app locally:

mvn jetty:run

b) Open http://localhost:9090/scenario-editor-0.1-SNAPSHOT/app/main.html# in your browser and load an appropriate xml file to see it displayed on the map. Note: In Chrome you must open the browser with this flag at command-line: --allow-file-access-from-files.

 On a mac at the command line: 
 /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --allow-file-access-from-files 
 
 This is only needed when you are running the application locally as a file and not through a web server.

c) Debugging and generally viewing what is in the browser memory can be done in Chrome *** by:

           1) View -> Developer -> Javascript console. The console will open and display 
              any javascript errors/messages the browser encounters.

           2) More on debugging in Chrome can be found here: 
              http://jtaby.com/2012/04/23/modern-web-development-part-1.html

Miscellaneous Information

  • Why does it make "hang"? After executing "make" the program will appear to "hang" in the terminal window.

This is by design, it is watching for any changes to app/coffeescripts folder. If there is change to one of the source files it will be automatically compiled to javascript. The watching can be stopped by removing the --watch flag from the final line in the app/Makefile file.

  • currently the scenario-editor is displaying information in line with the beats schema definition. This
    may change to another schema version as the project develops. In order to compile the correct coffeescripts(aurora or sirius or whatever in the future) you need to:

    1. open app/Makefile in your text editor and change the path from libs/sirius-coffee to libs/new-verion-name-coffee
  • Debugging can be done in firefox as well. I would recommend installing the Firebug plugin. A similar process for opening the javascript console is available.

Clone this wiki locally