mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-10-15 13:21:11 +00:00
fix: correct log-tail server resolution, drop unrelated Networks gating
- Log tail for failed-deployment classification now checks the app's
current buildServer before falling back to its server, matching the
buildServerId-then-serverId precedence used everywhere else in the
codebase (application.ts, drop.ts, directory.ts, patch-repo.ts).
- Removes a stale !isCloud gate on the Networks tab that this branch
had reintroduced from before Mauricio removed it in daba2d7fb
(Networks is intentionally shown in cloud now) — unrelated to this
PR's scope, docker.tsx's Networks tab/content now matches canary.
This commit is contained in:
@@ -26,7 +26,6 @@ const DEFAULT_SWARM_TAB = "overview";
|
||||
|
||||
const Dashboard = () => {
|
||||
const router = useRouter();
|
||||
const { data: isCloud } = api.settings.isCloud.useQuery();
|
||||
const { data: permissions } = api.user.getPermissions.useQuery();
|
||||
// Host-level diagnostics, so this needs server.read on top of docker.read.
|
||||
const canSeeHealth = !!permissions?.docker.read && !!permissions?.server.read;
|
||||
@@ -34,10 +33,7 @@ const Dashboard = () => {
|
||||
const queryTab =
|
||||
typeof router.query.tab === "string" ? router.query.tab : DEFAULT_TAB;
|
||||
const activeTab =
|
||||
(isCloud && queryTab === "networks") ||
|
||||
(queryTab === "health" && !canSeeHealth)
|
||||
? DEFAULT_TAB
|
||||
: queryTab;
|
||||
queryTab === "health" && !canSeeHealth ? DEFAULT_TAB : queryTab;
|
||||
|
||||
const activeSwarmTab =
|
||||
typeof router.query.subtab === "string"
|
||||
@@ -78,7 +74,7 @@ const Dashboard = () => {
|
||||
<TabsTrigger value="swarm">Swarm</TabsTrigger>
|
||||
<TabsTrigger value="images">Images</TabsTrigger>
|
||||
<TabsTrigger value="volumes">Volumes</TabsTrigger>
|
||||
{!isCloud && <TabsTrigger value="networks">Networks</TabsTrigger>}
|
||||
<TabsTrigger value="networks">Networks</TabsTrigger>
|
||||
<TabsTrigger value="events">Events</TabsTrigger>
|
||||
<TabsTrigger value="disk-usage">Disk Usage</TabsTrigger>
|
||||
{canSeeHealth && <TabsTrigger value="health">Health</TabsTrigger>}
|
||||
@@ -114,11 +110,9 @@ const Dashboard = () => {
|
||||
<TabsContent value="volumes">
|
||||
<ShowVolumes serverId={serverId} />
|
||||
</TabsContent>
|
||||
{!isCloud && (
|
||||
<TabsContent value="networks">
|
||||
<ShowNetworks serverId={serverId} />
|
||||
</TabsContent>
|
||||
)}
|
||||
<TabsContent value="networks">
|
||||
<ShowNetworks serverId={serverId} />
|
||||
</TabsContent>
|
||||
<TabsContent value="events">
|
||||
<ShowDockerEvents serverId={serverId} />
|
||||
</TabsContent>
|
||||
|
||||
@@ -1096,8 +1096,10 @@ export const findFailedDeploymentsCentralized = async (
|
||||
failed,
|
||||
LOG_TAIL_CONCURRENCY,
|
||||
async (deployment) => {
|
||||
// Same buildServerId-then-serverId precedence used app-wide (application.ts, drop.ts, etc.)
|
||||
const serverId =
|
||||
deployment.buildServer?.serverId ||
|
||||
deployment.application?.buildServer?.serverId ||
|
||||
deployment.server?.serverId ||
|
||||
deployment.application?.server?.serverId ||
|
||||
deployment.compose?.server?.serverId ||
|
||||
|
||||
Reference in New Issue
Block a user