commit bf2ea9ce66b0353604bcd3081b11a6ce5311ae3a Author: Gary Date: Mon Jan 10 01:22:50 2022 +0000 Initial Check-In diff --git a/README.md b/README.md new file mode 100644 index 0000000..bb96037 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +# NOC Screen Tab Rotator + +This app will automatically rotate and refresh tabs based on the hostname of the ?hostname variable passed to the script. + +The config Has the following: + +* **defaults** - common defaults across all clients +* * **tabTime** - how long each tab should be displayed for (Default: 30) +* * **tabRefresh** - Global setting for if a tab should be refreshed before display (Default: true) +* * **masterRefresh** - How often should the overal page be reloaded in seconds - default 86400 +* **screens** - A list of clients +* * **__hostname__** - config for the host +* * * **tabTime** - Overide for this host +* * * **tabRefresh** - Overide for this host +* * * **masterRefresh** - Overide for this host +* * * **urls** - A dict of URLs to display +* * * * **__url__** - the URL to load +* * * * * **tabRefresh** - optionall overide if this tab should(n't) be refresh before display + +Example Config: + +```js +{ + "defaults": { + "tabTime": 30, + "tabRefresh": true, + "masterRefresh": 86400 + }, + "screens": { + "screen0": { + "urls": { + "http://www.example.com/": {"tabRefresh": false}, + "http://news.bbc.co.uk/": {} + } + }, + "screen1": { + "tabTime": 60, + "urls": { + "http://www.google.com/": {} + } + } + } +} +``` diff --git a/settings.json.example b/settings.json.example new file mode 100644 index 0000000..647987b --- /dev/null +++ b/settings.json.example @@ -0,0 +1,21 @@ +{ + "defaults": { + "tabTime": 30, + "tabRefresh": true, + "masterRefresh": 86400 + }, + "screens": { + "screen0": { + "urls": { + "http://www.example.com/": {"tabRefresh": false}, + "http://news.bbc.co.uk/": {} + } + }, + "screen1": { + "tabTime": 60, + "urls": { + "http://www.google.com/": {} + } + } + } +} diff --git a/www/background-001.jpg b/www/background-001.jpg new file mode 100644 index 0000000..4cbe6b5 Binary files /dev/null and b/www/background-001.jpg differ diff --git a/www/background-002.jpg b/www/background-002.jpg new file mode 100644 index 0000000..c2f6c53 Binary files /dev/null and b/www/background-002.jpg differ diff --git a/www/background-003.jpg b/www/background-003.jpg new file mode 100644 index 0000000..ef5cb5e Binary files /dev/null and b/www/background-003.jpg differ diff --git a/www/background-004.jpg b/www/background-004.jpg new file mode 100644 index 0000000..cc8775f Binary files /dev/null and b/www/background-004.jpg differ diff --git a/www/background-005.jpg b/www/background-005.jpg new file mode 100644 index 0000000..e1c6030 Binary files /dev/null and b/www/background-005.jpg differ diff --git a/www/background-006.jpg b/www/background-006.jpg new file mode 100644 index 0000000..06ae5f1 Binary files /dev/null and b/www/background-006.jpg differ diff --git a/www/background-007.jpg b/www/background-007.jpg new file mode 100644 index 0000000..c5a68df Binary files /dev/null and b/www/background-007.jpg differ diff --git a/www/background-008.jpg b/www/background-008.jpg new file mode 100644 index 0000000..11df940 Binary files /dev/null and b/www/background-008.jpg differ diff --git a/www/index.php b/www/index.php new file mode 100644 index 0000000..618cfd6 --- /dev/null +++ b/www/index.php @@ -0,0 +1,73 @@ + + + + + NOC Screen + + + + + + +
+ +
+ +
+
 screen ip
+

unadopted - - will refresh in 60 seconds
+
+ + + diff --git a/www/screenRender.php b/www/screenRender.php new file mode 100644 index 0000000..324e528 --- /dev/null +++ b/www/screenRender.php @@ -0,0 +1,135 @@ + + + + + NOC Screen + + + + + + + + + + +\n"; + echo " \n"; + echo "\n"; +} +?> + + +