Compare commits

...

17 commits

Author SHA1 Message Date
Bozhidar
1b4c35819e Update RemoteBackupServerResource.php 2024-04-29 14:17:30 +03:00
Bozhidar
04330ef8b0 Add remote backup servers 2024-04-29 14:15:17 +03:00
Bozhidar
e2faa62f93 Update RemoteBackupServerResource.php 2024-04-29 13:48:05 +03:00
Bozhidar
d9168ba7f1 update 2024-04-29 13:44:02 +03:00
Bozhidar
1eb5ed038d fix backups 2024-04-29 13:30:01 +03:00
Bozhidar
64785c5ab6 Update phpunit-coverage.xml 2024-04-29 13:20:43 +03:00
Bozhidar
52738f5fc7 Update server.js 2024-04-29 13:10:18 +03:00
Bozhidar
5ecae71561 fix web terminal bugs 2024-04-29 13:08:05 +03:00
Bozhidar
8a3138659b update 2024-04-29 13:06:39 +03:00
Bozhidar
c75cf6f1eb Update Terminal.php 2024-04-29 12:53:18 +03:00
Bozhidar
4f75c8d511 update 2024-04-29 12:40:39 +03:00
Bozhidar
90f87fc12f Update Domain.php 2024-04-29 11:55:56 +03:00
Bozhidar
54ef686de6 update 2024-04-29 11:45:47 +03:00
Bozhidar
fc22ab52b2 update 2024-04-29 11:41:52 +03:00
Bozhidar
9e18e7a245 update 2024-04-29 11:32:35 +03:00
Bozhidar
99413b67d8 update 2024-04-29 11:26:37 +03:00
Bozhidar
2133e5cb54 Update ModulesManager.php 2024-04-29 11:04:33 +03:00
20 changed files with 561 additions and 25 deletions

View file

@ -30,8 +30,16 @@ class Terminal extends Page
shell_exec('mkdir -p ' . dirname($appTerminalConfigFile));
}
$serverIps = [];
$serverIps[] = $serverIp;
$masterDomain = setting('general.master_domain');
if (!empty($masterDomain)) {
$serverIps[] = $masterDomain;
}
file_put_contents($appTerminalConfigFile, json_encode([
'serverIp' => $serverIp,
'serverIps' => $serverIps,
], JSON_PRETTY_PRINT));
$appTerminalSessionsPath = storage_path('app/terminal/sessions');
@ -59,7 +67,13 @@ class Terminal extends Page
}
}
if ($runNewTerminal) {
// $exec = shell_exec('node /usr/local/phyre/web/Modules/Terminal/nodejs/terminal/server.js >> /usr/local/phyre/web/storage/logs/terminal/server-terminal.log &');
if (!is_dir('/usr/local/phyre/web/Modules/Terminal/nodejs/terminal/node_modules')) {
$exec = shell_exec('cd /usr/local/phyre/web/Modules/Terminal/nodejs/terminal && npm install');
}
if (!is_dir('/usr/local/phyre/web/storage/logs/terminal')) {
$exec = shell_exec('mkdir -p /usr/local/phyre/web/storage/logs/terminal/');
}
$exec = shell_exec('node /usr/local/phyre/web/Modules/Terminal/nodejs/terminal/server.js >> /usr/local/phyre/web/storage/logs/terminal/server-terminal.log &');
}
return [

View file

@ -10,7 +10,11 @@ const hostname = execSync('hostname', { silent: true }).toString().trim();
const systemIPs = [];
const terminalConfig = JSON.parse(readFileSync("/usr/local/phyre/web/storage/app/terminal/config.json").toString());
systemIPs.push(terminalConfig.serverIp);
if (terminalConfig.serverIps) {
for (const ip of terminalConfig.serverIps) {
systemIPs.push(ip);
}
}
const config = {
WEB_TERMINAL_PORT: 8449,

View file

@ -1,4 +1,4 @@
sudo apt-get install npm nodejs -y
sudo apt-get install net-tools npm nodejs -y
cd /usr/local/phyre/web/Modules/Terminal/nodejs/terminal
npm i

View file

@ -0,0 +1,38 @@
<?php
namespace App\Console\Commands;
use App\Models\Domain;
use Illuminate\Console\Command;
class RunDomainRepair extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'phyre:run-domain-repair';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Execute the console command.
*/
public function handle()
{
$getAllDomains = Domain::all();
if ($getAllDomains->count() > 0) {
foreach ($getAllDomains as $domain) {
$this->info('Repair domain: ' . $domain->domain);
$domain->configureVirtualHost(false);
}
shell_exec('service apache2 restart');
}
}
}

View file

@ -64,9 +64,13 @@ class RunHostingSubscriptionsBackup extends Command
->get();
if ($getPendingBackups->count() > 0) {
foreach ($getPendingBackups as $pendingBackup) {
$pendingBackup->startBackup();
$this->info('Backup started.. ');
if ($getPendingBackups->count() > 3) {
$this->info('There are more than 3 pending backups. Please wait for them to finish.');
} else {
foreach ($getPendingBackups as $pendingBackup) {
$pendingBackup->startBackup();
$this->info('Backup started.. ');
}
}
}

View file

@ -0,0 +1,110 @@
<?php
namespace App\Filament\Resources;
use App\Filament\Resources\RemoteBackupServerResource\Pages;
use App\Filament\Resources\RemoteBackupServerResource\RelationManagers;
use App\Models\RemoteBackupServer;
use Filament\Forms;
use Filament\Forms\Form;
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope;
class RemoteBackupServerResource extends Resource
{
protected static ?string $model = RemoteBackupServer::class;
protected static ?string $navigationIcon = 'phyre-backup-remote';
protected static ?string $navigationGroup = 'Server Clustering';
protected static ?string $navigationLabel = 'Backup Servers';
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make('name')
->label('Name')
->required(),
Forms\Components\Select::make('type')
->label('Type')
->options([
'ftp' => 'FTP',
'sftp' => 'SFTP',
])
->default('ftp')
->required(),
Forms\Components\TextInput::make('hostname')
->label('Hostname')
->required(),
Forms\Components\TextInput::make('port')
->label('Port')
->default('21')
->required(),
Forms\Components\TextInput::make('username')
->label('Username')
->required(),
Forms\Components\TextInput::make('password')
->label('Password')
->required(),
Forms\Components\TextInput::make('path')
->label('Path')
->default('/')
->required(),
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('name'),
Tables\Columns\TextColumn::make('type')->badge(),
Tables\Columns\TextColumn::make('hostname'),
Tables\Columns\TextColumn::make('status')
->badge()
->color(fn (string $state): string => match ($state) {
'online' => 'success',
'offline' => 'danger',
})
])
->filters([
//
])
->actions([
Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
]),
]);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => Pages\ListRemoteBackupServers::route('/'),
'create' => Pages\CreateRemoteBackupServer::route('/create'),
'edit' => Pages\EditRemoteBackupServer::route('/{record}/edit'),
];
}
}

