mirror of
git://git.yoctoproject.org/yocto-autobuilder2.git
synced 2025-07-19 20:59:02 +02:00
yocto_console_view: Also ensure yp_build_branch property is handled
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
c4b8a6ea0e
commit
50e72e78c3
|
@ -75,7 +75,8 @@ class Console extends Controller
|
||||||
return 0
|
return 0
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@$scope.maping = @maping = {}
|
@$scope.revmapping = @revmapping = {}
|
||||||
|
@$scope.branchmapping = @branchmapping = {}
|
||||||
|
|
||||||
@$scope.builds = @builds = @dataAccessor.getBuilds
|
@$scope.builds = @builds = @dataAccessor.getBuilds
|
||||||
property: ["yp_build_revision", "yp_build_branch", "reason"]
|
property: ["yp_build_revision", "yp_build_branch", "reason"]
|
||||||
|
@ -89,13 +90,21 @@ class Console extends Controller
|
||||||
|
|
||||||
@builds.onNew = (build) =>
|
@builds.onNew = (build) =>
|
||||||
build.getProperties().onChange = (properties) =>
|
build.getProperties().onChange = (properties) =>
|
||||||
|
change = false
|
||||||
buildid = properties.endpoint.split('/')[1]
|
buildid = properties.endpoint.split('/')[1]
|
||||||
if ! @maping[buildid]
|
if ! @revmapping[buildid]
|
||||||
rev = @getBuildProperty(properties[0], 'yp_build_revision')
|
rev = @getBuildProperty(properties[0], 'yp_build_revision')
|
||||||
if rev?
|
if rev?
|
||||||
@maping[buildid] = rev
|
@revmapping[buildid] = rev
|
||||||
if not @onchange_debounce?
|
change = true
|
||||||
@onchange_debounce = @$timeout(@_onChange, 100)
|
if ! @branchmapping[buildid]
|
||||||
|
branch = @getBuildProperty(properties[0], 'yp_build_branch')
|
||||||
|
if branch?
|
||||||
|
@branchmapping[buildid] = branch
|
||||||
|
change = true
|
||||||
|
if change and not @onchange_debounce?
|
||||||
|
@onchange_debounce = @$timeout(@_onChange, 100)
|
||||||
|
|
||||||
|
|
||||||
getBuildProperty: (properties, property) ->
|
getBuildProperty: (properties, property) ->
|
||||||
hasProperty = properties && properties.hasOwnProperty(property)
|
hasProperty = properties && properties.hasOwnProperty(property)
|
||||||
|
@ -284,11 +293,11 @@ class Console extends Controller
|
||||||
for sourcestamp in buildset.sourcestamps
|
for sourcestamp in buildset.sourcestamps
|
||||||
change = @changesBySSID[sourcestamp.ssid]
|
change = @changesBySSID[sourcestamp.ssid]
|
||||||
|
|
||||||
if build.properties?.yp_build_revision? or @maping[build.buildid]
|
if build.properties?.yp_build_revision? or @revmapping[build.buildid]
|
||||||
if build.properties?.yp_build_revision?
|
if build.properties?.yp_build_revision?
|
||||||
rev = build.properties.yp_build_revision[0]
|
rev = build.properties.yp_build_revision[0]
|
||||||
else
|
else
|
||||||
rev = @maping[build.buildid]
|
rev = @revmapping[build.buildid]
|
||||||
change = @changesByRevision[rev]
|
change = @changesByRevision[rev]
|
||||||
if not change?
|
if not change?
|
||||||
change = @changesBySSID[rev]
|
change = @changesBySSID[rev]
|
||||||
|
@ -303,6 +312,8 @@ class Console extends Controller
|
||||||
change.caption = "Commit"
|
change.caption = "Commit"
|
||||||
if build.properties?.yp_build_branch?
|
if build.properties?.yp_build_branch?
|
||||||
change.caption = build.properties.yp_build_branch[0]
|
change.caption = build.properties.yp_build_branch[0]
|
||||||
|
if @branchmapping[build.buildid]
|
||||||
|
change.caption = @branchmapping[build.buildid]
|
||||||
change.revlink = "http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=" + rev
|
change.revlink = "http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=" + rev
|
||||||
change.errorlink = "http://errors.yoctoproject.org/Errors/Latest/?filter=" + rev + "&type=commit&limit=150"
|
change.errorlink = "http://errors.yoctoproject.org/Errors/Latest/?filter=" + rev + "&type=commit&limit=150"
|
||||||
if build.properties?.reason?
|
if build.properties?.reason?
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user