refactor: show logs to each application and database

This commit is contained in:
Mauricio Siu
2024-09-09 00:14:08 -06:00
parent ea5349c844
commit cf06162be7
6 changed files with 66 additions and 46 deletions

View File

@@ -34,12 +34,14 @@ const Terminal = dynamic(
interface Props {
appName: string;
children?: React.ReactNode;
serverId?: string;
}
export const DockerTerminalModal = ({ children, appName }: Props) => {
export const DockerTerminalModal = ({ children, appName, serverId }: Props) => {
const { data } = api.docker.getContainersByAppNameMatch.useQuery(
{
appName,
serverId,
},
{
enabled: !!appName,
@@ -82,6 +84,7 @@ export const DockerTerminalModal = ({ children, appName }: Props) => {
</SelectContent>
</Select>
<Terminal
serverId={serverId || ""}
id="terminal"
containerId={containerId || "select-a-container"}
/>