View file

@ -0,0 +1,12 @@
<?php
namespace App\Filament\Resources\RemoteBackupServerResource\Pages;
use App\Filament\Resources\RemoteBackupServerResource;
use Filament\Actions;
use Filament\Resources\Pages\CreateRecord;
class CreateRemoteBackupServer extends CreateRecord
{
protected static string $resource = RemoteBackupServerResource::class;
}

View file

@ -0,0 +1,19 @@
<?php
namespace App\Filament\Resources\RemoteBackupServerResource\Pages;
use App\Filament\Resources\RemoteBackupServerResource;
use Filament\Actions;
use Filament\Resources\Pages\EditRecord;
class EditRemoteBackupServer extends EditRecord
{
protected static string $resource = RemoteBackupServerResource::class;
protected function getHeaderActions(): array
{
return [
Actions\DeleteAction::make(),
];
}
}

View file

@ -0,0 +1,19 @@
<?php
namespace App\Filament\Resources\RemoteBackupServerResource\Pages;
use App\Filament\Resources\RemoteBackupServerResource;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;
class ListRemoteBackupServers extends ListRecords
{
protected static string $resource = RemoteBackupServerResource::class;
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
];
}
}

View file

@ -0,0 +1,47 @@
<?php
namespace App\Livewire\Components;
use Exception;
use Filament\Actions\Action;
use Filament\Actions\ActionGroup;
use Filament\Actions\Concerns\InteractsWithActions;
use Filament\Actions\Contracts\HasActions;
use Filament\Actions\CreateAction;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
use Illuminate\Contracts\View\View;
use Illuminate\Support\Facades\App;
use InvalidArgumentException;
use Livewire\Component;
class QuickServiceRestartMenu extends Component implements HasForms, HasActions
{
use InteractsWithActions;
use InteractsWithForms;
public function restartApache()
{
shell_exec('sudo service apache2 restart');
}
public function restartSupervisor()
{
shell_exec('sudo service supervisor restart');
}
public function restartMysql()
{
shell_exec('sudo service mysql restart');
}
public function restartPhyreServices()
{
shell_exec('sudo service phyre restart');
}
public function render(): View
{
return view('filament.quick-service-restart-menu');
}
}

View file

@ -106,7 +106,7 @@ class Domain extends Model
return $this->belongsTo(HostingSubscription::class);
}
public function configureVirtualHost()
public function configureVirtualHost($reloadApache = true)
{
$findHostingSubscription = \App\Models\HostingSubscription::where('id', $this->hosting_subscription_id)
->first();
@ -298,9 +298,6 @@ class Domain extends Model
}
}
// Reload apache
shell_exec('systemctl reload apache2');
$catchMainDomain = '';
$domainExp = explode('.', $this->domain);
if (count($domainExp) > 0) {
@ -376,12 +373,15 @@ class Domain extends Model
file_put_contents('/etc/apache2/sites-available/'.$this->domain.'-ssl.conf', $apacheBaseConfigWithSSL);
shell_exec('ln -s /etc/apache2/sites-available/'.$this->domain.'-ssl.conf /etc/apache2/sites-enabled/'.$this->domain.'-ssl.conf');
// Reload apache
shell_exec('systemctl reload apache2');
}
}
// Reload apache
if ($reloadApache) {
shell_exec('systemctl reload apache2');
}
}
}

