Skip to content

Commit

Permalink
Alter time_elapsed field in BuildHistory Model
Browse files Browse the repository at this point in the history
Closes: #124
  • Loading branch information
arjunsalyan authored and mojca committed Sep 29, 2019
1 parent c37e5cf commit bafaefc
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
18 changes: 18 additions & 0 deletions app/ports/migrations/0009_alter_field_time_elapsed_buildhistory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.2.4 on 2019-09-27 20:49

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('ports', '0008_alter_field_cxx_stdlib'),
]

operations = [
migrations.AlterField(
model_name='buildhistory',
name='time_elapsed',
field=models.DurationField(null=True),
),
]
2 changes: 1 addition & 1 deletion app/ports/models/buildhistory.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class BuildHistory(models.Model):
status = models.CharField(max_length=50)
port_name = models.CharField(max_length=100)
time_start = models.DateTimeField()
time_elapsed = models.TimeField(null=True)
time_elapsed = models.DurationField(null=True)
watcher_id = models.IntegerField()

class Meta:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h4 class="text-secondary">Showing {% if port_name != '' %}results for <i>"{{ po
<td>{{ build.builder_name.name|os_version }}</td>
<td><a target="_blank" href="{% build_url build.builder_name.name build.build_id %}">{{ build.build_id }}</a></td>
<td>{{ build.time_start|date:"Y-m-d" }} {{ build.time_start|time:"G:i:s" }} </td>
<td>{{ build.time_elapsed|time:"H:i:s" }}</td>
<td>{{ build.time_elapsed }}</td>
<td><a target="_blank" href="{% watcher_url build.builder_name.name build.watcher_id %}">{{ build.watcher_id }}</a></td>
<td class="{% if build.status == 'build successful' %}text-success {% else %} text-danger {% endif %}">{{ build.status }}</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h4 class="text-secondary">Showing {% if status == "" %} <ins>All Builds</ins> {
<td>{{ build.builder_name.name|os_version }}</td>
<td><a target="_blank" href="{% build_url build.builder_name.name build.build_id %}">{{ build.build_id }}</a></td>
<td>{{ build.time_start|date:"Y-m-d" }} {{ build.time_start|time:"G:i:s" }} </td>
<td>{{ build.time_elapsed|time:"H:i:s" }}</td>
<td>{{ build.time_elapsed }}</td>
<td><a target="_blank" href="{% watcher_url build.builder_name.name build.watcher_id %}">{{ build.watcher_id }}</a></td>
<td class="{% if build.status == 'build successful' %}text-success {% else %} text-danger {% endif %}">{{ build.status }}</td>
</tr>
Expand Down

0 comments on commit bafaefc

Please sign in to comment.