Skip to content

Commit 3176111

Browse files
committed
Added duration column to the project page
1 parent 00a2248 commit 3176111

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

src/PHPCensor/Command/RunCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class RunCommand extends Command
3636
/**
3737
* @var int
3838
*/
39-
protected $maxBuilds = 100;
39+
protected $maxBuilds = 10;
4040

4141
/**
4242
* @param \Monolog\Logger $logger

src/PHPCensor/View/Project/ajax-builds.phtml

+3-11
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,6 @@ switch($build->getStatus())
4040
<tr>
4141
<td><a href="<?php echo APP_URL ?>build/view/<?php print $build->getId(); ?>">#<?php print str_pad($build->getId(), 6, '0', STR_PAD_LEFT); ?></a></td>
4242
<td><?php print $build->getCreated()->format('Y-m-d H:i:s'); ?></td>
43-
<td><a href="<?php echo APP_URL ?>project/view/<?php print $build->getProjectId(); ?>">
44-
<i class="fa fa-<?php print $build->getProject()->getIcon(); ?>"></i>
45-
46-
<?php
47-
if (is_object($build->getProject())) {
48-
print htmlspecialchars($build->getProject()->getTitle());
49-
} else {
50-
print ' - ';
51-
}
52-
?></a></td>
53-
5443
<td class="hidden-md hidden-sm hidden-xs">
5544
<?php
5645
if ($build->getCommitId() !== 'Manual') {
@@ -70,6 +59,9 @@ switch($build->getStatus())
7059
<td>
7160
<span class='label label-<?php echo $subcls ?>'><?php echo $status ?></span>
7261
</td>
62+
<td>
63+
<?php print $build->getDuration(); ?> <?= Lang::get('seconds'); ?>
64+
</td>
7365
<td>
7466
<div class="btn-group btn-group-right">
7567
<a class="btn btn-default btn-sm" href="<?php echo APP_URL ?>build/view/<?php print $build->getId(); ?>"><?php Lang::out('view'); ?></a>

src/PHPCensor/View/Project/view.phtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@
6060
<tr>
6161
<th><?php Lang::out('id'); ?></th>
6262
<th><?php Lang::out('date'); ?></th>
63-
<th><?php Lang::out('project'); ?></th>
6463
<th class="hidden-md hidden-sm hidden-xs"><?php Lang::out('commit'); ?></th>
6564
<th><?php Lang::out('branch'); ?></th>
6665
<th><?php Lang::out('status'); ?></th>
66+
<th><?php Lang::out('duration'); ?></th>
6767
<th></th>
6868
</tr>
6969
</thead>

0 commit comments

Comments
 (0)