robeaux 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +41 -61
- data/css/application.css +2 -0
- data/css/application.css.map +7 -0
- data/index.html +5 -39
- data/js/script.js +7 -0
- data/robeaux.gemspec +16 -8
- metadata +11 -104
- data/.gitignore +0 -1
- data/Gruntfile.js +0 -43
- data/Makefile +0 -22
- data/css/fonts.css +0 -59
- data/css/main.css +0 -1
- data/css/normalize.css +0 -425
- data/css/style.css +0 -558
- data/css/themes/artoo.css +0 -3
- data/css/themes/blackboard.css +0 -1
- data/css/themes/cylon.css +0 -3
- data/css/themes/dark.css +0 -1
- data/css/themes/gobot.css +0 -3
- data/css/themes/gray.css +0 -1
- data/css/themes/whiteboard.css +0 -1
- data/js/app.js +0 -1
- data/js/controllers/device_commands_ctrl.js +0 -81
- data/js/controllers/device_events_ctrl.js +0 -31
- data/js/controllers/index_ctrl.js +0 -9
- data/js/controllers/nav_ctrl.js +0 -5
- data/js/controllers/robot_commands_ctrl.js +0 -33
- data/js/controllers/robot_ctrl.js +0 -25
- data/js/controllers/themes_ctrl.js +0 -36
- data/js/controllers/widget_editor_ctrl.js +0 -44
- data/js/controllers/widgets_ctrl.js +0 -40
- data/js/directives/widget.js +0 -50
- data/js/router.js +0 -27
- data/js/services/themes.js +0 -90
- data/js/services/widgets.js +0 -86
- data/js/vendor/angular-route.min.js +0 -13
- data/js/vendor/angular.min.js +0 -212
- data/js/widgets/attitude.html +0 -32
- data/js/widgets/attitude.js +0 -27
- data/js/widgets/mindwave.html +0 -51
- data/js/widgets/mindwave.js +0 -23
- data/less/app.less +0 -21
- data/less/objects/buttons.less +0 -32
- data/less/objects/connections.less +0 -28
- data/less/objects/device.less +0 -30
- data/less/objects/forms.less +0 -29
- data/less/objects/list.less +0 -27
- data/less/objects/nav.less +0 -33
- data/less/objects/robot.less +0 -43
- data/less/objects/themes.less +0 -18
- data/less/objects/widgets.less +0 -85
- data/less/support/buttons.less +0 -39
- data/less/support/container.less +0 -9
- data/less/support/forms.less +0 -18
- data/less/support/mixins.less +0 -3
- data/less/themes/blackboard.less +0 -158
- data/less/themes/dark.less +0 -148
- data/less/themes/default.less +0 -52
- data/less/themes/gray.less +0 -121
- data/less/themes/whiteboard.less +0 -152
- data/less/vendor/elements.less +0 -156
- data/less/vendor/normalize.less +0 -425
- data/less/vendor/semantic-grid.less +0 -67
- data/less/views/devices.less +0 -47
- data/less/views/robots.less +0 -132
- data/less/views/themes.less +0 -31
- data/less/views/widgets.less +0 -50
- data/package.json +0 -21
- data/partials/device.html +0 -76
- data/partials/index.html +0 -17
- data/partials/robot.html +0 -127
- data/partials/themes.html +0 -42
- data/partials/widget_editor.html +0 -68
- data/test/controllers/device_commands_ctrl.js +0 -129
- data/test/controllers/device_events_ctrl.js +0 -82
- data/test/controllers/index_ctrl.js +0 -48
- data/test/controllers/nav_ctrl.js +0 -40
- data/test/controllers/robot_commands_ctrl.js +0 -127
- data/test/controllers/robot_ctrl.js +0 -62
- data/test/controllers/themes_ctrl.js +0 -96
- data/test/controllers/widget_editor_ctrl.js +0 -111
- data/test/controllers/widgets_ctrl.js +0 -74
- data/test/functions/functions.js +0 -30
- data/test/karma.conf.js +0 -76
- data/test/karma_test_all.conf.js +0 -23
- data/test/karma_test_controllers.conf.js +0 -19
- data/test/karma_test_functions.conf.js +0 -14
- data/test/karma_test_services.conf.js +0 -17
- data/test/services/themes.js +0 -122
- data/test/services/widgets.js +0 -104
- data/test/support/myDevice.json +0 -15
- data/test/support/myRobot.json +0 -31
- data/test/support/robots.json +0 -33
- data/test/support/themes.json +0 -9
- data/test/support/widgets.json +0 -18
- data/test/vendor/angular-mocks.js +0 -2163
- data/test/vendor/jasmine-jquery.js +0 -704
- data/test/vendor/jquery.js +0 -8755
data/css/themes/artoo.css
DELETED
data/css/themes/blackboard.css
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
body{background-color:#343434;color:#fff}nav{background:#2c2c2c}nav .links a{background:none;padding:8px 13px}nav .links a.active{background:none;color:#fff;border:2px solid #1cbcd8}nav .links a:hover{color:#1cbcd8 !important}.row{border-top:1px solid #1cbcd8;padding-top:25px;padding-bottom:25px;width:960px;margin-left:auto;margin-right:auto;display:block}.row:last-child{border-bottom:1px solid #1cbcd8}.row-device{border-top:none;border-bottom:none !important}.robot .details span{color:#fff}.robot .details strong{color:#1cbcd8}.row{background-color:#343434}.bullet-connections{padding-left:32px;background:transparent url(../../images/bullet-connections.png) no-repeat left center}.bullet-devices{padding-left:32px;background:transparent url(../../images/bullet-devices.png) no-repeat left center}.robot-devices{background:transparent url(../../images/devices-image.png) no-repeat 21px center;padding-left:84px}.btn-robot{color:#343434;background-color:#1cbcd8;border-color:#343434}.btn-robot:hover,.btn-robot:focus,.btn-robot:active,.btn-robot.active{color:#343434;background-color:#1695ab;border-color:#151515}.btn-robot:active,.btn-robot.active{background-image:none}.btn-robot.disabled,.btn-robot[disabled],fieldset[disabled] .btn-robot,.btn-robot.disabled:hover,.btn-robot[disabled]:hover,fieldset[disabled] .btn-robot:hover,.btn-robot.disabled:focus,.btn-robot[disabled]:focus,fieldset[disabled] .btn-robot:focus,.btn-robot.disabled:active,.btn-robot[disabled]:active,fieldset[disabled] .btn-robot:active,.btn-robot.disabled.active,.btn-robot[disabled].active,fieldset[disabled] .btn-robot.active{background-color:#1cbcd8;border-color:#343434}.btn-device,.btn-save{color:#343434;background-color:#56d884;border-color:#343434}.btn-device:hover,.btn-save:hover,.btn-device:focus,.btn-save:focus,.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{color:#343434;background-color:#2fcc67;border-color:#151515}.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{background-image:none}.btn-device.disabled,.btn-save.disabled,.btn-device[disabled],.btn-save[disabled],fieldset[disabled] .btn-device,fieldset[disabled] .btn-save,.btn-device.disabled:hover,.btn-save.disabled:hover,.btn-device[disabled]:hover,.btn-save[disabled]:hover,fieldset[disabled] .btn-device:hover,fieldset[disabled] .btn-save:hover,.btn-device.disabled:focus,.btn-save.disabled:focus,.btn-device[disabled]:focus,.btn-save[disabled]:focus,fieldset[disabled] .btn-device:focus,fieldset[disabled] .btn-save:focus,.btn-device.disabled:active,.btn-save.disabled:active,.btn-device[disabled]:active,.btn-save[disabled]:active,fieldset[disabled] .btn-device:active,fieldset[disabled] .btn-save:active,.btn-device.disabled.active,.btn-save.disabled.active,.btn-device[disabled].active,.btn-save[disabled].active,fieldset[disabled] .btn-device.active,fieldset[disabled] .btn-save.active{background-color:#56d884;border-color:#343434}.btn-connect{color:#343434;background-color:#d8ca69;border-color:#343434}.btn-connect:hover,.btn-connect:focus,.btn-connect:active,.btn-connect.active{color:#343434;background-color:#cdbc41;border-color:#151515}.btn-connect:active,.btn-connect.active{background-image:none}.btn-connect.disabled,.btn-connect[disabled],fieldset[disabled] .btn-connect,.btn-connect.disabled:hover,.btn-connect[disabled]:hover,fieldset[disabled] .btn-connect:hover,.btn-connect.disabled:focus,.btn-connect[disabled]:focus,fieldset[disabled] .btn-connect:focus,.btn-connect.disabled:active,.btn-connect[disabled]:active,fieldset[disabled] .btn-connect:active,.btn-connect.disabled.active,.btn-connect[disabled].active,fieldset[disabled] .btn-connect.active{background-color:#d8ca69;border-color:#343434}.btn-run,.btn-reset{color:#343434;background-color:#ca5252;border-color:#343434}.btn-run:hover,.btn-reset:hover,.btn-run:focus,.btn-reset:focus,.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{color:#343434;background-color:#b23737;border-color:#151515}.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{background-image:none}.btn-run.disabled,.btn-reset.disabled,.btn-run[disabled],.btn-reset[disabled],fieldset[disabled] .btn-run,fieldset[disabled] .btn-reset,.btn-run.disabled:hover,.btn-reset.disabled:hover,.btn-run[disabled]:hover,.btn-reset[disabled]:hover,fieldset[disabled] .btn-run:hover,fieldset[disabled] .btn-reset:hover,.btn-run.disabled:focus,.btn-reset.disabled:focus,.btn-run[disabled]:focus,.btn-reset[disabled]:focus,fieldset[disabled] .btn-run:focus,fieldset[disabled] .btn-reset:focus,.btn-run.disabled:active,.btn-reset.disabled:active,.btn-run[disabled]:active,.btn-reset[disabled]:active,fieldset[disabled] .btn-run:active,fieldset[disabled] .btn-reset:active,.btn-run.disabled.active,.btn-reset.disabled.active,.btn-run[disabled].active,.btn-reset[disabled].active,fieldset[disabled] .btn-run.active,fieldset[disabled] .btn-reset.active{background-color:#ca5252;border-color:#343434}input[type="text"],select,textarea{color:#fff;background:#343434}input[type="text"]:focus,select:focus,textarea:focus{border-color:#fff;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(255, 255, 255, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(255, 255, 255, 0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(255, 255, 255, 0.6)}.widgets .panel{background:#4d4d4d}.widgets .panel .panel-header{border-bottom:1px solid #666}.widgets .panel .panel-footer{border-top:1px solid #666}
|
data/css/themes/cylon.css
DELETED
data/css/themes/dark.css
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
body{background-color:#000;color:#000}.row{background-color:#4d4d4d}nav .links a{background:none}nav .links a.active{background:none;color:#1CBBD8}nav .links a:hover{color:#1CBBD8 !important}.robot .details span{color:#fff}.robot .details strong{color:#000}.btn-robot{color:#fff;background-color:#000;border-color:#fff}.btn-robot:hover,.btn-robot:focus,.btn-robot:active,.btn-robot.active{color:#fff;background-color:#000;border-color:#e0e0e0}.btn-robot:active,.btn-robot.active{background-image:none}.btn-robot.disabled,.btn-robot[disabled],fieldset[disabled] .btn-robot,.btn-robot.disabled:hover,.btn-robot[disabled]:hover,fieldset[disabled] .btn-robot:hover,.btn-robot.disabled:focus,.btn-robot[disabled]:focus,fieldset[disabled] .btn-robot:focus,.btn-robot.disabled:active,.btn-robot[disabled]:active,fieldset[disabled] .btn-robot:active,.btn-robot.disabled.active,.btn-robot[disabled].active,fieldset[disabled] .btn-robot.active{background-color:#000;border-color:#fff}.btn-device,.btn-save{color:#000;background-color:#fff;border-color:#000}.btn-device:hover,.btn-save:hover,.btn-device:focus,.btn-save:focus,.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{color:#000;background-color:#e6e6e6;border-color:#000}.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{background-image:none}.btn-device.disabled,.btn-save.disabled,.btn-device[disabled],.btn-save[disabled],fieldset[disabled] .btn-device,fieldset[disabled] .btn-save,.btn-device.disabled:hover,.btn-save.disabled:hover,.btn-device[disabled]:hover,.btn-save[disabled]:hover,fieldset[disabled] .btn-device:hover,fieldset[disabled] .btn-save:hover,.btn-device.disabled:focus,.btn-save.disabled:focus,.btn-device[disabled]:focus,.btn-save[disabled]:focus,fieldset[disabled] .btn-device:focus,fieldset[disabled] .btn-save:focus,.btn-device.disabled:active,.btn-save.disabled:active,.btn-device[disabled]:active,.btn-save[disabled]:active,fieldset[disabled] .btn-device:active,fieldset[disabled] .btn-save:active,.btn-device.disabled.active,.btn-save.disabled.active,.btn-device[disabled].active,.btn-save[disabled].active,fieldset[disabled] .btn-device.active,fieldset[disabled] .btn-save.active{background-color:#fff;border-color:#000}.btn-connect{color:#dec763;background-color:#000;border-color:#dec763;text-transform:uppercase}.btn-connect:hover,.btn-connect:focus,.btn-connect:active,.btn-connect.active{color:#dec763;background-color:#000;border-color:#d3b530}.btn-connect:active,.btn-connect.active{background-image:none}.btn-connect.disabled,.btn-connect[disabled],fieldset[disabled] .btn-connect,.btn-connect.disabled:hover,.btn-connect[disabled]:hover,fieldset[disabled] .btn-connect:hover,.btn-connect.disabled:focus,.btn-connect[disabled]:focus,fieldset[disabled] .btn-connect:focus,.btn-connect.disabled:active,.btn-connect[disabled]:active,fieldset[disabled] .btn-connect:active,.btn-connect.disabled.active,.btn-connect[disabled].active,fieldset[disabled] .btn-connect.active{background-color:#000;border-color:#dec763}.btn-run,.btn-reset{color:#c36148;background-color:#000;border-color:#c36148;text-transform:uppercase}.btn-run:hover,.btn-reset:hover,.btn-run:focus,.btn-reset:focus,.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{color:#c36148;background-color:#000;border-color:#9b4833}.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{background-image:none}.btn-run.disabled,.btn-reset.disabled,.btn-run[disabled],.btn-reset[disabled],fieldset[disabled] .btn-run,fieldset[disabled] .btn-reset,.btn-run.disabled:hover,.btn-reset.disabled:hover,.btn-run[disabled]:hover,.btn-reset[disabled]:hover,fieldset[disabled] .btn-run:hover,fieldset[disabled] .btn-reset:hover,.btn-run.disabled:focus,.btn-reset.disabled:focus,.btn-run[disabled]:focus,.btn-reset[disabled]:focus,fieldset[disabled] .btn-run:focus,fieldset[disabled] .btn-reset:focus,.btn-run.disabled:active,.btn-reset.disabled:active,.btn-run[disabled]:active,.btn-reset[disabled]:active,fieldset[disabled] .btn-run:active,fieldset[disabled] .btn-reset:active,.btn-run.disabled.active,.btn-reset.disabled.active,.btn-run[disabled].active,.btn-reset[disabled].active,fieldset[disabled] .btn-run.active,fieldset[disabled] .btn-reset.active{background-color:#000;border-color:#c36148}input[type="text"],select,textarea{color:#000;background:#666}input[type="text"]:focus,select:focus,textarea:focus{border-color:#fff;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(255, 255, 255, 0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(255, 255, 255, 0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(255, 255, 255, 0.6)}.widgets .panel{background:#4d4d4d}.widgets .panel .panel-header{border-bottom:1px solid #666}.widgets .panel .panel-footer{border-top:1px solid #666}.list .theme,.list .widget{border-bottom:1px dotted #666}th{border-bottom:1px solid #666 !important}.connections .robot-devices .details{color:#000}.connections .robot-connections .name{color:#000}
|
data/css/themes/gobot.css
DELETED
data/css/themes/gray.css
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
body{background-color:#eeeef4;color:#3e6372}nav{background:#2d4753}nav .links a{background:none;padding:8px 13px}.row{background-color:#fff;border-bottom:3px solid #e1e1e5;padding-top:25px;padding-bottom:25px;margin-bottom:26px;width:980px;margin-left:auto;margin-right:auto;display:block}.row-device{border-top:none}.robot .details span{color:#ff6900}.robot .details strong{color:#3e6372}.btn-robot{color:#fff;background-color:#ff6900;border-color:#fff}.btn-robot:hover,.btn-robot:focus,.btn-robot:active,.btn-robot.active{color:#fff;background-color:#cc5400;border-color:#e0e0e0}.btn-robot:active,.btn-robot.active{background-image:none}.btn-robot.disabled,.btn-robot[disabled],fieldset[disabled] .btn-robot,.btn-robot.disabled:hover,.btn-robot[disabled]:hover,fieldset[disabled] .btn-robot:hover,.btn-robot.disabled:focus,.btn-robot[disabled]:focus,fieldset[disabled] .btn-robot:focus,.btn-robot.disabled:active,.btn-robot[disabled]:active,fieldset[disabled] .btn-robot:active,.btn-robot.disabled.active,.btn-robot[disabled].active,fieldset[disabled] .btn-robot.active{background-color:#ff6900;border-color:#fff}.btn-device,.btn-save{color:#fff;background-color:#40cfaa;border-color:#fff}.btn-device:hover,.btn-save:hover,.btn-device:focus,.btn-save:focus,.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{color:#fff;background-color:#2cb08e;border-color:#e0e0e0}.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{background-image:none}.btn-device.disabled,.btn-save.disabled,.btn-device[disabled],.btn-save[disabled],fieldset[disabled] .btn-device,fieldset[disabled] .btn-save,.btn-device.disabled:hover,.btn-save.disabled:hover,.btn-device[disabled]:hover,.btn-save[disabled]:hover,fieldset[disabled] .btn-device:hover,fieldset[disabled] .btn-save:hover,.btn-device.disabled:focus,.btn-save.disabled:focus,.btn-device[disabled]:focus,.btn-save[disabled]:focus,fieldset[disabled] .btn-device:focus,fieldset[disabled] .btn-save:focus,.btn-device.disabled:active,.btn-save.disabled:active,.btn-device[disabled]:active,.btn-save[disabled]:active,fieldset[disabled] .btn-device:active,fieldset[disabled] .btn-save:active,.btn-device.disabled.active,.btn-save.disabled.active,.btn-device[disabled].active,.btn-save[disabled].active,fieldset[disabled] .btn-device.active,fieldset[disabled] .btn-save.active{background-color:#40cfaa;border-color:#fff}.btn-connect{color:#fff;background-color:#dccb5b;border-color:#fff}.btn-connect:hover,.btn-connect:focus,.btn-connect:active,.btn-connect.active{color:#fff;background-color:#d3be31;border-color:#e0e0e0}.btn-connect:active,.btn-connect.active{background-image:none}.btn-connect.disabled,.btn-connect[disabled],fieldset[disabled] .btn-connect,.btn-connect.disabled:hover,.btn-connect[disabled]:hover,fieldset[disabled] .btn-connect:hover,.btn-connect.disabled:focus,.btn-connect[disabled]:focus,fieldset[disabled] .btn-connect:focus,.btn-connect.disabled:active,.btn-connect[disabled]:active,fieldset[disabled] .btn-connect:active,.btn-connect.disabled.active,.btn-connect[disabled].active,fieldset[disabled] .btn-connect.active{background-color:#dccb5b;border-color:#fff}.btn-run,.btn-reset{color:#fff;background-color:#ca5252;border-color:#fff}.btn-run:hover,.btn-reset:hover,.btn-run:focus,.btn-reset:focus,.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{color:#fff;background-color:#b23737;border-color:#e0e0e0}.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{background-image:none}.btn-run.disabled,.btn-reset.disabled,.btn-run[disabled],.btn-reset[disabled],fieldset[disabled] .btn-run,fieldset[disabled] .btn-reset,.btn-run.disabled:hover,.btn-reset.disabled:hover,.btn-run[disabled]:hover,.btn-reset[disabled]:hover,fieldset[disabled] .btn-run:hover,fieldset[disabled] .btn-reset:hover,.btn-run.disabled:focus,.btn-reset.disabled:focus,.btn-run[disabled]:focus,.btn-reset[disabled]:focus,fieldset[disabled] .btn-run:focus,fieldset[disabled] .btn-reset:focus,.btn-run.disabled:active,.btn-reset.disabled:active,.btn-run[disabled]:active,.btn-reset[disabled]:active,fieldset[disabled] .btn-run:active,fieldset[disabled] .btn-reset:active,.btn-run.disabled.active,.btn-reset.disabled.active,.btn-run[disabled].active,.btn-reset[disabled].active,fieldset[disabled] .btn-run.active,fieldset[disabled] .btn-reset.active{background-color:#ca5252;border-color:#fff}.widgets .panel{background:#fff}.widgets .panel .panel-header{border-bottom:1px solid #E1E1E1}.widgets .panel .panel-footer{border-top:1px solid #E1E1E1}
|
data/css/themes/whiteboard.css
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
body{background-color:#fff;color:#666}nav{background:#1cbcd8}nav .links a{background:none;padding:8px 13px}nav .links a.active{background:#353535;color:#fff;border:2px solid #1cbcd8}nav .links a.active:hover{color:#fff !important}nav .links a:hover{color:#2c2c2c !important}.row{background-color:#fff;border-top:1px solid #E1E1E1;padding-top:25px;padding-bottom:25px;width:960px;margin-left:auto;margin-right:auto;display:block}.row:last-child{border-bottom:1px solid #E1E1E1}.row-device{border-top:none;border-bottom:none !important}.robot .details span{color:#333}.robot .details strong{color:#666}.bullet-connections{padding-left:32px;background:transparent url(../../images/bullet-connections-2.png) no-repeat left center}.bullet-devices{padding-left:32px;background:transparent url(../../images/bullet-devices-2.png) no-repeat left center}.robot-devices{background:transparent url(../../images/devices-image-2.png) no-repeat 21px center;padding-left:84px}.btn-robot{color:#343434;background-color:#28d8f7;border-color:#343434}.btn-robot:hover,.btn-robot:focus,.btn-robot:active,.btn-robot.active{color:#343434;background-color:#08c3e4;border-color:#151515}.btn-robot:active,.btn-robot.active{background-image:none}.btn-robot.disabled,.btn-robot[disabled],fieldset[disabled] .btn-robot,.btn-robot.disabled:hover,.btn-robot[disabled]:hover,fieldset[disabled] .btn-robot:hover,.btn-robot.disabled:focus,.btn-robot[disabled]:focus,fieldset[disabled] .btn-robot:focus,.btn-robot.disabled:active,.btn-robot[disabled]:active,fieldset[disabled] .btn-robot:active,.btn-robot.disabled.active,.btn-robot[disabled].active,fieldset[disabled] .btn-robot.active{background-color:#28d8f7;border-color:#343434}.btn-device,.btn-save{color:#343434;background-color:#15e2ad;border-color:#343434}.btn-device:hover,.btn-save:hover,.btn-device:focus,.btn-save:focus,.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{color:#343434;background-color:#11b389;border-color:#151515}.btn-device:active,.btn-save:active,.btn-device.active,.btn-save.active{background-image:none}.btn-device.disabled,.btn-save.disabled,.btn-device[disabled],.btn-save[disabled],fieldset[disabled] .btn-device,fieldset[disabled] .btn-save,.btn-device.disabled:hover,.btn-save.disabled:hover,.btn-device[disabled]:hover,.btn-save[disabled]:hover,fieldset[disabled] .btn-device:hover,fieldset[disabled] .btn-save:hover,.btn-device.disabled:focus,.btn-save.disabled:focus,.btn-device[disabled]:focus,.btn-save[disabled]:focus,fieldset[disabled] .btn-device:focus,fieldset[disabled] .btn-save:focus,.btn-device.disabled:active,.btn-save.disabled:active,.btn-device[disabled]:active,.btn-save[disabled]:active,fieldset[disabled] .btn-device:active,fieldset[disabled] .btn-save:active,.btn-device.disabled.active,.btn-save.disabled.active,.btn-device[disabled].active,.btn-save[disabled].active,fieldset[disabled] .btn-device.active,fieldset[disabled] .btn-save.active{background-color:#15e2ad;border-color:#343434}.btn-connect{color:#343434;background-color:#fbed8f;border-color:#343434}.btn-connect:hover,.btn-connect:focus,.btn-connect:active,.btn-connect.active{color:#343434;background-color:#f9e55e;border-color:#151515}.btn-connect:active,.btn-connect.active{background-image:none}.btn-connect.disabled,.btn-connect[disabled],fieldset[disabled] .btn-connect,.btn-connect.disabled:hover,.btn-connect[disabled]:hover,fieldset[disabled] .btn-connect:hover,.btn-connect.disabled:focus,.btn-connect[disabled]:focus,fieldset[disabled] .btn-connect:focus,.btn-connect.disabled:active,.btn-connect[disabled]:active,fieldset[disabled] .btn-connect:active,.btn-connect.disabled.active,.btn-connect[disabled].active,fieldset[disabled] .btn-connect.active{background-color:#fbed8f;border-color:#343434}.btn-run,.btn-reset{color:#343434;background-color:#ca5252;border-color:#343434}.btn-run:hover,.btn-reset:hover,.btn-run:focus,.btn-reset:focus,.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{color:#343434;background-color:#b23737;border-color:#151515}.btn-run:active,.btn-reset:active,.btn-run.active,.btn-reset.active{background-image:none}.btn-run.disabled,.btn-reset.disabled,.btn-run[disabled],.btn-reset[disabled],fieldset[disabled] .btn-run,fieldset[disabled] .btn-reset,.btn-run.disabled:hover,.btn-reset.disabled:hover,.btn-run[disabled]:hover,.btn-reset[disabled]:hover,fieldset[disabled] .btn-run:hover,fieldset[disabled] .btn-reset:hover,.btn-run.disabled:focus,.btn-reset.disabled:focus,.btn-run[disabled]:focus,.btn-reset[disabled]:focus,fieldset[disabled] .btn-run:focus,fieldset[disabled] .btn-reset:focus,.btn-run.disabled:active,.btn-reset.disabled:active,.btn-run[disabled]:active,.btn-reset[disabled]:active,fieldset[disabled] .btn-run:active,fieldset[disabled] .btn-reset:active,.btn-run.disabled.active,.btn-reset.disabled.active,.btn-run[disabled].active,.btn-reset[disabled].active,fieldset[disabled] .btn-run.active,fieldset[disabled] .btn-reset.active{background-color:#ca5252;border-color:#343434}.widgets .panel{background:#fff}.widgets .panel .panel-header{border-bottom:1px solid #E1E1E1}.widgets .panel .panel-footer{border-top:1px solid #E1E1E1}
|
data/js/app.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
var robeaux = angular.module('robeaux', ['ngRoute']);
|
@@ -1,81 +0,0 @@
|
|
1
|
-
var DeviceCommandsCtrl = function DeviceCommandsCtrl($scope, $http) {
|
2
|
-
$scope.command = "";
|
3
|
-
$scope.types = [ 'string', 'boolean', 'number' ];
|
4
|
-
|
5
|
-
$scope.isDisabled = function() {
|
6
|
-
return ($scope.command === "")
|
7
|
-
};
|
8
|
-
|
9
|
-
$scope.addParam = function(last) {
|
10
|
-
if (!last) { return; }
|
11
|
-
$scope.device.params.push({ name: '', value: '', type: 'string' });
|
12
|
-
};
|
13
|
-
|
14
|
-
$scope.removeParam = function(index) {
|
15
|
-
if ($scope.device.params.length === 1) { return; }
|
16
|
-
$scope.device.params.splice(index, 1);
|
17
|
-
};
|
18
|
-
|
19
|
-
$scope.submit = function() {
|
20
|
-
var robot = $scope.robot.name,
|
21
|
-
device = $scope.device.name,
|
22
|
-
command = $scope.command,
|
23
|
-
params = parseParams($scope.device.params);
|
24
|
-
|
25
|
-
var url ='/api/robots/' + robot + "/devices/" + device + "/commands/" + command;
|
26
|
-
|
27
|
-
$http.post(url, params).success(function(data) {
|
28
|
-
if (data.result) {
|
29
|
-
if ($scope.device.results.length > 4) { $scope.device.results.pop(); }
|
30
|
-
$scope.device.results.unshift(data);
|
31
|
-
}
|
32
|
-
});
|
33
|
-
};
|
34
|
-
}
|
35
|
-
|
36
|
-
// Parses command params, coercing to types where necessary.
|
37
|
-
//
|
38
|
-
// Returns an array.
|
39
|
-
var parseParams = function(formParams) {
|
40
|
-
if (paramsAreEmpty(formParams)) { return null; }
|
41
|
-
|
42
|
-
var params = {};
|
43
|
-
|
44
|
-
for (var i = 0; i < formParams.length; i++) {
|
45
|
-
var param = formParams[i];
|
46
|
-
|
47
|
-
// skip if param name or value is empty
|
48
|
-
if (param.name === '' || param.value === '') { continue; }
|
49
|
-
|
50
|
-
params[param.name] = param.value;
|
51
|
-
|
52
|
-
switch(param.type) {
|
53
|
-
case 'boolean':
|
54
|
-
string = String(param.value).toLowerCase();
|
55
|
-
params[param.name] = (string === 'true' || string === 't');
|
56
|
-
break;
|
57
|
-
|
58
|
-
case 'number':
|
59
|
-
params[param.name] = Number(param.value)
|
60
|
-
break;
|
61
|
-
|
62
|
-
default:
|
63
|
-
// assume a string, nothing changes
|
64
|
-
break;
|
65
|
-
}
|
66
|
-
};
|
67
|
-
|
68
|
-
return params;
|
69
|
-
};
|
70
|
-
|
71
|
-
var paramsAreEmpty = function(params) {
|
72
|
-
for (var i = 0; i < params.length; i++) {
|
73
|
-
var param = params[i]
|
74
|
-
|
75
|
-
if (param.name !== '' || param.value !== '') {
|
76
|
-
return false;
|
77
|
-
};
|
78
|
-
}
|
79
|
-
|
80
|
-
return true;
|
81
|
-
};
|
@@ -1,31 +0,0 @@
|
|
1
|
-
var DeviceEventsCtrl = function DeviceEventsCtrl($scope, $filter) {
|
2
|
-
$scope.listen = function() {
|
3
|
-
if ($scope.eventName === "") { return; }
|
4
|
-
|
5
|
-
if ($scope.device.events == null) { $scope.device.events = []; }
|
6
|
-
if ($scope.device.listeners == null) { $scope.device.listeners = {}; }
|
7
|
-
|
8
|
-
var robot = $scope.robot.name,
|
9
|
-
device = $scope.device.name,
|
10
|
-
event = $scope.eventName;
|
11
|
-
|
12
|
-
var uri = "/api/robots/" + robot + "/devices/" + device + "/events/" + event;
|
13
|
-
var $device = $scope.device;
|
14
|
-
var source = new EventSource(uri);
|
15
|
-
|
16
|
-
source.addEventListener('message', function(message) {
|
17
|
-
$scope.$apply(function() {
|
18
|
-
if ($device.events.length > 4) { $device.events.pop(); }
|
19
|
-
$device.events.unshift({ name: event, data: JSON.parse(message.data) });
|
20
|
-
});
|
21
|
-
}, false);
|
22
|
-
|
23
|
-
$scope.device.listeners[event] = source;
|
24
|
-
$scope.eventName = "";
|
25
|
-
};
|
26
|
-
|
27
|
-
$scope.remove = function(name) {
|
28
|
-
$scope.device.listeners[name].close();
|
29
|
-
delete $scope.device.listeners[name];
|
30
|
-
};
|
31
|
-
}
|
data/js/controllers/nav_ctrl.js
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
var RobotCommandsCtrl = function RobotCommandsCtrl($scope, $http) {
|
2
|
-
$scope.command = "";
|
3
|
-
$scope.types = [ 'string', 'boolean', 'number' ];
|
4
|
-
|
5
|
-
$scope.isDisabled = function() {
|
6
|
-
return ($scope.command === "")
|
7
|
-
};
|
8
|
-
|
9
|
-
$scope.addParam = function(last) {
|
10
|
-
if (!last) { return; }
|
11
|
-
$scope.robot.params.push({ name: '', value: '', type: 'string' });
|
12
|
-
};
|
13
|
-
|
14
|
-
$scope.removeParam = function(index) {
|
15
|
-
if ($scope.robot.params.length === 1) { return; }
|
16
|
-
$scope.robot.params.splice(index, 1);
|
17
|
-
};
|
18
|
-
|
19
|
-
$scope.submit = function() {
|
20
|
-
var robot = $scope.robot.name,
|
21
|
-
command = $scope.command,
|
22
|
-
params = parseParams($scope.robot.params);
|
23
|
-
|
24
|
-
var url ='/api/robots/' + robot + "/commands/" + command;
|
25
|
-
|
26
|
-
$http.post(url, params).success(function(data) {
|
27
|
-
if (data.result) {
|
28
|
-
if ($scope.robot.results.length > 4) { $scope.robot.results.pop(); }
|
29
|
-
$scope.robot.results.unshift(data);
|
30
|
-
}
|
31
|
-
});
|
32
|
-
};
|
33
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
var RobotCtrl = function RobotCtrl($scope, $http, $routeParams) {
|
2
|
-
$http.get("/api/robots/" + $routeParams.robot).success(function(data) {
|
3
|
-
$scope.robot = data.robot;
|
4
|
-
|
5
|
-
$scope.robot.params = [ { name: '', value: '', type: 'string' } ];
|
6
|
-
$scope.robot.results = [];
|
7
|
-
});
|
8
|
-
|
9
|
-
$scope.select = function(device) {
|
10
|
-
$scope.device = ($scope.device === device) ? null : device;
|
11
|
-
|
12
|
-
// setting up params we'll need in other controllers
|
13
|
-
if ($scope.device.params == null) {
|
14
|
-
$scope.device.params = [ { name: '', value: '', type: 'string' } ];
|
15
|
-
}
|
16
|
-
|
17
|
-
if ($scope.device.events == null) { $scope.device.events = []; }
|
18
|
-
if ($scope.device.results == null) { $scope.device.results = []; }
|
19
|
-
if ($scope.device.listeners == null) { $scope.device.listeners = {}; }
|
20
|
-
}
|
21
|
-
|
22
|
-
$scope.selected = function(device) {
|
23
|
-
return ($scope.device === device);
|
24
|
-
}
|
25
|
-
}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
var ThemesCtrl = function ThemesCtrl($scope, Themes) {
|
2
|
-
$scope.themes = Themes;
|
3
|
-
|
4
|
-
// save when a theme is selected
|
5
|
-
$scope.$watch('themes.active', function() {
|
6
|
-
// watch for corner case where 'themes.active' update was causing themes to
|
7
|
-
// be saved as undefined
|
8
|
-
if (Themes.list) { Themes.save(); }
|
9
|
-
});
|
10
|
-
|
11
|
-
// selecting a theme for editing
|
12
|
-
$scope.edit = function(theme) {
|
13
|
-
if ($scope.editing === theme || !theme.custom) {
|
14
|
-
return $scope.editing = null;
|
15
|
-
}
|
16
|
-
|
17
|
-
$scope.editing = theme;
|
18
|
-
};
|
19
|
-
|
20
|
-
// add a new theme
|
21
|
-
$scope.add = function(name) {
|
22
|
-
if (!name || name === '') { return false; }
|
23
|
-
|
24
|
-
var result = Themes.add(name);
|
25
|
-
if (result) {
|
26
|
-
$scope.edit(result);
|
27
|
-
$scope.name = '';
|
28
|
-
}
|
29
|
-
};
|
30
|
-
|
31
|
-
// remove an existing theme
|
32
|
-
$scope.remove = function(name) {
|
33
|
-
if ($scope.editing === Themes.find(name)) { $scope.editing = null; }
|
34
|
-
Themes.remove(name);
|
35
|
-
};
|
36
|
-
};
|
@@ -1,44 +0,0 @@
|
|
1
|
-
var WidgetEditorCtrl = function WidgetEditorCtrl($scope, Widgets) {
|
2
|
-
$scope.widgets = Widgets;
|
3
|
-
|
4
|
-
$scope.add = function(name) {
|
5
|
-
if (!name || name === '') {
|
6
|
-
return false;
|
7
|
-
}
|
8
|
-
|
9
|
-
var result = Widgets.add(name);
|
10
|
-
|
11
|
-
if (result) {
|
12
|
-
$scope.edit(result);
|
13
|
-
$scope.name = '';
|
14
|
-
}
|
15
|
-
};
|
16
|
-
|
17
|
-
$scope.edit = function(widget) {
|
18
|
-
if ($scope.editing === widget || !widget.custom) {
|
19
|
-
return $scope.editing = null;
|
20
|
-
}
|
21
|
-
|
22
|
-
$scope.editing = widget;
|
23
|
-
};
|
24
|
-
|
25
|
-
$scope.addAttr = function() {
|
26
|
-
if ($scope.editing && $scope.newAttr.length) {
|
27
|
-
$scope.editing.attrs.push($scope.newAttr);
|
28
|
-
}
|
29
|
-
|
30
|
-
$scope.newAttr = '';
|
31
|
-
|
32
|
-
Widgets.save();
|
33
|
-
};
|
34
|
-
|
35
|
-
$scope.removeAttr = function(index) {
|
36
|
-
if (!$scope.editing) {
|
37
|
-
return;
|
38
|
-
}
|
39
|
-
|
40
|
-
$scope.editing.attrs.splice(index, 1);
|
41
|
-
|
42
|
-
Widgets.save();
|
43
|
-
};
|
44
|
-
};
|
@@ -1,40 +0,0 @@
|
|
1
|
-
var WidgetsCtrl = function WidgetsCtrl($scope, Widgets) {
|
2
|
-
$scope.widgets = Widgets;
|
3
|
-
$scope.activeWidgets = [];
|
4
|
-
$scope.newWidget = false;
|
5
|
-
|
6
|
-
// fetch robot name from parent
|
7
|
-
var interval = setInterval(function() {
|
8
|
-
if ($scope.$parent.robot) {
|
9
|
-
$scope.$apply(function() {
|
10
|
-
$scope.robot = $scope.$parent.robot.name;
|
11
|
-
$scope.activeWidgets = Widgets.activeWidgets[$scope.robot] || [];
|
12
|
-
})
|
13
|
-
}
|
14
|
-
}, 100);
|
15
|
-
|
16
|
-
var save = function() {
|
17
|
-
Widgets.activeWidgets[$scope.robot] = $scope.activeWidgets;
|
18
|
-
Widgets.save();
|
19
|
-
}
|
20
|
-
|
21
|
-
$scope.newActiveWidget = function(widget) {
|
22
|
-
if (widget.base === '') {
|
23
|
-
return false;
|
24
|
-
}
|
25
|
-
|
26
|
-
widget.name = widget.base.name;
|
27
|
-
delete widget.base;
|
28
|
-
|
29
|
-
$scope.activeWidgets.push(widget);
|
30
|
-
|
31
|
-
save();
|
32
|
-
|
33
|
-
$scope.newWidget = false;
|
34
|
-
};
|
35
|
-
|
36
|
-
$scope.removeWidget = function(i) {
|
37
|
-
$scope.activeWidgets.splice(i, 1);
|
38
|
-
save();
|
39
|
-
};
|
40
|
-
};
|
data/js/directives/widget.js
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
robeaux.directive("widget", function(Widgets, $http, $compile) {
|
2
|
-
var directive = {};
|
3
|
-
|
4
|
-
var fetchTemplate = function(url) {
|
5
|
-
var request = new XMLHttpRequest();
|
6
|
-
request.open('GET', url, false);
|
7
|
-
request.send(null);
|
8
|
-
|
9
|
-
if (request.status === 200) {
|
10
|
-
return request.responseText;
|
11
|
-
}
|
12
|
-
};
|
13
|
-
|
14
|
-
directive.restrict = "E";
|
15
|
-
|
16
|
-
directive.scope = {};
|
17
|
-
|
18
|
-
directive.link = function($scope, $element, $attrs) {
|
19
|
-
var widget = Widgets.find($attrs.name),
|
20
|
-
tpl;
|
21
|
-
|
22
|
-
$scope.attrs = angular.fromJson($attrs.attrs);
|
23
|
-
|
24
|
-
if (!widget) {
|
25
|
-
return;
|
26
|
-
}
|
27
|
-
|
28
|
-
if (widget.template) {
|
29
|
-
tpl = $compile("<span>" + widget.template + "</span>")($scope);
|
30
|
-
}
|
31
|
-
|
32
|
-
if (widget.template_url) {
|
33
|
-
tpl = $compile("<span>" + fetchTemplate(widget.template_url) + "</span>")($scope);
|
34
|
-
}
|
35
|
-
|
36
|
-
$element.append(tpl);
|
37
|
-
|
38
|
-
if (widget.script) {
|
39
|
-
eval(widget.script)
|
40
|
-
}
|
41
|
-
|
42
|
-
if (widget.script_url) {
|
43
|
-
$http.get(widget.script_url).success(function(data) {
|
44
|
-
eval(data);
|
45
|
-
});
|
46
|
-
}
|
47
|
-
};
|
48
|
-
|
49
|
-
return directive;
|
50
|
-
});
|
data/js/router.js
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
robeaux.config(function($routeProvider) {
|
2
|
-
$routeProvider
|
3
|
-
|
4
|
-
.when('/robots', {
|
5
|
-
controller: 'IndexCtrl',
|
6
|
-
templateUrl: '/partials/index.html',
|
7
|
-
})
|
8
|
-
|
9
|
-
.when('/robots/:robot', {
|
10
|
-
controller: 'RobotCtrl',
|
11
|
-
templateUrl: '/partials/robot.html',
|
12
|
-
})
|
13
|
-
|
14
|
-
.when('/themes', {
|
15
|
-
controller: 'ThemesCtrl',
|
16
|
-
templateUrl: '/partials/themes.html',
|
17
|
-
})
|
18
|
-
|
19
|
-
.when('/widgets', {
|
20
|
-
controller: 'WidgetEditorCtrl',
|
21
|
-
templateUrl: '/partials/widget_editor.html',
|
22
|
-
})
|
23
|
-
|
24
|
-
.otherwise({
|
25
|
-
redirectTo: '/robots'
|
26
|
-
});
|
27
|
-
});
|
data/js/services/themes.js
DELETED
@@ -1,90 +0,0 @@
|
|
1
|
-
robeaux.factory('Themes', function() {
|
2
|
-
var service = {};
|
3
|
-
|
4
|
-
// default themes
|
5
|
-
var defaults = [
|
6
|
-
{ name: 'default', custom: false, css: '' },
|
7
|
-
{ name: 'artoo', custom: false, url: '/css/themes/artoo.css'},
|
8
|
-
{ name: 'cylon', custom: false, url: '/css/themes/cylon.css'},
|
9
|
-
{ name: 'gobot', custom: false, url: '/css/themes/gobot.css'},
|
10
|
-
{ name: 'blackboard', custom: false, url: '/css/themes/blackboard.css'},
|
11
|
-
{ name: 'whiteboard', custom: false, url: '/css/themes/whiteboard.css'},
|
12
|
-
{ name: 'dark', custom: false, url: '/css/themes/dark.css'},
|
13
|
-
{ name: 'gray', custom: false, url: '/css/themes/gray.css'},
|
14
|
-
{ name: 'custom', custom: true, css: ''}
|
15
|
-
];
|
16
|
-
|
17
|
-
service.list = [];
|
18
|
-
service.active = {};
|
19
|
-
|
20
|
-
// loads themes from localstorage, falling back to the above default themes
|
21
|
-
service.load = function() {
|
22
|
-
if (localStorage['themes']) {
|
23
|
-
this.list = angular.fromJson(localStorage['themes']);
|
24
|
-
} else {
|
25
|
-
this.list = defaults;
|
26
|
-
}
|
27
|
-
|
28
|
-
if (localStorage['active'] && this.find(localStorage['active'])) {
|
29
|
-
this.active = this.find(localStorage['active']);
|
30
|
-
} else {
|
31
|
-
this.active = this.find('default');
|
32
|
-
}
|
33
|
-
};
|
34
|
-
|
35
|
-
// saves themes to localstorage
|
36
|
-
service.save = function() {
|
37
|
-
localStorage.setItem('themes', angular.toJson(this.list));
|
38
|
-
localStorage.setItem('active', this.active.name);
|
39
|
-
};
|
40
|
-
|
41
|
-
// find a specific theme by name
|
42
|
-
service.find = function(name) {
|
43
|
-
for (var i = 0; i < this.list.length; i++) {
|
44
|
-
if (this.list[i].name === name) { return this.list[i]; }
|
45
|
-
}
|
46
|
-
return false;
|
47
|
-
};
|
48
|
-
|
49
|
-
// add a new custom theme
|
50
|
-
service.add = function(name) {
|
51
|
-
if (this.find(name)) { return false; }
|
52
|
-
|
53
|
-
var theme = {
|
54
|
-
name: name,
|
55
|
-
custom: true,
|
56
|
-
css: "/* write some css for the " + name + " theme here */"
|
57
|
-
};
|
58
|
-
|
59
|
-
this.list.push(theme);
|
60
|
-
|
61
|
-
this.save();
|
62
|
-
|
63
|
-
return this.find(name);
|
64
|
-
};
|
65
|
-
|
66
|
-
service.remove = function(name) {
|
67
|
-
if (this.active.name === name) {
|
68
|
-
this.active = this.find('default');
|
69
|
-
};
|
70
|
-
|
71
|
-
for (var i = 0; i < this.list.length; i++) {
|
72
|
-
if (this.list[i].name === name) {
|
73
|
-
this.list.splice(i, 1);
|
74
|
-
}
|
75
|
-
}
|
76
|
-
|
77
|
-
this.save();
|
78
|
-
};
|
79
|
-
|
80
|
-
// reset localStorage and reload everything from defaults.
|
81
|
-
service.reset = function() {
|
82
|
-
localStorage.removeItem('themes');
|
83
|
-
localStorage.removeItem('active');
|
84
|
-
this.load();
|
85
|
-
}
|
86
|
-
|
87
|
-
service.load();
|
88
|
-
|
89
|
-
return service;
|
90
|
-
});
|