mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
Feature/nodejs (#397)
* Add node support using nvm * Add icon * Rename to NodeJS * Rename to NodeJS * update php and node logo * only services which have units can be started,restarted,stopped,disabled and enabled * add tests --------- Co-authored-by: Saeed Vaziry <mr.saeedvaziry@gmail.com> Co-authored-by: Saeed Vaziry <61919774+saeedvaziry@users.noreply.github.com>
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
use App\Web\Pages\Servers\Firewall\Index as FirewallIndex;
|
||||
use App\Web\Pages\Servers\Logs\Index as LogsIndex;
|
||||
use App\Web\Pages\Servers\Metrics\Index as MetricsIndex;
|
||||
use App\Web\Pages\Servers\NodeJS\Index as NodeJsIndex;
|
||||
use App\Web\Pages\Servers\PHP\Index as PHPIndex;
|
||||
use App\Web\Pages\Servers\Services\Index as ServicesIndex;
|
||||
use App\Web\Pages\Servers\Settings as ServerSettings;
|
||||
@ -60,11 +61,18 @@ public function getSubNavigation(): array
|
||||
|
||||
if (auth()->user()->can('viewAny', [Service::class, $this->server])) {
|
||||
$items[] = NavigationItem::make(PHPIndex::getNavigationLabel())
|
||||
->icon('heroicon-o-code-bracket')
|
||||
->icon('icon-php-alt')
|
||||
->isActiveWhen(fn () => request()->routeIs(PHPIndex::getRouteName().'*'))
|
||||
->url(PHPIndex::getUrl(parameters: ['server' => $this->server]));
|
||||
}
|
||||
|
||||
if (auth()->user()->can('viewAny', [Service::class, $this->server])) {
|
||||
$items[] = NavigationItem::make(NodeJsIndex::getNavigationLabel())
|
||||
->icon('icon-nodejs-alt')
|
||||
->isActiveWhen(fn () => request()->routeIs(NodeJsIndex::getRouteName().'*'))
|
||||
->url(NodeJsIndex::getUrl(parameters: ['server' => $this->server]));
|
||||
}
|
||||
|
||||
if (auth()->user()->can('viewAny', [FirewallRule::class, $this->server])) {
|
||||
$items[] = NavigationItem::make(FirewallIndex::getNavigationLabel())
|
||||
->icon('heroicon-o-fire')
|
||||
|
Reference in New Issue
Block a user