php-censor/PHPCI/View/Build/view.phtml
2013-05-22 16:36:55 +01:00

80 lines
2.3 KiB
PHTML

<div id="title">
<h1 style="display: inline-block">Build #<?php print $build->getId(); ?></h1>
<h3 style="margin-left: 40px; display: inline-block">Branch: <?php print $build->getBranch(); ?> - <?php print $build->getCommitId() == 'Manual' ? 'Manual Build' : 'Commit: ' . $build->getCommitId(); ?></h3>
</div>
<div class="row">
<div class="span3">
<div class="well" style="padding: 8px 0">
<ul class="nav nav-list">
<li><a href="<?= PHPCI_URL ?>"><i class="icon-home"></i> Dashboard</a></li>
<li><a href="<?= PHPCI_URL ?>project/view/<?php print $build->getProject()->getId(); ?>"><i class="icon-folder-open"></i> <?php print $build->getProject()->getTitle(); ?></a></li>
<li class="divider"></li>
<li class="nav-header">Options</li>
<li><a href="<?= PHPCI_URL ?>build/rebuild/<?php print $build->getId(); ?>"><i class="icon-cog"></i> Rebuild</a></li>
<?php if($this->User()->getIsAdmin()): ?>
<li><a href="javascript:confirmDelete('<?= PHPCI_URL ?>build/delete/<?php print $build->getId(); ?>')"><i class="icon-trash"></i> Delete Build</a></li>
<?php endif; ?>
</ul>
</div>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th colspan="2">Plugin Status</th>
</tr>
</thead>
<tbody id="plugins">
</tbody>
</table>
</div>
<div class="span9">
<div id="status"></div>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th style="width: 33.3%">Build Created</th>
<th style="width: 33.3%">Build Started</th>
<th style="width: 33.3%">Build Finished</th>
</tr>
</thead>
<tbody>
<tr>
<td id="created"></td>
<td id="started"></td>
<td id="finished"></td>
</tr>
</tbody>
</table>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Build Log</th>
</tr>
</thead>
<tbody>
<tr>
<td><pre style="height: 300px; overflow-y: auto;" id="log"></pre></td>
</tr>
</tbody>
</table>
</div>
</div>
<script>
window.initial = <?php print $data; ?>;
<?php if($build->getStatus() == 0 || $build->getStatus() == 1 || true): ?>
setInterval(function()
{
$.getJSON('<?= PHPCI_URL ?>build/data/<?php print $build->getId(); ?>', updateBuildView);
}, 10000);
<?php endif; ?>
$(document).ready(function()
{
updateBuildView(window.initial);
});
</script>