Skip to content

Commit

Permalink
Updating the develop branch to match master
Browse files Browse the repository at this point in the history
  • Loading branch information
wickwire committed May 1, 2016
2 parents 63e718c + de6ceef commit 26c95c4
Show file tree
Hide file tree
Showing 35 changed files with 716 additions and 83 deletions.
484 changes: 484 additions & 0 deletions README.md

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ app.set('view engine', 'pug');

/*
Set bower and app directories for static retrieval.
JS files from app will use this path, not jade files becaue those need to be rendered
JS files from app will use this path, not pug files becaue those need to be rendered
*/
app.use('/static/common', express.static(__dirname + '/public/common'));
app.use('/static/framework', express.static(__dirname + '/public/app/framework'));
Expand All @@ -19,7 +19,7 @@ var frameworkFiles = [];
var dashboardFiles = [];

//Framework js files
readdirp({ root: __dirname + '/public/app/framework/', fileFilter: '*.jade' })
readdirp({ root: __dirname + '/public/app/framework/', fileFilter: '*.pug' })
.on('data', function (entry) {
frameworkFiles.push('/app-render/framework/' + entry.path);
});
Expand Down Expand Up @@ -55,12 +55,12 @@ app.get('/app-render/framework/**/*.css', function (req, res) {
app.get('/app-render/dashboard-elements/**/*.css', function (req, res) {
res.sendFile(__dirname + "/public/app/dashboard-elements/"+req.params[0]+"/"+req.params[2]+".css");
});
//templating angular html (jade) files
app.get('/app-render/framework/**/*.jade', function (req, res) {
res.render("framework/"+req.params[0]+"/"+req.params[2]+".jade");
//templating angular html (pug) files
app.get('/app-render/framework/**/*.pug', function (req, res) {
res.render("framework/"+req.params[0]+"/"+req.params[2]+".pug");
});
app.get('/app-render/dashboard-elements/**/*.jade', function (req, res) {
res.render("dashboard-elements/"+req.params[0]+"/"+req.params[2]+".jade");
app.get('/app-render/dashboard-elements/**/*.pug', function (req, res) {
res.render("dashboard-elements/"+req.params[0]+"/"+req.params[2]+".pug");
});
//For documentation
app.get('/app-render/documentation/*.css', function (req, res) {
Expand All @@ -73,7 +73,7 @@ app.get('/app-render/documentation/*.md', function (req, res) {
res.sendFile(__dirname + "/public/app/documentation/"+req.params[0]+".md");
});
app.get(['/documentation'], function (req, res) {
res.render('documentation/documentation.jade');
res.render('documentation/documentation.pug');
});
//404
app.use(function(req, res, next) {
Expand Down
79 changes: 46 additions & 33 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,61 @@
{
"name": "Crouton",
"version": "1.0.0",
"name": "crouton",
"description": "MQTT IOT Dashboard",
"main": "app.js",
"authors": [
"Edmund Fung <edfungus@gmail.com>"
],
"description": "MQTT IOT Dashboard",
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"public/common/bower",
"test",
"tests"
],
"dependencies": {
"font-awesome": "~4.4.0",
"polymer": "Polymer/polymer#^1.2.0",
"paper-card": "PolymerElements/paper-card#~1.0.6",
"paper-drawer-panel": "PolymerElements/paper-drawer-panel#~1.0.3",
"Materialize": "materialize#~0.97.1",
"paper-icon-button": "PolymerElements/paper-icon-button#~1.0.3",
"paper-header-panel": "PolymerElements/paper-header-panel#~1.0.5",
"paper-input": "PolymerElements/paper-input#~1.0.15",
"paper-button": "PolymerElements/paper-button#~1.0.8",
"paper-styles": "PolymerElements/paper-styles#~1.1.4",
"iron-form": "PolymerElements/iron-form#~1.0.9",
"paper-toast": "PolymerElements/paper-toast#~1.0.0",
"packery": "~1.4.3",
"draggabilly": "~1.2.4",
"paper-toggle-button": "PolymerElements/paper-toggle-button#~1.0.11",
"paper-fab": "PolymerElements/paper-fab#~1.1.0",
"fontawesome-iconset": "diego-d5000/fontawesome-iconset#~4.3.0",
"paper-dropdown-menu": "PolymerElements/paper-dropdown-menu#~1.1.0",
"paper-item": "PolymerElements/paper-item#~1.1.2",
"paper-listbox": "polymerelements/paper-listbox#~1.0.0",
"paper-menu": "PolymerElements/paper-menu#~1.2.0",
"web-animations-js": "~2.1.3",
"paper-slider": "PolymerElements/paper-slider#~1.0.8",
"chartist": "~0.9.5",
"paper-checkbox": "PolymerElements/paper-checkbox#~1.1.0"
},
"resolutions": {
"polymer": "^1.2.0",
"webcomponentsjs": "^0.7.2",
"web-animations-js": "~2.1.3"
"chartist": "*",
"ev-emitter": "~1.0.0",
"desandro-matches-selector": "~2.0.0",
"draggabilly": "*",
"fizzy-ui-utils": "~2.0.0",
"fontawesome-iconset": "edfungus/fontawesome-iconset",
"font-roboto": "PolymerElements/font-roboto#^1.0.1",
"font-awesome": "*",
"iron-a11y-announcer": "PolymerElements/iron-a11y-announcer#^1.0.0",
"iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0",
"iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#^1.0.0",
"iron-ajax": "PolymerElements/iron-ajax#^1.0.0",
"iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0",
"iron-collapse": "PolymerElements/iron-collapse#^1.0.0",
"iron-dropdown": "PolymerElements/iron-dropdown#^1.0.0",
"iron-form": "PolymerElements/iron-form",
"iron-image": "PolymerElements/iron-image#^1.2.0",
"iron-media-query": "PolymerElements/iron-media-query#^1.0.0",
"iron-input": "PolymerElements/iron-input#^1.0.0",
"iron-menu-behavior": "PolymerElements/iron-menu-behavior#^1.0.0",
"iron-range-behavior": "PolymerElements/iron-range-behavior#^1.0.0",
"jquery": ">=2.1.1",
"Materialize": "materialize#*",
"outlayer": "~2.0.0",
"packery": "*",
"paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
"paper-button": "PolymerElements/paper-button",
"paper-card": "PolymerElements/paper-card",
"paper-checkbox": "PolymerElements/paper-checkbox",
"paper-drawer-panel": "PolymerElements/paper-drawer-panel",
"paper-dropdown-menu": "PolymerElements/paper-dropdown-menu",
"paper-header-panel": "PolymerElements/paper-header-panel",
"paper-fab": "PolymerElements/paper-fab",
"paper-icon-button": "PolymerElements/paper-icon-button",
"paper-item": "PolymerElements/paper-item",
"paper-listbox": "polymerelements/paper-listbox",
"paper-menu": "PolymerElements/paper-menu",
"paper-progress": "PolymerElements/paper-progress#^1.0.0",
"paper-slider": "PolymerElements/paper-slider",
"paper-toast": "PolymerElements/paper-toast",
"paper-toggle-button": "PolymerElements/paper-toggle-button",
"polymer": "Polymer/polymer#~1.4.0"
}
}
9 changes: 8 additions & 1 deletion clients/python_clients/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,14 @@
},
"max": 255,
"title": "RGB LED <3"
}
},
"youTubeStream": {
"values": {
"youtubeID": "GZnb3jQ2YZo"
},
"card-type": "crouton-video-youtube",
"title": "YouTube Stream"
}
},
"description": "Kroobar's IOT devices"
}
Expand Down
7 changes: 7 additions & 0 deletions clients/python_clients/cf_demo_client/crouton-test-bar-cf.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,13 @@ def update_values():
"high": 73,
"card-type": "crouton-chart-line",
"title": "Temperature (F)"
},
"youTubeStream": {
"values": {
"youtubeID": "GZnb3jQ2YZo"
},
"card-type": "crouton-video-youtube",
"title": "YouTube Stream"
}
},
"description": "Kroobar's IOT devices"
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node app.js",
"postinstall": "node_modules/.bin/bower install"
"postinstall": "bower install"
},
"author": "Edmund Fung",
"license": "MIT",
"dependencies": {
"bower": "^1.5.2",
"express": "^4.13.3",
"jade": "^1.11.0",
"grunt-contrib-pug": "0.0.0",
"jit-grunt": "^0.9.1",
"pug": "^2.0.0-alpha6",
"readdirp": "^2.0.0"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
link(rel="import", href="/static/common/bower/polymer/polymer.html")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.jade")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.pug")


dom-module(id="crouton-chart-donut")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
link(rel="import", href="/static/common/bower/polymer/polymer.html")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.jade")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.pug")


