diff --git a/app/js/controllers/home.js b/app/js/controllers/home.js index 2ab7e5f5..63bd76cc 100644 --- a/app/js/controllers/home.js +++ b/app/js/controllers/home.js @@ -109,16 +109,19 @@ function HomeController($scope, healthService, projectService, viewService, $loc processData(response.data); vm.loaded = true; }); + healthService.getRecentFailedTests().then(function(response) { + vm.recentTests = response.data; + }); }; // ViewModel var vm = this; vm.loadData = loadData; vm.groupKey = viewService.groupKey(); - vm.searchProject = $location.search().searchProject || ''; vm.loaded = false; vm.hold = 0; + vm.recentTests = []; configurePeriods(); loadData(); diff --git a/app/js/services/health-api.js b/app/js/services/health-api.js index 4bfa50e9..485af6f0 100644 --- a/app/js/services/health-api.js +++ b/app/js/services/health-api.js @@ -129,6 +129,13 @@ function HealthService($http, config) { }); }); }; + service.getRecentFailedTests = function(options) { + return config.get().then(function(config) { + return $http.jsonp(config.apiRoot + '/tests/recent/fail', { + params: { callback: 'JSON_CALLBACK' } + }); + }); + }; return service; } diff --git a/app/views/home.html b/app/views/home.html index 184b8bf6..179e1218 100644 --- a/app/views/home.html +++ b/app/views/home.html @@ -35,6 +35,35 @@ +
Test ID | +Run Link | +Start Time | +Stop Time | +
---|---|---|---|
{{ testRun.test_id | limitTo: 80 }} | +{{ testRun.link | limitTo: -30 }} | +{{ testRun.start_time }} | +{{ testRun.stop_time }} | +