File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.runs.$runParam Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,13 @@ export class RunPresenter {
21
21
projectSlug,
22
22
organizationSlug,
23
23
runFriendlyId,
24
+ showDeletedLogs,
24
25
} : {
25
26
userId : string ;
26
27
projectSlug : string ;
27
28
organizationSlug : string ;
28
29
runFriendlyId : string ;
30
+ showDeletedLogs : boolean ;
29
31
} ) {
30
32
const run = await this . #prismaClient. taskRun . findFirstOrThrow ( {
31
33
select : {
@@ -148,7 +150,7 @@ export class RunPresenter {
148
150
status : run . status ,
149
151
isFinished : isFinalRunStatus ( run . status ) ,
150
152
completedAt : run . completedAt ,
151
- logsDeletedAt : run . logsDeletedAt ,
153
+ logsDeletedAt : showDeletedLogs ? false : run . logsDeletedAt ,
152
154
rootTaskRun : run . rootTaskRun ,
153
155
environment : {
154
156
id : run . runtimeEnvironment . id ,
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ import {
80
80
import { SpanView } from "../resources.orgs.$organizationSlug.projects.v3.$projectParam.runs.$runParam.spans.$spanParam/route" ;
81
81
import { useCurrentPlan } from "../_app.orgs.$organizationSlug/route" ;
82
82
import { getResizableSnapshot } from "~/services/resizablePanel.server" ;
83
+ import { getImpersonationId } from "~/services/impersonation.server" ;
83
84
84
85
const resizableSettings = {
85
86
parent : {
@@ -115,12 +116,14 @@ type TraceEvent = NonNullable<SerializeFrom<typeof loader>["trace"]>["events"][0
115
116
116
117
export const loader = async ( { request, params } : LoaderFunctionArgs ) => {
117
118
const userId = await requireUserId ( request ) ;
119
+ const impersonationId = await getImpersonationId ( request ) ;
118
120
const { projectParam, organizationSlug, runParam } = v3RunParamsSchema . parse ( params ) ;
119
121
120
122
const presenter = new RunPresenter ( ) ;
121
123
const result = await presenter . call ( {
122
124
userId,
123
125
organizationSlug,
126
+ showDeletedLogs : ! ! impersonationId ,
124
127
projectSlug : projectParam ,
125
128
runFriendlyId : runParam ,
126
129
} ) ;
You can’t perform that action at this time.
0 commit comments