File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
redisinsight/api/src/modules/workbench/models Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 1
1
import { ApiProperty , ApiPropertyOptional } from '@nestjs/swagger' ;
2
+ import { IsDefined } from 'class-validator' ;
2
3
import { CommandExecutionResult } from 'src/modules/workbench/models/command-execution-result' ;
3
4
import { ClusterNodeRole , RunQueryMode , ResultsMode } from 'src/modules/workbench/dto/create-command-execution.dto' ;
4
5
import { ClusterSingleNodeOptions } from 'src/modules/cli/dto/cli.dto' ;
5
6
import { Expose } from 'class-transformer' ;
6
7
7
- export type ResultsSummary = {
8
+ export class ResultsSummary {
9
+ @ApiProperty ( {
10
+ description : 'Total number of commands executed' ,
11
+ type : Number ,
12
+ } )
13
+ @IsDefined ( )
8
14
total : number ;
15
+
16
+ @ApiProperty ( {
17
+ description : 'Total number of successful commands executed' ,
18
+ type : Number ,
19
+ } )
20
+ @IsDefined ( )
9
21
success : number ;
22
+
23
+ @ApiProperty ( {
24
+ description : 'Total number of failed commands executed' ,
25
+ type : Number ,
26
+ } )
27
+ @IsDefined ( )
10
28
fail : number ;
11
29
}
12
30
@@ -57,7 +75,7 @@ export class CommandExecution {
57
75
58
76
@ApiPropertyOptional ( {
59
77
description : 'Workbench executions summary' ,
60
- // type: () => ResultsSummary,
78
+ type : ( ) => ResultsSummary ,
61
79
} )
62
80
@Expose ( )
63
81
summary ?: ResultsSummary ;
You can’t perform that action at this time.
0 commit comments