2014-12-02 17:26:55 +01:00
|
|
|
var logPlugin = ActiveBuild.UiPlugin.extend({
|
2013-10-08 08:21:46 +02:00
|
|
|
id: 'build-log',
|
2014-12-02 17:26:55 +01:00
|
|
|
css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12',
|
2014-12-04 14:08:48 +01:00
|
|
|
title: Lang.get('build_log'),
|
2013-10-08 08:21:46 +02:00
|
|
|
|
|
|
|
init: function(){
|
|
|
|
this._super();
|
|
|
|
},
|
|
|
|
|
|
|
|
render: function() {
|
2015-02-26 15:57:45 +01:00
|
|
|
var container = $('<pre class="ansi_color_bg_black ansi_color_fg_white"></pre>');
|
2013-10-08 08:21:46 +02:00
|
|
|
container.css({height: '300px', 'overflow-y': 'auto'});
|
2014-12-02 17:26:55 +01:00
|
|
|
container.html(ActiveBuild.buildData.log);
|
2013-10-08 08:21:46 +02:00
|
|
|
|
|
|
|
return container;
|
|
|
|
},
|
|
|
|
|
|
|
|
onUpdate: function(e) {
|
2014-12-02 17:26:55 +01:00
|
|
|
if (!e.queryData || e.queryData == '') {
|
|
|
|
$('#build-log').hide();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-10-08 08:21:46 +02:00
|
|
|
$('#build-log pre').html(e.queryData.log);
|
2014-12-02 17:26:55 +01:00
|
|
|
$('#build-log').show();
|
2013-10-08 08:21:46 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2014-12-02 17:26:55 +01:00
|
|
|
ActiveBuild.registerPlugin(new logPlugin());
|