Spaces:
Running
Running
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
@@ -127,6 +127,71 @@
|
|
127 |
</div>
|
128 |
</mat-tab>
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
<!-- Response Tab -->
|
131 |
<mat-tab label="Response">
|
132 |
<div class="tab-content">
|
@@ -323,70 +388,6 @@
|
|
323 |
</div>
|
324 |
</mat-tab>
|
325 |
|
326 |
-
<!-- Auth Tab -->
|
327 |
-
<mat-tab label="Authentication">
|
328 |
-
<div class="tab-content" [formGroup]="$any(form.get('auth'))">
|
329 |
-
<mat-checkbox formControlName="enabled">
|
330 |
-
Enable Authentication
|
331 |
-
</mat-checkbox>
|
332 |
-
|
333 |
-
@if (form.get('auth.enabled')?.value) {
|
334 |
-
<mat-divider></mat-divider>
|
335 |
-
|
336 |
-
<div class="auth-section">
|
337 |
-
<h3>Token Configuration</h3>
|
338 |
-
|
339 |
-
<mat-form-field appearance="outline">
|
340 |
-
<mat-label>Token Endpoint</mat-label>
|
341 |
-
<input matInput formControlName="token_endpoint" placeholder="https://api.example.com/auth/token">
|
342 |
-
<mat-hint>URL to obtain authentication token</mat-hint>
|
343 |
-
@if (form.get('auth.token_endpoint')?.hasError('required') && form.get('auth.token_endpoint')?.touched) {
|
344 |
-
<mat-error>Token endpoint is required when auth is enabled</mat-error>
|
345 |
-
}
|
346 |
-
</mat-form-field>
|
347 |
-
|
348 |
-
<mat-form-field appearance="outline">
|
349 |
-
<mat-label>Token Response Path</mat-label>
|
350 |
-
<input matInput formControlName="response_token_path" placeholder="token">
|
351 |
-
<mat-hint>JSON path to extract token from response</mat-hint>
|
352 |
-
@if (form.get('auth.response_token_path')?.hasError('required') && form.get('auth.response_token_path')?.touched) {
|
353 |
-
<mat-error>Token path is required when auth is enabled</mat-error>
|
354 |
-
}
|
355 |
-
</mat-form-field>
|
356 |
-
|
357 |
-
<app-json-editor
|
358 |
-
formControlName="token_request_body"
|
359 |
-
label="Token Request Body"
|
360 |
-
placeholder='{"username": "api_user", "password": "api_pass"}'
|
361 |
-
hint="JSON body for token request"
|
362 |
-
[rows]="6"
|
363 |
-
[availableVariables]="getTemplateVariables()"
|
364 |
-
[variableReplacer]="replaceVariablesForValidation">
|
365 |
-
</app-json-editor>
|
366 |
-
|
367 |
-
<mat-divider></mat-divider>
|
368 |
-
|
369 |
-
<h3>Token Refresh (Optional)</h3>
|
370 |
-
|
371 |
-
<mat-form-field appearance="outline">
|
372 |
-
<mat-label>Refresh Endpoint</mat-label>
|
373 |
-
<input matInput formControlName="token_refresh_endpoint" placeholder="https://api.example.com/auth/refresh">
|
374 |
-
<mat-hint>URL to refresh expired token</mat-hint>
|
375 |
-
</mat-form-field>
|
376 |
-
|
377 |
-
<app-json-editor
|
378 |
-
formControlName="token_refresh_body"
|
379 |
-
label="Refresh Request Body"
|
380 |
-
placeholder='{"refresh_token": "your_refresh_token"}'
|
381 |
-
hint="JSON body for refresh request"
|
382 |
-
[rows]="4"
|
383 |
-
[availableVariables]="getTemplateVariables()"
|
384 |
-
[variableReplacer]="replaceVariablesForValidation">
|
385 |
-
</app-json-editor>
|
386 |
-
</div>
|
387 |
-
}
|
388 |
-
</div>
|
389 |
-
</mat-tab>
|
390 |
</mat-tab-group>
|
391 |
</mat-dialog-content>
|
392 |
|
|
|
127 |
</div>
|
128 |
</mat-tab>
|
129 |
|
130 |
+
<!-- Auth Tab -->
|
131 |
+
<mat-tab label="Authentication">
|
132 |
+
<div class="tab-content" [formGroup]="$any(form.get('auth'))">
|
133 |
+
<mat-checkbox formControlName="enabled">
|
134 |
+
Enable Authentication
|
135 |
+
</mat-checkbox>
|
136 |
+
|
137 |
+
@if (form.get('auth.enabled')?.value) {
|
138 |
+
<mat-divider></mat-divider>
|
139 |
+
|
140 |
+
<div class="auth-section">
|
141 |
+
<h3>Token Configuration</h3>
|
142 |
+
|
143 |
+
<mat-form-field appearance="outline">
|
144 |
+
<mat-label>Token Endpoint</mat-label>
|
145 |
+
<input matInput formControlName="token_endpoint" placeholder="https://api.example.com/auth/token">
|
146 |
+
<mat-hint>URL to obtain authentication token</mat-hint>
|
147 |
+
@if (form.get('auth.token_endpoint')?.hasError('required') && form.get('auth.token_endpoint')?.touched) {
|
148 |
+
<mat-error>Token endpoint is required when auth is enabled</mat-error>
|
149 |
+
}
|
150 |
+
</mat-form-field>
|
151 |
+
|
152 |
+
<mat-form-field appearance="outline">
|
153 |
+
<mat-label>Token Response Path</mat-label>
|
154 |
+
<input matInput formControlName="response_token_path" placeholder="token">
|
155 |
+
<mat-hint>JSON path to extract token from response</mat-hint>
|
156 |
+
@if (form.get('auth.response_token_path')?.hasError('required') && form.get('auth.response_token_path')?.touched) {
|
157 |
+
<mat-error>Token path is required when auth is enabled</mat-error>
|
158 |
+
}
|
159 |
+
</mat-form-field>
|
160 |
+
|
161 |
+
<app-json-editor
|
162 |
+
formControlName="token_request_body"
|
163 |
+
label="Token Request Body"
|
164 |
+
placeholder='{"username": "api_user", "password": "api_pass"}'
|
165 |
+
hint="JSON body for token request"
|
166 |
+
[rows]="6"
|
167 |
+
[availableVariables]="getTemplateVariables()"
|
168 |
+
[variableReplacer]="replaceVariablesForValidation">
|
169 |
+
</app-json-editor>
|
170 |
+
|
171 |
+
<mat-divider></mat-divider>
|
172 |
+
|
173 |
+
<h3>Token Refresh (Optional)</h3>
|
174 |
+
|
175 |
+
<mat-form-field appearance="outline">
|
176 |
+
<mat-label>Refresh Endpoint</mat-label>
|
177 |
+
<input matInput formControlName="token_refresh_endpoint" placeholder="https://api.example.com/auth/refresh">
|
178 |
+
<mat-hint>URL to refresh expired token</mat-hint>
|
179 |
+
</mat-form-field>
|
180 |
+
|
181 |
+
<app-json-editor
|
182 |
+
formControlName="token_refresh_body"
|
183 |
+
label="Refresh Request Body"
|
184 |
+
placeholder='{"refresh_token": "your_refresh_token"}'
|
185 |
+
hint="JSON body for refresh request"
|
186 |
+
[rows]="4"
|
187 |
+
[availableVariables]="getTemplateVariables()"
|
188 |
+
[variableReplacer]="replaceVariablesForValidation">
|
189 |
+
</app-json-editor>
|
190 |
+
</div>
|
191 |
+
}
|
192 |
+
</div>
|
193 |
+
</mat-tab>
|
194 |
+
|
195 |
<!-- Response Tab -->
|
196 |
<mat-tab label="Response">
|
197 |
<div class="tab-content">
|
|
|
388 |
</div>
|
389 |
</mat-tab>
|
390 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
</mat-tab-group>
|
392 |
</mat-dialog-content>
|
393 |
|