Contributing to Net Log Viewer

Check-out the code

git clone https://chromium.googlesource.com/catapult
cd catapult/netlog_viewer/netlog_viewer

Running locally for development

cd catapult/netlog_viewer
./bin/serve_static

The Net Log viewer has no server-side dependencies, so it can be loaded through index.html using any static HTTP server (provided components/ is also mapped). See the serve_static script above for an example.

This is convenient for development using an edit/reload cycle, however this is not quite what is deployed to https://netlog-viewer.appspot.com/.

Running tests

cd catapult
./bin/run_dev_server --no-install-hooks --port 8111

Now navigate to http://localhost:8111/netlog_viewer/tests.html to run the tests and see their results.

Note that running the tests in headless mode does not currently work (i.e. netlog_viewer/bin/run_dev_server_tests).

Building a version for deployment

cd catapult/netlog_viewer
./netlog_viewer_build/build_for_appengine.py

This command will package all the HTML/JavaScript/CSS into a single vulcanized.html file under catapult/netlog_viewer/appengine/static/ (the build outputs will show up as an untracked files by git, and should not be committed).

The bundled app can be served by any static server. To test it using a similar environment as App Engine, serve it with:

cd catapult/netlog_viewer/appengine
dev_appserver.py app.yaml

dev_appserver.py is part of the Google Cloud SDK, and can be installed using:

sudo apt-get install google-cloud-sdk google-cloud-sdk-app-engine-python

Deploying to netlog-viewer.appspot.com

Only certain project OWNERS can publish the checked in code to https://netlog-viewer.appspot.com/.

For those members, here are the internal instructions.

Reporting bugs

File a bug using this chromium bug template which will add the component Internals>Network>Logging. Please also prefix the title with [NetLogViewer].

Contributing changes

Changes should be proposed using a Gerrit code review, with the reviewer set to one of the NetLog OWNERS. For instructions on how to use the code review system, see catapult/CONTRIBUTING.md.

Known issues

This viewer code was extracted from Chromium and has not yet been modernized.