php-censor/public/assets/js/build-plugins/log.js
Adirelle df5e378b8a Use sensiolabs/ansi-to-html to parse the build logs.
Added an AnsiConverter helper.

Use the AnsiConverter in the email and page templates that display the build log.

Use a dedicated stylesheet for the ANSI converter.

It can be customized.
It can be inlined in the notifications.

Do not use ProphecyTestCase when not needed.
2015-04-09 11:54:57 +02:00

29 lines
753 B
JavaScript

var logPlugin = ActiveBuild.UiPlugin.extend({
id: 'build-log',
css: 'col-lg-6 col-md-12 col-sm-12 col-xs-12',
title: Lang.get('build_log'),
init: function(){
this._super();
},
render: function() {
var container = $('<pre class="ansi_color_bg_black ansi_color_fg_white"></pre>');
container.css({height: '300px', 'overflow-y': 'auto'});
container.html(ActiveBuild.buildData.log);
return container;
},
onUpdate: function(e) {
if (!e.queryData || e.queryData == '') {
$('#build-log').hide();
return;
}
$('#build-log pre').html(e.queryData.log);
$('#build-log').show();
}
});
ActiveBuild.registerPlugin(new logPlugin());