Skip to content

Commit

Permalink
web: classify cmdimage logs as build logs (#6418)
Browse files Browse the repository at this point in the history
fixes #6415

Signed-off-by: Nick Santos <nick.santos@docker.com>
  • Loading branch information
nicks authored Jul 30, 2024
1 parent a80ab61 commit c0e12e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions web/src/OverviewLogPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import LogStore, {
LogUpdateEvent,
useLogStore,
} from "./LogStore"
import { isBuildSpanId } from "./logs"
import PathBuilder, { usePathBuilder } from "./PathBuilder"
import { RafContext, useRaf } from "./raf"
import { useStarredResources } from "./StarredResourcesContext"
Expand Down Expand Up @@ -449,13 +450,10 @@ export class OverviewLogComponent extends Component<OverviewLogComponentProps> {
}

let source = this.props.filterSet.source
if (
source === FilterSource.runtime &&
line.spanId.indexOf("build:") === 0
) {
if (source === FilterSource.runtime && isBuildSpanId(line.spanId)) {
return false
}
if (source === FilterSource.build && line.spanId.indexOf("build:") !== 0) {
if (source === FilterSource.build && !isBuildSpanId(line.spanId)) {
return false
}

Expand Down
2 changes: 1 addition & 1 deletion web/src/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ export function sourcePrefix(n: string) {
}

export function isBuildSpanId(spanId: string): boolean {
return spanId.indexOf("build:") !== -1
return spanId.indexOf("build:") === 0 || spanId.indexOf("cmdimage:") === 0
}

0 comments on commit c0e12e3

Please sign in to comment.