diff options
Diffstat (limited to 'bitbake/lib/bb/ui/crumbs')
-rwxr-xr-x | bitbake/lib/bb/ui/crumbs/builddetailspage.py | 30 | ||||
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/runningbuild.py | 65 |
2 files changed, 90 insertions, 5 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builddetailspage.py b/bitbake/lib/bb/ui/crumbs/builddetailspage.py index 8b75ca08bf..63d2c7b329 100755 --- a/bitbake/lib/bb/ui/crumbs/builddetailspage.py +++ b/bitbake/lib/bb/ui/crumbs/builddetailspage.py | |||
@@ -22,8 +22,10 @@ | |||
22 | 22 | ||
23 | import gtk | 23 | import gtk |
24 | from bb.ui.crumbs.progressbar import HobProgressBar | 24 | from bb.ui.crumbs.progressbar import HobProgressBar |
25 | from bb.ui.crumbs.hobwidget import hic | 25 | from bb.ui.crumbs.hobwidget import hic, HobNotebook |
26 | from bb.ui.crumbs.runningbuild import RunningBuildTreeView | 26 | from bb.ui.crumbs.runningbuild import RunningBuildTreeView |
27 | from bb.ui.crumbs.runningbuild import BuildConfigurationTreeView | ||
28 | from bb.ui.crumbs.runningbuild import BuildFailureTreeView | ||
27 | from bb.ui.crumbs.hobpages import HobPage | 29 | from bb.ui.crumbs.hobpages import HobPage |
28 | 30 | ||
29 | # | 31 | # |
@@ -49,11 +51,29 @@ class BuildDetailsPage (HobPage): | |||
49 | self.stop_button.connect("clicked", self.stop_button_clicked_cb) | 51 | self.stop_button.connect("clicked", self.stop_button_clicked_cb) |
50 | self.progress_box.pack_end(self.stop_button, expand=False, fill=False) | 52 | self.progress_box.pack_end(self.stop_button, expand=False, fill=False) |
51 | 53 | ||
54 | self.notebook = HobNotebook() | ||
55 | self.config_tv = BuildConfigurationTreeView() | ||
56 | self.config_model = self.builder.handler.build.model.config_model() | ||
57 | self.config_tv.set_model(self.config_model) | ||
58 | self.scrolled_view_config = gtk.ScrolledWindow () | ||
59 | self.scrolled_view_config.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) | ||
60 | self.scrolled_view_config.add(self.config_tv) | ||
61 | self.notebook.append_page(self.scrolled_view_config, gtk.Label("Build Configuration")) | ||
62 | |||
63 | self.failure_tv = BuildFailureTreeView() | ||
64 | self.failure_model = self.builder.handler.build.model.failure_model() | ||
65 | self.failure_tv.set_model(self.failure_model) | ||
66 | self.scrolled_view_failure = gtk.ScrolledWindow () | ||
67 | self.scrolled_view_failure.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) | ||
68 | self.scrolled_view_failure.add(self.failure_tv) | ||
69 | self.notebook.append_page(self.scrolled_view_failure, gtk.Label("Issues")) | ||
70 | |||
52 | self.build_tv = RunningBuildTreeView(readonly=True) | 71 | self.build_tv = RunningBuildTreeView(readonly=True) |
53 | self.build_tv.set_model(self.builder.handler.build.model) | 72 | self.build_tv.set_model(self.builder.handler.build.model) |
54 | self.scrolled_view = gtk.ScrolledWindow () | 73 | self.scrolled_view_build = gtk.ScrolledWindow () |
55 | self.scrolled_view.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) | 74 | self.scrolled_view_build.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) |
56 | self.scrolled_view.add(self.build_tv) | 75 | self.scrolled_view_build.add(self.build_tv) |
76 | self.notebook.append_page(self.scrolled_view_build, gtk.Label("Log")) | ||
57 | 77 | ||
58 | self.button_box = gtk.HBox(False, 6) | 78 | self.button_box = gtk.HBox(False, 6) |
59 | self.back_button = gtk.LinkButton("Go back to Image Configuration screen", "<< Back to image configuration") | 79 | self.back_button = gtk.LinkButton("Go back to Image Configuration screen", "<< Back to image configuration") |
@@ -86,7 +106,7 @@ class BuildDetailsPage (HobPage): | |||
86 | self.progress_bar.reset() | 106 | self.progress_bar.reset() |
87 | self.vbox.pack_start(self.progress_box, expand=False, fill=False) | 107 | self.vbox.pack_start(self.progress_box, expand=False, fill=False) |
88 | 108 | ||
89 | self.vbox.pack_start(self.scrolled_view, expand=True, fill=True) | 109 | self.vbox.pack_start(self.notebook, expand=True, fill=True) |
90 | 110 | ||
91 | self.box_group_area.pack_end(self.button_box, expand=False, fill=False) | 111 | self.box_group_area.pack_end(self.button_box, expand=False, fill=False) |
92 | self.show_all() | 112 | self.show_all() |
diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py index 10ca394061..6e6aac9855 100644 --- a/bitbake/lib/bb/ui/crumbs/runningbuild.py +++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py | |||
@@ -25,6 +25,7 @@ import logging | |||
25 | import time | 25 | import time |
26 | import urllib | 26 | import urllib |
27 | import urllib2 | 27 | import urllib2 |
28 | import pango | ||
28 | from bb.ui.crumbs.hobcolor import HobColors | 29 | from bb.ui.crumbs.hobcolor import HobColors |
29 | 30 | ||
30 | class RunningBuildModel (gtk.TreeStore): | 31 | class RunningBuildModel (gtk.TreeStore): |
@@ -40,6 +41,32 @@ class RunningBuildModel (gtk.TreeStore): | |||
40 | gobject.TYPE_STRING, | 41 | gobject.TYPE_STRING, |
41 | gobject.TYPE_INT) | 42 | gobject.TYPE_INT) |
42 | 43 | ||
44 | def config_model_filter(self, model, it): | ||
45 | msg = model.get(it, self.COL_MESSAGE)[0] | ||
46 | if msg == None or type(msg) != str: | ||
47 | return False | ||
48 | if msg.startswith("\nOE Build Configuration:\n"): | ||
49 | return True | ||
50 | return False | ||
51 | |||
52 | def failure_model_filter(self, model, it): | ||
53 | color = model.get(it, self.COL_COLOR)[0] | ||
54 | if color == None: | ||
55 | return False | ||
56 | if color == HobColors.ERROR: | ||
57 | return True | ||
58 | return False | ||
59 | |||
60 | def config_model(self): | ||
61 | model = self.filter_new() | ||
62 | model.set_visible_func(self.config_model_filter) | ||
63 | return model | ||
64 | |||
65 | def failure_model(self): | ||
66 | model = self.filter_new() | ||
67 | model.set_visible_func(self.failure_model_filter) | ||
68 | return model | ||
69 | |||
43 | class RunningBuild (gobject.GObject): | 70 | class RunningBuild (gobject.GObject): |
44 | __gsignals__ = { | 71 | __gsignals__ = { |
45 | 'build-started' : (gobject.SIGNAL_RUN_LAST, | 72 | 'build-started' : (gobject.SIGNAL_RUN_LAST, |
@@ -376,3 +403,41 @@ class RunningBuildTreeView (gtk.TreeView): | |||
376 | message = model.get(it, model.COL_MESSAGE)[0] | 403 | message = model.get(it, model.COL_MESSAGE)[0] |
377 | 404 | ||
378 | self._add_to_clipboard(message) | 405 | self._add_to_clipboard(message) |
406 | |||
407 | |||
408 | class BuildConfigurationTreeView(gtk.TreeView): | ||
409 | |||
410 | def __init__ (self): | ||
411 | gtk.TreeView.__init__(self) | ||
412 | self.set_rules_hint(False) | ||
413 | self.set_headers_visible(False) | ||
414 | self.set_property("hover-expand", True) | ||
415 | self.get_selection().set_mode(gtk.SELECTION_SINGLE) | ||
416 | |||
417 | # The message of the build. | ||
418 | self.message_renderer = gtk.CellRendererText () | ||
419 | self.message_column = gtk.TreeViewColumn ("Message", self.message_renderer, text=RunningBuildModel.COL_MESSAGE, background=RunningBuildModel.COL_COLOR) | ||
420 | font = self.get_style().font_desc | ||
421 | font.set_size(pango.SCALE * 13) | ||
422 | self.message_renderer.set_property('font-desc', font) | ||
423 | self.append_column (self.message_column) | ||
424 | |||
425 | |||
426 | class BuildFailureTreeView(gtk.TreeView): | ||
427 | |||
428 | def __init__ (self): | ||
429 | gtk.TreeView.__init__(self) | ||
430 | self.set_rules_hint(False) | ||
431 | self.set_headers_visible(False) | ||
432 | self.get_selection().set_mode(gtk.SELECTION_SINGLE) | ||
433 | |||
434 | # The icon that indicates whether we're building or failed. | ||
435 | renderer = gtk.CellRendererPixbuf () | ||
436 | col = gtk.TreeViewColumn ("Status", renderer) | ||
437 | col.add_attribute (renderer, "icon-name", RunningBuildModel.COL_ICON) | ||
438 | self.append_column (col) | ||
439 | |||
440 | # The message of the build. | ||
441 | self.message_renderer = gtk.CellRendererText () | ||
442 | self.message_column = gtk.TreeViewColumn ("Message", self.message_renderer, text=RunningBuildModel.COL_MESSAGE, background=RunningBuildModel.COL_COLOR) | ||
443 | self.append_column (self.message_column) | ||