View file

@ -0,0 +1,77 @@
<?php
namespace App\Models;
use Doctrine\DBAL\DriverManager;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class RemoteBackupServer extends Model
{
use HasFactory;
protected $fillable = [
'name',
'type',
'hostname',
'port',
'username',
'password',
'path',
'ssh_private_key',
'ssh_private_key_password',
];
public static function boot()
{
parent::boot();
static::created(function ($model) {
$model->healthCheck();
});
static::updated(function ($model) {
$model->healthCheck();
});
}
public function healthCheck()
{
if ($this->type == 'ftp') {
try {
$username = trim($this->username);
$password = trim($this->password);
$hostname = trim($this->hostname);
$port = trim($this->port);
$path = trim($this->path);
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'ftp://'.$hostname.':'.$port.'/'.$path.'/');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_TIMEOUT, 30);
curl_setopt($curl, CURLOPT_USERPWD, $username.':'.$password);
$curlResponse = curl_exec($curl);
curl_close($curl);
if ($curlResponse) {
$this->status = 'online';
$this->save();
return;
} else {
$this->status = 'offline';
$this->save();
return;
}
} catch (\Exception $e) {
$this->status = 'offline';
$this->save();
return;
}
}
}
}

View file

@ -30,7 +30,7 @@ class ModulesManager
public static function getModuleInfo($module)
{
if (!is_dir(base_path('Modules/' . $module))) {
unset($modules[$key]);
return [];
}
$moduleJson = file_get_contents(base_path('Modules/' . $module . '/module.json'));
$moduleJson = json_decode($moduleJson, true);

View file

@ -10,6 +10,7 @@ use App\Listeners\ModelDomainCreatedListener;
use App\Listeners\ModelDomainDeletingListener;
use App\Listeners\ModelHostingSubscriptionCreatingListener;
use App\Listeners\ModelHostingSubscriptionDeletingListener;
use App\Livewire\Components\QuickServiceRestartMenu;
use App\Policies\CustomerPolicy;
use BladeUI\Icons\Factory;
use Filament\Facades\Filament;
@ -17,6 +18,7 @@ use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\ServiceProvider;
use Livewire\Livewire;
class AppServiceProvider extends ServiceProvider
{
@ -52,6 +54,8 @@ class AppServiceProvider extends ServiceProvider
Filament::registerViteTheme('resources/css/app.css');
});
Livewire::component('quick-service-restart-menu', QuickServiceRestartMenu::class);
Gate::define('delete-customer', [CustomerPolicy::class, 'delete']);
}

View file

@ -17,6 +17,7 @@ use Filament\Pages;
use Filament\Panel;
use Filament\PanelProvider;
use Filament\Support\Colors\Color;
use Filament\View\PanelsRenderHook;
use Filament\Widgets;
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
use Illuminate\Cookie\Middleware\EncryptCookies;
@ -24,6 +25,7 @@ use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
use Illuminate\Routing\Middleware\SubstituteBindings;
use Illuminate\Session\Middleware\AuthenticateSession;
use Illuminate\Session\Middleware\StartSession;
use Illuminate\Support\Facades\Blade;
use Illuminate\View\Middleware\ShareErrorsFromSession;
use Leandrocfe\FilamentApexCharts\FilamentApexChartsPlugin;
use Outerweb\FilamentSettings\Filament\Plugins\FilamentSettingsPlugin;
@ -39,6 +41,11 @@ class AdminPanelProvider extends PanelProvider
->id('admin')
->path('admin')
->login()
->renderHook(
name: PanelsRenderHook::TOPBAR_START,
hook: fn (): string => Blade::render('@livewire(\'quick-service-restart-menu\')')
)
// ->topNavigation()
->unsavedChangesAlerts()
->globalSearch(true)
->databaseNotifications()

View file

@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('remote_backup_servers', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable();
$table->string('type')->nullable();
$table->string('hostname')->nullable();
$table->string('port')->nullable();
$table->string('username')->nullable();
$table->string('password')->nullable();
$table->string('path')->nullable();
$table->longText('ssh_private_key')->nullable();
$table->string('ssh_private_key_password')->nullable();
$table->string('status')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('remote_backup_servers');
}
};

View file

@ -26,7 +26,10 @@
<source>
<include>
<directory>app</directory>
<directory>app/Filament</directory>
<directory>Modules</directory>
<directory>Modules/*/App/Filament</directory>
<directory>Modules/*/Filament</directory>
</include>
</source>

