summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane Wang <shane.wang@intel.com>2012-03-24 00:05:13 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-25 12:23:34 +0100
commita80fc637def4d9568ceb79f7f4b40e0e15aa162b (patch)
tree7fc77ca216021d0771640136879b6de65253c6aa
parentfb7eb75f33ba27917624ffe65d352247f0e71069 (diff)
downloadast2050-yocto-poky-a80fc637def4d9568ceb79f7f4b40e0e15aa162b.zip
ast2050-yocto-poky-a80fc637def4d9568ceb79f7f4b40e0e15aa162b.tar.gz
Hob: add build status labels in the build details screen to make it more close to the visual design
This patch is to add build status (incl. "Running task XX of XX: XXXXXX") in the build details screen, in order to provide clear information about task in progress and make the GUI close to the visual design. [Yocto #2098] (Bitbake rev: 02d3451b2e0744204a1280f9effe9fd862bb4faf) Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builddetailspage.py17
-rwxr-xr-xbitbake/lib/bb/ui/crumbs/builder.py3
-rw-r--r--bitbake/lib/bb/ui/crumbs/runningbuild.py33
3 files changed, 34 insertions, 19 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/builddetailspage.py b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
index 59d5525..c2f980f 100755
--- a/bitbake/lib/bb/ui/crumbs/builddetailspage.py
+++ b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
@@ -46,12 +46,17 @@ class BuildDetailsPage (HobPage):
# create visual elements
self.vbox = gtk.VBox(False, 12)
- self.progress_box = gtk.HBox(False, 6)
+ self.progress_box = gtk.VBox(False, 12)
+ self.task_status = gtk.Label()
+ self.task_status.set_alignment(0.0, 0.5)
+ self.progress_box.pack_start(self.task_status, expand=False, fill=False)
+ self.progress_hbox = gtk.HBox(False, 6)
+ self.progress_box.pack_end(self.progress_hbox, expand=True, fill=True)
self.progress_bar = HobProgressBar()
- self.progress_box.pack_start(self.progress_bar, expand=True, fill=True)
+ self.progress_hbox.pack_start(self.progress_bar, expand=True, fill=True)
self.stop_button = HobAltButton("Stop")
self.stop_button.connect("clicked", self.stop_button_clicked_cb)
- self.progress_box.pack_end(self.stop_button, expand=False, fill=False)
+ self.progress_hbox.pack_end(self.stop_button, expand=False, fill=False)
self.notebook = HobNotebook()
self.config_tv = BuildConfigurationTreeView()
@@ -84,6 +89,12 @@ class BuildDetailsPage (HobPage):
self.back_button.connect("clicked", self.back_button_clicked_cb)
self.button_box.pack_start(self.back_button, expand=False, fill=False)
+ def update_build_status(self, tsk_msg):
+ self.task_status.set_markup(tsk_msg)
+
+ def reset_build_status(self):
+ self.task_status.set_markup("")
+
def show_issues(self):
self.num_of_issues += 1
self.notebook.show_indicator_icon("Issues", self.num_of_issues)
diff --git a/bitbake/lib/bb/ui/crumbs/builder.py b/bitbake/lib/bb/ui/crumbs/builder.py
index 5321685..f32a066 100755
--- a/bitbake/lib/bb/ui/crumbs/builder.py
+++ b/bitbake/lib/bb/ui/crumbs/builder.py
@@ -543,6 +543,7 @@ class Builder(gtk.Window):
elif self.current_step == self.PACKAGE_GENERATING:
fraction = 0
self.build_details_page.update_progress_bar("Build Started: ", fraction)
+ self.build_details_page.reset_build_status()
self.build_details_page.reset_issues()
def build_succeeded(self):
@@ -610,6 +611,8 @@ class Builder(gtk.Window):
elif message["eventname"] == "runQueueTaskStarted":
fraction = 0.2 + 0.8 * fraction
self.build_details_page.update_progress_bar(title + ": ", fraction)
+ self.build_details_page.update_build_status(
+ "<span weight=\'bold\'>Running task %s of %s:</span> %s" % (message["current"], message["total"], message["task"]))
def handler_build_failure_cb(self, running_build):
self.build_details_page.show_issues()
diff --git a/bitbake/lib/bb/ui/crumbs/runningbuild.py b/bitbake/lib/bb/ui/crumbs/runningbuild.py
index f202a90..0f58e4e 100644
--- a/bitbake/lib/bb/ui/crumbs/runningbuild.py
+++ b/bitbake/lib/bb/ui/crumbs/runningbuild.py
@@ -70,24 +70,24 @@ class RunningBuildModel (gtk.TreeStore):
class RunningBuild (gobject.GObject):
__gsignals__ = {
- 'build-started' : (gobject.SIGNAL_RUN_LAST,
- gobject.TYPE_NONE,
+ 'build-started' : (gobject.SIGNAL_RUN_LAST,
+ gobject.TYPE_NONE,
()),
- 'build-succeeded' : (gobject.SIGNAL_RUN_LAST,
- gobject.TYPE_NONE,
+ 'build-succeeded' : (gobject.SIGNAL_RUN_LAST,
+ gobject.TYPE_NONE,
+ ()),
+ 'build-failed' : (gobject.SIGNAL_RUN_LAST,
+ gobject.TYPE_NONE,
+ ()),
+ 'build-complete' : (gobject.SIGNAL_RUN_LAST,
+ gobject.TYPE_NONE,
+ ()),
+ 'task-started' : (gobject.SIGNAL_RUN_LAST,
+ gobject.TYPE_NONE,
+ (gobject.TYPE_PYOBJECT,)),
+ 'log-error' : (gobject.SIGNAL_RUN_LAST,
+ gobject.TYPE_NONE,
()),
- 'build-failed' : (gobject.SIGNAL_RUN_LAST,
- gobject.TYPE_NONE,
- ()),
- 'build-complete' : (gobject.SIGNAL_RUN_LAST,
- gobject.TYPE_NONE,
- ()),
- 'task-started' : (gobject.SIGNAL_RUN_LAST,
- gobject.TYPE_NONE,
- (gobject.TYPE_PYOBJECT,)),
- 'log-error' : (gobject.SIGNAL_RUN_LAST,
- gobject.TYPE_NONE,
- ()),
}
pids_to_task = {}
tasks_to_iter = {}
@@ -320,6 +320,7 @@ class RunningBuild (gobject.GObject):
message["current"] = num_of_completed
message["total"] = event.stats.total
message["title"] = ""
+ message["task"] = event.taskstring
self.emit("task-started", message)
return
OpenPOWER on IntegriCloud