diff options
Diffstat (limited to 'src')
6 files changed, 21 insertions, 3 deletions
diff --git a/src/main/java/io/trygvis/esper/testing/web/resource/JenkinsResource.java b/src/main/java/io/trygvis/esper/testing/web/resource/JenkinsResource.java index bd0c613..3169096 100755 --- a/src/main/java/io/trygvis/esper/testing/web/resource/JenkinsResource.java +++ b/src/main/java/io/trygvis/esper/testing/web/resource/JenkinsResource.java @@ -1,5 +1,6 @@ package io.trygvis.esper.testing.web.resource; +import fj.data.*; import io.trygvis.esper.testing.*; import io.trygvis.esper.testing.jenkins.*; import io.trygvis.esper.testing.jenkins.xml.*; @@ -151,9 +152,16 @@ public class JenkinsResource extends AbstractResource { protected SqlF<JenkinsBuildDto, JenkinsBuildJson> getJenkinsBuildJson = new SqlF<JenkinsBuildDto, JenkinsBuildJson>() { public JenkinsBuildJson apply(JenkinsBuildDto dto) throws SQLException { - JenkinsBuildXml xml = daos.fileDao.load(dto.file).toFj(). + Option<JenkinsBuildXml> xmlO = daos.fileDao.load(dto.file).toFj(). bind(xmlParser.parseDocument). - bind(JenkinsBuildXml.parse).some(); + bind(JenkinsBuildXml.parse); + + if(xmlO.isNone()) { + return new JenkinsBuildJson(dto.uuid, dto.createdDate, new DateTime(dto.createdDate), + "unknown", 0, 0); + } + + JenkinsBuildXml xml = xmlO.some(); return new JenkinsBuildJson(dto.uuid, dto.createdDate, new DateTime(xml.timestamp), xml.result.orSome("unknown"), xml.number, xml.duration); diff --git a/src/main/webapp/apps/jenkinsApp/build.html b/src/main/webapp/apps/jenkinsApp/build.html index 02fa60b..7239c90 100644 --- a/src/main/webapp/apps/jenkinsApp/build.html +++ b/src/main/webapp/apps/jenkinsApp/build.html @@ -1,5 +1,7 @@ <div class="container"> + <navbar/> + <div class="page-header"> <h1>Jenkins Build</h1> </div> diff --git a/src/main/webapp/apps/jenkinsApp/jenkinsApp.js b/src/main/webapp/apps/jenkinsApp/jenkinsApp.js index 1cd2d2a..e42c67b 100644 --- a/src/main/webapp/apps/jenkinsApp/jenkinsApp.js +++ b/src/main/webapp/apps/jenkinsApp/jenkinsApp.js @@ -1,6 +1,6 @@ 'use strict'; -var jenkinsApp = angular.module('jenkinsApp', ['jenkinsServer', 'jenkinsJob', 'jenkinsBuild', 'pagingTableService']).config(function ($routeProvider) { +var jenkinsApp = angular.module('jenkinsApp', ['jenkinsServer', 'jenkinsJob', 'jenkinsBuild', 'core.directives', 'pagingTableService']).config(function ($routeProvider) { $routeProvider. when('/', {controller: ServerListCtrl, templateUrl: '/apps/jenkinsApp/server-list.html?noCache=' + noCache}). when('/server/:uuid', {controller: ServerCtrl, templateUrl: '/apps/jenkinsApp/server.html?noCache=' + noCache}). diff --git a/src/main/webapp/apps/jenkinsApp/job.html b/src/main/webapp/apps/jenkinsApp/job.html index 027748a..8942ab7 100755 --- a/src/main/webapp/apps/jenkinsApp/job.html +++ b/src/main/webapp/apps/jenkinsApp/job.html @@ -1,5 +1,7 @@ <div class="container"> + <navbar/> + <div class="page-header"> <h1>Jenkins Job</h1> </div> diff --git a/src/main/webapp/apps/jenkinsApp/server-list.html b/src/main/webapp/apps/jenkinsApp/server-list.html index e488186..9e297e6 100644 --- a/src/main/webapp/apps/jenkinsApp/server-list.html +++ b/src/main/webapp/apps/jenkinsApp/server-list.html @@ -1,4 +1,7 @@ <div class="container"> + + <navbar/> + <div class="page-header"> <h1>Jenkins Servers</h1> </div> diff --git a/src/main/webapp/apps/jenkinsApp/server.html b/src/main/webapp/apps/jenkinsApp/server.html index 03be57e..7fbd9f5 100644 --- a/src/main/webapp/apps/jenkinsApp/server.html +++ b/src/main/webapp/apps/jenkinsApp/server.html @@ -1,5 +1,8 @@ <div class="container"> + <navbar/> + + <div class="page-header"> <h1>Jenkins Server</h1> </div> |