var timePlugin = ActiveBuild.UiPlugin.extend({ id: 'build-time', css: 'col-lg-12 col-md-12 col-sm-12 col-xs-12', title: null, box: true, init: function(){ this._super(); }, render: function() { var created = ''; var started = ''; var finished = ''; if (ActiveBuild.buildData.created) { created = dateFormat(ActiveBuild.buildData.created); } if (ActiveBuild.buildData.started) { started = dateFormat(ActiveBuild.buildData.started); } if (ActiveBuild.buildData.finished) { finished = dateFormat(ActiveBuild.buildData.finished); } return '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '
Build CreatedBuild StartedBuild Finished
' + created + '' + started + '' + finished + '
'; }, onUpdate: function(e) { var build = e.queryData; var created = ''; var started = ''; var finished = ''; if (build.created) { created = dateFormat(build.created); } if (build.started) { started = dateFormat(build.started); } if (build.finished) { finished = dateFormat(build.finished); } $('#created').text(created); $('#started').text(started); $('#finished').text(finished); } }); ActiveBuild.registerPlugin(new timePlugin());