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,27 +0,0 @@
|
|
1
|
-
# beacon-cloud-bot
|
2
|
-
This is a RoomPlaces bot, it keep tracks of information about beacons in order to decouple low level technical details with the resource name needed by RoomPlaces.
|
3
|
-
|
4
|
-
In order to interact with this bot you can use the library Nutella client library using the methods described below:
|
5
|
-
|
6
|
-
## Publish - Subscribe channels
|
7
|
-
|
8
|
-
| Channel | Function | Direction | Content |
|
9
|
-
| ------------------------------- | -------------------------- | ----------------- | -------------------------------------------------- |
|
10
|
-
| /beacon/beacon/add | Add a new beacon | client -> server | \<beacon\> |
|
11
|
-
| /beacon/beacon/remove | Remove a beacon | client -> server | {rid: ''} |
|
12
|
-
| /beacon/beacon/added | Remove a beacon | client -> server | {beacons: [\<beacon\>*]} |
|
13
|
-
| /beacon/beacon/removed | Remove a beacon | client -> server | {beacons: [\<beacon\>*]} |
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
## Request - Response channels
|
18
|
-
|
19
|
-
| Channel | Function | Request -> Response | Request | Response |
|
20
|
-
| -------------------------- | -------------------------- | ------------------- | ----------------- | ------------------------------------- |
|
21
|
-
| /beacon/beacons | Request all the beacons | client -> server | {} | {beacons: [\<beacon\>*]} |
|
22
|
-
| /beacon/uuids | Request all the uuids | client -> server | {} | {uuids: [''*]} |
|
23
|
-
| /beacon/virtual_beacon | Request new iBeacon codes | client -> server | {rid:'\<string\>} | {major: \<int\>, minor: \<int\>} | |
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
\<beacon\> ::= {rid: '', major: '\<number\>', minor: '\<number\>'}
|
@@ -1,150 +0,0 @@
|
|
1
|
-
require 'nutella_lib'
|
2
|
-
require 'json'
|
3
|
-
|
4
|
-
require_relative '../../lib/config/runlist'
|
5
|
-
require_relative '../../lib/config/config'
|
6
|
-
require_relative '../../nutella_lib/framework_core'
|
7
|
-
|
8
|
-
# Initialize nutella
|
9
|
-
nutella.f.init(Nutella.config['broker'], 'beacon-cloud-bot')
|
10
|
-
|
11
|
-
puts "Beacon cloud initialization"
|
12
|
-
|
13
|
-
# Open the resources database
|
14
|
-
beacons = nutella.f.persist.get_json_object_store("beacons")
|
15
|
-
|
16
|
-
# Contains virtual beacon codes that are created for iPads
|
17
|
-
virtualBeacons = {}
|
18
|
-
major = 0
|
19
|
-
minor = 0
|
20
|
-
uuid = '00000000-0000-0000-0000-000000000000'
|
21
|
-
|
22
|
-
# Create new beacon
|
23
|
-
nutella.f.net.subscribe("beacon/beacon/add", lambda do |message, from|
|
24
|
-
puts message
|
25
|
-
rid = message["rid"]
|
26
|
-
uuid = message["uuid"]
|
27
|
-
major = message["major"]
|
28
|
-
minor = message["minor"]
|
29
|
-
|
30
|
-
if rid != nil && uuid != nil && major != nil && minor != nil
|
31
|
-
|
32
|
-
if beacons[rid] == nil
|
33
|
-
beacons[rid] = {
|
34
|
-
:rid => rid,
|
35
|
-
:uuid => uuid,
|
36
|
-
:major => major,
|
37
|
-
:minor => minor
|
38
|
-
}
|
39
|
-
|
40
|
-
publishBeaconAdd(beacons[rid])
|
41
|
-
puts("Added beacon")
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end)
|
45
|
-
|
46
|
-
# Create new beacon
|
47
|
-
nutella.f.net.subscribe("beacon/beacon/remove", lambda do |message, from|
|
48
|
-
puts message
|
49
|
-
rid = message["rid"]
|
50
|
-
|
51
|
-
if rid != nil
|
52
|
-
if beacons[rid] != nil
|
53
|
-
beacon = beacons[rid]
|
54
|
-
|
55
|
-
beacons.delete(rid)
|
56
|
-
|
57
|
-
publishBeaconRemove(beacon)
|
58
|
-
puts("Removed resource")
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end)
|
62
|
-
|
63
|
-
# Publish an added beacon
|
64
|
-
def publishBeaconAdd(beacon)
|
65
|
-
puts beacon
|
66
|
-
nutella.f.net.publish("beacon/beacons/added", {:beacons => [beacon]})
|
67
|
-
nutella.f.net.publish_to_all_runs("beacon/beacons/added", {:beacons => [beacon]})
|
68
|
-
end
|
69
|
-
|
70
|
-
# Publish an remove beacon
|
71
|
-
def publishBeaconRemove(beacon)
|
72
|
-
puts beacon
|
73
|
-
nutella.f.net.publish("beacon/beacons/removed", {:beacons => [beacon]})
|
74
|
-
nutella.f.net.publish_to_all_runs("beacon/beacons/removed", {:beacons => [beacon]})
|
75
|
-
end
|
76
|
-
|
77
|
-
# Request all the beacons
|
78
|
-
nutella.f.net.handle_requests("beacon/beacons", lambda do |request, from|
|
79
|
-
puts "Send the beacon list"
|
80
|
-
beaconList = []
|
81
|
-
|
82
|
-
beacons.to_h.each do |key, beacon|
|
83
|
-
beaconList.push(beacon)
|
84
|
-
end
|
85
|
-
|
86
|
-
virtualBeacons.each do |key, beacon|
|
87
|
-
beaconList.push(beacon)
|
88
|
-
end
|
89
|
-
{:beacons => beaconList}
|
90
|
-
end)
|
91
|
-
|
92
|
-
# Request all the beacons
|
93
|
-
nutella.f.net.handle_requests_on_all_runs("beacon/beacons", lambda do |request, app_id, run_id, from|
|
94
|
-
puts "Send the beacon list"
|
95
|
-
beaconList = []
|
96
|
-
|
97
|
-
beacons.to_h.each do |key, beacon|
|
98
|
-
beaconList.push(beacon)
|
99
|
-
end
|
100
|
-
|
101
|
-
virtualBeacons.each do |key, beacon|
|
102
|
-
beaconList.push(beacon)
|
103
|
-
end
|
104
|
-
{:beacons => beaconList}
|
105
|
-
end)
|
106
|
-
|
107
|
-
# Request all the UUIDs
|
108
|
-
nutella.f.net.handle_requests_on_all_runs("beacon/uuids", lambda do |request, app_id, run_id, from|
|
109
|
-
puts "Send the uuid list"
|
110
|
-
uuidList = []
|
111
|
-
beacons.to_h.each do |key, beacon|
|
112
|
-
if !uuidList.include? beacon["uuid"]
|
113
|
-
uuidList.push(beacon["uuid"])
|
114
|
-
end
|
115
|
-
end
|
116
|
-
|
117
|
-
{:uuids => uuidList}
|
118
|
-
end)
|
119
|
-
|
120
|
-
# Request virtual beacon codes
|
121
|
-
nutella.f.net.handle_requests_on_all_runs("beacon/virtual_beacon", lambda do |request, app_id, run_id, from|
|
122
|
-
if request["rid"] != nil
|
123
|
-
rid = request["rid"]
|
124
|
-
virtualBeacon = virtualBeacons[rid]
|
125
|
-
if virtualBeacon == nil
|
126
|
-
puts "Create new virtual beacon major: #{major}, minor: #{minor}"
|
127
|
-
virtualBeacons[rid] = {
|
128
|
-
:rid => rid,
|
129
|
-
:uuid => uuid,
|
130
|
-
:major => "#{major}",
|
131
|
-
:minor => "#{minor}",
|
132
|
-
:virtual => true
|
133
|
-
}
|
134
|
-
minor += 1
|
135
|
-
if minor != minor % 65536
|
136
|
-
major += 1
|
137
|
-
end
|
138
|
-
minor = minor % 65536
|
139
|
-
virtualBeacon = virtualBeacons[rid]
|
140
|
-
publishBeaconAdd(virtualBeacon)
|
141
|
-
puts("Added virtual-beacon")
|
142
|
-
end
|
143
|
-
virtualBeacon
|
144
|
-
end
|
145
|
-
end)
|
146
|
-
|
147
|
-
puts "Beacon cloud Initialization completed"
|
148
|
-
|
149
|
-
# Just sit there waiting for messages to come
|
150
|
-
nutella.f.net.listen
|
@@ -1 +0,0 @@
|
|
1
|
-
{"beacon14":{"rid":"beacon14","uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D","major":"30000","minor":"14"},"beacon8":{"rid":"beacon8","uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D","major":"30000","minor":"8"},"beacon1":{"rid":"beacon1","uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D","major":"10000","minor":"1"},"beacon5":{"rid":"beacon5","uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D","major":"20000","minor":"5"},"beacon3":{"rid":"beacon3","uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D","major":"10000","minor":"3"},"beacon2":{"rid":"beacon2","uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D","major":"10000","minor":"2"},"beacon15":{"rid":"beacon15","uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D","major":"30000","minor":"15"},"beacon7":{"rid":"beacon7","uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D","major":"30000","minor":"7"},"beacon18":{"rid":"beacon18","uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D","major":"30000","minor":"18"},"beacon16":{"rid":"beacon16","uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D","major":"30000","minor":"16"},"beacon13":{"rid":"beacon13","uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D","major":"30000","minor":"13"},"beacon12":{"rid":"beacon12","uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D","major":"30000","minor":"12"},"beacon10":{"rid":"beacon10","uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D","major":"12745","minor":"10"},"beacon9":{"rid":"beacon9","uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D","major":"30000","minor":"9"}}
|
@@ -1,42 +0,0 @@
|
|
1
|
-
# Logger bot
|
2
|
-
# ----------
|
3
|
-
#
|
4
|
-
# This bot is in charge of recording all the messages that are sent by
|
5
|
-
# all components in all runs. It records all info sent to channels:
|
6
|
-
# - `/nutella/logging`
|
7
|
-
# - `/nutella/apps/<app_id>/logging`
|
8
|
-
# - `/nutella/apps/<app_id>/runs/<run_id>/logging`
|
9
|
-
# All logs are appended to a MongoDB collection called `logs`, inside the
|
10
|
-
# `nutella` database.
|
11
|
-
#
|
12
|
-
# -----------------------------------------------------------------------------
|
13
|
-
|
14
|
-
require_relative '../../lib/config/runlist'
|
15
|
-
require_relative '../../lib/config/config'
|
16
|
-
require_relative '../../nutella_lib/framework_core'
|
17
|
-
|
18
|
-
require_relative 'utils'
|
19
|
-
|
20
|
-
# Initialize this bot as framework component
|
21
|
-
nutella.f.init(Nutella.config['broker'], 'example_framework_bot')
|
22
|
-
|
23
|
-
# Get a mongo persisted collection
|
24
|
-
logs = nutella.f.persist.get_mongo_collection_store 'logs'
|
25
|
-
|
26
|
-
# Listen for run-level log messages
|
27
|
-
nutella.f.net.subscribe_to_all_runs('logging', lambda do |payload, app_id, run_id, from|
|
28
|
-
logs.push assemble_log(payload, from)
|
29
|
-
end)
|
30
|
-
|
31
|
-
# Listen for app-level log messages
|
32
|
-
nutella.f.net.subscribe_to_all_apps('logging', lambda do |payload, app_id, from|
|
33
|
-
logs.push assemble_log(payload, from)
|
34
|
-
end)
|
35
|
-
|
36
|
-
# Listen for framework-level log messages
|
37
|
-
nutella.f.net.subscribe('logging', lambda do |payload, from|
|
38
|
-
logs.push assemble_log(payload, from)
|
39
|
-
end)
|
40
|
-
|
41
|
-
# Listen and process messages as they come
|
42
|
-
nutella.f.net.listen
|
@@ -1,34 +0,0 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
/.config
|
4
|
-
/coverage/
|
5
|
-
/InstalledFiles
|
6
|
-
/pkg/
|
7
|
-
/spec/reports/
|
8
|
-
/test/tmp/
|
9
|
-
/test/version_tmp/
|
10
|
-
/tmp/
|
11
|
-
|
12
|
-
## Specific to RubyMotion:
|
13
|
-
.dat*
|
14
|
-
.repl_history
|
15
|
-
build/
|
16
|
-
|
17
|
-
## Documentation cache and generated files:
|
18
|
-
/.yardoc/
|
19
|
-
/_yardoc/
|
20
|
-
/doc/
|
21
|
-
/rdoc/
|
22
|
-
|
23
|
-
## Environment normalisation:
|
24
|
-
/.bundle/
|
25
|
-
/lib/bundler/man/
|
26
|
-
|
27
|
-
# for a library or gem, you might want to ignore these files since the code is
|
28
|
-
# intended to run in multiple environments; otherwise, check them in:
|
29
|
-
# Gemfile.lock
|
30
|
-
# .ruby-version
|
31
|
-
# .ruby-gemset
|
32
|
-
|
33
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
34
|
-
.rvmrc
|
@@ -1 +0,0 @@
|
|
1
|
-
# monitoring-bot
|
@@ -1,472 +0,0 @@
|
|
1
|
-
require_relative '../../lib/config/runlist'
|
2
|
-
require_relative '../../lib/config/config'
|
3
|
-
require_relative '../../nutella_lib/framework_core'
|
4
|
-
require_relative '../../lib/commands/util/components_list'
|
5
|
-
require 'active_support/core_ext/object/deep_dup'
|
6
|
-
require 'mongo'
|
7
|
-
require 'bson'
|
8
|
-
|
9
|
-
|
10
|
-
# Initialize this bot as framework component
|
11
|
-
nutella.f.init(Nutella.config['broker'], 'monitoring_bot')
|
12
|
-
|
13
|
-
# Open the resources database
|
14
|
-
$messages = nutella.f.persist.get_json_object_store('messages')
|
15
|
-
|
16
|
-
# Application structure
|
17
|
-
$applications = {}
|
18
|
-
|
19
|
-
# MongoDB client
|
20
|
-
Mongo::Logger.logger.level = ::Logger::INFO
|
21
|
-
client = Mongo::Client.new([Nutella.config['broker']], :database => 'nutella')
|
22
|
-
|
23
|
-
puts 'Monitoring bot initialization'
|
24
|
-
|
25
|
-
def send_subscription_mail(mail, application, instance = nil, component = nil)
|
26
|
-
object = application
|
27
|
-
|
28
|
-
if instance != nil
|
29
|
-
object = object + ' > ' + instance
|
30
|
-
if rcomponent != nil
|
31
|
-
object = object + ' > ' + component
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
puts "Send mail to " + mail + "message: " + object
|
36
|
-
|
37
|
-
|
38
|
-
template_name = 'Nutella subscription'
|
39
|
-
template_content = [
|
40
|
-
{
|
41
|
-
:name=> 'main',
|
42
|
-
:content=> "Congratulation: subscription to component
|
43
|
-
<b>#{object}</b>
|
44
|
-
has been succeded."
|
45
|
-
}
|
46
|
-
]
|
47
|
-
message = {
|
48
|
-
:subject=> "Subscription to #{object}",
|
49
|
-
:from_name=> 'Nutella Monitoring Interface',
|
50
|
-
:to=>[
|
51
|
-
{
|
52
|
-
:email=> mail,
|
53
|
-
# :name=> ""
|
54
|
-
}
|
55
|
-
],
|
56
|
-
:from_email=>'nutellamonitoring@gmail.com'
|
57
|
-
}
|
58
|
-
end
|
59
|
-
|
60
|
-
def send_notification_mail(mail, application, instance = nil, component = nil)
|
61
|
-
object = application
|
62
|
-
|
63
|
-
if instance != nil
|
64
|
-
object = object + ' > ' + instance
|
65
|
-
if component != nil
|
66
|
-
object = object + ' > ' + component
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
puts "Send mail to " + mail + "message: " + object
|
71
|
-
|
72
|
-
template_name = 'Nutella alert'
|
73
|
-
template_content = [
|
74
|
-
{
|
75
|
-
:name=> 'main',
|
76
|
-
:content=> "Attention: component
|
77
|
-
<b>#{object}</b>
|
78
|
-
had a problem and went down."
|
79
|
-
}
|
80
|
-
]
|
81
|
-
message = {
|
82
|
-
:subject=> "Alert: #{object} went down",
|
83
|
-
:from_name=> 'Nutella Monitoring Interface',
|
84
|
-
:to=>[
|
85
|
-
{
|
86
|
-
:email=> mail,
|
87
|
-
# :name=> ""
|
88
|
-
}
|
89
|
-
],
|
90
|
-
:from_email=>'nutellamonitoring@gmail.com'
|
91
|
-
}
|
92
|
-
end
|
93
|
-
|
94
|
-
# Add an alert on a specific application/instance/component
|
95
|
-
nutella.f.net.subscribe_to_all_runs('monitoring/alert/add', lambda do |message, appId, runId, from|
|
96
|
-
application = message['application']
|
97
|
-
instance = message['instance']
|
98
|
-
component = message['component']
|
99
|
-
mail = message['mail']
|
100
|
-
|
101
|
-
create_if_not_present(application, instance, component)
|
102
|
-
|
103
|
-
if application != nil
|
104
|
-
puts "Subscribed to #{application} with mail #{mail}";
|
105
|
-
end
|
106
|
-
|
107
|
-
if application != nil && instance != nil && component != nil
|
108
|
-
a = $applications[application]
|
109
|
-
if a['instances'][instance]['components'][component]['alert'] == nil
|
110
|
-
a['instances'][instance]['components'][component]['alert'] = []
|
111
|
-
end
|
112
|
-
if !a['instances'][instance]['components'][component]['alert'].include? mail
|
113
|
-
a['instances'][instance]['components'][component]['alert'].push(mail)
|
114
|
-
end
|
115
|
-
$applications[application] = a
|
116
|
-
elsif application != nil && instance != nil
|
117
|
-
a = $applications[application]
|
118
|
-
if a['instances'][instance]['alert'] == nil
|
119
|
-
a['instances'][instance]['alert'] = []
|
120
|
-
end
|
121
|
-
if !a['instances'][instance]['alert'].include? mail
|
122
|
-
a['instances'][instance]['alert'].push(mail)
|
123
|
-
end
|
124
|
-
$applications[application] = a
|
125
|
-
elsif application != nil
|
126
|
-
a = $applications[application]
|
127
|
-
if a['alert'] == nil
|
128
|
-
a['alert'] = []
|
129
|
-
end
|
130
|
-
emails = a['alert']
|
131
|
-
if !emails.include? mail
|
132
|
-
emails.push(mail)
|
133
|
-
send_subscription_mail(mail, application)
|
134
|
-
end
|
135
|
-
$applications[application] = a
|
136
|
-
end
|
137
|
-
|
138
|
-
end)
|
139
|
-
|
140
|
-
# Listen for published messages
|
141
|
-
=begin
|
142
|
-
nutella.net.subscribe('#', lambda do |message, channel, from|
|
143
|
-
puts message
|
144
|
-
puts channel
|
145
|
-
#application = from['app_id']
|
146
|
-
#instance = from['run_id']
|
147
|
-
#component = from['component_id']
|
148
|
-
puts from
|
149
|
-
#puts application, instance, component
|
150
|
-
|
151
|
-
#create_if_not_present(application, instance, component)
|
152
|
-
|
153
|
-
#if !($applications[application]['instances'][instance]['components'][component]['publish'].include? channel)
|
154
|
-
# $applications[application]['instances'][instance]['components'][component]['publish'].push(channel)
|
155
|
-
#end
|
156
|
-
|
157
|
-
end)
|
158
|
-
=end
|
159
|
-
|
160
|
-
# Add an alert on a specific application/instance/component
|
161
|
-
nutella.f.net.subscribe_to_all_runs('monitoring/alert/remove', lambda do |message, appId, runId, from|
|
162
|
-
puts "Delete alert"
|
163
|
-
puts message
|
164
|
-
application = message['application']
|
165
|
-
instance = message['instance']
|
166
|
-
component = message['component']
|
167
|
-
mail = message['mail']
|
168
|
-
|
169
|
-
if application != nil && instance != nil && component != nil
|
170
|
-
a = $applications[application]
|
171
|
-
a['instances'][instance]['components'][component]['alert'] -=[mail]
|
172
|
-
$applications[application] = a
|
173
|
-
elsif application != nil && instance != nil
|
174
|
-
a = $applications[application]
|
175
|
-
a['instances'][instance]['alert'] -= [mail]
|
176
|
-
$applications[application] = a
|
177
|
-
elsif application != nil
|
178
|
-
a = $applications[application]
|
179
|
-
a['alert'] -= [mail]
|
180
|
-
puts a['alert']
|
181
|
-
$applications[application] = a
|
182
|
-
end
|
183
|
-
end)
|
184
|
-
|
185
|
-
# Listen for subscribe
|
186
|
-
# Listen for request
|
187
|
-
# Listen for handle_request
|
188
|
-
|
189
|
-
# Request the list of alert for an application/instance/component
|
190
|
-
nutella.f.net.handle_requests_on_all_runs('monitoring/alert', lambda do |request, appId, runId, from|
|
191
|
-
puts 'Sending alert list'
|
192
|
-
application = request['application']
|
193
|
-
instance = request['instance']
|
194
|
-
component = request['component']
|
195
|
-
|
196
|
-
alert = nil
|
197
|
-
|
198
|
-
begin
|
199
|
-
if application != nil && instance != nil && component != nil
|
200
|
-
a = $applications[application]
|
201
|
-
alert = a['instances'][instance]['components'][component]['alert']
|
202
|
-
elsif application != nil && instance != nil
|
203
|
-
a = $applications[application]
|
204
|
-
alert = a['instances'][instance]['alert']
|
205
|
-
elsif application != nil
|
206
|
-
a = $applications[application]
|
207
|
-
alert = a['alert']
|
208
|
-
end
|
209
|
-
rescue
|
210
|
-
end
|
211
|
-
|
212
|
-
if alert == nil
|
213
|
-
alert = []
|
214
|
-
end
|
215
|
-
|
216
|
-
{:emails => alert}
|
217
|
-
end)
|
218
|
-
|
219
|
-
# Create the application structure if it is not present
|
220
|
-
def create_if_not_present(application, instance=nil, component=nil)
|
221
|
-
|
222
|
-
a = $applications[application]
|
223
|
-
|
224
|
-
if a == nil
|
225
|
-
a = {
|
226
|
-
'name' => application,
|
227
|
-
'instances' => {}
|
228
|
-
}
|
229
|
-
end
|
230
|
-
|
231
|
-
begin
|
232
|
-
if instance != nil && a['instances'][instance] == nil
|
233
|
-
a['instances'][instance] = {
|
234
|
-
'name' => instance,
|
235
|
-
'components' => {}
|
236
|
-
}
|
237
|
-
end
|
238
|
-
rescue
|
239
|
-
a['instances'][instance] = {
|
240
|
-
'name' => instance,
|
241
|
-
'components' => {}
|
242
|
-
}
|
243
|
-
end
|
244
|
-
|
245
|
-
begin
|
246
|
-
if component != nil && instance != nil && a['instances'][instance]['components'][component] == nil
|
247
|
-
a['instances'][instance]['components'][component] = {
|
248
|
-
'name' => component,
|
249
|
-
'publish' => [],
|
250
|
-
'subscribe' => [],
|
251
|
-
'request' => [],
|
252
|
-
'handle_request' => []
|
253
|
-
}
|
254
|
-
end
|
255
|
-
rescue
|
256
|
-
a['instances'][instance]['components'][component] = {
|
257
|
-
'name' => component,
|
258
|
-
'publish' => [],
|
259
|
-
'subscribe' => [],
|
260
|
-
'request' => [],
|
261
|
-
'handle_request' => []
|
262
|
-
}
|
263
|
-
end
|
264
|
-
|
265
|
-
$applications[application] = a
|
266
|
-
|
267
|
-
end
|
268
|
-
|
269
|
-
nutella.f.net.handle_requests_on_all_runs('monitoring/application', lambda do |request, appId, runId, from|
|
270
|
-
apps = []
|
271
|
-
|
272
|
-
$applications.each do |_, application|
|
273
|
-
app = application.deep_dup
|
274
|
-
app['instances'] = []
|
275
|
-
if application['instances'] != nil
|
276
|
-
application['instances'].each do |_, instance|
|
277
|
-
inst = instance.deep_dup
|
278
|
-
|
279
|
-
app['instances'].push(inst)
|
280
|
-
|
281
|
-
inst['components'] = []
|
282
|
-
if instance['components'] != nil
|
283
|
-
instance['components'].each do |_, component|
|
284
|
-
comp = component.deep_dup
|
285
|
-
inst['components'].push(comp)
|
286
|
-
end
|
287
|
-
end
|
288
|
-
end
|
289
|
-
end
|
290
|
-
apps.push(app)
|
291
|
-
end
|
292
|
-
{:applications => apps}
|
293
|
-
end)
|
294
|
-
|
295
|
-
nutella.f.net.handle_requests_on_all_runs('monitoring/message', lambda do |request, appId, runId, from|
|
296
|
-
|
297
|
-
application = request['application']
|
298
|
-
instance = request['instance']
|
299
|
-
channel = request['channel']
|
300
|
-
|
301
|
-
collection = client['dump']
|
302
|
-
|
303
|
-
messages = []
|
304
|
-
|
305
|
-
timestamp_low = (Time.now-3600).to_f # Last hour
|
306
|
-
timestamp_high = Time.now.to_f
|
307
|
-
object_id_low = BSON::ObjectId.from_string((timestamp_low).floor.to_s(16) + "0000000000000000")
|
308
|
-
object_id_high = BSON::ObjectId.from_string((timestamp_high).floor.to_s(16) + "0000000000000000")
|
309
|
-
|
310
|
-
|
311
|
-
collection .find({ '_id' => { '$gt' => object_id_low, '$lt' => object_id_high }, 'channel' => "/nutella/apps/#{application}/runs/#{instance}/#{channel}"}).sort({'_id' => -1}).limit(50).each do |message|
|
312
|
-
m = {
|
313
|
-
'from' => '',
|
314
|
-
'to' => '',
|
315
|
-
'from' => '',
|
316
|
-
'date' => message['_id'].generation_time.getlocal.to_s,
|
317
|
-
'type' => message['message']['type'],
|
318
|
-
'payload' => message['message']['payload']
|
319
|
-
}
|
320
|
-
messages.push(m)
|
321
|
-
end
|
322
|
-
|
323
|
-
{:messages => messages}
|
324
|
-
end)
|
325
|
-
|
326
|
-
# Catch publish messages
|
327
|
-
nutella.f.net.subscribe_to_all_runs("#", lambda do |channel, payload, app_id, run_id, from|
|
328
|
-
|
329
|
-
component_id = from['component_id']
|
330
|
-
|
331
|
-
if component_id != nil
|
332
|
-
create_if_not_present(app_id, run_id, component_id)
|
333
|
-
|
334
|
-
publish = $applications[app_id]['instances'][run_id]['components'][component_id]['publish']
|
335
|
-
|
336
|
-
if not publish.include? ({'channel' => channel})
|
337
|
-
publish.push({'channel' => channel})
|
338
|
-
end
|
339
|
-
|
340
|
-
$applications[app_id]['instances'][run_id]['components'][component_id]['publish'] = publish
|
341
|
-
|
342
|
-
end
|
343
|
-
|
344
|
-
end)
|
345
|
-
|
346
|
-
# Catch subscribe / handle_request messages
|
347
|
-
nutella.f.net.subscribe_to_all_runs("subscriptions", lambda do |payload, app_id, run_id, from|
|
348
|
-
|
349
|
-
component_id = from['component_id']
|
350
|
-
type = payload['type']
|
351
|
-
channel = nutella.net.un_pad_channel(payload['channel'], app_id, run_id)
|
352
|
-
|
353
|
-
if type == 'subscribe'
|
354
|
-
create_if_not_present(app_id, run_id, component_id)
|
355
|
-
|
356
|
-
subscribe = $applications[app_id]['instances'][run_id]['components'][component_id]['subscribe']
|
357
|
-
|
358
|
-
if not subscribe.include? ({'channel' => channel})
|
359
|
-
subscribe.push({'channel' => channel})
|
360
|
-
end
|
361
|
-
|
362
|
-
$applications[app_id]['instances'][run_id]['components'][component_id]['subscribe'] = subscribe
|
363
|
-
|
364
|
-
end
|
365
|
-
|
366
|
-
if type == 'handle_requests'
|
367
|
-
create_if_not_present(app_id, run_id, component_id)
|
368
|
-
|
369
|
-
handle_request = $applications[app_id]['instances'][run_id]['components'][component_id]['handle_request']
|
370
|
-
|
371
|
-
if not handle_request.include? ({'channel' => channel})
|
372
|
-
handle_request.push({'channel' => channel})
|
373
|
-
end
|
374
|
-
|
375
|
-
$applications[app_id]['instances'][run_id]['components'][component_id]['handle_request'] = handle_request
|
376
|
-
|
377
|
-
end
|
378
|
-
|
379
|
-
end)
|
380
|
-
|
381
|
-
# Catch requests
|
382
|
-
nutella.f.net.catch_requests_on_all_runs_wildcard(lambda do |channel, payload, app_id, run_id, from|
|
383
|
-
|
384
|
-
component_id = from['component_id']
|
385
|
-
|
386
|
-
if component_id != nil
|
387
|
-
|
388
|
-
create_if_not_present(app_id, run_id, component_id)
|
389
|
-
|
390
|
-
request = $applications[app_id]['instances'][run_id]['components'][component_id]['request']
|
391
|
-
|
392
|
-
unless request.include? ({'channel' => channel})
|
393
|
-
request.push({'channel' => channel})
|
394
|
-
end
|
395
|
-
|
396
|
-
$applications[app_id]['instances'][run_id]['components'][component_id]['request'] = request
|
397
|
-
|
398
|
-
end
|
399
|
-
|
400
|
-
|
401
|
-
end)
|
402
|
-
|
403
|
-
|
404
|
-
nutella.f.net.subscribe_to_all_runs("pings", lambda do |payload, app_id, run_id, from|
|
405
|
-
|
406
|
-
component_id = from['component_id']
|
407
|
-
|
408
|
-
create_if_not_present(app_id, run_id, component_id)
|
409
|
-
|
410
|
-
$applications[app_id]['instances'][run_id]['components'][component_id]['timestamp'] = Time.now.to_f
|
411
|
-
|
412
|
-
end)
|
413
|
-
|
414
|
-
# TODO implement framework pings
|
415
|
-
|
416
|
-
puts 'Initialization completed'
|
417
|
-
|
418
|
-
while sleep 0.25
|
419
|
-
n = Nutella.runlist.all_runs
|
420
|
-
Nutella.runlist.all_apps.each do |app_id, _|
|
421
|
-
Nutella.runlist.runs_for_app(app_id).each do |run_id|
|
422
|
-
pathBots = "#{Nutella.runlist.app_path(app_id)}/bots"
|
423
|
-
pathInterfaces = "#{Nutella.runlist.app_path(app_id)}/interfaces"
|
424
|
-
|
425
|
-
create_if_not_present(app_id, run_id)
|
426
|
-
|
427
|
-
ComponentsList.for_each_component_in_dir(pathBots) do |comp_name|
|
428
|
-
create_if_not_present(app_id, run_id, comp_name)
|
429
|
-
end
|
430
|
-
|
431
|
-
ComponentsList.for_each_component_in_dir(pathInterfaces) do |comp_name|
|
432
|
-
create_if_not_present(app_id, run_id, comp_name)
|
433
|
-
end
|
434
|
-
end
|
435
|
-
end
|
436
|
-
|
437
|
-
$applications.each do |_, application|
|
438
|
-
appProblems = 0
|
439
|
-
application['instances'].each do |_, instance|
|
440
|
-
instanceProblems = 0
|
441
|
-
instance['components'].each do |_, component|
|
442
|
-
if component['timestamp'] == nil || Time.now.to_f - component['timestamp'] > 16.0
|
443
|
-
appProblems += 1
|
444
|
-
instanceProblems += 1
|
445
|
-
if component['problem'] != true
|
446
|
-
component['problem'] = true
|
447
|
-
#puts "Set problem on #{application['name']} > #{instance['name']} > #{component['name']}}"
|
448
|
-
if component['alert'] != nil
|
449
|
-
component['alert'].each do |mail|
|
450
|
-
send_notification_mail(mail, application['name'], instance['name'], component['name'])
|
451
|
-
end
|
452
|
-
end
|
453
|
-
if instance['alert'] != nil
|
454
|
-
instance['alert'].each do |mail|
|
455
|
-
send_notification_mail(mail, application['name'], instance['name'], component['name'])
|
456
|
-
end
|
457
|
-
end
|
458
|
-
if application['alert'] != nil
|
459
|
-
application['alert'].each do |mail|
|
460
|
-
send_notification_mail(mail, application['name'], instance['name'], component['name'])
|
461
|
-
end
|
462
|
-
end
|
463
|
-
end
|
464
|
-
else
|
465
|
-
component['problem'] = false
|
466
|
-
end
|
467
|
-
instance['problems'] = instanceProblems
|
468
|
-
end
|
469
|
-
application['problems'] = appProblems
|
470
|
-
end
|
471
|
-
end
|
472
|
-
end
|