Refactor variable and function names for consistency
This commit is contained in:
@@ -174,7 +174,8 @@ class Form extends Component
|
|||||||
$this->server->settings->refresh();
|
$this->server->settings->refresh();
|
||||||
|
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
} finally {}
|
} finally {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function restartSentinel($notification = true)
|
public function restartSentinel($notification = true)
|
||||||
|
@@ -131,11 +131,11 @@ class Server extends BaseModel
|
|||||||
|
|
||||||
protected $guarded = [];
|
protected $guarded = [];
|
||||||
|
|
||||||
|
|
||||||
public function type()
|
public function type()
|
||||||
{
|
{
|
||||||
return 'server';
|
return 'server';
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function isReachable()
|
public static function isReachable()
|
||||||
{
|
{
|
||||||
return Server::ownedByCurrentTeam()->whereRelation('settings', 'is_reachable', true);
|
return Server::ownedByCurrentTeam()->whereRelation('settings', 'is_reachable', true);
|
||||||
@@ -575,7 +575,6 @@ $schema://$host {
|
|||||||
return $this->settings->is_sentinel_enabled;
|
return $this->settings->is_sentinel_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function checkSentinel()
|
public function checkSentinel()
|
||||||
{
|
{
|
||||||
// ray("Checking sentinel on server: {$this->name}");
|
// ray("Checking sentinel on server: {$this->name}");
|
||||||
@@ -1273,11 +1272,12 @@ $schema://$host {
|
|||||||
public function restartSentinel()
|
public function restartSentinel()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
StartSentinel::dispatch($this,true);
|
StartSentinel::dispatch($this, true);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
loggy('Error restarting Sentinel: '.$e->getMessage());
|
loggy('Error restarting Sentinel: '.$e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function url()
|
public function url()
|
||||||
{
|
{
|
||||||
return base_url().'/server/'.$this->uuid;
|
return base_url().'/server/'.$this->uuid;
|
||||||
|
@@ -3,9 +3,6 @@
|
|||||||
namespace App\Notifications\Server;
|
namespace App\Notifications\Server;
|
||||||
|
|
||||||
use App\Models\Server;
|
use App\Models\Server;
|
||||||
use App\Notifications\Channels\DiscordChannel;
|
|
||||||
use App\Notifications\Channels\EmailChannel;
|
|
||||||
use App\Notifications\Channels\TelegramChannel;
|
|
||||||
use App\Notifications\Dto\DiscordMessage;
|
use App\Notifications\Dto\DiscordMessage;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||||
|
@@ -651,7 +651,7 @@ function queryResourcesByUuid(string $uuid)
|
|||||||
|
|
||||||
return $resource;
|
return $resource;
|
||||||
}
|
}
|
||||||
function generatTagDeployWebhook($tag_name)
|
function generateTagDeployWebhook($tag_name)
|
||||||
{
|
{
|
||||||
$baseUrl = base_url();
|
$baseUrl = base_url();
|
||||||
$api = Url::fromString($baseUrl).'/api/v1';
|
$api = Url::fromString($baseUrl).'/api/v1';
|
||||||
|
@@ -143,21 +143,22 @@
|
|||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div class="md:w-96 pb-4">
|
<div class="md:w-96 pb-4">
|
||||||
<x-modal-confirmation title="Disable Two Step Confirmation?" buttonTitle="Disable Two Step Confirmation"
|
<x-modal-confirmation title="Disable Two Step Confirmation?"
|
||||||
isErrorButton submitAction="toggleTwoStepConfirmation" :actions="[
|
buttonTitle="Disable Two Step Confirmation" isErrorButton submitAction="toggleTwoStepConfirmation"
|
||||||
|
:actions="[
|
||||||
'Tow Step confimation will be disabled globally.',
|
'Tow Step confimation will be disabled globally.',
|
||||||
'Disabling two step confirmation reduces security (as anyone can easily delete anything).',
|
'Disabling two step confirmation reduces security (as anyone can easily delete anything).',
|
||||||
'The risk of accidental actions will increase.',
|
'The risk of accidental actions will increase.',
|
||||||
]"
|
]" confirmationText="DISABLE TWO STEP CONFIRMATION"
|
||||||
confirmationText="DISABLE TWO STEP CONFIRMATION"
|
|
||||||
confirmationLabel="Please type the confirmation text to disable two step confirmation."
|
confirmationLabel="Please type the confirmation text to disable two step confirmation."
|
||||||
shortConfirmationLabel="Confirmation text" step3ButtonText="Disable Two Step Confirmation" />
|
shortConfirmationLabel="Confirmation text" step3ButtonText="Disable Two Step Confirmation" />
|
||||||
</div>
|
</div>
|
||||||
@endif
|
|
||||||
<div class="p-4 mb-4 text-white border-l-4 border-red-500 bg-error md:w-[40rem] w-full mb-32">
|
<div class="p-4 mb-4 text-white border-l-4 border-red-500 bg-error md:w-[40rem] w-full mb-32">
|
||||||
<p class="font-bold">Warning!</p>
|
<p class="font-bold">Warning!</p>
|
||||||
<p>Disabling two step confirmation reduces security (as anyone can easily delete anything) and increases the
|
<p>Disabling two step confirmation reduces security (as anyone can easily delete anything) and increases
|
||||||
|
the
|
||||||
risk of accidental actions. This is not recommended for production servers.</p>
|
risk of accidental actions. This is not recommended for production servers.</p>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user