mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-08 09:22:34 +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:
@ -35,4 +35,29 @@ public function delete(User $user, Service $service): bool
|
||||
{
|
||||
return ($user->isAdmin() || $service->server->project->users->contains($user)) && $service->server->isReady();
|
||||
}
|
||||
|
||||
public function start(User $user, Service $service): bool
|
||||
{
|
||||
return $this->update($user, $service) && $service->unit;
|
||||
}
|
||||
|
||||
public function stop(User $user, Service $service): bool
|
||||
{
|
||||
return $this->update($user, $service) && $service->unit;
|
||||
}
|
||||
|
||||
public function restart(User $user, Service $service): bool
|
||||
{
|
||||
return $this->update($user, $service) && $service->unit;
|
||||
}
|
||||
|
||||
public function disable(User $user, Service $service): bool
|
||||
{
|
||||
return $this->update($user, $service) && $service->unit;
|
||||
}
|
||||
|
||||
public function enable(User $user, Service $service): bool
|
||||
{
|
||||
return $this->update($user, $service) && $service->unit;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user