dom-module(id="crouton-chart-line")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
link(rel="import", href="/static/common/bower/polymer/polymer.html")
link(rel="import", href="/static/common/bower/paper-slider/paper-slider.html")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.jade")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.pug")


dom-module(id="crouton-rgb-slider")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ link(rel="import", href="/static/common/bower/paper-fab/paper-fab.html")
link(rel="import", href="/static/common/bower/iron-icons/iron-icons.html")
link(rel="import", href="/static/common/bower/iron-icon/iron-icon.html")
link(rel="import", href="/static/common/bower/fontawesome-iconset/fa-all.html")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.jade")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.pug")


dom-module(id="crouton-simple-button")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ link(rel="import", href="/static/common/bower/paper-dropdown-menu/paper-dropdown
// link(rel="import", href="/static/common/bower/paper-menu/paper-menu.html")
link(rel="import", href="/static/common/bower/paper-listbox/paper-listbox.html")
link(rel="import", href="/static/common/bower/paper-item/paper-item.html")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.jade")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.pug")


dom-module(id="crouton-simple-dropdown")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
link(rel="import", href="/static/common/bower/polymer/polymer.html")
link(rel="import", href="/static/common/bower/paper-input/paper-textarea.html")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.jade")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.pug")


dom-module(id="crouton-simple-input")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
link(rel="import", href="/static/common/bower/polymer/polymer.html")
link(rel="import", href="/static/common/bower/paper-slider/paper-slider.html")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.jade")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.pug")


