sw2at-ui 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +5 -0
- data/Gemfile +21 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +51 -0
- data/VERSION +1 -0
- data/app/assets/images/swat/loading-green.gif +0 -0
- data/app/assets/javascripts/swat/.bowerrc +3 -0
- data/app/assets/javascripts/swat/app/app.coffee +38 -0
- data/app/assets/javascripts/swat/app/controllers/revision.coffee +25 -0
- data/app/assets/javascripts/swat/app/controllers/revisions.coffee +10 -0
- data/app/assets/javascripts/swat/app/controllers/root.coffee +8 -0
- data/app/assets/javascripts/swat/app/factories/response.coffee +9 -0
- data/app/assets/javascripts/swat/app/factories/revision_model.coffee +20 -0
- data/app/assets/javascripts/swat/app/services/revision.coffee +16 -0
- data/app/assets/javascripts/swat/app/services/test_case.coffee +8 -0
- data/app/assets/javascripts/swat/application.coffee +5 -0
- data/app/assets/javascripts/swat/bower.json +16 -0
- data/app/assets/javascripts/swat/bower_components/angular/angular-csp.css +21 -0
- data/app/assets/javascripts/swat/bower_components/angular/angular.js +28133 -0
- data/app/assets/javascripts/swat/bower_components/angular/angular.min.js +289 -0
- data/app/assets/javascripts/swat/bower_components/angular/index.js +2 -0
- data/app/assets/javascripts/swat/bower_components/angular-animate/angular-animate.js +2137 -0
- data/app/assets/javascripts/swat/bower_components/angular-animate/angular-animate.min.js +33 -0
- data/app/assets/javascripts/swat/bower_components/angular-aria/angular-aria.js +339 -0
- data/app/assets/javascripts/swat/bower_components/angular-aria/angular-aria.min.js +12 -0
- data/app/assets/javascripts/swat/bower_components/angular-bootstrap/ui-bootstrap-csp.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-bootstrap/ui-bootstrap-tpls.js +4840 -0
- data/app/assets/javascripts/swat/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js +10 -0
- data/app/assets/javascripts/swat/bower_components/angular-bootstrap/ui-bootstrap.js +4461 -0
- data/app/assets/javascripts/swat/bower_components/angular-bootstrap/ui-bootstrap.min.js +9 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/LICENSE.txt +21 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/angular-material.css +6228 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/angular-material.js +8602 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/angular-material.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/angular-material.min.js +277 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/default-theme.css +394 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/backdrop/backdrop-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/backdrop/backdrop.css +54 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/backdrop/backdrop.js +40 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/bottomSheet/bottomSheet-default-theme.css +15 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/bottomSheet/bottomSheet.css +161 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/bottomSheet/bottomSheet.js +263 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/button/button-default-theme.css +49 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/button/button.css +134 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/button/button.js +101 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/card/card-default-theme.css +10 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/card/card.css +26 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/card/card.js +60 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/checkbox/checkbox-default-theme.css +38 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/checkbox/checkbox.css +78 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/checkbox/checkbox.js +135 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/content/content-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/content/content.css +24 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/content/content.js +87 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/core/core.css +2736 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/core/core.js +3090 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/core/default-theme.js +1 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/dialog/dialog-default-theme.css +11 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/dialog/dialog.css +75 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/dialog/dialog.js +500 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/divider/divider-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/divider/divider.css +12 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/divider/divider.js +50 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/icon/icon.css +24 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/icon/icon.js +52 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/input/input-default-theme.css +39 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/input/input.css +113 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/input/input.js +355 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/list/list.css +56 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/list/list.js +96 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/menu/menu.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/menu/menu.js +29 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/progressCircular/progressCircular-default-theme.css +35 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/progressCircular/progressCircular.css +1395 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/progressCircular/progressCircular.js +129 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/progressLinear/progressLinear-default-theme.css +26 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/progressLinear/progressLinear.css +366 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/progressLinear/progressLinear.js +130 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/radioButton/radioButton-default-theme.css +39 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/radioButton/radioButton.css +66 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/radioButton/radioButton.js +302 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/sidenav/sidenav-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/sidenav/sidenav.css +86 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/sidenav/sidenav.js +320 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/slider/slider-default-theme.css +55 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/slider/slider.css +210 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/slider/slider.js +391 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/sticky/sticky.css +20 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/sticky/sticky.js +314 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/subheader/subheader-default-theme.css +15 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/subheader/subheader.css +62 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/subheader/subheader.js +89 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/swipe/swipe.js +79 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/switch/switch-default-theme.css +29 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/switch/switch.css +81 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/switch/switch.js +171 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/tabs/tabs-default-theme.css +34 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/tabs/tabs.css +171 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/tabs/tabs.js +1009 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/textField/textField-default-theme.css +29 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/textField/textField.css +72 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/textField/textField.js +145 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/toast/toast-default-theme.css +17 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/toast/toast.css +110 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/toast/toast.js +236 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/toolbar/toolbar-default-theme.css +17 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/toolbar/toolbar.css +69 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/toolbar/toolbar.js +161 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/tooltip/tooltip-default-theme.css +10 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/tooltip/tooltip.css +133 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/tooltip/tooltip.js +199 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/whiteframe/whiteframe.css +20 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/closure/whiteframe/whiteframe.js +17 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/css/angular-material-layout.css +2582 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/backdrop/backdrop-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/backdrop/backdrop-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/backdrop/backdrop.css +54 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/backdrop/backdrop.js +38 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/backdrop/backdrop.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/backdrop/backdrop.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/backdrop/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/bottomSheet/bottomSheet-default-theme.css +15 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/bottomSheet/bottomSheet-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/bottomSheet/bottomSheet.css +188 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/bottomSheet/bottomSheet.js +293 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/bottomSheet/bottomSheet.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/bottomSheet/bottomSheet.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/bottomSheet/bower.json +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/button/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/button/button-default-theme.css +42 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/button/button-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/button/button.css +132 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/button/button.js +94 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/button/button.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/button/button.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/card/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/card/card-default-theme.css +10 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/card/card-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/card/card.css +31 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/card/card.js +58 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/card/card.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/card/card.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/checkbox/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/checkbox/checkbox-default-theme.css +38 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/checkbox/checkbox-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/checkbox/checkbox.css +79 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/checkbox/checkbox.js +133 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/checkbox/checkbox.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/checkbox/checkbox.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/content/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/content/content-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/content/content-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/content/content.css +24 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/content/content.js +60 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/content/content.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/content/content.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/core/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/core/core.css +3067 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/core/core.js +2780 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/core/core.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/core/core.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/core/default-theme.js +1 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/dialog/bower.json +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/dialog/dialog-default-theme.css +11 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/dialog/dialog-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/dialog/dialog.css +88 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/dialog/dialog.js +495 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/dialog/dialog.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/dialog/dialog.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/divider/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/divider/divider-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/divider/divider-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/divider/divider.css +12 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/divider/divider.js +48 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/divider/divider.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/divider/divider.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/icon/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/icon/icon.css +24 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/icon/icon.js +50 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/icon/icon.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/icon/icon.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/input/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/input/input-default-theme.css +40 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/input/input-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/input/input.css +102 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/input/input.js +333 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/input/input.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/input/input.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/list/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/list/list.css +61 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/list/list.js +94 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/list/list.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/list/list.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/menu/bower.json +5 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/menu/menu.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/menu/menu.js +27 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/menu/menu.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/menu/menu.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressCircular/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressCircular/progressCircular-default-theme.css +35 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressCircular/progressCircular-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressCircular/progressCircular.css +1445 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressCircular/progressCircular.js +127 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressCircular/progressCircular.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressCircular/progressCircular.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressLinear/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressLinear/progressLinear-default-theme.css +28 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressLinear/progressLinear-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressLinear/progressLinear.css +368 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressLinear/progressLinear.js +128 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressLinear/progressLinear.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/progressLinear/progressLinear.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/radioButton/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/radioButton/radioButton-default-theme.css +39 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/radioButton/radioButton-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/radioButton/radioButton.css +67 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/radioButton/radioButton.js +296 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/radioButton/radioButton.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/radioButton/radioButton.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sidenav/bower.json +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sidenav/sidenav-default-theme.css +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sidenav/sidenav-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sidenav/sidenav.css +90 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sidenav/sidenav.js +302 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sidenav/sidenav.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sidenav/sidenav.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/slider/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/slider/slider-default-theme.css +55 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/slider/slider-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/slider/slider.css +218 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/slider/slider.js +411 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/slider/slider.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/slider/slider.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sticky/bower.json +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sticky/sticky.css +20 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sticky/sticky.js +309 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sticky/sticky.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/sticky/sticky.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/subheader/bower.json +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/subheader/subheader-default-theme.css +15 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/subheader/subheader-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/subheader/subheader.css +61 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/subheader/subheader.js +86 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/subheader/subheader.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/subheader/subheader.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/swipe/bower.json +5 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/swipe/swipe.js +213 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/swipe/swipe.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/switch/bower.json +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/switch/switch-default-theme.css +29 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/switch/switch-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/switch/switch.css +77 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/switch/switch.js +144 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/switch/switch.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/switch/switch.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tabs/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tabs/tabs-default-theme.css +34 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tabs/tabs-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tabs/tabs.css +181 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tabs/tabs.js +992 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tabs/tabs.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tabs/tabs.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/textField/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/textField/textField-default-theme.css +29 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/textField/textField-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/textField/textField.css +76 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/textField/textField.js +143 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/textField/textField.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/textField/textField.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toast/bower.json +9 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toast/toast-default-theme.css +17 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toast/toast-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toast/toast.css +115 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toast/toast.js +235 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toast/toast.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toast/toast.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toolbar/bower.json +8 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toolbar/toolbar-default-theme.css +17 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toolbar/toolbar-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toolbar/toolbar.css +78 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toolbar/toolbar.js +158 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toolbar/toolbar.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/toolbar/toolbar.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tooltip/bower.json +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tooltip/tooltip-default-theme.css +10 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tooltip/tooltip-default-theme.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tooltip/tooltip.css +136 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tooltip/tooltip.js +197 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tooltip/tooltip.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/tooltip/tooltip.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/whiteframe/bower.json +5 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/whiteframe/whiteframe.css +20 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/whiteframe/whiteframe.js +15 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/whiteframe/whiteframe.min.css +6 -0
- data/app/assets/javascripts/swat/bower_components/angular-material/modules/js/whiteframe/whiteframe.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-resource/angular-resource.js +668 -0
- data/app/assets/javascripts/swat/bower_components/angular-resource/angular-resource.min.js +13 -0
- data/app/assets/javascripts/swat/bower_components/angular-resource/index.js +2 -0
- data/app/assets/javascripts/swat/bower_components/angular-route/angular-route.js +991 -0
- data/app/assets/javascripts/swat/bower_components/angular-route/angular-route.min.js +15 -0
- data/app/assets/javascripts/swat/bower_components/angular-route/index.js +2 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/LICENSE.txt +21 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/api/angular-ui-router.d.ts +126 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/release/angular-ui-router.js +4370 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/release/angular-ui-router.min.js +7 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/common.js +292 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/resolve.js +252 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/state.js +1465 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/stateDirectives.js +285 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/stateFilters.js +39 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/templateFactory.js +110 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/urlMatcherFactory.js +1050 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/urlRouter.js +427 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/view.js +71 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/viewDirective.js +303 -0
- data/app/assets/javascripts/swat/bower_components/angular-ui-router/src/viewScroll.js +52 -0
- data/app/assets/javascripts/swat/bower_components/lodash/lodash.js +12235 -0
- data/app/assets/javascripts/swat/bower_components/lodash/lodash.min.js +98 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/.editorconfig +10 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/.gitignore +3 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/Gruntfile.js +96 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/dest/ng-clip.min.js +2 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/example/bootstrap-tooltip.html +49 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/example/index.html +68 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/example/ng-repeat.html +44 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/npm-debug.log +145 -0
- data/app/assets/javascripts/swat/bower_components/ng-clip/src/ngClip.js +84 -0
- data/app/assets/javascripts/swat/bower_components/zeroclipboard/dist/.jshintrc +70 -0
- data/app/assets/javascripts/swat/bower_components/zeroclipboard/dist/ZeroClipboard.Core.js +2017 -0
- data/app/assets/javascripts/swat/bower_components/zeroclipboard/dist/ZeroClipboard.Core.min.js +10 -0
- data/app/assets/javascripts/swat/bower_components/zeroclipboard/dist/ZeroClipboard.js +2581 -0
- data/app/assets/javascripts/swat/bower_components/zeroclipboard/dist/ZeroClipboard.min.js +10 -0
- data/app/assets/javascripts/swat/bower_components/zeroclipboard/dist/ZeroClipboard.swf +0 -0
- data/app/assets/javascripts/swat/bower_components.coffee +12 -0
- data/app/assets/stylesheets/swat/application.sass +59 -0
- data/app/assets/stylesheets/swat/default-theme.css +394 -0
- data/app/assets/stylesheets/swat/font-awesome.css +1801 -0
- data/app/assets/stylesheets/swat/fonts/FontAwesome.otf +0 -0
- data/app/assets/stylesheets/swat/fonts/fontawesome-webfont.eot +0 -0
- data/app/assets/stylesheets/swat/fonts/fontawesome-webfont.svg +565 -0
- data/app/assets/stylesheets/swat/fonts/fontawesome-webfont.ttf +0 -0
- data/app/assets/stylesheets/swat/fonts/fontawesome-webfont.woff +0 -0
- data/app/assets/stylesheets/swat/fonts/fontawesome-webfont.woff2 +0 -0
- data/app/assets/stylesheets/swat/swat_theme.sass +177 -0
- data/app/controllers/swat/api/revisions_controller.rb +27 -0
- data/app/controllers/swat/api/test_cases_controller.rb +20 -0
- data/app/controllers/swat/application_controller.rb +4 -0
- data/app/controllers/swat/info/states_controller.rb +12 -0
- data/app/controllers/swat/pages/base_pages_controller.rb +7 -0
- data/app/controllers/swat/pages/revisions_controller.rb +8 -0
- data/app/controllers/swat/revisions_controller.rb +4 -0
- data/app/helpers/swat/application_helper.rb +4 -0
- data/app/models/concerns/root_revision_ext.rb +14 -0
- data/app/models/full_revision.rb +88 -0
- data/app/models/revision.rb +84 -0
- data/app/models/revision_status_calculator.rb +98 -0
- data/app/models/test_case.rb +25 -0
- data/app/views/layouts/swat/application.slim +36 -0
- data/app/views/layouts/swat/page.slim +2 -0
- data/app/views/swat/application/index.slim +0 -0
- data/app/views/swat/pages/revisions/index.slim +25 -0
- data/app/views/swat/pages/revisions/show.slim +43 -0
- data/app/views/swat/shared/_footer.slim +5 -0
- data/app/views/swat/shared/_header.slim +9 -0
- data/bin/rails +12 -0
- data/config/routes.rb +38 -0
- data/fixtures/firebase_collection.rb +97 -0
- data/lib/sw2at-ui.rb +19 -0
- data/lib/swat/engine.rb +5 -0
- data/lib/swat/ui/config.rb +28 -0
- data/lib/swat/ui/rspec_commands.rb +191 -0
- data/lib/swat/ui/rspec_setup.rb +42 -0
- data/lib/swat/ui/stats_collector.rb +90 -0
- data/lib/swat/ui/version.rb +5 -0
- data/lib/tasks/swat_tasks.rake +36 -0
- data/spec/lib/commands_spec.rb +88 -0
- data/spec/models/calculator_spec.rb +130 -0
- data/spec/models/full_revision_spec.rb +263 -0
- data/spec/models/revision_spec.rb +59 -0
- data/spec/models/testcase_spec.rb +94 -0
- data/spec/spec_helper.rb +45 -0
- data/sw2at-ui.gemspec +465 -0
- data/test/helper.rb +34 -0
- data/test/test_sw2at-ui.rb +7 -0
- metadata +628 -0
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,177 @@
|
|
1
|
+
$footerSize: 45px
|
2
|
+
$negativeFooterSize: -$footerSize
|
3
|
+
|
4
|
+
$commandWidth: 400px
|
5
|
+
$copyIconWidth: 30px
|
6
|
+
$commandTextWidth: $commandWidth - $copyIconWidth
|
7
|
+
|
8
|
+
html, body
|
9
|
+
height: 100% !important
|
10
|
+
min-height: 100%
|
11
|
+
|
12
|
+
#swat
|
13
|
+
height: 100%
|
14
|
+
min-height: 100%
|
15
|
+
|
16
|
+
#container
|
17
|
+
min-height: 100%
|
18
|
+
|
19
|
+
.invisible
|
20
|
+
opacity: 0
|
21
|
+
|
22
|
+
.loader
|
23
|
+
background: url('/assets/swat/loading-green.gif') no-repeat
|
24
|
+
width: 50px
|
25
|
+
height: 50px
|
26
|
+
display: inline-block
|
27
|
+
float: left
|
28
|
+
margin-left: 16px
|
29
|
+
|
30
|
+
#revision-info
|
31
|
+
.revision
|
32
|
+
color: grey
|
33
|
+
padding-top: 9px
|
34
|
+
float: left
|
35
|
+
width: 100%
|
36
|
+
.revision-name
|
37
|
+
padding-left: 10px
|
38
|
+
color: black
|
39
|
+
|
40
|
+
.revision-status
|
41
|
+
float: left
|
42
|
+
margin-left: 20px
|
43
|
+
&.in_progress_success, &.completed_passed
|
44
|
+
color: #43ee57
|
45
|
+
&.in_progress_failed,&.completed_failed
|
46
|
+
color: #ff5246
|
47
|
+
|
48
|
+
|
49
|
+
.controls
|
50
|
+
float: right
|
51
|
+
.btn
|
52
|
+
background-color: rgb(124, 222, 124)
|
53
|
+
color: green
|
54
|
+
font-weight: bold
|
55
|
+
margin-right: 10px
|
56
|
+
&:hover
|
57
|
+
background-color: rgb(169, 222, 157)
|
58
|
+
.revisions
|
59
|
+
.reload
|
60
|
+
|
61
|
+
|
62
|
+
.total-examples
|
63
|
+
background: #E8E8E8
|
64
|
+
display: inline-block
|
65
|
+
padding: 6px
|
66
|
+
border-radius: 30px
|
67
|
+
color: #887171
|
68
|
+
font-weight: bold
|
69
|
+
text-align: center
|
70
|
+
margin-left: 10px
|
71
|
+
|
72
|
+
#revisions-container
|
73
|
+
.revisions-header
|
74
|
+
margin: 0
|
75
|
+
padding-right: 50px
|
76
|
+
padding-top: 8px
|
77
|
+
.list
|
78
|
+
padding: 13px
|
79
|
+
|
80
|
+
table.revisions-table
|
81
|
+
background: #ffffff
|
82
|
+
tr
|
83
|
+
cursor: pointer
|
84
|
+
|
85
|
+
|
86
|
+
#revisions-container
|
87
|
+
tr
|
88
|
+
cursor: pointer
|
89
|
+
|
90
|
+
table#test-cases
|
91
|
+
border-top: 0
|
92
|
+
tr
|
93
|
+
&:hover
|
94
|
+
background: grey
|
95
|
+
th
|
96
|
+
border-top: 0
|
97
|
+
background: #ffffff
|
98
|
+
&.command
|
99
|
+
width: $commandWidth
|
100
|
+
&.status
|
101
|
+
width: 100px
|
102
|
+
&.duration
|
103
|
+
width: 100px
|
104
|
+
|
105
|
+
td.status
|
106
|
+
font-weight: bold
|
107
|
+
text-transform: capitalize
|
108
|
+
td.command
|
109
|
+
background: white
|
110
|
+
cursor: pointer
|
111
|
+
margin: 0
|
112
|
+
padding: 0
|
113
|
+
input
|
114
|
+
width: $commandTextWidth
|
115
|
+
margin-right: 5px
|
116
|
+
height: 100%
|
117
|
+
padding-left: 10px
|
118
|
+
padding-right: 10px
|
119
|
+
margin: 0
|
120
|
+
border: none
|
121
|
+
font-weight: bold
|
122
|
+
background: black
|
123
|
+
color: red
|
124
|
+
|
125
|
+
&.failed
|
126
|
+
background: mistyrose
|
127
|
+
color: red
|
128
|
+
td.command
|
129
|
+
input
|
130
|
+
color: rgb(223, 96, 96)
|
131
|
+
&.passed
|
132
|
+
background: lightgreen
|
133
|
+
color: green
|
134
|
+
td.command
|
135
|
+
input
|
136
|
+
color: rgb(129, 192, 129)
|
137
|
+
|
138
|
+
|
139
|
+
.push
|
140
|
+
height: $footerSize
|
141
|
+
|
142
|
+
|
143
|
+
#footer
|
144
|
+
height: $footerSize
|
145
|
+
margin-top: $negativeFooterSize
|
146
|
+
text-align: center
|
147
|
+
|
148
|
+
|
149
|
+
.nav-tabs
|
150
|
+
margin-left: 12px
|
151
|
+
margin-right: 12px
|
152
|
+
span.label
|
153
|
+
color: black
|
154
|
+
font-size: 15px
|
155
|
+
span.status
|
156
|
+
&.in_progress_success
|
157
|
+
color: rgb(192, 175, 84)
|
158
|
+
&.in_progress_failed
|
159
|
+
color: rgb(217, 140, 160)
|
160
|
+
&.completed_failed
|
161
|
+
color: rgb(242, 40, 77)
|
162
|
+
&.completed_passed
|
163
|
+
color: rgb(61, 168, 83)
|
164
|
+
|
165
|
+
.tab-content
|
166
|
+
.tab-pane
|
167
|
+
padding: 12px
|
168
|
+
padding-top: 0
|
169
|
+
|
170
|
+
.copy-icon
|
171
|
+
font-size: 20px
|
172
|
+
display: inline-block
|
173
|
+
text-decoration: none
|
174
|
+
color: black
|
175
|
+
margin-left: 5px
|
176
|
+
|
177
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Swat
|
2
|
+
module Api
|
3
|
+
class RevisionsController < Swat::ApplicationController
|
4
|
+
before_filter :parse_revision_options, only: :show
|
5
|
+
|
6
|
+
|
7
|
+
def index
|
8
|
+
render json: revisions
|
9
|
+
end
|
10
|
+
|
11
|
+
def show
|
12
|
+
render json: FullRevision.revision_json(@options)
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def revisions
|
18
|
+
FullRevision.revisions_json
|
19
|
+
end
|
20
|
+
|
21
|
+
def parse_revision_options
|
22
|
+
@options = params[:json_params] ? HashWithIndifferentAccess[JSON.parse(params[:json_params])] : params
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Swat
|
2
|
+
module Api
|
3
|
+
class TestCasesController < Swat::ApplicationController
|
4
|
+
def index
|
5
|
+
render json: test_cases.to_json
|
6
|
+
end
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
def test_cases
|
11
|
+
opts = HashWithIndifferentAccess[JSON.parse(params[:options])]
|
12
|
+
if !opts.empty?
|
13
|
+
TestCase.query(opts)
|
14
|
+
else
|
15
|
+
[]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module RootRevisionExt
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
def extend_path_data(args)
|
5
|
+
attrs = self.class.prepare_hash(args)
|
6
|
+
if attrs[:main]
|
7
|
+
self.class.all_path_keys.each do |k|
|
8
|
+
attrs[k] = attrs[:main][k.to_s]
|
9
|
+
end
|
10
|
+
end
|
11
|
+
attrs
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
require Swat::Engine.root.join 'app/models/revision_status_calculator'
|
2
|
+
|
3
|
+
class FullRevision
|
4
|
+
|
5
|
+
class << self
|
6
|
+
|
7
|
+
def fetch(all_params, update_status=true)
|
8
|
+
params = prepare_fetch_params(all_params)
|
9
|
+
revision = Revision::Root.take(params)
|
10
|
+
tests = TestCase.query(params)
|
11
|
+
merge(revision, tests, update_status)
|
12
|
+
end
|
13
|
+
|
14
|
+
def fetch_all
|
15
|
+
Revision::Root.all.map do |rev|
|
16
|
+
merge(rev, [])
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def revision_json(all_params)
|
21
|
+
to_json(fetch(all_params))
|
22
|
+
end
|
23
|
+
|
24
|
+
def revisions_json
|
25
|
+
fetch_all.map do |rev|
|
26
|
+
to_json(rev)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def merge(revision, tests, update_status=false)
|
33
|
+
revision.nested_threads.each do |th|
|
34
|
+
th.tests = tests.select{|test| test.thread_id.to_s == th.thread_id.to_s }
|
35
|
+
end
|
36
|
+
|
37
|
+
assign_status(revision, update_status)
|
38
|
+
revision
|
39
|
+
end
|
40
|
+
|
41
|
+
def to_json(revision)
|
42
|
+
main = revision.nested_main.data
|
43
|
+
main[:threads] = revision.nested_threads.map do |th|
|
44
|
+
data = clean_keys(th.data)
|
45
|
+
data[:tests] = th.tests.map(&:data)
|
46
|
+
data
|
47
|
+
end
|
48
|
+
main[:status] = clean_keys(revision.nested_status.data)
|
49
|
+
main
|
50
|
+
end
|
51
|
+
|
52
|
+
def prepare_fetch_params(all_params)
|
53
|
+
res = {
|
54
|
+
branch: all_params[:branch],
|
55
|
+
user: all_params[:user],
|
56
|
+
time: all_params[:time],
|
57
|
+
}
|
58
|
+
res[:time] = res[:time].to_i if res[:time]
|
59
|
+
res
|
60
|
+
end
|
61
|
+
|
62
|
+
def clean_keys(original_hash, keys=[:branch, :user, :time, :id])
|
63
|
+
keys.each{|k| original_hash.delete(k)}
|
64
|
+
original_hash
|
65
|
+
end
|
66
|
+
|
67
|
+
def assign_status(revision, update)
|
68
|
+
if update
|
69
|
+
update_status!(revision)
|
70
|
+
else
|
71
|
+
RevisionStatusCalulator.new.set_status(revision)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def update_status!(revision)
|
76
|
+
current_status = revision.nested_status.data.clone
|
77
|
+
|
78
|
+
return if current_status[:completed]
|
79
|
+
|
80
|
+
new_status = RevisionStatusCalulator.new.set_status(revision)
|
81
|
+
return if new_status[:passed] && current_status[:failed]
|
82
|
+
|
83
|
+
revision.save
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
class Revision < Fire::SingleNestedModel
|
2
|
+
|
3
|
+
class Root < Fire::Model
|
4
|
+
in_collection 'Revision'
|
5
|
+
has_path_keys :branch, :user
|
6
|
+
set_id_key(:time)
|
7
|
+
|
8
|
+
require Swat::Engine.root.join 'app/models/concerns/root_revision_ext'
|
9
|
+
include RootRevisionExt
|
10
|
+
|
11
|
+
def initialize(args)
|
12
|
+
super(extend_path_data(args))
|
13
|
+
end
|
14
|
+
|
15
|
+
def threads_count
|
16
|
+
nested_main.threads_count.to_i
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
nested_in Revision::Root, folder: 'main', parent_values: true
|
22
|
+
set_id_key(:time)
|
23
|
+
|
24
|
+
class Thread < Fire::NestedModel
|
25
|
+
nested_in Revision::Root, folder: 'threads'
|
26
|
+
set_id_key(:thread_id)
|
27
|
+
has_path_keys
|
28
|
+
attr_accessor :tests
|
29
|
+
end
|
30
|
+
|
31
|
+
class Status < Fire::SingleNestedModel
|
32
|
+
nested_in Revision::Root, folder: 'status'
|
33
|
+
end
|
34
|
+
|
35
|
+
def collect_started_thread(rspec_notification, data)
|
36
|
+
object = data.merge( total_examples: rspec_notification.count )
|
37
|
+
add_to_threads(object)
|
38
|
+
end
|
39
|
+
|
40
|
+
def add_to_threads(data)
|
41
|
+
root.add_to_threads(data)
|
42
|
+
end
|
43
|
+
|
44
|
+
def threads
|
45
|
+
load_root.nested_threads || []
|
46
|
+
end
|
47
|
+
|
48
|
+
def collect_ended_thread(rspec_notification, data)
|
49
|
+
rspec_data = {
|
50
|
+
total_examples: rspec_notification.examples.count,
|
51
|
+
failed_examples: rspec_notification.failed_examples.count,
|
52
|
+
pending_examples: rspec_notification.pending_examples.count,
|
53
|
+
formatted_fails: rspec_notification.fully_formatted_failed_examples,
|
54
|
+
total_runtime: rspec_notification.examples.map{|ex| ex.metadata[:execution_result].run_time }.inject(:+)
|
55
|
+
}
|
56
|
+
object = rspec_data.merge(data)
|
57
|
+
add_to_threads(object)
|
58
|
+
end
|
59
|
+
|
60
|
+
class << self
|
61
|
+
|
62
|
+
def add(params)
|
63
|
+
create(params)
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
67
|
+
|
68
|
+
private
|
69
|
+
|
70
|
+
def root
|
71
|
+
@root || Root.new(data)
|
72
|
+
end
|
73
|
+
|
74
|
+
def load_root
|
75
|
+
@root = Root.take(data)
|
76
|
+
return root unless @root
|
77
|
+
Root.all_path_keys.each do |k|
|
78
|
+
@root.send("#{k}=", self.send(k))
|
79
|
+
end
|
80
|
+
@root
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
|
@@ -0,0 +1,98 @@
|
|
1
|
+
class RevisionStatusCalulator
|
2
|
+
|
3
|
+
def set_thread_statuses(revision_root)
|
4
|
+
threads = revision_root.nested_threads
|
5
|
+
(0..(revision_root.threads_count-1)).map do |index|
|
6
|
+
thread = threads.find{|t| t.thread_id == index }
|
7
|
+
calculate_and_modify_thread_status(thread || thread_result_stub)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def set_status(revision_root)
|
12
|
+
thread_statuses = set_thread_statuses(revision_root)
|
13
|
+
threads_completed = thread_statuses.all?{|ts| ts[:completed] }
|
14
|
+
|
15
|
+
completed = (thread_statuses.count == revision_root.threads_count && threads_completed )
|
16
|
+
failed = thread_statuses.any?{|ts| ts[:failed] }
|
17
|
+
|
18
|
+
revision_root.nested_status.set(status(failed, completed))
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def calculate_and_modify_thread_status(thread)
|
24
|
+
init_total_failed(thread)
|
25
|
+
thread.total_runned = thread.total_examples.to_i - thread.pending_examples.to_i
|
26
|
+
|
27
|
+
thread.status = thread_status(thread)
|
28
|
+
thread.status
|
29
|
+
end
|
30
|
+
|
31
|
+
def thread_status(thread)
|
32
|
+
failed_aleady = thread[:status][:failed] rescue false
|
33
|
+
completed_already = thread[:status][:completed] rescue false
|
34
|
+
|
35
|
+
failed = (thread.total_failed > 0) || failed_aleady
|
36
|
+
completed = !thread.in_progress || completed_already
|
37
|
+
status(failed, completed)
|
38
|
+
end
|
39
|
+
|
40
|
+
def thread_result_stub
|
41
|
+
stub = {
|
42
|
+
pending_examples: 0,
|
43
|
+
total_examples: 0,
|
44
|
+
total_runtime: 0,
|
45
|
+
in_progress: true,
|
46
|
+
}
|
47
|
+
OpenStruct.new(stub)
|
48
|
+
end
|
49
|
+
|
50
|
+
def init_total_failed(thread)
|
51
|
+
failed_tests = (thread.tests||[]).select{|x|x.status == 'failed'}.count
|
52
|
+
unless thread.failed_examples
|
53
|
+
if (thread.tests||[]).count == thread.total_examples
|
54
|
+
thread.failed_examples = thread.total_failed = failed_tests
|
55
|
+
end
|
56
|
+
thread.in_progress = true
|
57
|
+
thread.total_failed = failed_tests
|
58
|
+
else
|
59
|
+
thread.total_failed = thread.failed_examples
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
STATUSES = {
|
64
|
+
in_progress_success: {
|
65
|
+
name: 'in_progress_success',
|
66
|
+
label: 'In Progress',
|
67
|
+
completed: false,
|
68
|
+
failed: false,
|
69
|
+
},
|
70
|
+
in_progress_failed: {
|
71
|
+
name: 'in_progress_failed',
|
72
|
+
label: 'In Progress',
|
73
|
+
completed: false,
|
74
|
+
failed: true,
|
75
|
+
},
|
76
|
+
completed_failed: {
|
77
|
+
name: 'completed_failed',
|
78
|
+
label: 'Failed',
|
79
|
+
completed: true,
|
80
|
+
failed: true,
|
81
|
+
},
|
82
|
+
completed_passed: {
|
83
|
+
name: 'completed_passed',
|
84
|
+
label: 'Passed',
|
85
|
+
completed: true,
|
86
|
+
failed: false,
|
87
|
+
},
|
88
|
+
}
|
89
|
+
|
90
|
+
def status(failed, completed)
|
91
|
+
id = if completed
|
92
|
+
failed ? :completed_failed : :completed_passed
|
93
|
+
else
|
94
|
+
failed ? :in_progress_failed : :in_progress_success
|
95
|
+
end
|
96
|
+
STATUSES[id]
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class TestCase < Fire::Model
|
2
|
+
has_path_keys :branch, :user, :time, :thread_id
|
3
|
+
|
4
|
+
class << self
|
5
|
+
|
6
|
+
def collect(revision_opts, rspec_example, extras)
|
7
|
+
data = {
|
8
|
+
description: rspec_example.description,
|
9
|
+
full_description: rspec_example.full_description,
|
10
|
+
file_path: rspec_example.file_path,
|
11
|
+
location: rspec_example.location,
|
12
|
+
exception: rspec_example.exception,
|
13
|
+
status: rspec_example.metadata[:execution_result].status,
|
14
|
+
started_at: rspec_example.metadata[:execution_result].started_at,
|
15
|
+
run_time: rspec_example.metadata[:execution_result].run_time
|
16
|
+
}.merge!(revision_opts).merge!(extras)
|
17
|
+
if rspec_example.respond_to?(:swat_extras)
|
18
|
+
data.merge!(swat_extras: rspec_example.swat_extras)
|
19
|
+
end
|
20
|
+
create(data)
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
doctype html
|
2
|
+
html lang="en" ng-app="SWAT"
|
3
|
+
head
|
4
|
+
meta charset="utf-8"
|
5
|
+
title
|
6
|
+
- unless yield(:title).to_s.empty?
|
7
|
+
= yield(:title)
|
8
|
+
- else
|
9
|
+
| S.W.A.T.
|
10
|
+
= yield(:head)
|
11
|
+
|
12
|
+
= csrf_meta_tags
|
13
|
+
|
14
|
+
- unless request.xhr?
|
15
|
+
= stylesheet_link_tag 'swat/application'
|
16
|
+
|
17
|
+
meta name="viewport" content="width=device-width, initial-scale=1"
|
18
|
+
|
19
|
+
body
|
20
|
+
#swat ng-controller='RootCtrl'
|
21
|
+
#container
|
22
|
+
header
|
23
|
+
= render partial: 'swat/shared/header'
|
24
|
+
#subheader
|
25
|
+
= yield(:subheader)
|
26
|
+
nav
|
27
|
+
= yield(:nav)
|
28
|
+
#content
|
29
|
+
= yield
|
30
|
+
#ui-view ui-view="content"
|
31
|
+
|
32
|
+
div.push
|
33
|
+
footer#footer
|
34
|
+
= render partial: 'swat/shared/footer'
|
35
|
+
|
36
|
+
= javascript_include_tag 'swat/application'
|
File without changes
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#revisions-container
|
2
|
+
span.loader ng-class="{ true: 'invisible' }[(revisions && revisions.$resolved)]"
|
3
|
+
h2.revisions-header Revisions
|
4
|
+
.controls
|
5
|
+
.list ng-if="revisions"
|
6
|
+
table.revisions-table.table.table-bordered.table-hover
|
7
|
+
tr
|
8
|
+
th Branch
|
9
|
+
th User
|
10
|
+
th Name
|
11
|
+
th Time
|
12
|
+
th Status
|
13
|
+
tr ng-repeat="revision in revisions | orderBy: 'data.time'" ui-sref="revision(revision.data)"
|
14
|
+
td
|
15
|
+
| {{ revision.data.branch }}
|
16
|
+
td
|
17
|
+
| {{ revision.data.user }}
|
18
|
+
td
|
19
|
+
strong
|
20
|
+
| {{ revision.data.name || revision.data.time }}
|
21
|
+
td
|
22
|
+
| {{ revision.data.time | date: "yyyy/MM/dd h:mm:ss a" }}
|
23
|
+
td.revision-status ng-class="revision.data.status.name"
|
24
|
+
| {{ revision.data.status.label }}
|
25
|
+
|