2013-05-10 13:28:43 +02:00
|
|
|
<div id="title">
|
2014-04-30 15:13:07 +02:00
|
|
|
<h1><i class="glyphicon glyphicon-home"></i> Dashboard</h1>
|
2013-05-10 13:28:43 +02:00
|
|
|
</div>
|
2014-04-30 15:13:07 +02:00
|
|
|
|
|
|
|
|
2013-05-03 17:02:53 +02:00
|
|
|
<div class="row">
|
2013-08-01 12:55:10 +02:00
|
|
|
<div class="col-lg-3">
|
2014-04-30 15:13:07 +02:00
|
|
|
<?php if (count($projects)): ?>
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h4 class="panel-title">Projects</h4>
|
|
|
|
</div>
|
|
|
|
<div class="list-group">
|
|
|
|
<?php foreach($projects as $project): ?>
|
|
|
|
<a class="list-group-item" href="<?php echo PHPCI_URL ?>project/view/<?php print $project->getId(); ?>"><?php print htmlspecialchars($project->getTitle()); ?></a>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-05-10 13:28:43 +02:00
|
|
|
|
2013-08-01 12:55:10 +02:00
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<div class="col-lg-9">
|
2014-04-30 15:13:07 +02:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading"><h3 class="panel-title">Project Overview</h3></div>
|
|
|
|
<table class="table table-striped table-bordered">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Health</th>
|
|
|
|
<th>Project</th>
|
|
|
|
<th>Last Success</th>
|
|
|
|
<th>Last Failure</th>
|
|
|
|
<th>Success/Failures</th>
|
|
|
|
<th style="width: 100px"></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="project-overview">
|
|
|
|
<?php print $summary; ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2013-10-08 08:21:46 +02:00
|
|
|
</div>
|
2013-05-22 18:15:02 +02:00
|
|
|
|
2014-04-30 15:13:07 +02:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">Last 5 Builds</h3>
|
|
|
|
</div>
|
|
|
|
|
2013-05-10 13:28:43 +02:00
|
|
|
<table class="table table-striped table-bordered">
|
|
|
|
<thead>
|
2013-05-03 17:02:53 +02:00
|
|
|
<tr>
|
2013-05-10 13:28:43 +02:00
|
|
|
<th>ID</th>
|
2013-05-03 17:02:53 +02:00
|
|
|
<th>Project</th>
|
|
|
|
<th>Commit</th>
|
|
|
|
<th>Branch</th>
|
|
|
|
<th>Status</th>
|
2014-04-30 15:13:07 +02:00
|
|
|
<th style="width: 100px"></th>
|
2013-05-03 17:02:53 +02:00
|
|
|
</tr>
|
2013-05-10 13:28:43 +02:00
|
|
|
</thead>
|
|
|
|
<tbody id="latest-builds">
|
2013-05-14 19:28:03 +02:00
|
|
|
<?php print $builds; ?>
|
2013-05-10 13:28:43 +02:00
|
|
|
</tbody>
|
2013-05-03 17:02:53 +02:00
|
|
|
</table>
|
2013-10-08 08:21:46 +02:00
|
|
|
</div>
|
2013-05-03 17:02:53 +02:00
|
|
|
</div>
|
2013-05-10 13:28:43 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
2014-04-30 16:24:55 +02:00
|
|
|
var refreshProjectData = function()
|
2013-11-27 15:09:14 +01:00
|
|
|
{
|
2014-07-30 15:32:38 +02:00
|
|
|
$.ajax({
|
|
|
|
url: '<?php echo PHPCI_URL ?>home/latest',
|
|
|
|
|
|
|
|
success: function (data) {
|
|
|
|
$('#latest-builds').html(data);
|
|
|
|
$('#latest-builds').trigger('latest-builds:reload');
|
|
|
|
},
|
|
|
|
|
|
|
|
error: handleFailedAjax
|
2013-12-31 01:15:34 +01:00
|
|
|
});
|
2014-04-30 16:24:55 +02:00
|
|
|
|
2014-07-30 15:32:38 +02:00
|
|
|
$.ajax({
|
|
|
|
url: '<?php echo PHPCI_URL ?>home/summary',
|
|
|
|
|
|
|
|
success: function (data) {
|
|
|
|
$('#project-overview').html(data);
|
|
|
|
$('#project-overview').trigger('project-overview:reload');
|
|
|
|
},
|
|
|
|
|
|
|
|
error: handleFailedAjax
|
2014-04-30 16:24:55 +02:00
|
|
|
});
|
2013-11-27 15:09:14 +01:00
|
|
|
};
|
|
|
|
|
2014-04-30 16:24:55 +02:00
|
|
|
setInterval(refreshProjectData, 10000);
|
2014-01-28 22:27:39 +01:00
|
|
|
</script>
|