mirror of
https://github.com/ohwgiles/laminar.git
synced 2026-03-02 03:40:21 +00:00
resolves #61: clickable up/downstream triggers
Recognises triggers in build logs and converts them to hyperlinks. Also separates upstream job from reason string and allows both to be provided
This commit is contained in:
@@ -655,14 +655,14 @@ var Job = function() {
|
||||
|
||||
const Run = function() {
|
||||
var state = {
|
||||
job: { artifacts: [] },
|
||||
job: { artifacts: [], upstream: {} },
|
||||
latestNum: null,
|
||||
log: '',
|
||||
autoscroll: false
|
||||
};
|
||||
var firstLog = false;
|
||||
var logHandler = function(vm, d) {
|
||||
state.log += ansi_up.ansi_to_html(d.replace(/</g,'<').replace(/>/g,'>'));
|
||||
state.log += ansi_up.ansi_to_html(d.replace(/</g,'<').replace(/>/g,'>').replace(/\033\[\{([^:]+):(\d+)\033\\/g, (m,$1,$2)=>{return '<a href="/jobs/'+$1+'" onclick="return vroute(this);">'+$1+'</a>:<a href="/jobs/'+$1+'/'+$2+'" onclick="return vroute(this);">#'+$2+'</a>';}));
|
||||
vm.$forceUpdate();
|
||||
if (!firstLog) {
|
||||
firstLog = true;
|
||||
|
||||
Reference in New Issue
Block a user