dom-module(id="crouton-simple-slider")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
link(rel="import", href="/static/common/bower/polymer/polymer.html")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.jade")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.pug")


dom-module(id="crouton-simple-text")
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
link(rel="import", href="/static/common/bower/polymer/polymer.html")
link(rel="import", href="/static/common/bower/paper-toggle-button/paper-toggle-button.html")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.jade")
link(rel="import", href="/app-render/framework/crouton-card/crouton-card.pug")


dom-module(id="crouton-simple-toggle")
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
@import "./public/common/css/style.less";

crouton-video-youtube{
width: @db-min-size;
min-width: @db-min-size;
height: @db-min-size;
min-height: @db-min-size;
display: table-row-group;

crouton-card {
text-align: center;
color: @fc-regular;

.expand {
margin: @dashboard-card-padding;
padding-top: @db-card-top-spacing;
}
}

.textDisplay {
font-size: @db-main-font-size;
margin-bottom: @db-space-under-main-text;
}

.unitDisplay {
font-size: @db-sub-font-size;
color: @fc-gray;
}

.titleDisplay {
font-size: @db-title-font-size;
bottom: @db-title-bottom;
left: 0px;
width: 100%;
position: absolute;
}
}
Loading

0 comments on commit 26c95c4

Please sign in to comment.