phpci/PHPCI/View/Build/view.phtml

83 lines
2.4 KiB
PHTML
Raw Normal View History

2013-05-10 13:28:43 +02:00
<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>
2013-05-10 13:28:43 +02:00
</div>
<div class="row">
<div class="col-lg-3">
<ul class="nav nav-pills nav-stacked">
<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>
</ul>
<h5>Options</h5>
<ul class="nav nav-pills nav-stacked">
<li><a href="<?= PHPCI_URL ?>build/rebuild/<?php print $build->getId(); ?>"><i class="icon-cog"></i> Rebuild</a></li>
2013-05-10 17:25:51 +02:00
<?php if($this->User()->getIsAdmin()): ?>
<li><a href="#" id="delete-build"><i class="icon-trash"></i> Delete Build</a></li>
2013-05-10 17:25:51 +02:00
<?php endif; ?>
2013-05-10 13:28:43 +02:00
</ul>
<table class="table table-striped table-bordered" style="margin-top: 20px">
<thead>
<tr>
<th colspan="2">Plugin Status</th>
</tr>
</thead>
<tbody id="plugins">
</tbody>
</table>
2013-05-10 13:28:43 +02:00
</div>
<div class="col-lg-9">
2013-05-10 13:28:43 +02:00
<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; ?>;
2013-05-10 13:28:43 +02:00
<?php if($build->getStatus() == 0 || $build->getStatus() == 1 || true): ?>
setInterval(function()
2013-05-10 13:28:43 +02:00
{
$.getJSON('<?= PHPCI_URL ?>build/data/<?php print $build->getId(); ?>', updateBuildView);
}, 10000);
<?php endif; ?>
2013-05-10 13:28:43 +02:00
$(function() {
2013-05-10 13:28:43 +02:00
updateBuildView(window.initial);
$('#delete-build').on('click', function (e) {
e.preventDefault();
confirmDelete("<?= PHPCI_URL ?>build/delete/<?php print $build->getId(); ?>");
});
2013-05-10 13:28:43 +02:00
});
</script>