<commit_before># Web Components Swarming UI


This is the Web Components based UI. It aims to be lighter-weight and more
future-proof than the previous Polymer v1 UI, but functionally identical.

## Prerequisites

You will install a node.js, npm and npx via cipd (they usually come together).
You should always use the same node/npm/npx used in bots. Please use
`gclient sync` to fetch them.

## npm install

After doing a git pull, before running any make commands, you must run:

    make install_deps

This should only be required once per pull (in case package.json was updated).

## Building

To build the pages for deploying, run:

    make release

The output of the dist/ folder will have the bundled HTML, JS and CSS files.
This should be checked in so as to fit with the App Engine deployment setup.

## Using the demo pages

To build the pages locally for demoing/developing, run:

    make serve

Then, navigate to <http://localhost:8080/newres/swarming-index.html> to see
one of the demo pages.  You can navigate to newres/[foo] where foo is one
of the modules (found in ./modules/) or one of the top level HTML files
(found in ./pages/). The pages in ./modules have mock data, so those are
generally more useful.

The list of all demo pages so far (for easy clicking):

  - [bot-list](http://localhost:8080/newres/bot-list.html)
  - [bot-mass-delete](http://localhost:8080/newres/bot-mass-delete.html)
  - [sort-toggle](http://localhost:8080/newres/sort-toggle.html)
  - [swarming-app](http://localhost:8080/newres/swarming-app.html)
  - [swarming-index](http://localhost:8080/newres/swarming-index.html)
  - [task-list](http://localhost:8080/newres/task-list.html)
  - [task-mass-cancel](http://localhost:8080/newres/task-mass-cancel.html)
  - [task-page](http://localhost:8080/newres/task-page.html)<commit_msg>Added instructions for running swarming ui2 on your cloudtop<commit_after># Web Components Swarming UI


This is the Web Components based UI. It aims to be lighter-weight and more
future-proof than the previous Polymer v1 UI, but functionally identical.

## Prerequisites

You will install a node.js, npm and npx via cipd (they usually come together).
You should always use the same node/npm/npx used in bots. Please use
`gclient sync` to fetch them.

## npm install

After doing a git pull, before running any make commands, you must run:

    make install_deps

This should only be required once per pull (in case package.json was updated).

## Building

To build the pages for deploying, run:

    make release

The output of the dist/ folder will have the bundled HTML, JS and CSS files.
This should be checked in so as to fit with the App Engine deployment setup.

## Using the demo pages

To build the pages locally for demoing/developing, run:

    make serve

Then, navigate to <http://localhost:8080/newres/swarming-index.html> to see
one of the demo pages.  You can navigate to newres/[foo] where foo is one
of the modules (found in ./modules/) or one of the top level HTML files
(found in ./pages/). The pages in ./modules have mock data, so those are
generally more useful.

If you are running `make serve` on a cloudtop you can access the demo pages on your local machine by using an ssh-tunnel. Run the command

    ssh <your-user-name>@<your-cloudtop-host> -L 8080:localhost:8080


All the links should work as expected if opened on local machine.

The list of all demo pages so far (for easy clicking):

  - [bot-list](http://localhost:8080/newres/bot-list.html)
  - [bot-mass-delete](http://localhost:8080/newres/bot-mass-delete.html)
  - [sort-toggle](http://localhost:8080/newres/sort-toggle.html)
  - [swarming-app](http://localhost:8080/newres/swarming-app.html)
  - [swarming-index](http://localhost:8080/newres/swarming-index.html)
  - [task-list](http://localhost:8080/newres/task-list.html)
  - [task-mass-cancel](http://localhost:8080/newres/task-mass-cancel.html)
  - [task-page](http://localhost:8080/newres/task-page.html)
{'fraction_non_alphanumeric': 0.10130718954248366, 'fraction_numerical': 0.020864756158873805, 'mean_word_length': 3.882208588957055, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4603746', 'n_tokens_mistral': 1281, 'n_tokens_neox': 1173, 'n_words': 477}