[ews-app] status bubble should fetch builder name info from BuilderMapping table
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2019 22:10:37 +0000 (22:10 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Feb 2019 22:10:37 +0000 (22:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194599

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
(StatusBubble._build_bubble):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241562 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py
Tools/ChangeLog

index 7887531..1a7e633 100644 (file)
@@ -26,14 +26,19 @@ from django.http import HttpResponse
 from django.shortcuts import render
 from django.views import View
 from django.views.decorators.clickjacking import xframe_options_exempt
+from ews.models.buildermapping import BuilderMapping
 from ews.models.patch import Patch
 import ews.config as config
 
 
 class StatusBubble(View):
     def _build_bubble(self, build, patch):
-        builder_display_name = build.builder_id  # TODO: fetch display name from buildermapping table https://bugs.webkit.org/show_bug.cgi?id=194599
-        builder_full_name = build.builder_id  # TODO: fetch builder full name from buildermapping table https://bugs.webkit.org/show_bug.cgi?id=194599
+        try:
+            builder_display_name = build.builder.display_name
+            builder_full_name = build.builder.builder_name
+        except BuilderMapping.DoesNotExist:
+            builder_display_name = build.builder_id
+            builder_full_name = ''
 
         bubble = {
             "name": builder_display_name,
index 628fc56..3b94482 100644 (file)
@@ -1,5 +1,15 @@
 2019-02-14  Aakash Jain  <aakash_jain@apple.com>
 
+        [ews-app] status bubble should fetch builder name info from BuilderMapping table
+        https://bugs.webkit.org/show_bug.cgi?id=194599
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
+        (StatusBubble._build_bubble):
+
+2019-02-14  Aakash Jain  <aakash_jain@apple.com>
+
         [ews-app] Set Foreign Key in Django build model
         https://bugs.webkit.org/show_bug.cgi?id=194667