File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
frontend/app/components/capture_profile/capture_profile_dialog Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 116116 />
117117 </ mat-form-field >
118118 </ div >
119+
120+ < div >
121+ Extra Options:
122+ < div *ngFor ="let option of extraOptions; let i = index ">
123+ < mat-form-field >
124+ < input matInput placeholder ="Key " [(ngModel)] ="option.key " />
125+ </ mat-form-field >
126+ < mat-form-field >
127+ < input matInput placeholder ="Value " [(ngModel)] ="option.value " />
128+ </ mat-form-field >
129+ < button mat-button (click) ="removeExtraOption(i) "> Remove</ button >
130+ </ div >
131+ < button mat-button (click) ="addExtraOption() "> Add Option</ button >
132+ </ div >
119133 </ mat-expansion-panel >
120134 </ div >
121135</ mat-dialog-content >
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export class CaptureProfileDialog {
2424 deviceTracerLevel = '1' ;
2525 pythonTracerLevel = '0' ;
2626 delay = 0 ;
27+ extraOptions : Array < { key : string , value : string } > = [ ] ;
2728
2829 constructor ( private readonly dialogRef :
2930 MatDialogRef < CaptureProfileDialog > ) { }
@@ -47,10 +48,19 @@ export class CaptureProfileDialog {
4748 deviceTracerLevel : Number ( this . deviceTracerLevel ) ,
4849 pythonTracerLevel : Number ( this . pythonTracerLevel ) ,
4950 delay : this . delay ,
51+ extraOptions : this . extraOptions ,
5052 } ) ;
5153 }
5254
5355 close ( ) {
5456 this . dialogRef . close ( ) ;
5557 }
58+
59+ addExtraOption ( ) {
60+ this . extraOptions . push ( { key : '' , value : '' } ) ;
61+ }
62+
63+ removeExtraOption ( index : number ) {
64+ this . extraOptions . splice ( index , 1 ) ;
65+ }
5666}
You can’t perform that action at this time.
0 commit comments