fix: traefik dashboard ip
This commit is contained in:
parent
59eae3a44e
commit
2639bf92ad
@ -12,10 +12,17 @@ class Deploy extends Component
|
|||||||
public Server $server;
|
public Server $server;
|
||||||
public bool $traefikDashboardAvailable = false;
|
public bool $traefikDashboardAvailable = false;
|
||||||
public ?string $currentRoute = null;
|
public ?string $currentRoute = null;
|
||||||
|
public ?string $serverIp = null;
|
||||||
|
|
||||||
protected $listeners = ['proxyStatusUpdated', 'traefikDashboardAvailable', 'serverRefresh' => 'proxyStatusUpdated', "checkProxy", "startProxy"];
|
protected $listeners = ['proxyStatusUpdated', 'traefikDashboardAvailable', 'serverRefresh' => 'proxyStatusUpdated', "checkProxy", "startProxy"];
|
||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
|
if ($this->server->id === 0) {
|
||||||
|
$this->serverIp = base_ip();
|
||||||
|
} else {
|
||||||
|
$this->serverIp = $this->server->ip;
|
||||||
|
}
|
||||||
$this->currentRoute = request()->route()->getName();
|
$this->currentRoute = request()->route()->getName();
|
||||||
}
|
}
|
||||||
public function traefikDashboardAvailable(bool $data)
|
public function traefikDashboardAvailable(bool $data)
|
||||||
@ -26,7 +33,11 @@ class Deploy extends Component
|
|||||||
{
|
{
|
||||||
$this->server->refresh();
|
$this->server->refresh();
|
||||||
}
|
}
|
||||||
public function checkProxy() {
|
public function ip()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
public function checkProxy()
|
||||||
|
{
|
||||||
try {
|
try {
|
||||||
CheckProxy::run($this->server);
|
CheckProxy::run($this->server);
|
||||||
$this->emit('startProxyPolling');
|
$this->emit('startProxyPolling');
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div class="flex gap-4">
|
<div class="flex gap-4">
|
||||||
@if ($currentRoute === 'server.proxy' && $traefikDashboardAvailable)
|
@if ($currentRoute === 'server.proxy' && $traefikDashboardAvailable)
|
||||||
<button>
|
<button>
|
||||||
<a target="_blank" href="http://{{ $server->ip }}:8080">
|
<a target="_blank" href="http://{{ $serverIp }}:8080">
|
||||||
Traefik Dashboard
|
Traefik Dashboard
|
||||||
<x-external-link />
|
<x-external-link />
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user