[ews-app] Rename id variables
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jan 2019 20:08:13 +0000 (20:08 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Jan 2019 20:08:13 +0000 (20:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193883

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-app/ews/models/build.py:
* BuildSlaveSupport/ews-app/ews/models/buildermapping.py:
* BuildSlaveSupport/ews-app/ews/models/step.py:
* BuildSlaveSupport/ews-app/ews/urls.py:
* BuildSlaveSupport/ews-app/ews/views/patch.py:
* BuildSlaveSupport/ews-app/ews/views/results.py:
* BuildSlaveSupport/ews-app/ews/views/statusbubble.py:

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

Tools/BuildSlaveSupport/ews-app/ews/models/build.py
Tools/BuildSlaveSupport/ews-app/ews/models/buildermapping.py
Tools/BuildSlaveSupport/ews-app/ews/models/step.py
Tools/BuildSlaveSupport/ews-app/ews/urls.py
Tools/BuildSlaveSupport/ews-app/ews/views/patch.py
Tools/BuildSlaveSupport/ews-app/ews/views/results.py
Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py
Tools/ChangeLog

index a309671..7cf7ac8 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 Apple Inc. All rights reserved.
+# Copyright (C) 2018-2019 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -28,8 +28,8 @@ from ews.models.patch import Patch
 
 class Build(models.Model):
     patch = models.ForeignKey(Patch, on_delete=models.CASCADE)
-    buildid = models.IntegerField(primary_key=True)
-    builderid = models.IntegerField()
+    build_id = models.IntegerField(primary_key=True)
+    builder_id = models.IntegerField()
     number = models.IntegerField()
     result = models.IntegerField(null=True, blank=True)
     state_string = models.TextField()
@@ -39,4 +39,4 @@ class Build(models.Model):
     modified = models.DateTimeField(auto_now=True)
 
     def __str__(self):
-        return str(self.buildid)
+        return str(self.build_id)
index dbc8278..fccba5f 100644 (file)
@@ -26,8 +26,8 @@ from django.db import models
 
 
 class BuilderMapping(models.Model):
-    builderid = models.IntegerField(primary_key=True)
+    builder_id = models.IntegerField(primary_key=True)
     name = models.TextField()
 
     def __str__(self):
-        return "{}: {}".format(self.builderid, self.name)
+        return "{}: {}".format(self.builder_id, self.name)
index b160af9..37a38b9 100644 (file)
@@ -27,7 +27,7 @@ from ews.models.build import Build
 
 
 class Step(models.Model):
-    stepid = models.IntegerField(primary_key=True)
+    step_id = models.IntegerField(primary_key=True)
     build = models.ForeignKey(Build, on_delete=models.CASCADE)
     result = models.IntegerField(null=True, blank=True)
     state_string = models.TextField()
@@ -37,4 +37,4 @@ class Step(models.Model):
     modified = models.DateTimeField(auto_now=True)
 
     def __str__(self):
-        return str(self.stepid)
+        return str(self.step_id)
index ed4ec88..6773d90 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 Apple Inc. All rights reserved.
+# Copyright (C) 2018-2019 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -32,9 +32,9 @@ urlpatterns = [
     # ex: /
     url(r'^$', Index.as_view(), name='index'),
     # ex: /patch/5
-    url(r'^patch/(?P<patchid>[0-9]+)/$', Patch.as_view(), name='patch'),
+    url(r'^patch/(?P<patch_id>[0-9]+)/$', Patch.as_view(), name='patch'),
     # ex: /patch/5/results
-    url(r'^patch/(?P<patchid>[0-9]+)/results$', Results.as_view(), name='results'),
+    url(r'^patch/(?P<patch_id>[0-9]+)/results$', Results.as_view(), name='results'),
     # ex: /status-bubble/5
-    url(r'^status-bubble/(?P<patchid>[0-9]+)/$', StatusBubble.as_view(), name='statusbubble'),
+    url(r'^status-bubble/(?P<patch_id>[0-9]+)/$', StatusBubble.as_view(), name='statusbubble'),
 ]
index 0d92ff1..88cc20b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 Apple Inc. All rights reserved.
+# Copyright (C) 2018-2019 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -28,8 +28,8 @@ from django.views import View
 
 
 class Patch(View):
-    def get(self, request, patchid):
-        return HttpResponse("Placeholder for patch {}.".format(patchid))
+    def get(self, request, patch_id):
+        return HttpResponse("Placeholder for patch {}.".format(patch_id))
 
-    def post(self, request, patchid):
-        return HttpResponse("Placeholder to handle post request for patch {}.".format(patchid))
+    def post(self, request, patch_id):
+        return HttpResponse("Placeholder to handle post request for patch {}.".format(patch_id))
index 90e9521..e3f7c5e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 Apple Inc. All rights reserved.
+# Copyright (C) 2018-2019 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -28,5 +28,5 @@ from django.views import View
 
 
 class Results(View):
-    def post(self, request, patchid):
-        return HttpResponse("Placeholder to handle post request for result for patch: {}.".format(patchid))
+    def post(self, request, patch_id):
+        return HttpResponse("Placeholder to handle post request for result for patch: {}.".format(patch_id))
index 8acc70d..ac7e139 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018 Apple Inc. All rights reserved.
+# Copyright (C) 2018-2019 Apple Inc. All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -28,5 +28,5 @@ from django.views import View
 
 
 class StatusBubble(View):
-    def get(self, request, patchid):
-        return HttpResponse("Placeholder for status bubble for {}.".format(patchid))
+    def get(self, request, patch_id):
+        return HttpResponse("Placeholder for status bubble for {}.".format(patch_id))
index fefd48d..18d7579 100644 (file)
@@ -1,5 +1,20 @@
 2019-01-28  Aakash Jain  <aakash_jain@apple.com>
 
+        [ews-app] Rename id variables
+        https://bugs.webkit.org/show_bug.cgi?id=193883
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-app/ews/models/build.py:
+        * BuildSlaveSupport/ews-app/ews/models/buildermapping.py:
+        * BuildSlaveSupport/ews-app/ews/models/step.py:
+        * BuildSlaveSupport/ews-app/ews/urls.py:
+        * BuildSlaveSupport/ews-app/ews/views/patch.py:
+        * BuildSlaveSupport/ews-app/ews/views/results.py:
+        * BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
+
+2019-01-28  Aakash Jain  <aakash_jain@apple.com>
+
         [ews-app] Allow certain fields to be empty
         https://bugs.webkit.org/show_bug.cgi?id=193892