-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IOT-1276: Implemented sorting for gateway table (#234)
- Loading branch information
1 parent
d7c140b
commit 783ec99
Showing
9 changed files
with
125 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
src/entities/dto/chirpstack/list-all-gateways-response.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { ChirpstackGatewayResponseDto, GatewayResponseDto } from "./gateway-response.dto"; | ||
|
||
export class ListAllGatewaysResponseDto { | ||
totalCount: number; | ||
resultList: GatewayResponseDto[]; | ||
} | ||
|
||
export class ListAllChirpstackGatewaysResponseDto { | ||
totalCount: number; | ||
resultList: ChirpstackGatewayResponseDto[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,26 @@ | ||
import { ChirpstackGatewayResponseDto, GatewayResponseDto } from "./gateway-response.dto"; | ||
import { ApiProperty, OmitType, PickType } from "@nestjs/swagger"; | ||
import { ChirpstackPaginatedListDto } from "./chirpstack-paginated-list.dto"; | ||
import { ListAllEntitiesDto } from "@dto/list-all-entities.dto"; | ||
import { IsSwaggerOptional } from "@helpers/optional-validator"; | ||
import { NullableStringToNumber, StringToNumber } from "@helpers/string-to-number-validator"; | ||
import { IsNumber, IsOptional } from "class-validator"; | ||
import { Transform } from "class-transformer"; | ||
import { DefaultLimit, DefaultOffset } from "@config/constants/pagination-constants"; | ||
|
||
export class ListAllGatewaysResponseDto { | ||
totalCount: number; | ||
resultList: GatewayResponseDto[]; | ||
} | ||
export class ListAllGatewaysDto extends OmitType(ListAllEntitiesDto, ["limit", "offset"]) { | ||
@IsSwaggerOptional({ description: "Filter to one organization" }) | ||
@StringToNumber() | ||
organizationId?: number; | ||
|
||
@ApiProperty({ type: Number, required: false }) | ||
@IsOptional() | ||
@IsNumber() | ||
@Transform(({ value }) => NullableStringToNumber(value)) | ||
limit? = DefaultLimit; | ||
|
||
export class ListAllChirpstackGatewaysResponseDto { | ||
totalCount: number; | ||
resultList: ChirpstackGatewayResponseDto[]; | ||
@ApiProperty({ type: Number, required: false }) | ||
@IsOptional() | ||
@IsNumber() | ||
@Transform(({ value }) => NullableStringToNumber(value)) | ||
offset? = DefaultOffset; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters