feat: add logs for each application

This commit is contained in:
Mauricio Siu
2024-09-08 23:11:39 -06:00
parent 6007427a6c
commit ea5349c844
14 changed files with 193 additions and 53 deletions
@@ -30,14 +30,20 @@ export const DockerLogs = dynamic(
interface Props {
appName: string;
serverId?: string;
appType: "stack" | "docker-compose";
}
export const ShowDockerLogsCompose = ({ appName, appType }: Props) => {
export const ShowDockerLogsCompose = ({
appName,
appType,
serverId,
}: Props) => {
const { data } = api.docker.getContainersByAppNameMatch.useQuery(
{
appName,
appType,
serverId,
},
{
enabled: !!appName,
@@ -81,6 +87,7 @@ export const ShowDockerLogsCompose = ({ appName, appType }: Props) => {
</SelectContent>
</Select>
<DockerLogs
serverId={serverId || ""}
id="terminal"
containerId={containerId || "select-a-container"}
/>
@@ -23,17 +23,20 @@ import { DockerMonitoring } from "../../monitoring/docker/show";
interface Props {
appName: string;
serverId?: string;
appType: "stack" | "docker-compose";
}
export const ShowMonitoringCompose = ({
appName,
appType = "stack",
serverId,
}: Props) => {
const { data } = api.docker.getContainersByAppNameMatch.useQuery(
{
appName: appName,
appType,
serverId,
},
{
enabled: !!appName,
@@ -108,6 +111,7 @@ export const ShowMonitoringCompose = ({
</Button>
</div>
<DockerMonitoring
serverId={serverId || ""}
appName={containerAppName || ""}
appType={appType}
/>