diff --git a/app/Http/Livewire/Project/Shared/GetLogs.php b/app/Http/Livewire/Project/Shared/GetLogs.php
new file mode 100644
index 000000000..aba2e2649
--- /dev/null
+++ b/app/Http/Livewire/Project/Shared/GetLogs.php
@@ -0,0 +1,40 @@
+outputs .= $output;
+ }
+ public function instantSave()
+ {
+ }
+ public function getLogs($refresh = false)
+ {
+ if ($this->container) {
+ $sshCommand = generateSshCommand($this->server, "docker logs -t {$this->container}");
+ if ($refresh) {
+ $this->outputs = '';
+ }
+ Process::run($sshCommand, function (string $type, string $output) {
+ $this->doSomethingWithThisChunkOfOutput($output);
+ });
+ }
+ }
+ public function render()
+ {
+ return view('livewire.project.shared.get-logs');
+ }
+}
diff --git a/app/Http/Livewire/Project/Shared/Logs.php b/app/Http/Livewire/Project/Shared/Logs.php
new file mode 100644
index 000000000..69848a7c5
--- /dev/null
+++ b/app/Http/Livewire/Project/Shared/Logs.php
@@ -0,0 +1,53 @@
+parameters = get_route_parameters();
+ $this->query = request()->query();
+ if (data_get($this->parameters, 'application_uuid')) {
+ $this->type = 'application';
+ $this->resource = Application::where('uuid', $this->parameters['application_uuid'])->firstOrFail();
+ $this->status = $this->resource->status;
+ $this->server = $this->resource->destination->server;
+ $containers = getCurrentApplicationContainerStatus($this->server, $this->resource->id);
+ if ($containers->count() > 0) {
+ $this->container = data_get($containers[0], 'Names');
+ }
+ } else if (data_get($this->parameters, 'database_uuid')) {
+ $this->type = 'database';
+ $this->resource = StandalonePostgresql::where('uuid', $this->parameters['database_uuid'])->firstOrFail();
+ $this->status = $this->resource->status;
+ $this->server = $this->resource->destination->server;
+ $this->container = $this->resource->uuid;
+ } else if (data_get($this->parameters, 'service_uuid')) {
+ $this->type = 'service';
+ $this->resource = Service::where('uuid', $this->parameters['service_uuid'])->firstOrFail();
+ $this->status = $this->resource->status;
+ $this->server = $this->resource->server;
+ $this->container = data_get($this->parameters, 'service_name') . '-' . $this->resource->uuid;
+ }
+ }
+
+ public function render()
+ {
+ return view('livewire.project.shared.logs');
+ }
+}
diff --git a/resources/views/components/applications/navbar.blade.php b/resources/views/components/applications/navbar.blade.php
index 00a390826..b84b0bf13 100644
--- a/resources/views/components/applications/navbar.blade.php
+++ b/resources/views/components/applications/navbar.blade.php
@@ -7,6 +7,10 @@
href="{{ route('project.application.deployments', $parameters) }}">
+
+
+