-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a pending deployments and running deployments menu to the top n…
…avigation bar
- Loading branch information
1 parent
02af0e8
commit 8d307fe
Showing
8 changed files
with
140 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php namespace App\Http\Composers; | ||
|
||
use Illuminate\Contracts\View\View; | ||
use App\Repositories\Contracts\DeploymentRepositoryInterface; | ||
|
||
/** | ||
* View composer for the header bar | ||
*/ | ||
class HeaderComposer | ||
{ | ||
private $deploymentRepository; | ||
|
||
/** | ||
* Class constructor | ||
* | ||
* @param DeploymentRepositoryInterface $user | ||
*/ | ||
public function __construct(DeploymentRepositoryInterface $deploymentRepository) | ||
{ | ||
$this->deploymentRepository = $deploymentRepository; | ||
} | ||
|
||
/** | ||
* Generates the pending and deploying projects for the view | ||
* | ||
* @param \Illuminate\Contracts\View\View $view | ||
* @return void | ||
*/ | ||
public function compose(View $view) | ||
{ | ||
$pending = $this->deploymentRepository->getPending(); | ||
|
||
$view->with('pending', $pending); | ||
$view->with('pending_count', count($pending)); | ||
|
||
$deploying = $this->deploymentRepository->getRunning(); | ||
|
||
$view->with('deploying', $deploying); | ||
$view->with('deploying_count', count($deploying)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PHPCS: Whitespace found at end of line