mirror of
git://git.yoctoproject.org/yocto-autobuilder2.git
synced 2025-07-19 20:59:02 +02:00
yocto_console_view: Only request properties for running builds which don't have them
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
81273de5ac
commit
a60c841a49
|
@ -89,22 +89,32 @@ class Console extends Controller
|
||||||
@builds.onChange = @changes.onChange = @buildrequests.onChange = @buildsets.onChange = @onChange
|
@builds.onChange = @changes.onChange = @buildrequests.onChange = @buildsets.onChange = @onChange
|
||||||
|
|
||||||
@builds.onNew = (build) =>
|
@builds.onNew = (build) =>
|
||||||
build.getProperties().onChange = (properties) =>
|
change = false
|
||||||
change = false
|
buildid = build.buildid
|
||||||
buildid = properties.endpoint.split('/')[1]
|
if build.properties?.yp_build_revision?
|
||||||
if ! @revmapping[buildid]
|
@revmapping[build.buildid] = build.properties.yp_build_revision[0]
|
||||||
rev = @getBuildProperty(properties[0], 'yp_build_revision')
|
change = true
|
||||||
if rev?
|
if build.properties?.yp_build_branch?
|
||||||
@revmapping[buildid] = rev
|
@branchmapping[build.buildid] = build.properties.yp_build_branch[0]
|
||||||
change = true
|
change = true
|
||||||
if ! @branchmapping[buildid]
|
if (! @revmapping[buildid] || ! @branchmapping[buildid]) && ! build.complete_at
|
||||||
branch = @getBuildProperty(properties[0], 'yp_build_branch')
|
build.getProperties().onChange = (properties) =>
|
||||||
if branch?
|
change = false
|
||||||
@branchmapping[buildid] = branch
|
buildid = properties.endpoint.split('/')[1]
|
||||||
|
if ! @revmapping[buildid]
|
||||||
|
rev = @getBuildProperty(properties[0], 'yp_build_revision')
|
||||||
|
if rev?
|
||||||
|
@revmapping[buildid] = rev
|
||||||
|
change = true
|
||||||
|
if ! @branchmapping[buildid]
|
||||||
|
branch = @getBuildProperty(properties[0], 'yp_build_branch')
|
||||||
|
if branch?
|
||||||
|
@branchmapping[buildid] = branch
|
||||||
change = true
|
change = true
|
||||||
if change and not @onchange_debounce?
|
if change and not @onchange_debounce?
|
||||||
@onchange_debounce = @$timeout(@_onChange, 100)
|
@onchange_debounce = @$timeout(@_onChange, 100)
|
||||||
|
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)
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user