Skip to content

Commit

Permalink
docs(README): improved README, and some very minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Nov 23, 2022
1 parent 80dcc44 commit 408174c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,24 @@ First, you need to build it, which you can do by:

```sh
cd visualization/
npm install -g pug pug-cli browserify # might need sudo
npm install -g pug-cli browserify # might need sudo
npm install
make build
```

You can then configure aw-server (aw-server-rust not yet supported) to host the custom visualization by adding the following to your aw-server config file:
You can then configure aw-server (aw-server-rust not yet supported) to host the custom visualization by adding the following to your aw-server config file (with the correct path!):

```toml
[server.custom_static]
aw-watcher-input = "/home/user/path/to/aw-watcher-input/visualization/dist"
```

You then need to restart aw-server for the changes to take effect.

Once the server is restarted, you can open the Activity view in the web UI, click "Edit view", then "Add visualization", then click the cogwheel and select "Custom visualization". This will open a popup asking for which visualization, here enter "aw-watcher-input".

It should now work. Click save and you're done!

# Notes

This was massively inspired by ulogme by @karpathy, here's a screenshot of how it looks:
Expand Down
3 changes: 3 additions & 0 deletions visualization/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

build: dist/index.html dist/bundle.js

clean:
rm -r dist

dist/bundle.js: src/index.js
browserify $< -o $@

Expand Down
1 change: 1 addition & 0 deletions visualization/src/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ html
title aw-watcher-input visualization
style
| th { text-align: left; }
| body { font-family: sans-serif; }
body
p#status

Expand Down

0 comments on commit 408174c

Please sign in to comment.