Skip to content

Commit

Permalink
make message to say www/base/setup.py depends on mock and buildbot as…
Browse files Browse the repository at this point in the history
… well

Fix some review comments from prev commit
Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
  • Loading branch information
Pierre Tardy committed Aug 31, 2014
1 parent 93244ef commit 0b485d2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
5 changes: 4 additions & 1 deletion www/base/setup.py
Expand Up @@ -17,16 +17,19 @@

try:
from buildbot_pkg import setup_www_plugin
import mock, buildbot
except ImportError:
from setuptools import setup
import sys
print >> sys.stderr, "Please install buildbot_pkg module in order to install that package, or use the pre-build .whl modules available on pypi"
print >> sys.stderr, "Please install buildbot, buildbot_pkg, and mock modules in order to install that package, or use the pre-build .whl modules available on pypi"
sys.exit(1)

setup_www_plugin(
name='buildbot-www',
description='Buildbot UI',
author=u'Pierre Tardy',
author_email=u'tardyp@gmail.com',
setup_requires=['buildbot', 'buildbot_pkg', 'mock'],
url='http://buildbot.net/',
license='GNU GPL',
packages=['buildbot_www'],
Expand Down
10 changes: 4 additions & 6 deletions www/waterfall_view/src/module/main.module.coffee
Expand Up @@ -191,7 +191,7 @@ class Waterfall extends Controller
###
# Returns the result string of a builder, build or step
###
result: (b) ->
getResultClassFromThing: (b) ->
if not b.complete and b.started_at >= 0
result = 'pending'
else
Expand All @@ -211,7 +211,6 @@ class Waterfall extends Controller
drawXAxis: ->
x = @scale.getX(@builders, @getInnerWidth())
builderName = @scale.getBuilderName(@builders)
color = @result

# Remove old axis
@header.select('.axis.x').remove()
Expand Down Expand Up @@ -252,7 +251,7 @@ class Waterfall extends Controller
.attr('x2', 0)
.attr('y1', x.rangeBand() / 2)
.attr('y2', - x.rangeBand() / 2)
.attr('class', color)
.attr('class', self.getResultClassFromThing)
.classed('stroke', true)

# Y axis tick values
Expand Down Expand Up @@ -328,7 +327,6 @@ class Waterfall extends Controller
drawBuilds: ->
x = @scale.getX(@builders, @getInnerWidth())
y = @scale.getY(@groups, @c.gap, @getInnerHeight())
color = @result

# Remove previous elements
@chart.selectAll('.builder').remove()
Expand All @@ -351,7 +349,7 @@ class Waterfall extends Controller

# Draw rectangle for each build
builds.append('rect')
.attr('class', color)
.attr('class', self.getResultClassFromThing)
.attr('width', x.rangeBand())
.attr('height', (build) -> y(build.started_at) - y(build.complete_at))
.classed('fill', true)
Expand Down Expand Up @@ -431,7 +429,7 @@ class Waterfall extends Controller
.append('text')
.attr('y', (step, i) -> 15 * (i + 1))
.attr('x', if r then 30 else 10)
.attr('class', (step, i) -> self.result(step))
.attr('class', self.getResultClassFromThing)
.classed('fill', true)
.transition().delay(100)
# Text format
Expand Down
6 changes: 3 additions & 3 deletions www/waterfall_view/src/module/main.module.spec.coffee
Expand Up @@ -109,9 +109,9 @@ describe 'Waterfall view controller', ->
testBuild =
complete: false
started_at: 0
expect(w.result(testBuild)).toBe('pending')
expect(w.getResultClassFromThing(testBuild)).toBe('pending')
testBuild.complete = true
expect(w.result(testBuild)).toBe('unknown')
expect(w.getResultClassFromThing(testBuild)).toBe('unknown')
results =
0: 'success'
1: 'warnings'
Expand All @@ -121,4 +121,4 @@ describe 'Waterfall view controller', ->
5: 'cancelled'
for i in [0..5]
testBuild.results = i
expect(w.result(testBuild)).toBe(results[i])
expect(w.getResultClassFromThing(testBuild)).toBe(results[i])

0 comments on commit 0b485d2

Please sign in to comment.