Using the web interface

The web interface is built using the Django web framework, and requires that Django be installed (see Installation).

Starting the web interface

Before using the web interface, you must have created a Sumatra project using smt init.

To launch the web interface, in your project directory run:

$ smtweb &

This will launch a simple web server that listens on port 8000, and will automatically open a new tab in your browser at http://127.0.0.1:8000/. You can specify the -n option which will disable automatic opening of the new tab:

$ smtweb -n

If port 8000 is already in use, you can specify a different port with the -p option to smtweb, e.g.:

$ smtweb -p 8001

If you are using a single record store for multiple projects, you can run smtweb from anywhere and specify the location of the record store on the command line, e.g.:

$ smtweb ~/sumatra.db

List of projects

When you first start smtweb, the first page you see is a list of your projects.

_images/project_list.png

Click on the project name to see the records of your simulations/analyses in that project.

List of records

The list of records page contains a table with the following columns:

  • version control repository
  • label
  • tags
  • reason
  • outcome
  • duration
  • number of processes
  • date
  • time
  • executable name
  • executable version
  • main file
  • version
  • command line arguments

You can change which columns to display by clicking on Settings.

_images/settings_dialog.png

Selecting records

Each record is represented as one row in the table. The rows can be selected by dragging the mouse over them. As soon as you start doing that, the header of the table will be changed to contain actions you can perform with selected records. Actions you can perform are:

  • set tags for the selected records
  • delete records
  • compare records
_images/selecting_rows.png

Deleting records

When deleting records, you have the option of also deleting any data generated by that simulation or analysis.

_images/delete_records.png

Editing tags

For the selected records you can specify additional tags, edit or remove them.

_images/set_tags.png

Comparing records

From the set of selected records you can choose any two to compare them.

_images/compare_records.png

Reviewing your code

You can see the contents of your main script file by clicking the corresponding link in the table. It will be shown in the modal window which can be dragged around.

Important: for now this works only for Git and Mercurial repositories.

_images/view_main_file.png

Filtering the records

You can filter the records by clicking on the ‘tag’ button or by using the search form. This form contains the following items:

  • label
  • tags
  • reason
  • executable
  • repository
  • main file
  • date
  • interval of dates
_images/search_form.png

Search by variable name allows filtering the records using the name of parameter. If for each new simulation you have different parameter set, this feature can be useful for narrowing the set of possible records.

Accessing record details

You can access the record detail by clicking the corresponding label name in the main table. The record detail page contains the following sections:

  • general info
  • input files
  • output files
  • parameters
  • dependencies
  • platform information
  • stdout & stderr
_images/detail_view.png

Finishing up

Don’t forget to kill the webserver process (e.g. with fg, Ctrl-C) when you are finished with it.

Launching computations from the web interface

It is possible to run simulations/analyses from within the web interface. Clicking on the “New record” button will bring up the following dialog:

_images/launch_computation1.png

You can specify label, reason, tag, main file, arguments, and executable there. Main file and arguments are drop-down lists with the names of the files from the folder of the Sumatra project. As soon as the file is picked from the list, you can see its content. Moreover, the argument file is editable and any changes you made can be saved from this web page. You can hide and open the content of the files by clicking the corresponding links below the drop-down list.

_images/launch_computation2.png

On clicking run, the computation is launched and a progress bar appears. On succesful completion, a new record is added to the list of records page.

Customizing the web interface

You can customize the web interface on a per-project basis by placing your own Django templates in a “templates” subdirectory of the Sumatra ”.smt” directory. The templates you can customize are called “base.html”, “record_list.html”, “show_file.html”, “project_detail.html”, “show_csv.html”, “show_image.html”, “record_detail.html”, “show_diff.html”, “tag_list.html”. The best way to proceed is to copy the default template from “/path/to/sumatra/web/templates” to “/path/to/myproject/.smt/templates” and then modify it.