ciyidogan commited on
Commit
c5cff03
·
verified ·
1 Parent(s): 70e75db

Update flare-ui/src/app/dialogs/api-edit-dialog/api-edit-dialog.component.html

Browse files
flare-ui/src/app/dialogs/api-edit-dialog/api-edit-dialog.component.html CHANGED
@@ -38,12 +38,21 @@
38
  <div class="form-section">
39
  <label class="section-label">Body Template:</label>
40
  <div class="json-editor">
41
- <textarea formControlName="body_template"
42
- placeholder='{"key": "value"}'
43
- rows="8"
44
- class="json-textarea"
45
- (click)="saveCursorPosition('body_template', $event)"
46
- (keyup)="saveCursorPosition('body_template', $event)"></textarea>
 
 
 
 
 
 
 
 
 
47
  <div class="template-helpers">
48
  <mat-expansion-panel>
49
  <mat-expansion-panel-header>
 
38
  <div class="form-section">
39
  <label class="section-label">Body Template:</label>
40
  <div class="json-editor">
41
+ <textarea formControlName="body_template"
42
+ placeholder='{"key": "value"}'
43
+ rows="8"
44
+ class="json-textarea"
45
+ (click)="saveCursorPosition('body_template', $event)"
46
+ (keyup)="saveCursorPosition('body_template', $event)"></textarea>
47
+
48
+ <button mat-button type="button"
49
+ (click)="validateJSON('body_template')"
50
+ [color]="validateJSON('body_template') ? 'primary' : 'warn'">
51
+ <mat-icon>check_circle</mat-icon>
52
+ Validate JSON
53
+ </button>
54
+ </div>
55
+
56
  <div class="template-helpers">
57
  <mat-expansion-panel>
58
  <mat-expansion-panel-header>