mirror of
git://git.yoctoproject.org/yocto-autobuilder2.git
synced 2025-07-19 12:49:03 +02:00
yocto_console_view: Merge in upstream improvements
Merge in various tweaks made to the upstream console_view plugin. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
36ae2de715
commit
9562761148
|
@ -109,7 +109,10 @@ class Console {
|
||||||
this.buildrequests = this.dataAccessor.getBuildrequests({limit: this.buildLimit, order: '-submitted_at'});
|
this.buildrequests = this.dataAccessor.getBuildrequests({limit: this.buildLimit, order: '-submitted_at'});
|
||||||
this.buildsets = this.dataAccessor.getBuildsets({limit: this.buildLimit, order: '-submitted_at'});
|
this.buildsets = this.dataAccessor.getBuildsets({limit: this.buildLimit, order: '-submitted_at'});
|
||||||
|
|
||||||
this.builds.onChange = (this.changes.onChange = (this.buildrequests.onChange = (this.buildsets.onChange = this.onChange)));
|
this.builds.onChange = this.onChange;
|
||||||
|
this.changes.onChange = this.onChange;
|
||||||
|
this.buildrequests.onChange = this.onChange;
|
||||||
|
this.buildsets.onChange = this.onChange;
|
||||||
|
|
||||||
this.builds.onNew = build => {
|
this.builds.onNew = build => {
|
||||||
let change = false;
|
let change = false;
|
||||||
|
@ -165,7 +168,7 @@ class Console {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((this.onchange_debounce == null)) {
|
if ((this.onchange_debounce == null)) {
|
||||||
return this.onchange_debounce = this.$timeout(this._onChange, 100);
|
this.onchange_debounce = this.$timeout(this._onChange, 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,28 +196,19 @@ class Console {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.filtered_changes = [];
|
this.filtered_changes = [];
|
||||||
return (() => {
|
|
||||||
const result = [];
|
for (let ssid in this.changesBySSID) {
|
||||||
for (let ssid in this.changesBySSID) {
|
change = this.changesBySSID[ssid];
|
||||||
change = this.changesBySSID[ssid];
|
if (change.comments) {
|
||||||
if (change.comments) {
|
change.subject = change.comments.split("\n")[0];
|
||||||
change.subject = change.comments.split("\n")[0];
|
|
||||||
}
|
|
||||||
result.push((() => {
|
|
||||||
const result1 = [];
|
|
||||||
for (let builder of Array.from(change.builders)) {
|
|
||||||
if (builder.builds.length > 0) {
|
|
||||||
this.filtered_changes.push(change);
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
result1.push(undefined);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result1;
|
|
||||||
})());
|
|
||||||
}
|
}
|
||||||
return result;
|
for (let builder of Array.from(change.builders)) {
|
||||||
})();
|
if (builder.builds.length > 0) {
|
||||||
|
this.filtered_changes.push(change);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Sort builders by tags
|
* Sort builders by tags
|
||||||
|
@ -232,7 +226,7 @@ class Console {
|
||||||
for (let builder of Array.from(all_builders)) {
|
for (let builder of Array.from(all_builders)) {
|
||||||
if (builder.hasBuild) {
|
if (builder.hasBuild) {
|
||||||
builders_with_builds.push(builder);
|
builders_with_builds.push(builder);
|
||||||
builderids_with_builds += "." + builder.builderid;
|
builderids_with_builds += `.${builder.builderid}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,15 +373,11 @@ class Console {
|
||||||
populateChange(change) {
|
populateChange(change) {
|
||||||
change.builders = [];
|
change.builders = [];
|
||||||
change.buildersById = {};
|
change.buildersById = {};
|
||||||
return (() => {
|
for (let builder of Array.from(this.builders)) {
|
||||||
const result = [];
|
builder = {builderid: builder.builderid, name: builder.name, builds: []};
|
||||||
for (let builder of Array.from(this.builders)) {
|
change.builders.push(builder);
|
||||||
builder = {builderid: builder.builderid, name: builder.name, builds: []};
|
change.buildersById[builder.builderid] = builder;
|
||||||
change.builders.push(builder);
|
}
|
||||||
result.push(change.buildersById[builder.builderid] = builder);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
})();
|
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Match builds with a change
|
* Match builds with a change
|
||||||
|
@ -405,6 +395,9 @@ class Console {
|
||||||
if ((buildset != null) && (buildset.sourcestamps != null)) {
|
if ((buildset != null) && (buildset.sourcestamps != null)) {
|
||||||
for (let sourcestamp of Array.from(buildset.sourcestamps)) {
|
for (let sourcestamp of Array.from(buildset.sourcestamps)) {
|
||||||
change = this.changesBySSID[sourcestamp.ssid];
|
change = this.changesBySSID[sourcestamp.ssid];
|
||||||
|
if (change != null) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user