Browse Source

Adding filtering code to HTML and JS files

rfm69
Xose Pérez 6 years ago
parent
commit
79cb59b06c
9 changed files with 8105 additions and 3261 deletions
  1. +3
    -3
      README.md
  2. +4823
    -0
      code/espurna/data/index.html
  3. BIN
      code/espurna/data/index.html.gz
  4. +3020
    -3251
      code/espurna/static/index.html.gz.h
  5. +21
    -1
      code/gulpfile.js
  6. +30
    -1
      code/html/custom.js
  7. +41
    -5
      code/html/index.html
  8. +166
    -0
      code/package-lock.json
  9. +1
    -0
      code/package.json

+ 3
- 3
README.md View File

@ -4,9 +4,9 @@ ESPurna ("spark" in Catalan) is a custom firmware for ESP8285/ESP8266 based smar
It uses the Arduino Core for ESP8266 framework and a number of 3rd party libraries. It uses the Arduino Core for ESP8266 framework and a number of 3rd party libraries.
[![version](https://img.shields.io/badge/version-1.13.0c-brightgreen.svg)](CHANGELOG.md) [![version](https://img.shields.io/badge/version-1.13.0c-brightgreen.svg)](CHANGELOG.md)
[![branch](https://img.shields.io/badge/branch-dev-orange.svg)](https://github.org/xoseperez/espurna/tree/dev/)
[![travis](https://travis-ci.org/xoseperez/espurna.svg?branch=dev)](https://travis-ci.org/xoseperez/espurna)
[![codacy](https://img.shields.io/codacy/grade/c9496e25cf07434cba786b462cb15f49/dev.svg)](https://www.codacy.com/app/xoseperez/espurna/dashboard)
[![branch](https://img.shields.io/badge/branch-webui-filter-orange.svg)](https://github.org/xoseperez/espurna/tree/webui-filter/)
[![travis](https://travis-ci.org/xoseperez/espurna.svg?branch=webui-filter)](https://travis-ci.org/xoseperez/espurna)
[![codacy](https://img.shields.io/codacy/grade/c9496e25cf07434cba786b462cb15f49/webui-filter.svg)](https://www.codacy.com/app/xoseperez/espurna/dashboard)
[![license](https://img.shields.io/github/license/xoseperez/espurna.svg)](LICENSE) [![license](https://img.shields.io/github/license/xoseperez/espurna.svg)](LICENSE)
<br /> <br />
[![donate](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=xose%2eperez%40gmail%2ecom&lc=US&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHostedGuest) [![donate](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=xose%2eperez%40gmail%2ecom&lc=US&no_note=0&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHostedGuest)


+ 4823
- 0
code/espurna/data/index.html
File diff suppressed because it is too large
View File


BIN
code/espurna/data/index.html.gz View File


+ 3020
- 3251
code/espurna/static/index.html.gz.h
File diff suppressed because it is too large
View File


+ 21
- 1
code/gulpfile.js View File

@ -39,6 +39,7 @@ const log = require('fancy-log');
const csslint = require('gulp-csslint'); const csslint = require('gulp-csslint');
const crass = require('gulp-crass'); const crass = require('gulp-crass');
const replace = require('gulp-replace'); const replace = require('gulp-replace');
const remover = require('gulp-remove-code');
const dataFolder = 'espurna/data/'; const dataFolder = 'espurna/data/';
const staticFolder = 'espurna/static/'; const staticFolder = 'espurna/static/';
@ -106,6 +107,13 @@ gulp.task('buildfs_embeded', ['buildfs_inline'], function() {
}); });
gulp.task('buildfs_inline', function() { gulp.task('buildfs_inline', function() {
var remover_config = {
sensor: false,
light: false,
rfbridge: false
};
return gulp.src('html/*.html'). return gulp.src('html/*.html').
pipe(htmllint({ pipe(htmllint({
'failOnError': true, 'failOnError': true,
@ -117,10 +125,11 @@ gulp.task('buildfs_inline', function() {
pipe(favicon()). pipe(favicon()).
pipe(inline({ pipe(inline({
base: 'html/', base: 'html/',
js: [uglify],
js: [],
css: [crass, inlineImages], css: [crass, inlineImages],
disabledTypes: ['svg', 'img'] disabledTypes: ['svg', 'img']
})). })).
pipe(remover(remover_config)).
pipe(htmlmin({ pipe(htmlmin({
collapseWhitespace: true, collapseWhitespace: true,
removeComments: true, removeComments: true,
@ -133,4 +142,15 @@ gulp.task('buildfs_inline', function() {
}); });
gulp.task('test', function() {
return gulp.src('html/custom.js').
pipe(remover({
sensor: false,
light: false,
rfbridge: false
})).
pipe(gulp.dest('/home/xose/tmp/'));
});
gulp.task('default', ['buildfs_embeded']); gulp.task('default', ['buildfs_embeded']);

+ 30
- 1
code/html/custom.js View File

@ -34,6 +34,7 @@ function initMessages() {
messages[10] = "Session expired, please reload page..."; messages[10] = "Session expired, please reload page...";
} }
<!-- removeIf(!sensor)-->
function sensorName(id) { function sensorName(id) {
var names = [ var names = [
"DHT", "Dallas", "Emon Analog", "Emon ADC121", "Emon ADS1X15", "DHT", "Dallas", "Emon Analog", "Emon ADC121", "Emon ADS1X15",
@ -73,6 +74,7 @@ function magnitudeError(error) {
} }
return "Error " + error; return "Error " + error;
} }
<!-- endRemoveIf(!sensor)-->
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Utils // Utils
@ -609,6 +611,7 @@ function createRelayList(data, container, template_name) {
} }
<!-- removeIf(!sensor)-->
function createMagnitudeList(data, container, template_name) { function createMagnitudeList(data, container, template_name) {
var current = $("#" + container + " > div").length; var current = $("#" + container + " > div").length;
@ -625,6 +628,7 @@ function createMagnitudeList(data, container, template_name) {
} }
} }
<!-- endRemoveIf(!sensor)-->
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Wifi // Wifi
@ -666,6 +670,7 @@ function addNetwork() {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Relays scheduler // Relays scheduler
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
function delSchedule() { function delSchedule() {
var parent = $(this).parents(".pure-g"); var parent = $(this).parents(".pure-g");
$(parent).remove(); $(parent).remove();
@ -739,7 +744,6 @@ function initRelays(data) {
} }
} }
function initRelayConfig(data) { function initRelayConfig(data) {
@ -768,6 +772,7 @@ function initRelayConfig(data) {
// Sensors & Magnitudes // Sensors & Magnitudes
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
<!-- removeIf(!sensor)-->
function initMagnitudes(data) { function initMagnitudes(data) {
// check if already initialized // check if already initialized
@ -786,11 +791,14 @@ function initMagnitudes(data) {
} }
} }
<!-- endRemoveIf(!sensor)-->
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Lights // Lights
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
<!-- removeIf(!light)-->
function initColorRGB() { function initColorRGB() {
// check if already initialized // check if already initialized
@ -909,11 +917,14 @@ function initChannels(num) {
} }
} }
<!-- endRemoveIf(!light)-->
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// RFBridge // RFBridge
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
<!-- removeIf(!rfbridge)-->
function rfbLearn() { function rfbLearn() {
var parent = $(this).parents(".pure-g"); var parent = $(this).parents(".pure-g");
var input = $("input", parent); var input = $("input", parent);
@ -952,6 +963,7 @@ function addRfbNode() {
return line; return line;
} }
<!-- endRemoveIf(!rfbridge)-->
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Processing // Processing
@ -1000,6 +1012,8 @@ function processData(data) {
// RFBridge // RFBridge
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
<!-- removeIf(!rfbridge)-->
if ("rfbCount" === key) { if ("rfbCount" === key) {
for (i=0; i<data.rfbCount; i++) { addRfbNode(); } for (i=0; i<data.rfbCount; i++) { addRfbNode(); }
return; return;
@ -1017,11 +1031,14 @@ function processData(data) {
} }
return; return;
} }
<!-- endRemoveIf(!rfbridge)-->
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// Lights // Lights
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
<!-- removeIf(!light)-->
if ("rgb" === key) { if ("rgb" === key) {
initColorRGB(); initColorRGB();
$("input[name='color']").wheelColorPicker("setValue", value, true); $("input[name='color']").wheelColorPicker("setValue", value, true);
@ -1072,10 +1089,14 @@ function processData(data) {
useCCT = value; useCCT = value;
} }
<!-- endRemoveIf(!light)-->
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// Sensors & Magnitudes // Sensors & Magnitudes
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
<!-- removeIf(!sensor)-->
if ("magnitudes" === key) { if ("magnitudes" === key) {
initMagnitudes(value); initMagnitudes(value);
for (i in value) { for (i in value) {
@ -1091,6 +1112,8 @@ function processData(data) {
return; return;
} }
<!-- endRemoveIf(!sensor)-->
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// WiFi // WiFi
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
@ -1184,10 +1207,12 @@ function processData(data) {
} }
// Domoticz - Magnitudes // Domoticz - Magnitudes
<!-- removeIf(!sensor)-->
if ("dczMagnitudes" === key) { if ("dczMagnitudes" === key) {
createMagnitudeList(value, "dczMagnitudes", "dczMagnitudeTemplate"); createMagnitudeList(value, "dczMagnitudes", "dczMagnitudeTemplate");
return; return;
} }
<!-- endRemoveIf(!sensor)-->
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// Thingspeak // Thingspeak
@ -1200,10 +1225,12 @@ function processData(data) {
} }
// Thingspeak - Magnitudes // Thingspeak - Magnitudes
<!-- removeIf(!sensor)-->
if ("tspkMagnitudes" === key) { if ("tspkMagnitudes" === key) {
createMagnitudeList(value, "tspkMagnitudes", "tspkMagnitudeTemplate"); createMagnitudeList(value, "tspkMagnitudes", "tspkMagnitudeTemplate");
return; return;
} }
<!-- endRemoveIf(!sensor)-->
// --------------------------------------------------------------------- // ---------------------------------------------------------------------
// General // General
@ -1440,7 +1467,9 @@ $(function() {
$(".more", addNetwork()).toggle(); $(".more", addNetwork()).toggle();
}); });
$(".button-add-switch-schedule").on("click", { schType: 1 }, addSchedule); $(".button-add-switch-schedule").on("click", { schType: 1 }, addSchedule);
<!-- removeIf(!light)-->
$(".button-add-light-schedule").on("click", { schType: 2 }, addSchedule); $(".button-add-light-schedule").on("click", { schType: 2 }, addSchedule);
<!-- endRemoveIf(!light)-->
$(document).on("change", "input", hasChanged); $(document).on("change", "input", hasChanged);
$(document).on("change", "select", hasChanged); $(document).on("change", "select", hasChanged);


+ 41
- 5
code/html/index.html View File

@ -12,7 +12,9 @@
<link rel="stylesheet" href="vendor/pure-grids-responsive-1.0.0.min.css" /> <link rel="stylesheet" href="vendor/pure-grids-responsive-1.0.0.min.css" />
<link rel="stylesheet" href="vendor/side-menu.css" /> <link rel="stylesheet" href="vendor/side-menu.css" />
<link rel="stylesheet" href="vendor/checkboxes.css" /> <link rel="stylesheet" href="vendor/checkboxes.css" />
<!-- removeIf(!light)-->
<link rel="stylesheet" href="vendor/jquery.wheelcolorpicker-3.0.3.css" /> <link rel="stylesheet" href="vendor/jquery.wheelcolorpicker-3.0.3.css" />
<!-- endRemoveIf(!light)-->
<link rel="stylesheet" href="custom.css" /> <link rel="stylesheet" href="custom.css" />
<!-- endbuild --> <!-- endbuild -->
@ -98,9 +100,11 @@
<a href="#" class="pure-menu-link" data="panel-idb">INFLUXDB</a> <a href="#" class="pure-menu-link" data="panel-idb">INFLUXDB</a>
</li> </li>
<!-- removeIf(!light)-->
<li class="pure-menu-item module module-color"> <li class="pure-menu-item module module-color">
<a href="#" class="pure-menu-link" data="panel-color">LIGHTS</a> <a href="#" class="pure-menu-link" data="panel-color">LIGHTS</a>
</li> </li>
<!-- endRemoveIf(!light)-->
<li class="pure-menu-item module module-mqtt"> <li class="pure-menu-item module module-mqtt">
<a href="#" class="pure-menu-link" data="panel-mqtt">MQTT</a> <a href="#" class="pure-menu-link" data="panel-mqtt">MQTT</a>
@ -110,17 +114,21 @@
<a href="#" class="pure-menu-link" data="panel-ntp">NTP</a> <a href="#" class="pure-menu-link" data="panel-ntp">NTP</a>
</li> </li>
<!-- removeIf(!rfbridge)-->
<li class="pure-menu-item module module-rfb"> <li class="pure-menu-item module module-rfb">
<a href="#" class="pure-menu-link" data="panel-rfb">RF</a> <a href="#" class="pure-menu-link" data="panel-rfb">RF</a>
</li> </li>
<!-- endRemoveIf(!rfbridge)-->
<li class="pure-menu-item module module-sch"> <li class="pure-menu-item module module-sch">
<a href="#" class="pure-menu-link" data="panel-schedule">SCHEDULE</a> <a href="#" class="pure-menu-link" data="panel-schedule">SCHEDULE</a>
</li> </li>
<!-- removeIf(!sensor)-->
<li class="pure-menu-item module module-sensors"> <li class="pure-menu-item module module-sensors">
<a href="#" class="pure-menu-link" data="panel-sensors">SENSORS</a> <a href="#" class="pure-menu-link" data="panel-sensors">SENSORS</a>
</li> </li>
<!-- endRemoveIf(!sensor)-->
<li class="pure-menu-item module module-relay"> <li class="pure-menu-item module module-relay">
<a href="#" class="pure-menu-link" data="panel-relay">SWITCHES</a> <a href="#" class="pure-menu-link" data="panel-relay">SWITCHES</a>
@ -177,13 +185,15 @@
<div id="relays"></div> <div id="relays"></div>
<!-- removeIf(!light)-->
<div id="colors"></div> <div id="colors"></div>
<div id="cct"></div> <div id="cct"></div>
<div id="channels"></div> <div id="channels"></div>
<!-- endRemoveIf(!light)-->
<!-- removeIf(!sensor)-->
<div id="magnitudes"></div> <div id="magnitudes"></div>
<!-- endRemoveIf(!sensor)-->
<div class="pure-u-1 pure-u-lg-1-2 state"> <div class="pure-u-1 pure-u-lg-1-2 state">
@ -382,6 +392,7 @@
</div> </div>
</div> </div>
<!-- removeIf(!light)-->
<div class="panel" id="panel-color"> <div class="panel" id="panel-color">
<div class="header"> <div class="header">
@ -467,6 +478,7 @@
</fieldset> </fieldset>
</div> </div>
</div> </div>
<!-- endRemoveIf(!light)-->
<div class="panel" id="panel-admin"> <div class="panel" id="panel-admin">
@ -638,7 +650,9 @@
<div id="schedules"></div> <div id="schedules"></div>
<button type="button" class="pure-button button-add-switch-schedule module module-relay">Add switch schedule</button> <button type="button" class="pure-button button-add-switch-schedule module module-relay">Add switch schedule</button>
<!-- removeIf(!light)-->
<button type="button" class="pure-button button-add-light-schedule module module-color">Add channel schedule</button> <button type="button" class="pure-button button-add-light-schedule module module-color">Add channel schedule</button>
<!-- endRemoveIf(!light)-->
</fieldset> </fieldset>
@ -735,11 +749,13 @@
<div class="pure-u-1 pure-u-lg-3-4 hint"> <div class="pure-u-1 pure-u-lg-3-4 hint">
This is the root topic for this device. The {hostname} and {mac} placeholders will be replaced by the device hostname and MAC address.<br /> This is the root topic for this device. The {hostname} and {mac} placeholders will be replaced by the device hostname and MAC address.<br />
- <strong>&lt;root&gt;/relay/#/set</strong> Send a 0 or a 1 as a payload to this topic to switch it on or off. You can also send a 2 to toggle its current state. Replace # with the switch ID (starting from 0). If the board has only one switch it will be 0.<br /> - <strong>&lt;root&gt;/relay/#/set</strong> Send a 0 or a 1 as a payload to this topic to switch it on or off. You can also send a 2 to toggle its current state. Replace # with the switch ID (starting from 0). If the board has only one switch it will be 0.<br />
<!-- removeIf(!light)-->
<span class="module module-color">- <strong>&lt;root&gt;/rgb/set</strong> Set the color using this topic, your can either send an "#RRGGBB" value or "RRR,GGG,BBB" (0-255 each).<br /></span> <span class="module module-color">- <strong>&lt;root&gt;/rgb/set</strong> Set the color using this topic, your can either send an "#RRGGBB" value or "RRR,GGG,BBB" (0-255 each).<br /></span>
<span class="module module-color">- <strong>&lt;root&gt;/hsv/set</strong> Set the color using hue (0-360), saturation (0-100) and value (0-100) values, comma separated.<br /></span> <span class="module module-color">- <strong>&lt;root&gt;/hsv/set</strong> Set the color using hue (0-360), saturation (0-100) and value (0-100) values, comma separated.<br /></span>
<span class="module module-color">- <strong>&lt;root&gt;/brightness/set</strong> Set the brighness (0-255).<br /></span> <span class="module module-color">- <strong>&lt;root&gt;/brightness/set</strong> Set the brighness (0-255).<br /></span>
<span class="module module-color">- <strong>&lt;root&gt;/channel/#/set</strong> Set the value for a single color channel (0-255). Replace # with the channel ID (starting from 0 and up to 4 for RGBWC lights).<br /></span> <span class="module module-color">- <strong>&lt;root&gt;/channel/#/set</strong> Set the value for a single color channel (0-255). Replace # with the channel ID (starting from 0 and up to 4 for RGBWC lights).<br /></span>
<span class="module module-color">- <strong>&lt;root&gt;/mired/set</strong> Set the temperature color in mired.<br /></span> <span class="module module-color">- <strong>&lt;root&gt;/mired/set</strong> Set the temperature color in mired.<br /></span>
<!-- endRemoveIf(!light)-->
- <strong>&lt;root&gt;/status</strong> The device will report a 1 to this topic every few minutes. Upon MQTT disconnecting this will be set to 0.<br /> - <strong>&lt;root&gt;/status</strong> The device will report a 1 to this topic every few minutes. Upon MQTT disconnecting this will be set to 0.<br />
- Other values reported (depending on the build) are: <strong>firmware</strong> and <strong>version</strong>, <strong>hostname</strong>, <strong>IP</strong>, <strong>MAC</strong>, signal strenth (<strong>RSSI</strong>), <strong>uptime</strong> (in seconds), <strong>free heap</strong> and <strong>power supply</strong>. - Other values reported (depending on the build) are: <strong>firmware</strong> and <strong>version</strong>, <strong>hostname</strong>, <strong>IP</strong>, <strong>MAC</strong>, signal strenth (<strong>RSSI</strong>), <strong>uptime</strong> (in seconds), <strong>free heap</strong> and <strong>power supply</strong>.
</div> </div>
@ -844,7 +860,9 @@
<div id="dczRelays"></div> <div id="dczRelays"></div>
<!-- removeIf(!sensor)-->
<div id="dczMagnitudes"></div> <div id="dczMagnitudes"></div>
<!-- endRemoveIf(!sensor)-->
</fieldset> </fieldset>
</div> </div>
@ -872,7 +890,9 @@
<div class="pure-u-0 pure-u-lg-1-4"></div> <div class="pure-u-0 pure-u-lg-1-4"></div>
<div class="pure-u-1 pure-u-lg-3-4 hint"> <div class="pure-u-1 pure-u-lg-3-4 hint">
Home Assistant auto-discovery feature. Enable and save to add the device to your HA console. Home Assistant auto-discovery feature. Enable and save to add the device to your HA console.
<!-- removeIf(!light)-->
When using a colour light you might want to disable CSS style so Home Assistant can parse the color. When using a colour light you might want to disable CSS style so Home Assistant can parse the color.
<!-- endRemoveIf(!light)-->
</div> </div>
</div> </div>
@ -903,8 +923,6 @@
</div> </div>
<div class="panel" id="panel-thingspeak"> <div class="panel" id="panel-thingspeak">
<div class="header"> <div class="header">
@ -938,7 +956,9 @@
<div id="tspkRelays"></div> <div id="tspkRelays"></div>
<!-- removeIf(!sensor)-->
<div id="tspkMagnitudes"></div> <div id="tspkMagnitudes"></div>
<!-- endRemoveIf(!sensor)-->
</fieldset> </fieldset>
</div> </div>
@ -1025,6 +1045,7 @@
</div> </div>
<!-- removeIf(!sensor)-->
<div class="panel" id="panel-sensors"> <div class="panel" id="panel-sensors">
<div class="header"> <div class="header">
@ -1161,7 +1182,9 @@
</div> </div>
</div> </div>
<!-- endRemoveIf(!sensor)-->
<!-- removeIf(!rfbridge)-->
<div class="panel" id="panel-rfb"> <div class="panel" id="panel-rfb">
<div class="header"> <div class="header">
@ -1182,6 +1205,7 @@
</fieldset> </fieldset>
</div> </div>
</div> </div>
<!-- endRemoveIf(!rfbridge)-->
</form> </form>
@ -1191,6 +1215,7 @@
<!-- Templates --> <!-- Templates -->
<!-- removeIf(!rfbridge)-->
<div id="rfbNodeTemplate" class="template"> <div id="rfbNodeTemplate" class="template">
<legend>Switch #<span></span></legend> <legend>Switch #<span></span></legend>
@ -1212,6 +1237,7 @@
</div> </div>
</div> </div>
<!-- endRemoveIf(!rfbridge)-->
<div id="networkTemplate" class="template"> <div id="networkTemplate" class="template">
@ -1299,6 +1325,7 @@
<input type="hidden" name="schType" value="1"> <input type="hidden" name="schType" value="1">
</div> </div>
<!-- removeIf(!light)-->
<div id="lightActionTemplate" class="template"> <div id="lightActionTemplate" class="template">
<label class="pure-u-1 pure-u-lg-1-4">Brightness</label> <label class="pure-u-1 pure-u-lg-1-4">Brightness</label>
<div class="pure-u-1 pure-u-lg-1-5"> <div class="pure-u-1 pure-u-lg-1-5">
@ -1307,6 +1334,7 @@
<select class="pure-u-1 pure-u-lg-1-5 islight" name="schSwitch"></select> <select class="pure-u-1 pure-u-lg-1-5 islight" name="schSwitch"></select>
<input type="hidden" name="schType" value="2"> <input type="hidden" name="schType" value="2">
</div> </div>
<!-- endRemoveIf(!light)-->
<div id="relayTemplate" class="template"> <div id="relayTemplate" class="template">
<div class="pure-g"> <div class="pure-g">
@ -1366,6 +1394,7 @@
</div> </div>
</div> </div>
<!-- removeIf(!sensor)-->
<div id="dczMagnitudeTemplate" class="template"> <div id="dczMagnitudeTemplate" class="template">
<div class="pure-g"> <div class="pure-g">
<label class="pure-u-1 pure-u-lg-1-4">Magnitude</label> <label class="pure-u-1 pure-u-lg-1-4">Magnitude</label>
@ -1373,6 +1402,7 @@
<div class="pure-u-1 pure-u-lg-1-2 hint center"></div> <div class="pure-u-1 pure-u-lg-1-2 hint center"></div>
</div> </div>
</div> </div>
<!-- endRemoveIf(!sensor)-->
<div id="tspkRelayTemplate" class="template"> <div id="tspkRelayTemplate" class="template">
<div class="pure-g"> <div class="pure-g">
@ -1381,6 +1411,7 @@
</div> </div>
</div> </div>
<!-- removeIf(!sensor)-->
<div id="tspkMagnitudeTemplate" class="template"> <div id="tspkMagnitudeTemplate" class="template">
<div class="pure-g"> <div class="pure-g">
<label class="pure-u-1 pure-u-lg-1-4">Magnitude</label> <label class="pure-u-1 pure-u-lg-1-4">Magnitude</label>
@ -1388,7 +1419,9 @@
<div class="pure-u-1 pure-u-lg-1-2 hint center"></div> <div class="pure-u-1 pure-u-lg-1-2 hint center"></div>
</div> </div>
</div> </div>
<!-- endRemoveIf(!sensor)-->
<!-- removeIf(!light)-->
<div id="colorRGBTemplate" class="template"> <div id="colorRGBTemplate" class="template">
<div class="pure-g"> <div class="pure-g">
<label class="pure-u-1 pure-u-lg-1-4">Color</label> <label class="pure-u-1 pure-u-lg-1-4">Color</label>
@ -1424,7 +1457,9 @@
<span class="slider mireds pure-u-lg-1-4"></span> <span class="slider mireds pure-u-lg-1-4"></span>
</div> </div>
</div> </div>
<!-- endRemoveIf(!light)-->
<!-- removeIf(!sensor)-->
<div id="magnitudeTemplate" class="template"> <div id="magnitudeTemplate" class="template">
<div class="pure-g"> <div class="pure-g">
<label class="pure-u-1 pure-u-lg-1-4"></label> <label class="pure-u-1 pure-u-lg-1-4"></label>
@ -1434,6 +1469,7 @@
<div class="pure-u-1 pure-u-lg-1-2 hint center"></div> <div class="pure-u-1 pure-u-lg-1-2 hint center"></div>
</div> </div>
</div> </div>
<!-- endRemoveIf(!sensor)-->
<iframe id="downloader"></iframe> <iframe id="downloader"></iframe>
<input id="uploader" type="file" /> <input id="uploader" type="file" />
@ -1442,9 +1478,9 @@
<!-- build:js script.js --> <!-- build:js script.js -->
<script src="vendor/jquery-3.2.1.min.js"></script> <script src="vendor/jquery-3.2.1.min.js"></script>
<script src="custom.js"></script>
<script src="vendor/checkboxes.js"></script> <script src="vendor/checkboxes.js"></script>
<script src="vendor/jquery.wheelcolorpicker-3.0.3.min.js"></script> <script src="vendor/jquery.wheelcolorpicker-3.0.3.min.js"></script>
<script src="custom.js"></script>
<!-- endbuild --> <!-- endbuild -->
</html> </html>

+ 166
- 0
code/package-lock.json View File

@ -841,6 +841,16 @@
"clone": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz" "clone": "https://registry.npmjs.org/clone/-/clone-1.0.3.tgz"
} }
}, },
"define-properties": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz",
"integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=",
"dev": true,
"requires": {
"foreach": "2.0.5",
"object-keys": "1.0.11"
}
},
"define-property": { "define-property": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
@ -981,6 +991,30 @@
"integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=", "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=",
"dev": true "dev": true
}, },
"es-abstract": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz",
"integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==",
"dev": true,
"requires": {
"es-to-primitive": "1.1.1",
"function-bind": "1.1.1",
"has": "1.0.3",
"is-callable": "1.1.3",
"is-regex": "1.0.4"
}
},
"es-to-primitive": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz",
"integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=",
"dev": true,
"requires": {
"is-callable": "1.1.3",
"is-date-object": "1.0.1",
"is-symbol": "1.0.1"
}
},
"escape-string-regexp": { "escape-string-regexp": {
"version": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "version": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
@ -1273,6 +1307,12 @@
"for-in": "1.0.2" "for-in": "1.0.2"
} }
}, },
"foreach": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
"integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=",
"dev": true
},
"forever-agent": { "forever-agent": {
"version": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "version": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
@ -1307,6 +1347,12 @@
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true "dev": true
}, },
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
"gaze": { "gaze": {
"version": "0.5.2", "version": "0.5.2",
"resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz",
@ -1720,6 +1766,60 @@
"through2": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz" "through2": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz"
} }
}, },
"gulp-remove-code": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/gulp-remove-code/-/gulp-remove-code-3.0.2.tgz",
"integrity": "sha512-Ptrwce+Nq8B+zPMomMzjfkEpldBpbHDOtE4Py0jyxh3eE7scfzEjxAs0XojwFw4xBkLWuNdqetZhPk7zsuyxAw==",
"dev": true,
"requires": {
"bufferstreams": "2.0.1",
"escape-string-regexp": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"object.entries": "1.0.4",
"plugin-error": "1.0.1",
"through2": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz"
},
"dependencies": {
"bufferstreams": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/bufferstreams/-/bufferstreams-2.0.1.tgz",
"integrity": "sha512-ZswyIoBfFb3cVDsnZLLj2IDJ/0ppYdil/v2EGlZXvoefO689FokEmFEldhN5dV7R2QBxFneqTJOMIpfqhj+n0g==",
"dev": true,
"requires": {
"readable-stream": "2.3.6"
}
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
"dev": true
},
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true,
"requires": {
"core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"isarray": "1.0.0",
"process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
"safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
"string_decoder": "1.1.1",
"util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true,
"requires": {
"safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz"
}
}
}
},
"gulp-replace": { "gulp-replace": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-1.0.0.tgz", "resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-1.0.0.tgz",
@ -1847,6 +1947,15 @@
"har-schema": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz" "har-schema": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz"
} }
}, },
"has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
"requires": {
"function-bind": "1.1.1"
}
},
"has-ansi": { "has-ansi": {
"version": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "version": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
@ -2103,6 +2212,12 @@
"integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=", "integrity": "sha1-76ouqdqg16suoTqXsritUf776L4=",
"dev": true "dev": true
}, },
"is-callable": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz",
"integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=",
"dev": true
},
"is-data-descriptor": { "is-data-descriptor": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
@ -2112,6 +2227,12 @@
"kind-of": "6.0.2" "kind-of": "6.0.2"
} }
}, },
"is-date-object": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
"integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
"dev": true
},
"is-descriptor": { "is-descriptor": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
@ -2218,6 +2339,15 @@
"isobject": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz" "isobject": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz"
} }
}, },
"is-regex": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
"integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
"dev": true,
"requires": {
"has": "1.0.3"
}
},
"is-relative": { "is-relative": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
@ -2227,6 +2357,12 @@
"is-unc-path": "1.0.0" "is-unc-path": "1.0.0"
} }
}, },
"is-symbol": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz",
"integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=",
"dev": true
},
"is-typedarray": { "is-typedarray": {
"version": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "version": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
@ -2846,6 +2982,12 @@
} }
} }
}, },
"object-keys": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz",
"integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=",
"dev": true
},
"object-visit": { "object-visit": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
@ -2867,6 +3009,18 @@
"isobject": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz" "isobject": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz"
} }
}, },
"object.entries": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.0.4.tgz",
"integrity": "sha1-G/mk3SKI9bM/Opk9JXZh8F0WGl8=",
"dev": true,
"requires": {
"define-properties": "1.1.2",
"es-abstract": "1.12.0",
"function-bind": "1.1.1",
"has": "1.0.3"
}
},
"object.map": { "object.map": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz",
@ -3038,6 +3192,18 @@
"pinkie": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz" "pinkie": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz"
} }
}, },
"plugin-error": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz",
"integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==",
"dev": true,
"requires": {
"ansi-colors": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
"arr-diff": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
"arr-union": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
"extend-shallow": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz"
}
},
"posix-character-classes": { "posix-character-classes": {
"version": "0.1.1", "version": "0.1.1",
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",


+ 1
- 0
code/package.json View File

@ -17,6 +17,7 @@
"gulp-htmllint": "0.0.14", "gulp-htmllint": "0.0.14",
"gulp-htmlmin": "^2.0.0", "gulp-htmlmin": "^2.0.0",
"gulp-inline": "^0.1.1", "gulp-inline": "^0.1.1",
"gulp-remove-code": "^3.0.2",
"gulp-replace": "^1.0.0", "gulp-replace": "^1.0.0",
"gulp-uglify": "^1.5.3" "gulp-uglify": "^1.5.3"
} }


Loading…
Cancel
Save