nutella_framework 0.7.3 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/framework_components/order.json +1 -6
- data/nutella_framework.gemspec +7 -507
- metadata +5 -505
- data/framework_components/beacon-cloud-bot/README.md +0 -27
- data/framework_components/beacon-cloud-bot/beacon_cloud_bot.rb +0 -150
- data/framework_components/beacon-cloud-bot/beacons.json +0 -1
- data/framework_components/beacon-cloud-bot/startup +0 -5
- data/framework_components/logging_bot/logging_bot.rb +0 -42
- data/framework_components/logging_bot/startup +0 -5
- data/framework_components/logging_bot/utils.rb +0 -8
- data/framework_components/monitoring-bot/.gitignore +0 -34
- data/framework_components/monitoring-bot/README.md +0 -1
- data/framework_components/monitoring-bot/monitoring-bot.rb +0 -472
- data/framework_components/monitoring-bot/nutella.json +0 -6
- data/framework_components/monitoring-bot/startup +0 -6
- data/framework_components/monitoring-interface/.gitignore +0 -2
- data/framework_components/monitoring-interface/README.md +0 -1
- data/framework_components/monitoring-interface/bower.json +0 -29
- data/framework_components/monitoring-interface/bower_components/bower-mqttws/.bower.json +0 -23
- data/framework_components/monitoring-interface/bower_components/bower-mqttws/bower.json +0 -14
- data/framework_components/monitoring-interface/bower_components/bower-mqttws/mqttws31.js +0 -2081
- data/framework_components/monitoring-interface/bower_components/bower-mqttws/readme.md +0 -4
- data/framework_components/monitoring-interface/bower_components/nutella_lib/.bower.json +0 -37
- data/framework_components/monitoring-interface/bower_components/nutella_lib/LICENSE +0 -21
- data/framework_components/monitoring-interface/bower_components/nutella_lib/README.md +0 -15
- data/framework_components/monitoring-interface/bower_components/nutella_lib/bower.json +0 -28
- data/framework_components/monitoring-interface/bower_components/nutella_lib/examples/browser/mqtt_client_hello_world.html +0 -23
- data/framework_components/monitoring-interface/bower_components/nutella_lib/examples/browser/nutella_hello_world.html +0 -52
- data/framework_components/monitoring-interface/bower_components/nutella_lib/examples/node/mqtt_client_hello_world.js +0 -14
- data/framework_components/monitoring-interface/bower_components/nutella_lib/examples/node/nutella_hello_world.js +0 -38
- data/framework_components/monitoring-interface/bower_components/nutella_lib/nutella_lib.js +0 -789
- data/framework_components/monitoring-interface/bower_components/nutella_lib/package.json +0 -30
- data/framework_components/monitoring-interface/css/Monitoring Interface.html +0 -215
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/animations.js +0 -27
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/application-view-controller.js +0 -232
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/applications-model.js +0 -61
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/bootstrap.min.js +0 -7
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/cursor.css +0 -7
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/d3.v3.min.js +0 -5
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/graphics.js +0 -156
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/grid-layout.js +0 -103
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/highlight.min.js +0 -2
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/instance-view-controller.js +0 -104
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/jquery-1.10.0.min.js +0 -6
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/notification-center.js +0 -63
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/notifications.js +0 -14
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/page.css +0 -33
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/radial-layout.js +0 -175
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/tab-table.js +0 -8
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-application.css +0 -0
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-application.js +0 -320
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-connection-view.css +0 -10
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-connection-view.js +0 -426
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-element.js +0 -205
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-notification.js +0 -94
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/ui-tab.js +0 -229
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/underscore-min.js +0 -5
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/view-controller.js +0 -68
- data/framework_components/monitoring-interface/css/Monitoring Interface_files/window-view-controller.js +0 -169
- data/framework_components/monitoring-interface/css/alerts.css +0 -3
- data/framework_components/monitoring-interface/css/bootstrap.min.css +0 -5
- data/framework_components/monitoring-interface/css/cursor.css +0 -7
- data/framework_components/monitoring-interface/css/highlight.default.min.css +0 -1
- data/framework_components/monitoring-interface/css/page.css +0 -41
- data/framework_components/monitoring-interface/css/ui-application.css +0 -0
- data/framework_components/monitoring-interface/css/ui-connection-view.css +0 -10
- data/framework_components/monitoring-interface/css/ui-legend-view.css +0 -7
- data/framework_components/monitoring-interface/data/alert.json +0 -8
- data/framework_components/monitoring-interface/data/data.json +0 -2118
- data/framework_components/monitoring-interface/data/data2.json +0 -814
- data/framework_components/monitoring-interface/data/data3.json +0 -823
- data/framework_components/monitoring-interface/data/data4.json +0 -848
- data/framework_components/monitoring-interface/data/message.json +0 -999
- data/framework_components/monitoring-interface/gulpfile.js +0 -29
- data/framework_components/monitoring-interface/img/arrow_white.svg +0 -120
- data/framework_components/monitoring-interface/img/arrow_white_right.svg +0 -104
- data/framework_components/monitoring-interface/img/back.svg +0 -164
- data/framework_components/monitoring-interface/img/cross_red_border_white.svg +0 -143
- data/framework_components/monitoring-interface/img/cross_red_border_white_mouseover.svg +0 -143
- data/framework_components/monitoring-interface/img/email.svg +0 -89
- data/framework_components/monitoring-interface/img/email_highlighted.svg +0 -89
- data/framework_components/monitoring-interface/index.html +0 -144
- data/framework_components/monitoring-interface/js/d3/layout/grid-layout.js +0 -103
- data/framework_components/monitoring-interface/js/d3/layout/radial-layout.js +0 -184
- data/framework_components/monitoring-interface/js/d3/plugin/graphics.js +0 -156
- data/framework_components/monitoring-interface/js/d3/plugin/tab-table.js +0 -8
- data/framework_components/monitoring-interface/js/d3/ui/animations.js +0 -27
- data/framework_components/monitoring-interface/js/d3/ui/ui-application.js +0 -471
- data/framework_components/monitoring-interface/js/d3/ui/ui-connection-view.js +0 -861
- data/framework_components/monitoring-interface/js/d3/ui/ui-element.js +0 -245
- data/framework_components/monitoring-interface/js/d3/ui/ui-legend.js +0 -174
- data/framework_components/monitoring-interface/js/d3/ui/ui-notification.js +0 -90
- data/framework_components/monitoring-interface/js/d3/ui/ui-tab.js +0 -309
- data/framework_components/monitoring-interface/js/lib/JSXTransformer-0.12.2.js +0 -15199
- data/framework_components/monitoring-interface/js/lib/bootstrap.min.js +0 -7
- data/framework_components/monitoring-interface/js/lib/d3.v3.min.js +0 -5
- data/framework_components/monitoring-interface/js/lib/highlight.min.js +0 -2
- data/framework_components/monitoring-interface/js/lib/jquery-1.10.0.min.js +0 -6
- data/framework_components/monitoring-interface/js/lib/nutella_lib.js +0 -5121
- data/framework_components/monitoring-interface/js/lib/react-with-addons-0.12.2.js +0 -19822
- data/framework_components/monitoring-interface/js/lib/underscore-min.js +0 -5
- data/framework_components/monitoring-interface/js/model/alerts-model.js +0 -74
- data/framework_components/monitoring-interface/js/model/applications-model.js +0 -78
- data/framework_components/monitoring-interface/js/model/messages-model.js +0 -112
- data/framework_components/monitoring-interface/js/notification/notification-center.js +0 -63
- data/framework_components/monitoring-interface/js/notification/notifications.js +0 -21
- data/framework_components/monitoring-interface/js/react/dist/ui-alerts.js +0 -178
- data/framework_components/monitoring-interface/js/react/dist/ui-message-send.js +0 -389
- data/framework_components/monitoring-interface/js/react/dist/ui-messages.js +0 -103
- data/framework_components/monitoring-interface/js/react/src/ui-alerts.js +0 -178
- data/framework_components/monitoring-interface/js/react/src/ui-message-send.js +0 -389
- data/framework_components/monitoring-interface/js/react/src/ui-messages.js +0 -103
- data/framework_components/monitoring-interface/js/view-controller/application-view-controller.js +0 -259
- data/framework_components/monitoring-interface/js/view-controller/instance-view-controller.js +0 -112
- data/framework_components/monitoring-interface/js/view-controller/view-controller.js +0 -74
- data/framework_components/monitoring-interface/js/view-controller/window-view-controller.js +0 -169
- data/framework_components/monitoring-interface/nutella.json +0 -6
- data/framework_components/room-places-beacon-cloud-interface/LICENSE +0 -21
- data/framework_components/room-places-beacon-cloud-interface/Readme.md +0 -0
- data/framework_components/room-places-beacon-cloud-interface/bower.json +0 -29
- data/framework_components/room-places-beacon-cloud-interface/bower_components/bower-mqttws/.bower.json +0 -23
- data/framework_components/room-places-beacon-cloud-interface/bower_components/bower-mqttws/bower.json +0 -14
- data/framework_components/room-places-beacon-cloud-interface/bower_components/bower-mqttws/mqttws31.js +0 -2081
- data/framework_components/room-places-beacon-cloud-interface/bower_components/bower-mqttws/readme.md +0 -4
- data/framework_components/room-places-beacon-cloud-interface/bower_components/nutella_lib/.bower.json +0 -37
- data/framework_components/room-places-beacon-cloud-interface/bower_components/nutella_lib/LICENSE +0 -21
- data/framework_components/room-places-beacon-cloud-interface/bower_components/nutella_lib/README.md +0 -15
- data/framework_components/room-places-beacon-cloud-interface/bower_components/nutella_lib/bower.json +0 -28
- data/framework_components/room-places-beacon-cloud-interface/bower_components/nutella_lib/examples/browser/mqtt_client_hello_world.html +0 -23
- data/framework_components/room-places-beacon-cloud-interface/bower_components/nutella_lib/examples/browser/nutella_hello_world.html +0 -52
- data/framework_components/room-places-beacon-cloud-interface/bower_components/nutella_lib/examples/node/mqtt_client_hello_world.js +0 -14
- data/framework_components/room-places-beacon-cloud-interface/bower_components/nutella_lib/examples/node/nutella_hello_world.js +0 -38
- data/framework_components/room-places-beacon-cloud-interface/bower_components/nutella_lib/nutella_lib.js +0 -789
- data/framework_components/room-places-beacon-cloud-interface/bower_components/nutella_lib/package.json +0 -30
- data/framework_components/room-places-beacon-cloud-interface/bower_components/nutella_lib/simple-js-mqtt-client.js +0 -428
- data/framework_components/room-places-beacon-cloud-interface/css/animation.css +0 -17
- data/framework_components/room-places-beacon-cloud-interface/css/cursor.css +0 -16
- data/framework_components/room-places-beacon-cloud-interface/css/page_layout.css +0 -73
- data/framework_components/room-places-beacon-cloud-interface/index.html +0 -157
- data/framework_components/room-places-beacon-cloud-interface/js/lib/nutella_lib.js +0 -5121
- data/framework_components/room-places-beacon-cloud-interface/js/react/beacon-add.js +0 -102
- data/framework_components/room-places-beacon-cloud-interface/js/react/beacon-table.js +0 -73
- data/framework_components/room-places-beacon-cloud-interface/js/react/beacon.js +0 -97
- data/framework_components/room-places-beacon-cloud-interface/nutella.json +0 -6
- data/framework_components/room-places-bot/.gitignore +0 -4
- data/framework_components/room-places-bot/Gemfile +0 -3
- data/framework_components/room-places-bot/README.md +0 -66
- data/framework_components/room-places-bot/nutella.json +0 -6
- data/framework_components/room-places-bot/room_places_bot.rb +0 -766
- data/framework_components/room-places-bot/startup +0 -6
- data/framework_components/room-places-bot/virtual_beacons.rb +0 -124
- data/framework_components/room-places-interface/.gitignore +0 -3
- data/framework_components/room-places-interface/LICENSE +0 -21
- data/framework_components/room-places-interface/Readme.md +0 -0
- data/framework_components/room-places-interface/bower.json +0 -29
- data/framework_components/room-places-interface/bower_components/bower-mqttws/.bower.json +0 -23
- data/framework_components/room-places-interface/bower_components/bower-mqttws/bower.json +0 -14
- data/framework_components/room-places-interface/bower_components/bower-mqttws/mqttws31.js +0 -2081
- data/framework_components/room-places-interface/bower_components/bower-mqttws/readme.md +0 -4
- data/framework_components/room-places-interface/bower_components/nutella_lib/.bower.json +0 -37
- data/framework_components/room-places-interface/bower_components/nutella_lib/LICENSE +0 -21
- data/framework_components/room-places-interface/bower_components/nutella_lib/README.md +0 -15
- data/framework_components/room-places-interface/bower_components/nutella_lib/bower.json +0 -28
- data/framework_components/room-places-interface/bower_components/nutella_lib/examples/browser/mqtt_client_hello_world.html +0 -23
- data/framework_components/room-places-interface/bower_components/nutella_lib/examples/browser/nutella_hello_world.html +0 -52
- data/framework_components/room-places-interface/bower_components/nutella_lib/examples/node/mqtt_client_hello_world.js +0 -14
- data/framework_components/room-places-interface/bower_components/nutella_lib/examples/node/nutella_hello_world.js +0 -38
- data/framework_components/room-places-interface/bower_components/nutella_lib/nutella_lib.js +0 -789
- data/framework_components/room-places-interface/bower_components/nutella_lib/package.json +0 -30
- data/framework_components/room-places-interface/css/animation.css +0 -22
- data/framework_components/room-places-interface/css/bootstrap.min.css +0 -5
- data/framework_components/room-places-interface/css/cursor.css +0 -22
- data/framework_components/room-places-interface/css/font-awesome/css/font-awesome.css +0 -1801
- data/framework_components/room-places-interface/css/font-awesome/css/font-awesome.min.css +0 -4
- data/framework_components/room-places-interface/css/font-awesome/fonts/FontAwesome.otf +0 -0
- data/framework_components/room-places-interface/css/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- data/framework_components/room-places-interface/css/font-awesome/fonts/fontawesome-webfont.svg +0 -565
- data/framework_components/room-places-interface/css/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- data/framework_components/room-places-interface/css/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- data/framework_components/room-places-interface/css/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- data/framework_components/room-places-interface/css/font-awesome/less/animated.less +0 -34
- data/framework_components/room-places-interface/css/font-awesome/less/bordered-pulled.less +0 -16
- data/framework_components/room-places-interface/css/font-awesome/less/core.less +0 -13
- data/framework_components/room-places-interface/css/font-awesome/less/fixed-width.less +0 -6
- data/framework_components/room-places-interface/css/font-awesome/less/font-awesome.less +0 -17
- data/framework_components/room-places-interface/css/font-awesome/less/icons.less +0 -596
- data/framework_components/room-places-interface/css/font-awesome/less/larger.less +0 -13
- data/framework_components/room-places-interface/css/font-awesome/less/list.less +0 -19
- data/framework_components/room-places-interface/css/font-awesome/less/mixins.less +0 -27
- data/framework_components/room-places-interface/css/font-awesome/less/path.less +0 -15
- data/framework_components/room-places-interface/css/font-awesome/less/rotated-flipped.less +0 -20
- data/framework_components/room-places-interface/css/font-awesome/less/stacked.less +0 -20
- data/framework_components/room-places-interface/css/font-awesome/less/variables.less +0 -606
- data/framework_components/room-places-interface/css/font-awesome/scss/_animated.scss +0 -34
- data/framework_components/room-places-interface/css/font-awesome/scss/_bordered-pulled.scss +0 -16
- data/framework_components/room-places-interface/css/font-awesome/scss/_core.scss +0 -13
- data/framework_components/room-places-interface/css/font-awesome/scss/_fixed-width.scss +0 -6
- data/framework_components/room-places-interface/css/font-awesome/scss/_icons.scss +0 -596
- data/framework_components/room-places-interface/css/font-awesome/scss/_larger.scss +0 -13
- data/framework_components/room-places-interface/css/font-awesome/scss/_list.scss +0 -19
- data/framework_components/room-places-interface/css/font-awesome/scss/_mixins.scss +0 -27
- data/framework_components/room-places-interface/css/font-awesome/scss/_path.scss +0 -15
- data/framework_components/room-places-interface/css/font-awesome/scss/_rotated-flipped.scss +0 -20
- data/framework_components/room-places-interface/css/font-awesome/scss/_stacked.scss +0 -20
- data/framework_components/room-places-interface/css/font-awesome/scss/_variables.scss +0 -606
- data/framework_components/room-places-interface/css/font-awesome/scss/font-awesome.scss +0 -17
- data/framework_components/room-places-interface/css/icomoon.css +0 -57
- data/framework_components/room-places-interface/css/page_layout.css +0 -82
- data/framework_components/room-places-interface/fonts/glyphicons-halflings-regular.eot +0 -0
- data/framework_components/room-places-interface/fonts/glyphicons-halflings-regular.svg +0 -288
- data/framework_components/room-places-interface/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/framework_components/room-places-interface/fonts/glyphicons-halflings-regular.woff +0 -0
- data/framework_components/room-places-interface/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/framework_components/room-places-interface/fonts/icomoon.eot +0 -0
- data/framework_components/room-places-interface/fonts/icomoon.svg +0 -17
- data/framework_components/room-places-interface/fonts/icomoon.ttf +0 -0
- data/framework_components/room-places-interface/fonts/icomoon.woff +0 -0
- data/framework_components/room-places-interface/gulpfile.js +0 -24
- data/framework_components/room-places-interface/index.html +0 -73
- data/framework_components/room-places-interface/index2.html +0 -1753
- data/framework_components/room-places-interface/js/component.js +0 -438
- data/framework_components/room-places-interface/js/lib/JSXTransformer-0.12.2.js +0 -15199
- data/framework_components/room-places-interface/js/lib/bootstrap.min.js +0 -7
- data/framework_components/room-places-interface/js/lib/d3.v3.min.js +0 -5
- data/framework_components/room-places-interface/js/lib/jquery-1.10.0.min.js +0 -6
- data/framework_components/room-places-interface/js/lib/nutella_lib.js +0 -4145
- data/framework_components/room-places-interface/js/lib/react-with-addons-0.12.2.js +0 -19822
- data/framework_components/room-places-interface/js/lib/underscore.js +0 -6
- data/framework_components/room-places-interface/js/map.js +0 -1593
- data/framework_components/room-places-interface/js/position.js +0 -6
- data/framework_components/room-places-interface/js/react/dist/beacon.js +0 -30
- data/framework_components/room-places-interface/js/react/dist/discrete.js +0 -282
- data/framework_components/room-places-interface/js/react/dist/interactive-label.js +0 -54
- data/framework_components/room-places-interface/js/react/dist/resource-add.js +0 -203
- data/framework_components/room-places-interface/js/react/dist/resource-table.js +0 -227
- data/framework_components/room-places-interface/js/react/dist/resource.js +0 -433
- data/framework_components/room-places-interface/js/react/src/beacon.js +0 -30
- data/framework_components/room-places-interface/js/react/src/discrete.js +0 -282
- data/framework_components/room-places-interface/js/react/src/interactive-label.js +0 -54
- data/framework_components/room-places-interface/js/react/src/resource-add.js +0 -203
- data/framework_components/room-places-interface/js/react/src/resource-table.js +0 -227
- data/framework_components/room-places-interface/js/react/src/resource.js +0 -433
- data/framework_components/room-places-interface/js/room.js +0 -65
- data/framework_components/room-places-interface/nutella.json +0 -6
- data/framework_components/roomcast-bot/data/default/channels.json +0 -1
- data/framework_components/roomcast-bot/data/default/configs.json +0 -1
- data/framework_components/roomcast-bot/roomcast_bot.rb +0 -284
- data/framework_components/roomcast-bot/startup +0 -6
- data/framework_components/roomcast-channel-creator/.gitignore +0 -2
- data/framework_components/roomcast-channel-creator/README.md +0 -9
- data/framework_components/roomcast-channel-creator/dist/app.js +0 -44376
- data/framework_components/roomcast-channel-creator/dist/css/font-awesome.min.css +0 -4
- data/framework_components/roomcast-channel-creator/dist/css/ionicons.min.css +0 -11
- data/framework_components/roomcast-channel-creator/dist/fonts/FontAwesome.otf +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.eot +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.svg +0 -565
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.ttf +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.woff +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/fontawesome-webfont.woff2 +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/ionicons.eot +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/ionicons.svg +0 -2230
- data/framework_components/roomcast-channel-creator/dist/fonts/ionicons.ttf +0 -0
- data/framework_components/roomcast-channel-creator/dist/fonts/ionicons.woff +0 -0
- data/framework_components/roomcast-channel-creator/dist/main.css +0 -3310
- data/framework_components/roomcast-channel-creator/dist/nutella_lib.js +0 -5128
- data/framework_components/roomcast-channel-creator/gulp/config.js +0 -51
- data/framework_components/roomcast-channel-creator/gulp/tasks/browserify.js +0 -77
- data/framework_components/roomcast-channel-creator/gulp/tasks/build.js +0 -3
- data/framework_components/roomcast-channel-creator/gulp/tasks/css.js +0 -7
- data/framework_components/roomcast-channel-creator/gulp/tasks/default.js +0 -3
- data/framework_components/roomcast-channel-creator/gulp/tasks/fonts.js +0 -7
- data/framework_components/roomcast-channel-creator/gulp/tasks/less.js +0 -16
- data/framework_components/roomcast-channel-creator/gulp/tasks/mui-fonts.js +0 -7
- data/framework_components/roomcast-channel-creator/gulp/tasks/nutella.js +0 -7
- data/framework_components/roomcast-channel-creator/gulp/tasks/setWatch.js +0 -5
- data/framework_components/roomcast-channel-creator/gulp/tasks/svgs.js +0 -7
- data/framework_components/roomcast-channel-creator/gulp/tasks/watch.js +0 -12
- data/framework_components/roomcast-channel-creator/gulp/util/bundleLogger.js +0 -21
- data/framework_components/roomcast-channel-creator/gulp/util/handleErrors.js +0 -15
- data/framework_components/roomcast-channel-creator/gulpfile.js +0 -16
- data/framework_components/roomcast-channel-creator/index.html +0 -40
- data/framework_components/roomcast-channel-creator/nutella.json +0 -6
- data/framework_components/roomcast-channel-creator/package.json +0 -38
- data/framework_components/roomcast-channel-creator/roomcast-default.png +0 -0
- data/framework_components/roomcast-channel-creator/src/app/app.js +0 -28
- data/framework_components/roomcast-channel-creator/src/app/components/AnimationMixin.js +0 -44
- data/framework_components/roomcast-channel-creator/src/app/components/CataloguePage.js +0 -148
- data/framework_components/roomcast-channel-creator/src/app/components/Channel.js +0 -406
- data/framework_components/roomcast-channel-creator/src/app/components/ColorCell.js +0 -28
- data/framework_components/roomcast-channel-creator/src/app/components/ColorPicker.js +0 -53
- data/framework_components/roomcast-channel-creator/src/app/components/DetailPage.js +0 -66
- data/framework_components/roomcast-channel-creator/src/app/components/NutellaMixin.js +0 -40
- data/framework_components/roomcast-channel-creator/src/app/components/PageSliderMixin.js +0 -68
- data/framework_components/roomcast-channel-creator/src/app/components/Router.js +0 -52
- data/framework_components/roomcast-channel-creator/src/app/components/TopBar.js +0 -86
- data/framework_components/roomcast-channel-creator/src/app/components/UploadingScreen.js +0 -74
- data/framework_components/roomcast-channel-creator/src/app/components/main.js +0 -342
- data/framework_components/roomcast-channel-creator/src/css/font-awesome.min.css +0 -4
- data/framework_components/roomcast-channel-creator/src/css/ionicons.min.css +0 -11
- data/framework_components/roomcast-channel-creator/src/fonts/FontAwesome.otf +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.eot +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.svg +0 -565
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.ttf +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.woff +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/fontawesome-webfont.woff2 +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/ionicons.eot +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/ionicons.svg +0 -2230
- data/framework_components/roomcast-channel-creator/src/fonts/ionicons.ttf +0 -0
- data/framework_components/roomcast-channel-creator/src/fonts/ionicons.woff +0 -0
- data/framework_components/roomcast-channel-creator/src/less/main.less +0 -506
- data/framework_components/roomcast-channel-creator/src/less/my_overrides.less +0 -14
- data/framework_components/roomcast-channel-creator/upload.svg +0 -216
- data/framework_components/roomcast-main-app/.gitignore +0 -2
- data/framework_components/roomcast-main-app/README.md +0 -9
- data/framework_components/roomcast-main-app/dist/LICENSE +0 -21
- data/framework_components/roomcast-main-app/dist/app.js +0 -54373
- data/framework_components/roomcast-main-app/dist/assets/Logo.png +0 -0
- data/framework_components/roomcast-main-app/dist/assets/Logo_alpha.png +0 -0
- data/framework_components/roomcast-main-app/dist/assets/Logo_grid.svg +0 -216
- data/framework_components/roomcast-main-app/dist/css/ionicons.min.css +0 -11
- data/framework_components/roomcast-main-app/dist/fonts/ionicons.eot +0 -0
- data/framework_components/roomcast-main-app/dist/fonts/ionicons.svg +0 -2230
- data/framework_components/roomcast-main-app/dist/fonts/ionicons.ttf +0 -0
- data/framework_components/roomcast-main-app/dist/fonts/ionicons.woff +0 -0
- data/framework_components/roomcast-main-app/dist/main.css +0 -3234
- data/framework_components/roomcast-main-app/gulp/config.js +0 -47
- data/framework_components/roomcast-main-app/gulp/tasks/browserify.js +0 -77
- data/framework_components/roomcast-main-app/gulp/tasks/build.js +0 -3
- data/framework_components/roomcast-main-app/gulp/tasks/css.js +0 -7
- data/framework_components/roomcast-main-app/gulp/tasks/default.js +0 -3
- data/framework_components/roomcast-main-app/gulp/tasks/fonts.js +0 -7
- data/framework_components/roomcast-main-app/gulp/tasks/less.js +0 -16
- data/framework_components/roomcast-main-app/gulp/tasks/markup.js +0 -7
- data/framework_components/roomcast-main-app/gulp/tasks/setWatch.js +0 -5
- data/framework_components/roomcast-main-app/gulp/tasks/svgs.js +0 -7
- data/framework_components/roomcast-main-app/gulp/tasks/watch.js +0 -12
- data/framework_components/roomcast-main-app/gulp/util/bundleLogger.js +0 -21
- data/framework_components/roomcast-main-app/gulp/util/handleErrors.js +0 -15
- data/framework_components/roomcast-main-app/gulpfile.js +0 -16
- data/framework_components/roomcast-main-app/index.html +0 -37
- data/framework_components/roomcast-main-app/nutella.json +0 -6
- data/framework_components/roomcast-main-app/package.json +0 -47
- data/framework_components/roomcast-main-app/roomcast-default.png +0 -0
- data/framework_components/roomcast-main-app/src/app/app.js +0 -15
- data/framework_components/roomcast-main-app/src/app/components/NutellaMixin.js +0 -56
- data/framework_components/roomcast-main-app/src/app/components/app/Channel.js +0 -68
- data/framework_components/roomcast-main-app/src/app/components/app/Player.js +0 -139
- data/framework_components/roomcast-main-app/src/app/components/app/iOSMixin.js +0 -22
- data/framework_components/roomcast-main-app/src/app/components/app/main.js +0 -567
- data/framework_components/roomcast-main-app/src/app/components/app/material-ui/menu-item.jsx +0 -79
- data/framework_components/roomcast-main-app/src/app/components/app/material-ui/menu.jsx +0 -177
- data/framework_components/roomcast-main-app/src/app/components/app/material-ui/overlay.jsx +0 -21
- data/framework_components/roomcast-main-app/src/app/components/app/material-ui/right-nav.jsx +0 -108
- data/framework_components/roomcast-main-app/src/app/components/identity-selector/IdentitiesGrid.js +0 -95
- data/framework_components/roomcast-main-app/src/app/components/identity-selector/IdentityCard.js +0 -103
- data/framework_components/roomcast-main-app/src/app/components/identity-selector/iOSMixin.js +0 -19
- data/framework_components/roomcast-main-app/src/app/components/identity-selector/main.js +0 -109
- data/framework_components/roomcast-main-app/src/app/components/login/AppIdPage.js +0 -97
- data/framework_components/roomcast-main-app/src/app/components/login/BrokerPage.js +0 -139
- data/framework_components/roomcast-main-app/src/app/components/login/IdentitiesGrid.js +0 -93
- data/framework_components/roomcast-main-app/src/app/components/login/IdentityCard.js +0 -99
- data/framework_components/roomcast-main-app/src/app/components/login/RunIdPage.js +0 -78
- data/framework_components/roomcast-main-app/src/app/components/login/iOSMixin.js +0 -23
- data/framework_components/roomcast-main-app/src/app/components/login/main.js +0 -125
- data/framework_components/roomcast-main-app/src/app/components/main.js +0 -64
- data/framework_components/roomcast-main-app/src/less/main.less +0 -365
- data/framework_components/roomcast-main-app/src/less/my_overrides.less +0 -53
- data/framework_components/roomcast-main-app/src/less/right-nav.less +0 -31
- data/framework_components/roomcast-package-creator/.gitignore +0 -2
- data/framework_components/roomcast-package-creator/README.md +0 -9
- data/framework_components/roomcast-package-creator/dist/app.js +0 -51196
- data/framework_components/roomcast-package-creator/dist/css/font-awesome.min.css +0 -4
- data/framework_components/roomcast-package-creator/dist/css/ionicons.min.css +0 -11
- data/framework_components/roomcast-package-creator/dist/fonts/FontAwesome.otf +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.eot +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.svg +0 -565
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.ttf +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.woff +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/fontawesome-webfont.woff2 +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/ionicons.eot +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/ionicons.svg +0 -2230
- data/framework_components/roomcast-package-creator/dist/fonts/ionicons.ttf +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/ionicons.woff +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/material-ui-icons.eot +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/material-ui-icons.svg +0 -14
- data/framework_components/roomcast-package-creator/dist/fonts/material-ui-icons.ttf +0 -0
- data/framework_components/roomcast-package-creator/dist/fonts/material-ui-icons.woff +0 -0
- data/framework_components/roomcast-package-creator/dist/main.css +0 -5682
- data/framework_components/roomcast-package-creator/dist/nutella_lib.js +0 -5128
- data/framework_components/roomcast-package-creator/gulp/config.js +0 -51
- data/framework_components/roomcast-package-creator/gulp/tasks/browserify.js +0 -77
- data/framework_components/roomcast-package-creator/gulp/tasks/build.js +0 -3
- data/framework_components/roomcast-package-creator/gulp/tasks/css.js +0 -7
- data/framework_components/roomcast-package-creator/gulp/tasks/default.js +0 -3
- data/framework_components/roomcast-package-creator/gulp/tasks/fonts.js +0 -7
- data/framework_components/roomcast-package-creator/gulp/tasks/less.js +0 -16
- data/framework_components/roomcast-package-creator/gulp/tasks/mui-fonts.js +0 -7
- data/framework_components/roomcast-package-creator/gulp/tasks/nutella.js +0 -7
- data/framework_components/roomcast-package-creator/gulp/tasks/setWatch.js +0 -5
- data/framework_components/roomcast-package-creator/gulp/tasks/svgs.js +0 -7
- data/framework_components/roomcast-package-creator/gulp/tasks/watch.js +0 -12
- data/framework_components/roomcast-package-creator/gulp/util/bundleLogger.js +0 -21
- data/framework_components/roomcast-package-creator/gulp/util/handleErrors.js +0 -15
- data/framework_components/roomcast-package-creator/gulpfile.js +0 -16
- data/framework_components/roomcast-package-creator/index.html +0 -38
- data/framework_components/roomcast-package-creator/nutella.json +0 -6
- data/framework_components/roomcast-package-creator/package.json +0 -39
- data/framework_components/roomcast-package-creator/roomcast-default.png +0 -0
- data/framework_components/roomcast-package-creator/src/app/app.js +0 -30
- data/framework_components/roomcast-package-creator/src/app/components/ButtonInteractionsMixin.js +0 -45
- data/framework_components/roomcast-package-creator/src/app/components/ChannelCard.js +0 -100
- data/framework_components/roomcast-package-creator/src/app/components/ChannelItem.js +0 -71
- data/framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js +0 -51
- data/framework_components/roomcast-package-creator/src/app/components/ChannelsPanel.js +0 -127
- data/framework_components/roomcast-package-creator/src/app/components/ConfigField.js +0 -50
- data/framework_components/roomcast-package-creator/src/app/components/ConfigurationsPanel.js +0 -112
- data/framework_components/roomcast-package-creator/src/app/components/ContextButton.js +0 -37
- data/framework_components/roomcast-package-creator/src/app/components/GlobalButton.js +0 -28
- data/framework_components/roomcast-package-creator/src/app/components/NutellaMixin.js +0 -58
- data/framework_components/roomcast-package-creator/src/app/components/PoolHeader.js +0 -67
- data/framework_components/roomcast-package-creator/src/app/components/PoolRow.js +0 -160
- data/framework_components/roomcast-package-creator/src/app/components/ResourceFamilyPool.js +0 -168
- data/framework_components/roomcast-package-creator/src/app/components/ResourcesPanel.js +0 -76
- data/framework_components/roomcast-package-creator/src/app/components/main.js +0 -239
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/dialog_.jsx +0 -66
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/drop-down-menu.jsx +0 -159
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/enhanced-textarea.jsx +0 -113
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/floating-action-button_.jsx +0 -73
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/menu-item.jsx +0 -100
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/menu.jsx +0 -211
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/overlay.jsx +0 -21
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/raised-button_.jsx +0 -72
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/right-nav.jsx +0 -108
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/ripple.jsx +0 -52
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/drop-down-arrow.jsx +0 -17
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/navigation-chevron-left.jsx +0 -16
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/navigation-chevron-right.jsx +0 -17
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/navigation-menu.jsx +0 -16
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/svg-icon.jsx +0 -23
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/toggle-check-box-checked.jsx +0 -16
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/toggle-check-box-outline-blank.jsx +0 -16
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/toggle-radio-button-off.jsx +0 -16
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/svg-icons/toggle-radio-button-on.jsx +0 -16
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/text-field.jsx +0 -215
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/css-event.js +0 -52
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/date-time.js +0 -132
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/dom.js +0 -71
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/events.js +0 -34
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/key-code.js +0 -10
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/key-line.js +0 -13
- data/framework_components/roomcast-package-creator/src/app/components/material-ui/utils/unique-id.js +0 -7
- data/framework_components/roomcast-package-creator/src/css/font-awesome.min.css +0 -4
- data/framework_components/roomcast-package-creator/src/css/ionicons.min.css +0 -11
- data/framework_components/roomcast-package-creator/src/fonts/FontAwesome.otf +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.eot +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.svg +0 -565
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.ttf +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.woff +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/fontawesome-webfont.woff2 +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/ionicons.eot +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/ionicons.svg +0 -2230
- data/framework_components/roomcast-package-creator/src/fonts/ionicons.ttf +0 -0
- data/framework_components/roomcast-package-creator/src/fonts/ionicons.woff +0 -0
- data/framework_components/roomcast-package-creator/src/less/drop-down-icon.less +0 -43
- data/framework_components/roomcast-package-creator/src/less/drop-down-menu.less +0 -77
- data/framework_components/roomcast-package-creator/src/less/enhanced-textarea.less +0 -16
- data/framework_components/roomcast-package-creator/src/less/main.less +0 -514
- data/framework_components/roomcast-package-creator/src/less/menu-item.less +0 -71
- data/framework_components/roomcast-package-creator/src/less/menu.less +0 -50
- data/framework_components/roomcast-package-creator/src/less/my_overrides.less +0 -15
- data/framework_components/roomcast-package-creator/src/less/svg-icon.less +0 -11
- data/framework_components/roomcast-package-creator/src/less/text-field.less +0 -168
- data/framework_components/roomcast-teacher-controls/.gitignore +0 -2
- data/framework_components/roomcast-teacher-controls/README.md +0 -9
- data/framework_components/roomcast-teacher-controls/dist/app.js +0 -43614
- data/framework_components/roomcast-teacher-controls/dist/main.css +0 -3043
- data/framework_components/roomcast-teacher-controls/dist/nutella_lib.js +0 -5128
- data/framework_components/roomcast-teacher-controls/gulp/config.js +0 -51
- data/framework_components/roomcast-teacher-controls/gulp/tasks/browserify.js +0 -77
- data/framework_components/roomcast-teacher-controls/gulp/tasks/build.js +0 -3
- data/framework_components/roomcast-teacher-controls/gulp/tasks/css.js +0 -7
- data/framework_components/roomcast-teacher-controls/gulp/tasks/default.js +0 -3
- data/framework_components/roomcast-teacher-controls/gulp/tasks/fonts.js +0 -7
- data/framework_components/roomcast-teacher-controls/gulp/tasks/less.js +0 -16
- data/framework_components/roomcast-teacher-controls/gulp/tasks/mui-fonts.js +0 -7
- data/framework_components/roomcast-teacher-controls/gulp/tasks/nutella.js +0 -7
- data/framework_components/roomcast-teacher-controls/gulp/tasks/setWatch.js +0 -5
- data/framework_components/roomcast-teacher-controls/gulp/tasks/svgs.js +0 -7
- data/framework_components/roomcast-teacher-controls/gulp/tasks/watch.js +0 -12
- data/framework_components/roomcast-teacher-controls/gulp/util/bundleLogger.js +0 -21
- data/framework_components/roomcast-teacher-controls/gulp/util/handleErrors.js +0 -15
- data/framework_components/roomcast-teacher-controls/gulpfile.js +0 -16
- data/framework_components/roomcast-teacher-controls/index.html +0 -37
- data/framework_components/roomcast-teacher-controls/nutella.json +0 -6
- data/framework_components/roomcast-teacher-controls/package.json +0 -38
- data/framework_components/roomcast-teacher-controls/src/app/app.js +0 -28
- data/framework_components/roomcast-teacher-controls/src/app/components/ActivitiesGrid.js +0 -87
- data/framework_components/roomcast-teacher-controls/src/app/components/ActivityCard.js +0 -183
- data/framework_components/roomcast-teacher-controls/src/app/components/Footer.js +0 -37
- data/framework_components/roomcast-teacher-controls/src/app/components/NutellaMixin.js +0 -58
- data/framework_components/roomcast-teacher-controls/src/app/components/main.js +0 -125
- data/framework_components/roomcast-teacher-controls/src/less/main.less +0 -196
- data/framework_components/roomcast-teacher-controls/src/less/my_overrides.less +0 -14
@@ -1,30 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "nutella_lib",
|
3
|
-
"version": "0.3.0",
|
4
|
-
"description": "Nutella library for JavaScript",
|
5
|
-
"main": "nutella_lib.js",
|
6
|
-
"scripts": {
|
7
|
-
"test": "mocha"
|
8
|
-
},
|
9
|
-
"repository": {
|
10
|
-
"type": "git",
|
11
|
-
"url": "https://github.com/nutella-framework/nutella_lib.js"
|
12
|
-
},
|
13
|
-
"devDependencies": {
|
14
|
-
"chai": "*",
|
15
|
-
"mocha": "*"
|
16
|
-
},
|
17
|
-
"keywords": [
|
18
|
-
"nutella",
|
19
|
-
"framework"
|
20
|
-
],
|
21
|
-
"author": "Alessandro Gnoli",
|
22
|
-
"license": "MIT",
|
23
|
-
"bugs": {
|
24
|
-
"url": "https://github.com/nutella-framework/nutella_lib.js/issues"
|
25
|
-
},
|
26
|
-
"homepage": "https://github.com/nutella-framework/nutella_lib.js",
|
27
|
-
"dependencies": {
|
28
|
-
"mqtt": "~1.0.x"
|
29
|
-
}
|
30
|
-
}
|
@@ -1,428 +0,0 @@
|
|
1
|
-
/**********************
|
2
|
-
* Simple MQTT client *
|
3
|
-
**********************/
|
4
|
-
|
5
|
-
(function() {
|
6
|
-
"use strict";
|
7
|
-
|
8
|
-
// Establish the root object, `window` in the browser, or `exports` on the server.
|
9
|
-
var root = this;
|
10
|
-
|
11
|
-
// Save the previous value of the `MQTT` variable to use with noConflict().
|
12
|
-
var previous_mqtt = root.MQTT;
|
13
|
-
|
14
|
-
// Internal reference to this library (used below)
|
15
|
-
var mqtt = {};
|
16
|
-
|
17
|
-
// Detect if we are in the browser or in node and
|
18
|
-
// load the appropriate dependencies
|
19
|
-
var isNode;
|
20
|
-
var mqtt_lib;
|
21
|
-
if (typeof window === 'undefined') {
|
22
|
-
isNode = true; // Node
|
23
|
-
mqtt_lib = require('mqtt');
|
24
|
-
if( typeof mqtt_lib === 'undefined' )
|
25
|
-
throw new Error('This MQTT client requires the mqtt library (https://www.npmjs.com/package/mqtt)');
|
26
|
-
} else {
|
27
|
-
isNode = false; // Browser
|
28
|
-
mqtt_lib = root.Paho.MQTT;
|
29
|
-
if( typeof mqtt_lib === 'undefined' )
|
30
|
-
throw new Error('This MQTT client requires the mqtt-ws library (https://github.com/M2MConnections/mqtt-ws) a wrapper of Paho.js');
|
31
|
-
|
32
|
-
}
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
/**
|
37
|
-
* Runs simple-js-mqtt-client in noConflict mode by
|
38
|
-
* returning the MQTT variable to its previous owner.
|
39
|
-
*
|
40
|
-
* @return a reference to the MQTT object defined by this library.
|
41
|
-
*/
|
42
|
-
mqtt.noConflict = function() {
|
43
|
-
root.MQTT = previous_mqtt;
|
44
|
-
return mqtt;
|
45
|
-
};
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
/**
|
50
|
-
* Creates a new instance of SimpleMQTTClient
|
51
|
-
* and connects it to an MQTT.
|
52
|
-
* This is a factory method.
|
53
|
-
*
|
54
|
-
* @param {string} host - the hostname of the broker.
|
55
|
-
* @param {string} [clientId] - the unique name of this client. If no ID is provided a random one is generated
|
56
|
-
*/
|
57
|
-
mqtt.connect = function (host, clientId) {
|
58
|
-
return new SimpleMQTTClient(host, clientId);
|
59
|
-
};
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
/**
|
64
|
-
* Defines a Simple MQTT client.
|
65
|
-
*
|
66
|
-
* @param {string} host - the hostname of the broker.
|
67
|
-
* @param {string} [clientId] - the unique name of this client. If no ID is provided a random one is generated
|
68
|
-
*/
|
69
|
-
var SimpleMQTTClient = function (host, clientId) {
|
70
|
-
|
71
|
-
// Initializes the object that stores subscriptions
|
72
|
-
this.subscriptions = {};
|
73
|
-
// Initializes the object that holds the internal client
|
74
|
-
this.client = {};
|
75
|
-
// Functions backlog
|
76
|
-
this.backlog = [];
|
77
|
-
|
78
|
-
// Handles the optional clientId parameter
|
79
|
-
if (arguments.length === 1 || clientId === undefined) {
|
80
|
-
clientId = generateRandomClientId();
|
81
|
-
}
|
82
|
-
|
83
|
-
// Connect
|
84
|
-
if (isNode)
|
85
|
-
this.client = connectNode(this.subscriptions, host, clientId);
|
86
|
-
else
|
87
|
-
this.client = connectBrowser(this.subscriptions, this.backlog, host, clientId);
|
88
|
-
};
|
89
|
-
|
90
|
-
|
91
|
-
//
|
92
|
-
// Helper function that connects the MQTT client in node
|
93
|
-
//
|
94
|
-
function connectNode (subscriptions, host, clientId) {
|
95
|
-
// Create client
|
96
|
-
var url = "tcp://" + host + ":1883";
|
97
|
-
var client = mqtt_lib.connect(url, {clientId : clientId});
|
98
|
-
// Register incoming message callback
|
99
|
-
client.on('message', function(channel, message) {
|
100
|
-
// Executes the appropriate channel callback
|
101
|
-
var cbs = findCallbacks(subscriptions, channel);
|
102
|
-
if (cbs!==undefined) {
|
103
|
-
if (Object.keys(subscriptions).indexOf(channel)!==-1)
|
104
|
-
cbs.forEach(function(cb) {
|
105
|
-
cb(message);
|
106
|
-
});
|
107
|
-
else
|
108
|
-
cbs.forEach(function(cb) {
|
109
|
-
cb(message, channel);
|
110
|
-
});
|
111
|
-
|
112
|
-
}
|
113
|
-
});
|
114
|
-
return client;
|
115
|
-
}
|
116
|
-
|
117
|
-
|
118
|
-
//
|
119
|
-
// Helper function that connects the MQTT client in the browser
|
120
|
-
//
|
121
|
-
function connectBrowser (subscriptions, backlog, host, clientId) {
|
122
|
-
// Create client
|
123
|
-
var client = new mqtt_lib.Client(host, Number(1884), clientId);
|
124
|
-
// Register callback for connection lost
|
125
|
-
client.onConnectionLost = function() {
|
126
|
-
// TODO try to reconnect
|
127
|
-
};
|
128
|
-
// Register callback for received message
|
129
|
-
client.onMessageArrived = function (message) {
|
130
|
-
// Executes the appropriate channel callback
|
131
|
-
var cbs = findCallbacks(subscriptions, message.destinationName);
|
132
|
-
if (cbs!==undefined) {
|
133
|
-
if (Object.keys(subscriptions).indexOf(message.destinationName)!==-1)
|
134
|
-
cbs.forEach(function(cb) {
|
135
|
-
cb(message.payloadString);
|
136
|
-
});
|
137
|
-
else
|
138
|
-
cbs.forEach(function(cb) {
|
139
|
-
cb(message.payloadString, message.destinationName);
|
140
|
-
});
|
141
|
-
}
|
142
|
-
};
|
143
|
-
// Connect
|
144
|
-
client.connect({onSuccess: function() {
|
145
|
-
// Execute the backlog of operations performed while the client wasn't connected
|
146
|
-
backlog.forEach(function(e) {
|
147
|
-
e.op.apply(this, e.params);
|
148
|
-
});
|
149
|
-
}});
|
150
|
-
return client;
|
151
|
-
}
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
/**
|
156
|
-
* Disconnects from the MQTT client.
|
157
|
-
*/
|
158
|
-
SimpleMQTTClient.prototype.disconnect = function () {
|
159
|
-
if (isNode)
|
160
|
-
this.client.end();
|
161
|
-
else
|
162
|
-
this.client.disconnect();
|
163
|
-
this.subscriptions = {};
|
164
|
-
};
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
/**
|
169
|
-
* Subscribes to a channel and registers a callback.
|
170
|
-
*
|
171
|
-
* @param {string} channel - the channel we are subscribing to.
|
172
|
-
* @param {callback} callback - A function that is executed every time a message is received on that channel.
|
173
|
-
* @param {callback} [done_callback] - A function that is executed once the subscribe operation has completed successfully.
|
174
|
-
*/
|
175
|
-
SimpleMQTTClient.prototype.subscribe = function (channel, callback, done_callback) {
|
176
|
-
// Subscribe
|
177
|
-
if( isNode )
|
178
|
-
subscribeNode(this.client, this.subscriptions, channel, callback, done_callback);
|
179
|
-
else
|
180
|
-
subscribeBrowser(this.client, this.subscriptions, this.backlog, channel, callback, done_callback);
|
181
|
-
};
|
182
|
-
|
183
|
-
|
184
|
-
//
|
185
|
-
// Helper function that subscribes to a channel in node
|
186
|
-
//
|
187
|
-
function subscribeNode (client, subscriptions, channel, callback, done_callback) {
|
188
|
-
if (subscriptions[channel]===undefined) {
|
189
|
-
subscriptions[channel] = [callback];
|
190
|
-
client.subscribe(channel, {qos: 0}, function() {
|
191
|
-
// If there is a done_callback defined, execute it
|
192
|
-
if (done_callback!==undefined) done_callback();
|
193
|
-
});
|
194
|
-
} else {
|
195
|
-
subscriptions[channel].push(callback);
|
196
|
-
}
|
197
|
-
}
|
198
|
-
|
199
|
-
|
200
|
-
//
|
201
|
-
// Helper function that subscribes to a channel in the browser
|
202
|
-
//
|
203
|
-
function subscribeBrowser (client, subscriptions, backlog, channel, callback, done_callback) {
|
204
|
-
if ( addToBacklog(client, backlog, subscribeBrowser, [client, subscriptions, backlog, channel, callback, done_callback]) ) return;
|
205
|
-
if (subscriptions[channel]===undefined) {
|
206
|
-
subscriptions[channel] = [callback];
|
207
|
-
client.subscribe(channel, {qos: 0, onSuccess: function() {
|
208
|
-
// If there is a done_callback defined, execute it
|
209
|
-
if (done_callback!==undefined) done_callback();
|
210
|
-
}});
|
211
|
-
} else {
|
212
|
-
subscriptions[channel].push(callback);
|
213
|
-
}
|
214
|
-
}
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
/**
|
219
|
-
* Unsubscribe from a channel.
|
220
|
-
*
|
221
|
-
* @param {string} channel - the channel we are unsubscribing from.
|
222
|
-
* @param {function} callback - the callback we are trying to unregister
|
223
|
-
* @param {callback} [done_callback] - A function that is executed once the unsubscribe operation has completed successfully.
|
224
|
-
*/
|
225
|
-
SimpleMQTTClient.prototype.unsubscribe = function (channel, callback, done_callback) {
|
226
|
-
if( isNode )
|
227
|
-
unsubscribeNode(this.client, this.subscriptions, channel, callback, done_callback);
|
228
|
-
else
|
229
|
-
unsubscribeBrowser(this.client, this.subscriptions, this.backlog, channel, callback, done_callback);
|
230
|
-
};
|
231
|
-
|
232
|
-
|
233
|
-
//
|
234
|
-
// Helper function that unsubscribes from a channel in node
|
235
|
-
//
|
236
|
-
var unsubscribeNode = function(client, subscriptions, channel, callback, done_callback) {
|
237
|
-
if (subscriptions[channel]===undefined)
|
238
|
-
return;
|
239
|
-
subscriptions[channel].splice(subscriptions[channel].indexOf(callback), 1);
|
240
|
-
if (subscriptions[channel].length===0) {
|
241
|
-
delete subscriptions[channel];
|
242
|
-
client.unsubscribe(channel, function() {
|
243
|
-
// If there is a done_callback defined, execute it
|
244
|
-
if (done_callback!==undefined) done_callback();
|
245
|
-
});
|
246
|
-
}
|
247
|
-
};
|
248
|
-
|
249
|
-
|
250
|
-
//
|
251
|
-
// Helper function that unsubscribes from a channel in the browser
|
252
|
-
//
|
253
|
-
var unsubscribeBrowser = function(client, subscriptions, backlog, channel, callback, done_callback) {
|
254
|
-
if ( addToBacklog(client, backlog, unsubscribeBrowser, [client, subscriptions, backlog, channel, callback, done_callback]) ) return;
|
255
|
-
if (subscriptions[channel]===undefined)
|
256
|
-
return;
|
257
|
-
subscriptions[channel].splice(subscriptions[channel].indexOf(callback), 1);
|
258
|
-
if (subscriptions[channel].length===0) {
|
259
|
-
delete subscriptions[channel];
|
260
|
-
client.unsubscribe(channel, {onSuccess : function() {
|
261
|
-
// If there is a done_callback defined, execute it
|
262
|
-
if (done_callback!==undefined) done_callback();
|
263
|
-
}});
|
264
|
-
}
|
265
|
-
};
|
266
|
-
|
267
|
-
|
268
|
-
/**
|
269
|
-
* Lists all the channels we are currently subscribed to.
|
270
|
-
*
|
271
|
-
* @returns {Array} a lists of all the channels we are currently subscribed to.
|
272
|
-
*/
|
273
|
-
SimpleMQTTClient.prototype.getSubscriptions = function () {
|
274
|
-
return Object.keys(this.subscriptions);
|
275
|
-
};
|
276
|
-
|
277
|
-
|
278
|
-
/**
|
279
|
-
* Publishes a message to a channel.
|
280
|
-
*
|
281
|
-
* @param {string} channel - the channel we are publishing to.
|
282
|
-
* @param {string} message - the message we are publishing.
|
283
|
-
*/
|
284
|
-
SimpleMQTTClient.prototype.publish = function (channel, message) {
|
285
|
-
if (isNode)
|
286
|
-
publishNode(this.client, channel, message)
|
287
|
-
else
|
288
|
-
publishBrowser(this.client, this.backlog, channel, message)
|
289
|
-
};
|
290
|
-
|
291
|
-
|
292
|
-
//
|
293
|
-
// Helper function that publishes to a channel in node
|
294
|
-
//
|
295
|
-
var publishNode = function (client, channel, message) {
|
296
|
-
client.publish(channel, message);
|
297
|
-
};
|
298
|
-
|
299
|
-
|
300
|
-
//
|
301
|
-
// Helper function that publishes to a channel in the browser
|
302
|
-
//
|
303
|
-
var publishBrowser = function (client, backlog, channel, message) {
|
304
|
-
if ( addToBacklog(client, backlog, publishBrowser, [client, backlog, channel, message]) ) return;
|
305
|
-
message = new mqtt_lib.Message(message);
|
306
|
-
message.destinationName = channel;
|
307
|
-
client.send(message);
|
308
|
-
};
|
309
|
-
|
310
|
-
|
311
|
-
//
|
312
|
-
// Helper functions
|
313
|
-
//
|
314
|
-
|
315
|
-
|
316
|
-
//
|
317
|
-
// Helper function that generates a random client ID
|
318
|
-
//
|
319
|
-
function generateRandomClientId () {
|
320
|
-
var length = 22;
|
321
|
-
var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
322
|
-
var result = '';
|
323
|
-
for (var i = length; i > 0; --i) {
|
324
|
-
result += chars[Math.round(Math.random() * (chars.length - 1))];
|
325
|
-
}
|
326
|
-
return result;
|
327
|
-
};
|
328
|
-
|
329
|
-
|
330
|
-
//
|
331
|
-
// Helper function that selects the right callback when a message is received
|
332
|
-
//
|
333
|
-
function findCallbacks (subscriptions, channel) {
|
334
|
-
// First try to see if a callback for the exact channel exists
|
335
|
-
if(Object.keys(subscriptions).indexOf(channel)!==-1)
|
336
|
-
return subscriptions[channel];
|
337
|
-
// If it doesn't then let's try to see if the channel matches a wildcard callback
|
338
|
-
var pattern = matchesWildcard(subscriptions, channel);
|
339
|
-
if (pattern!== undefined) {
|
340
|
-
return subscriptions[pattern];
|
341
|
-
}
|
342
|
-
// If there's no exact match or wildcard we have to return undefined
|
343
|
-
return undefined;
|
344
|
-
};
|
345
|
-
|
346
|
-
|
347
|
-
//
|
348
|
-
// Helper function that tries to match a channel with each subscription
|
349
|
-
// it returns undefined if no match is found
|
350
|
-
//
|
351
|
-
function matchesWildcard (subscriptions, channel) {
|
352
|
-
var i;
|
353
|
-
var subs = Object.keys(subscriptions);
|
354
|
-
for (i=0; i < subs.length; i++) {
|
355
|
-
if (matchesFilter(subs[i], channel)) {
|
356
|
-
return subs[i];
|
357
|
-
}
|
358
|
-
}
|
359
|
-
return undefined;
|
360
|
-
};
|
361
|
-
|
362
|
-
|
363
|
-
//
|
364
|
-
// Helper function that checks a certain channel and see if it matches a wildcard pattern
|
365
|
-
// Returns true if the channel matches a pattern (including the exact pattern)
|
366
|
-
//
|
367
|
-
function matchesFilter (pattern, channel) {
|
368
|
-
// If multi-level wildcard is the only character in pattern, then any string will match
|
369
|
-
if (pattern==="#") {
|
370
|
-
return true;
|
371
|
-
}
|
372
|
-
// Handle all other multi-level wildcards
|
373
|
-
// FROM SPEC: The number sign (‘#’ U+0023) is a wildcard character that matches any number of levels within a topic. The multi-level wildcard represents the parent and any number of child levels. The multi-level wildcard character MUST be specified either on its own or following a topic level separator. In either case it MUST be the last character specified in the Topic Filter
|
374
|
-
var p_wo_wildcard = pattern.substring(0, pattern.length-2);
|
375
|
-
var str_wo_details = channel.substring(0, pattern.length-2);
|
376
|
-
if (pattern.slice(-1)=='#' && p_wo_wildcard==str_wo_details) {
|
377
|
-
return true;
|
378
|
-
}
|
379
|
-
// TODO Handle single-level wildcards (+)
|
380
|
-
// FROM SPEC: The single-level wildcard can be used at any level in the Topic Filter, including first and last levels. Where it is used it MUST occupy an entire level of the filter [MQTT-4.7.1-3]. It can be used at more than one level in the Topic Filter and can be used in conjunction with the multilevel wildcard.
|
381
|
-
// http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718107
|
382
|
-
return false;
|
383
|
-
};
|
384
|
-
|
385
|
-
|
386
|
-
//
|
387
|
-
// Helper method that queues operations into the backlog.
|
388
|
-
// This method is used to make `connect` "synchronous" by
|
389
|
-
// queueing up operations on the client until it is connected.
|
390
|
-
//
|
391
|
-
// @param {string} method - the method that needs to be added to the backlog
|
392
|
-
// @param {Array} parameters - parameters to the method being added to the backlog
|
393
|
-
// @returns {boolean} true if the method was successfully added, false otherwise
|
394
|
-
//
|
395
|
-
function addToBacklog (client, backlog, method, parameters) {
|
396
|
-
if (!client.isConnected() ) {
|
397
|
-
backlog.push({
|
398
|
-
op : method,
|
399
|
-
params : parameters
|
400
|
-
});
|
401
|
-
return true;
|
402
|
-
}
|
403
|
-
return false;
|
404
|
-
};
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
//
|
410
|
-
// End of methods definition for SimpleMQTTClient
|
411
|
-
//
|
412
|
-
|
413
|
-
|
414
|
-
// Exports mqtt object
|
415
|
-
// For node.js, also with backwards-compatibility for the old `require()` API.
|
416
|
-
// If we're in the browser, add `MQTT` as a global object.
|
417
|
-
if (typeof exports !== 'undefined') {
|
418
|
-
if (typeof module !== 'undefined' && module.exports) {
|
419
|
-
exports = module.exports = mqtt;
|
420
|
-
}
|
421
|
-
exports.MQTT = mqtt;
|
422
|
-
} else {
|
423
|
-
root.MQTT = mqtt;
|
424
|
-
}
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
}.call(this));
|