Sha256: 8f917e79c0929881f7dd39917b2077e82a2bc5227fe8e0fb57c68a82461dcc83
Contents?: true
Size: 779 Bytes
Versions: 1
Compression:
Stored size: 779 Bytes
Contents
angular.module("SWAT").controller "RevisionsCtrl", ($rootScope, $scope, $state, RevisionService)-> $scope.init = -> window.Swat.log('Revisions Controller initalized!') $scope.initRevisions() $scope.initRevisions = -> $scope.revisions = RevisionService.query() $scope.testsProgress = (revision)-> startedThreads = revision.data.threads.length totalThreads = revision.data.threads_count completedThreads = _.select(revision.data.threads, (t)->t.status && t.status.completed) completedTests = _.sum( completedThreads, (t)-> t.total_examples) totalTests = _.sum( revision.data.threads, (t)-> t.total_examples) completedThreads.length + " threads completed of " + totalThreads + ". (" + totalTests + " tests in total)" $scope.init()
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sw2at-ui-0.0.12 | app/assets/javascripts/swat/app/controllers/revisions.coffee |