Diff
Modified: trunk/Tools/BuildSlaveSupport/ews-app/ews/models/__init__.py (237899 => 237900)
--- trunk/Tools/BuildSlaveSupport/ews-app/ews/models/__init__.py 2018-11-06 23:57:39 UTC (rev 237899)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/models/__init__.py 2018-11-07 00:07:19 UTC (rev 237900)
@@ -1 +1,4 @@
+from buildermappings import *
+from builds import *
from patch import *
+from steps import *
Added: trunk/Tools/BuildSlaveSupport/ews-app/ews/models/buildermappings.py (0 => 237900)
--- trunk/Tools/BuildSlaveSupport/ews-app/ews/models/buildermappings.py (rev 0)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/models/buildermappings.py 2018-11-07 00:07:19 UTC (rev 237900)
@@ -0,0 +1,33 @@
+# Copyright (C) 2018 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from __future__ import unicode_literals
+
+from django.db import models
+
+
+class BuilderMappings(models.Model):
+ builderid = models.IntegerField(primary_key=True)
+ name = models.TextField()
+
+ def __str__(self):
+ return "{}: {}".format(self.builderid, self.name)
Added: trunk/Tools/BuildSlaveSupport/ews-app/ews/models/builds.py (0 => 237900)
--- trunk/Tools/BuildSlaveSupport/ews-app/ews/models/builds.py (rev 0)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/models/builds.py 2018-11-07 00:07:19 UTC (rev 237900)
@@ -0,0 +1,41 @@
+# Copyright (C) 2018 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from __future__ import unicode_literals
+
+from django.db import models
+
+
+class Builds(models.Model):
+ patchid = models.IntegerField() # TODO: set foreign key
+ buildid = models.IntegerField(primary_key=True)
+ builderid = models.IntegerField()
+ number = models.IntegerField()
+ result = models.IntegerField()
+ state_string = models.TextField()
+ started_at = models.IntegerField()
+ complete_at = models.IntegerField()
+ created = models.DateTimeField(auto_now_add=True)
+ modified = models.DateTimeField(auto_now=True)
+
+ def __str__(self):
+ return str(self.buildid)
Modified: trunk/Tools/BuildSlaveSupport/ews-app/ews/models/patch.py (237899 => 237900)
--- trunk/Tools/BuildSlaveSupport/ews-app/ews/models/patch.py 2018-11-06 23:57:39 UTC (rev 237899)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/models/patch.py 2018-11-07 00:07:19 UTC (rev 237900)
@@ -24,4 +24,14 @@
from django.db import models
-# Create your models here.
+
+class Patch(models.Model):
+ patchid = models.IntegerField(primary_key=True)
+ bugid = models.IntegerField()
+ content = models.TextField(default='')
+ obsolete = models.BooleanField(default=False)
+ created = models.DateTimeField(auto_now_add=True)
+ modified = models.DateTimeField(auto_now=True)
+
+ def __str__(self):
+ return str(self.patchid)
Added: trunk/Tools/BuildSlaveSupport/ews-app/ews/models/steps.py (0 => 237900)
--- trunk/Tools/BuildSlaveSupport/ews-app/ews/models/steps.py (rev 0)
+++ trunk/Tools/BuildSlaveSupport/ews-app/ews/models/steps.py 2018-11-07 00:07:19 UTC (rev 237900)
@@ -0,0 +1,39 @@
+# Copyright (C) 2018 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from __future__ import unicode_literals
+
+from django.db import models
+
+
+class Steps(models.Model):
+ stepid = models.IntegerField(primary_key=True)
+ buildid = models.IntegerField() # TODO: set foreign key
+ result = models.IntegerField()
+ state_string = models.TextField()
+ started_at = models.IntegerField()
+ complete_at = models.IntegerField()
+ created = models.DateTimeField(auto_now_add=True)
+ modified = models.DateTimeField(auto_now=True)
+
+ def __str__(self):
+ return str(self.buildid)
Modified: trunk/Tools/ChangeLog (237899 => 237900)
--- trunk/Tools/ChangeLog 2018-11-06 23:57:39 UTC (rev 237899)
+++ trunk/Tools/ChangeLog 2018-11-07 00:07:19 UTC (rev 237900)
@@ -1,5 +1,18 @@
2018-11-06 Aakash Jain <[email protected]>
+ [ews-app] Add models for OpenSource EWS Django app
+ https://bugs.webkit.org/show_bug.cgi?id=191123
+
+ Reviewed by Lucas Forschler.
+
+ * BuildSlaveSupport/ews-app/ews/models/__init__.py:
+ * BuildSlaveSupport/ews-app/ews/models/buildermappings.py: Added.
+ * BuildSlaveSupport/ews-app/ews/models/builds.py: Added.
+ * BuildSlaveSupport/ews-app/ews/models/patch.py:
+ * BuildSlaveSupport/ews-app/ews/models/steps.py: Added.
+
+2018-11-06 Aakash Jain <[email protected]>
+
[ews-app] Fix Invalid HTTP_HOST header
https://bugs.webkit.org/show_bug.cgi?id=191325