Skip to content

Commit

Permalink
feat: deploy list by configbundle
Browse files Browse the repository at this point in the history
  • Loading branch information
robot9706 committed Nov 28, 2024
1 parent 20ff448 commit 8a28439
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web/crux/src/app/deploy/deploy.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ export class DeploymentQueryDto {
@ApiProperty({ enum: DEPLOYMENT_STATUS_VALUES })
@IsIn(DEPLOYMENT_STATUS_VALUES)
readonly status?: DeploymentStatusDto

@IsOptional()
@IsString()
@Type(() => String)
@ApiProperty()
readonly configBundleId?: string
}

export class BasicDeploymentDto {
Expand Down
11 changes: 11 additions & 0 deletions web/crux/src/app/deploy/deploy.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,17 @@ export default class DeployService {
status: query?.status ? this.mapper.statusDtoToDb(query.status) : undefined,
}

if (!!query.configBundleId) {
where = {
...where,
configBundles: {
some: {
configBundleId: query.configBundleId,
}
}
}
}

if (query.filter) {
const { filter: filterKeyword } = query
where = {
Expand Down

0 comments on commit 8a28439

Please sign in to comment.