View file

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
<path fill="currentColor" d="M12 4.5a4.5 4.5 0 0 0-4.495 4.285a.75.75 0 0 1-.75.715H6.5a3 3 0 1 0 0 6h3.576a6.6 6.6 0 0 0-.057 1.5H6.5a4.5 4.5 0 0 1-.42-8.98a6.001 6.001 0 0 1 11.84 0a4.5 4.5 0 0 1 4.053 4.973a6.5 6.5 0 0 0-1.8-1.857A3 3 0 0 0 17.5 9.5h-.256a.75.75 0 0 1-.749-.715A4.5 4.5 0 0 0 12 4.5m10 12a5.5 5.5 0 1 1-11 0a5.5 5.5 0 0 1 11 0m-6 3a.5.5 0 0 0 1 0v-4.793l1.646 1.647a.5.5 0 0 0 .708-.708l-2.5-2.5a.5.5 0 0 0-.708 0l-2.5 2.5a.5.5 0 0 0 .708.708L16 14.707z" />
</svg>

After

Width:  |  Height:  |  Size: 575 B

View file

@ -0,0 +1,145 @@
<div class="quick-service-restart-menu">
<x-filament::dropdown placement="top-start" :teleport="true">
<x-slot name="trigger">
<button
class="
flex items-center justify-center gap-2 rounded-md p-2 outline-none transition duration-75 hover:bg-gray-50 focus-visible:bg-gray-50 dark:hover:bg-white/5 dark:focus-visible:bg-white/5 text-gray-400 hover:text-gray-500 focus-visible:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400 dark:focus-visible:text-gray-400
">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" viewBox="0 0 26 26">
<path fill="currentColor" d="M1.313 0L0 1.313l2.313 4l1.5-.22l9.156 9.157l-.781.75c-.4.4-.4 1.006 0 1.406l.406.407c.4.4 1.012.4 1.312 0L15.094 18c-.1.6 0 1.313.5 1.813L21 25.188c1.1 1.1 2.9 1.1 4 0c1.3-1.2 1.288-2.994.188-4.094l-5.375-5.407c-.5-.5-1.213-.7-1.813-.5L16.687 14c.3-.4.3-1.012 0-1.313l-.375-.374a.974.974 0 0 0-1.406 0l-.656.656l-9.156-9.156l.218-1.5l-4-2.313zm19.5.031C18.84-.133 16.224 1.175 15 2.312c-1.506 1.506-1.26 3.475-.063 5.376l-2.124 2.125l1.5 1.687c.8-.7 1.98-.7 2.78 0l.407.406l.094.094l.875-.875c1.808 1.063 3.69 1.216 5.125-.219c1.4-1.3 2.918-4.506 2.218-6.406L23 7.406c-.4.4-1.006.4-1.406 0L18.687 4.5a.974.974 0 0 1 0-1.406L21.595.188c-.25-.088-.5-.133-.782-.157m-11 12.469l-3.626 3.625A5.26 5.26 0 0 0 5 16c-2.8 0-5 2.2-5 5s2.2 5 5 5s5-2.2 5-5c0-.513-.081-1.006-.219-1.469l2.125-2.125l-.312-.406c-.8-.8-.794-2.012-.094-2.813L9.812 12.5zm7.75 4.563c.125 0 .243.024.343.125l5.907 5.906c.2.2.2.518 0 .718c-.2.2-.52.2-.72 0l-5.905-5.906c-.2-.2-.2-.518 0-.718c.1-.1.25-.125.375-.125M5.688 18.405l1.906 1.907l-.688 2.593l-2.593.688l-1.907-1.907l.688-2.593z"></path>
</svg>
</button>
</x-slot>
<x-filament::dropdown.list>
<x-filament::dropdown.list.item wire:key="restart-apache" wire:click="restartApache" tag="button">
<div class="flex items-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" class="w-6" viewBox="0 0 128 128">
<path fill="url(#deviconApache0)" d="M86.522.606c-2.007 1.185-5.348 4.54-9.318 9.407l3.652 6.903c2.57-3.666 5.177-6.977 7.807-9.8l.304-.325l-.304.326c-.852.933-3.437 3.955-7.333 9.94c3.755-.185 9.518-.956 14.222-1.756c1.407-7.844-1.37-11.429-1.37-11.429S90.654-1.83 86.521.606Z" />
<use href="#deviconApachea" />
<use href="#deviconApachea" opacity="0.35" />
<use href="#deviconApacheb" />
<use href="#deviconApacheb" opacity="0.35" />
<path fill="url(#deviconApache1)" d="M70.071 34.76a220 220 0 0 1 3.37-6.081a172 172 0 0 1 3.585-5.97c.067-.112.148-.23.215-.341a145 145 0 0 1 3.607-5.444l-3.651-6.904a71 71 0 0 0-.83 1.03a157 157 0 0 0-3.274 4.23a201 201 0 0 0-3.889 5.392a233 233 0 0 0-3.703 5.48a215 215 0 0 0-3.163 4.978q-.056.091-.11.193l4.762 9.407a214 214 0 0 1 3.081-5.97" />
<path fill="url(#deviconApache2)" d="M48.383 87.735a421 421 0 0 0-1.896 5.296c-.008.022-.015.052-.03.074c-.089.252-.185.511-.266.763c-.43 1.215-.8 2.311-1.652 4.793c1.4.637 2.526 2.325 3.592 4.236a7.62 7.62 0 0 0-2.489-5.273c6.911.31 12.867-1.437 15.948-6.489c.274-.452.526-.919.755-1.43c-1.4 1.778-3.14 2.526-6.407 2.348c-.007 0-.014.008-.022.008c.008 0 .015-.008.022-.008c4.815-2.155 7.222-4.222 9.363-7.644c.504-.814 1-1.696 1.504-2.681c-4.208 4.318-9.074 5.548-14.207 4.615l-3.852.422c-.126.326-.237.644-.363.97" />
<path fill="url(#deviconApache3)" d="M50.183 79.12c.83-2.147 1.689-4.325 2.563-6.517a442 442 0 0 1 2.593-6.341a748 748 0 0 1 2.71-6.392q1.403-3.255 2.882-6.489a353 353 0 0 1 2.948-6.34c.355-.756.726-1.511 1.089-2.26c.63-1.296 1.266-2.585 1.91-3.859c.038-.066.067-.14.104-.207l-4.762-9.407a7 7 0 0 1-.237.378a220 220 0 0 0-3.296 5.555a208 208 0 0 0-3.223 5.837a248 248 0 0 0-2.6 5.044c-.17.34-.333.689-.503 1.03a144 144 0 0 0-2.822 6.185a116 116 0 0 0-2.54 6.429c-.49 1.34-.927 2.63-1.334 3.874c-.333 1.059-.645 2.126-.956 3.185a99 99 0 0 0-1.83 7.451l4.786 9.444c.63-1.688 1.281-3.407 1.948-5.14c.2-.496.378-.985.57-1.46" />
<path fill="url(#deviconApache4)" d="M42.828 76.595c-.6 3.022-1.03 6.03-1.245 9.022l-.022.31c-1.496-2.392-5.488-4.725-5.481-4.703c2.867 4.148 5.037 8.267 5.355 12.31c-1.533.312-3.63-.14-6.051-1.029c2.526 2.326 4.422 2.963 5.17 3.14c-2.326.149-4.74 1.742-7.178 3.579c3.563-1.452 6.445-2.03 8.504-1.563c-3.274 9.258-6.548 19.48-9.83 30.339c1.008-.296 1.608-.978 1.941-1.889c.585-1.963 4.46-14.866 10.54-31.806c.178-.481.349-.97.526-1.452q.07-.21.149-.4c.637-1.777 1.31-3.592 1.992-5.444c.156-.422.311-.844.474-1.266c0-.008.008-.015.008-.023l-4.793-9.444a7 7 0 0 1-.06.319Z" />
<path fill="url(#deviconApache5)" d="M67.723 41.5c-.14.282-.274.563-.415.845c-.414.851-.83 1.718-1.259 2.607c-.46.963-.918 1.94-1.385 2.948q-.356.756-.711 1.533a415 415 0 0 0-2.163 4.8a389 389 0 0 0-2.748 6.326c-.881 2.088-1.793 4.244-2.696 6.48c-.867 2.12-1.74 4.312-2.63 6.563a412 412 0 0 0-2.392 6.208c-.037.096-.074.207-.111.303c-.8 2.111-1.608 4.282-2.415 6.504c-.015.051-.037.096-.052.155l3.852-.422c-.074-.015-.156-.022-.23-.037c4.6-.57 10.726-4.015 14.674-8.259c1.822-1.955 3.474-4.266 5-6.97q1.698-3.01 3.229-6.71a98 98 0 0 0 2.563-7.023c-1.06.556-2.267.97-3.6 1.252c-.237.052-.474.096-.718.14q-.366.067-.741.112s.007 0 .007-.007c4.296-1.652 7-4.837 8.963-8.74c-1.126.77-2.963 1.777-5.163 2.258a17 17 0 0 1-1.14.208h.014c1.496-.622 2.748-1.326 3.837-2.148c.237-.178.467-.356.674-.548c.333-.29.645-.593.956-.904c.192-.207.377-.415.563-.63q.645-.764 1.2-1.651c.11-.186.23-.363.333-.556c.148-.274.281-.548.415-.807a44 44 0 0 0 1.459-3.222c.192-.474.355-.904.503-1.319c.06-.163.111-.318.163-.474c.156-.452.274-.852.37-1.207c.149-.534.238-.956.282-1.26c-.148.112-.31.23-.504.341c-1.296.778-3.518 1.474-5.31 1.808l3.533-.386l-3.533.386c-.023.007-.052.007-.082.014c-.185.03-.355.06-.54.082l.088-.045l-12.095 1.326a.4.4 0 0 1-.045.126" />
<path fill="url(#deviconApache6)" d="M81.337 17.057a182 182 0 0 0-3.518 5.651a248 248 0 0 0-3.674 6.4a281 281 0 0 0-3.289 6.155a332 332 0 0 0-3.074 6.111l12.096-1.326c3.526-1.622 5.096-3.081 6.622-5.207c.4-.585.815-1.192 1.215-1.83a75 75 0 0 0 3.548-6.2c1.051-2.05 1.977-4.08 2.688-5.917a31 31 0 0 0 1.067-3.2c.222-.837.393-1.637.526-2.4c-4.689.807-10.459 1.578-14.207 1.763" />
<use href="#deviconApachec" />
<use href="#deviconApachec" opacity="0.35" />
<path fill="url(#deviconApache7)" d="M73.516 58.729q-.366.066-.741.111c.252-.022.503-.067.74-.111Z" />
<use href="#deviconApached" />
<use href="#deviconApached" opacity="0.35" />
<path fill="url(#deviconApache8)" d="M75.449 52.566c.074-.007.155-.022.23-.037c-.075.008-.149.03-.23.037" />
<use href="#deviconApachee" />
<use href="#deviconApachee" opacity="0.35" />
<path fill="url(#deviconApache9)" d="M75.449 52.566c.007 0 .007-.007 0 0c.007-.007.007 0 0 0" />
<defs>
<linearGradient id="deviconApache0" x1="80.277" x2="107.078" y1="10.871" y2="3.42" gradientUnits="userSpaceOnUse">
<stop stop-color="#f59723" />
<stop offset=".312" stop-color="#f69822" />
<stop offset=".838" stop-color="#e87726" />
</linearGradient>
<linearGradient id="deviconApache1" x1="21.611" x2="76.124" y1="131.156" y2="14.252" gradientUnits="userSpaceOnUse">
<stop offset=".323" stop-color="#9c2063" />
<stop offset=".63" stop-color="#c82037" />
<stop offset=".751" stop-color="#cc2135" />
<stop offset="1" stop-color="#e87726" />
</linearGradient>
<linearGradient id="deviconApache2" x1="39.903" x2="72.387" y1="122.505" y2="52.841" gradientUnits="userSpaceOnUse">
<stop stop-color="#282661" />
<stop offset=".095" stop-color="#662e8c" />
<stop offset=".788" stop-color="#9e2064" />
<stop offset=".949" stop-color="#cc2032" />
</linearGradient>
<linearGradient id="deviconApache3" x1="23.576" x2="78.089" y1="124.078" y2="7.174" gradientUnits="userSpaceOnUse">
<stop offset=".323" stop-color="#9c2063" />
<stop offset=".63" stop-color="#c82037" />
<stop offset=".751" stop-color="#cc2135" />
<stop offset="1" stop-color="#e87726" />
</linearGradient>
<linearGradient id="deviconApache4" x1="29.138" x2="57.786" y1="116.292" y2="54.855" gradientUnits="userSpaceOnUse">
<stop stop-color="#282661" />
<stop offset=".095" stop-color="#662e8c" />
<stop offset=".788" stop-color="#9e2064" />
<stop offset=".949" stop-color="#cc2032" />
</linearGradient>
<linearGradient id="deviconApache5" x1="35.68" x2="90.192" y1="129.722" y2="12.818" gradientUnits="userSpaceOnUse">
<stop offset=".323" stop-color="#9c2063" />
<stop offset=".63" stop-color="#c82037" />
<stop offset=".751" stop-color="#cc2135" />
<stop offset="1" stop-color="#e87726" />
</linearGradient>
<linearGradient id="deviconApache6" x1="31.692" x2="86.205" y1="136.692" y2="19.788" gradientUnits="userSpaceOnUse">
<stop offset=".323" stop-color="#9c2063" />
<stop offset=".63" stop-color="#c82037" />
<stop offset=".751" stop-color="#cc2135" />
<stop offset="1" stop-color="#e87726" />
</linearGradient>
<linearGradient id="deviconApache7" x1="39.272" x2="93.784" y1="131.397" y2="14.493" gradientUnits="userSpaceOnUse">
<stop offset=".323" stop-color="#9c2063" />
<stop offset=".63" stop-color="#c82037" />
<stop offset=".751" stop-color="#cc2135" />
<stop offset="1" stop-color="#e87726" />
</linearGradient>
<linearGradient id="deviconApache8" x1="38.865" x2="93.378" y1="131.208" y2="14.303" gradientUnits="userSpaceOnUse">
<stop offset=".323" stop-color="#9c2063" />
<stop offset=".63" stop-color="#c82037" />
<stop offset=".751" stop-color="#cc2135" />
<stop offset="1" stop-color="#e87726" />
</linearGradient>
<linearGradient id="deviconApache9" x1="69.406" x2="81.455" y1="65.493" y2="39.654" gradientUnits="userSpaceOnUse">
<stop offset=".323" stop-color="#9c2063" />
<stop offset=".63" stop-color="#c82037" />
<stop offset=".751" stop-color="#cc2135" />
<stop offset="1" stop-color="#e87726" />
</linearGradient>
<path id="deviconApachea" fill="#bd202e" d="M74.234 58.596c-.467.081-.94.17-1.437.252c0 0-.007 0-.007.007l.74-.111c.23-.052.467-.096.704-.148" />
<path id="deviconApacheb" fill="#bd202e" d="M75.456 52.559s0 .007 0 0q-.009-.002-.007.007c.074-.007.155-.022.23-.037c.31-.044.614-.096.91-.17c-.37.067-.74.133-1.133.2" />
<path id="deviconApachec" fill="#bd202e" d="M73.516 58.729q-.366.066-.741.111c.252-.022.503-.067.74-.111Z" />
<path id="deviconApached" fill="#bd202e" d="M75.449 52.566c.074-.007.155-.022.23-.037c-.075.008-.149.03-.23.037" />
<path id="deviconApachee" fill="#bd202e" d="M75.449 52.566c.007 0 .007-.007 0 0c.007-.007.007 0 0 0" />
</defs>
</svg>
Restart Apache
</div>
</x-filament::dropdown.list.item>
<x-filament::dropdown.list.item wire:key="restart-mysql" wire:click="restartMysql" tag="button">
<div class="flex items-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" class="w-6" viewBox="0 0 128 128">
<path fill="#00618a" d="M117.688 98.242c-6.973-.191-12.297.461-16.852 2.379c-1.293.547-3.355.559-3.566 2.18c.711.746.82 1.859 1.387 2.777c1.086 1.754 2.922 4.113 4.559 5.352c1.789 1.348 3.633 2.793 5.551 3.961c3.414 2.082 7.223 3.27 10.504 5.352c1.938 1.23 3.859 2.777 5.75 4.164c.934.684 1.563 1.75 2.773 2.18v-.195c-.637-.812-.801-1.93-1.387-2.777l-2.578-2.578c-2.52-3.344-5.719-6.281-9.117-8.719c-2.711-1.949-8.781-4.578-9.91-7.73l-.199-.199c1.922-.219 4.172-.914 5.949-1.391c2.98-.797 5.645-.59 8.719-1.387l4.164-1.187v-.793c-1.555-1.594-2.664-3.707-4.359-5.152c-4.441-3.781-9.285-7.555-14.273-10.703c-2.766-1.746-6.184-2.883-9.117-4.363c-.988-.496-2.719-.758-3.371-1.586c-1.539-1.961-2.379-4.449-3.566-6.738c-2.488-4.793-4.93-10.023-7.137-15.066c-1.504-3.437-2.484-6.828-4.359-9.91c-9-14.797-18.687-23.73-33.695-32.508c-3.195-1.867-7.039-2.605-11.102-3.57l-6.543-.395c-1.332-.555-2.715-2.184-3.965-2.977C16.977 3.52 4.223-3.312.539 5.672C-1.785 11.34 4.016 16.871 6.09 19.746c1.457 2.012 3.32 4.273 4.359 6.539c.688 1.492.805 2.984 1.391 4.559c1.438 3.883 2.695 8.109 4.559 11.695c.941 1.816 1.98 3.727 3.172 5.352c.727.996 1.98 1.438 2.18 2.973c-1.227 1.715-1.297 4.375-1.984 6.543c-3.098 9.77-1.926 21.91 2.578 29.137c1.383 2.223 4.641 6.98 9.117 5.156c3.918-1.598 3.043-6.539 4.164-10.902c.254-.988.098-1.715.594-2.379v.199l3.57 7.133c2.641 4.254 7.324 8.699 11.297 11.699c2.059 1.555 3.68 4.242 6.344 5.152v-.199h-.199c-.516-.805-1.324-1.137-1.98-1.781c-1.551-1.523-3.277-3.414-4.559-5.156c-3.613-4.902-6.805-10.27-9.711-15.855c-1.391-2.668-2.598-5.609-3.77-8.324c-.453-1.047-.445-2.633-1.387-3.172c-1.281 1.988-3.172 3.598-4.164 5.945c-1.582 3.754-1.789 8.336-2.375 13.082c-.348.125-.195.039-.398.199c-2.762-.668-3.73-3.508-4.758-5.949c-2.594-6.164-3.078-16.09-.793-23.191c.59-1.836 3.262-7.617 2.18-9.316c-.516-1.691-2.219-2.672-3.172-3.965c-1.18-1.598-2.355-3.703-3.172-5.551c-2.125-4.805-3.113-10.203-5.352-15.062c-1.07-2.324-2.875-4.676-4.359-6.738c-1.645-2.289-3.484-3.977-4.758-6.742c-.453-.984-1.066-2.559-.398-3.566c.215-.684.516-.969 1.191-1.191c1.148-.887 4.352.297 5.547.793c3.18 1.32 5.832 2.578 8.527 4.363c1.289.855 2.598 2.512 4.16 2.973h1.785c2.789.641 5.914.195 8.523.988c4.609 1.402 8.738 3.582 12.488 5.949c11.422 7.215 20.766 17.48 27.156 29.734c1.027 1.973 1.473 3.852 2.379 5.945c1.824 4.219 4.125 8.559 5.941 12.688c1.816 4.113 3.582 8.27 6.148 11.695c1.348 1.801 6.551 2.766 8.918 3.766c1.66.699 4.379 1.43 5.949 2.379c3 1.809 5.906 3.965 8.723 5.945c1.402.992 5.73 3.168 5.945 4.957zm-88.605-75.52c-1.453-.027-2.48.156-3.566.395v.199h.195c.695 1.422 1.918 2.34 2.777 3.566l1.98 4.164l.199-.195c1.227-.867 1.789-2.25 1.781-4.363c-.492-.52-.562-1.164-.992-1.785c-.562-.824-1.66-1.289-2.375-1.98zm0 0" />
</svg>
Restart MySQL
</div>
</x-filament::dropdown.list.item>
<x-filament::dropdown.list.item wire:key="restart-supervisor" wire:click="restartSupervisor" tag="button">
<div class="flex items-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" class="text-primary-500 w-6" viewBox="0 0 512 512">
<path fill="currentColor" d="M150.25 19.97c-114.48-.574-139.972 184.95 20.563 212.124c-29.5.534-55.382 8.11-91.75 25.97C-19.2 306.313.665 462.966 100.874 446c34.48-5.838 51.21-50.325.875-65.375c16.515 29.61-27.968 47.1-41.906 1.938c-11.262-36.49 21.145-74.914 52.468-85c30.5-9.82 55.244-10.86 82.47-5.844c-36.585 34.247-56.547 80.465-42.376 123.624c44.522 135.595 192.146 82.52 162.844-6.72c-10.346-31.506-41.408-46.505-68-10.155c35.164-8.854 50.45 38.75 18.188 49.342c-26.355 8.655-60.212-13.527-66.032-41.343c-7.82-37.39 19.77-77.195 54.78-95.25c22.176 35.37 38.812 48.68 83.22 72.186c85.843 45.436 212.957-36.54 143.906-110.53c-22.626-24.244-54.574-30.02-67.5 13.124c30.188-20.09 60.748 26.8 33.875 47.563c-21.95 16.96-61.503 19.135-86.437 5.5c-30.797-16.842-53.79-37.798-70.188-66.532c57.07 13.69 119.584-1.065 143-45.342c45.72-86.45-7.046-152.467-59.125-153.375c-20.378-.356-40.654 9.237-54.875 31.5c-17.85 27.946-9.815 61.533 35.157 59.124c-29.11-21.628-1.9-63.623 26.717-45.343c23.378 14.932 22.494 51.88 9.75 77.28c-15.165 30.23-60.573 50.738-95.062 24.657c-3.008-5.71-5.563-11.683-7.78-17.843c8.99-6.49 14.874-17.028 14.874-28.875c0-17.772-13.252-32.64-30.345-35.218c-9.763-47.134-23.34-92.648-84.844-112.594c-13.64-4.424-26.437-6.472-38.28-6.53zm117.844 137.405c9.463 0 16.937 7.474 16.937 16.938s-7.473 16.937-16.936 16.937s-16.906-7.474-16.906-16.938s7.443-16.937 16.906-16.937zm-65.406 10.5c9.463 0 16.937 7.474 16.937 16.938s-7.474 16.937-16.938 16.937s-16.937-7.474-16.937-16.938s7.474-16.937 16.938-16.937" />
</svg>
Restart Supervisor
</div>
</x-filament::dropdown.list.item>
<x-filament::dropdown.list.item wire:key="restart-phyre-services" wire:click="restartPhyreServices" tag="button">
<div class="flex items-center gap-2">
<svg xmlns="http://www.w3.org/2000/svg" class="text-primary-500 w-6" viewBox="0 0 24 24">
<g fill="none">
<path d="M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z" />
<path fill="currentColor" d="m11.514 2.142l-1.26-.755l-.24 1.449C9.632 5.124 8.069 7.25 6.345 8.744C2.97 11.67 2.231 14.85 3.276 17.475c1 2.512 3.538 4.232 6.114 4.519l.596.066c-1.474-.901-2.42-3.006-2.09-4.579c.326-1.546 1.438-2.994 3.574-4.33l1.077-.672l.402 1.205c.237.712.647 1.284 1.064 1.865c.2.28.403.563.589.864c.643 1.045.813 2.207.398 3.36c-.378 1.048-1.001 1.872-1.86 2.329l.97-.108c2.418-.269 4.193-1.096 5.346-2.479C20.599 18.144 21 16.379 21 14.5c0-1.75-.719-3.554-1.567-5.055c-.994-1.758-2.291-3.218-3.707-4.633c-.245.49-.226.688-.73 1.475a8.146 8.146 0 0 0-3.482-4.145" />
</g>
</svg>
Restart Phyre Services
</div>
</x-filament::dropdown.list.item>
</x-filament::dropdown.list>
</x-filament::dropdown>
<x-filament-actions::modals />
</div>

View file

@ -28,14 +28,3 @@ if (!file_exists(storage_path('installed'))) {
}
Route::get('/installer', \App\Livewire\Installer::class);
Route::get('vurti', function () {
$findDomain = \App\Models\Domain::where('id', 41)->first();
$findDomain->configureVirtualHost();
dd(3);
});