Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions apps/front/modules/default/actions/fileListAction.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ public function execute($request)
false
);

$cntValid = 0;

$jenkinsEnabled = sfConfig::get('app_jenkins_enabled', false);
$this->jobResults = [];
if($jenkinsEnabled) {
Expand Down Expand Up @@ -147,8 +149,14 @@ public function execute($request)
'NbFileCommentsNotChecked' => $fileCommentsCountNotChecked + $lineCommentsCountNotChecked,
'LastCommentId' => $lastCommentId
));

if ($file->getStatus() == BranchPeer::OK) {
$cntValid ++;
}
}

$this->readyPercent = round($cntValid * 100 / count($this->files));

usort($this->files, array('self', 'sortPath'));
$this->statusActions = StatusActionPeer::getStatusActionsForBoard(null, $this->repository->getId(), $this->branch->getId());
$this->commentBoards = CommentPeer::getCommentsForBoard(null, $this->repository->getId(), $this->branch->getId());
Expand Down
3 changes: 3 additions & 0 deletions apps/front/modules/default/templates/fileListSuccess.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<label for="view_files_tree" >tree</label> <input type="checkbox" checked id="view_files_tree" name="view_files_tree">
</span>
<div class="right status">
<span>
<progress max="100" value="<?=$readyPercent?>" title="<?=$readyPercent?>%"></progress>
</span>
<?php include_partial('default/dropdownStatus', array('id' => $branch->getId(), 'status' => $branch->getStatus(), 'readonly' => $readonly, 'type' => 'branch')); ?>
</div>
</div>
Expand Down