From 5033fe93af643ba8e4a581b551b71e4b2b3c1af9 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 6 Jan 2014 13:14:28 +0100 Subject: [PATCH] Use a variable for the default machine id --- README.md | 2 +- website/awfy.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cc2ede5..7cee189 100644 --- a/README.md +++ b/README.md @@ -70,4 +70,4 @@ There is also a `monitor.py` script provided in the server folder. You can run t Website ------- -Nothing special needed, just place the static files somewhere. Note that AWFY's flot is slightly modified, so it might not work to just replace it with upstream flot. There must be a 'data' folder that contains the json/js files dumped by `update.py`. It can be a symlink. +Nothing special needed, just place the static files somewhere. Don't forget to replace the default machine number in website/awfy.js, which is the one that will show up in the first place. Note that AWFY's flot is slightly modified, so it might not work to just replace it with upstream flot. There must be a 'data' folder that contains the json/js files dumped by `update.py`. It can be a symlink. diff --git a/website/awfy.js b/website/awfy.js index 74c4d9e..6f7e218 100644 --- a/website/awfy.js +++ b/website/awfy.js @@ -5,6 +5,7 @@ "use strict"; var AWFY = { }; +AWFY.DEFAULT_MACHINE_ID = 11; AWFY.refreshTime = 60 * 5; AWFY.machineId = 0; AWFY.hasLegend = false; @@ -627,7 +628,7 @@ AWFY.parseURL = function () { if ('machine' in this.queryParams) machineId = parseInt(this.queryParams['machine']); else - machineId = 11; + machineId = this.DEFAULT_MACHINE_ID; var view = this.queryParams['view']; if (!view || (view != 'overview' && view != 'breakdown'))