Spaces:
Running
Running
Update flare-ui/src/app/components/apis/apis.component.ts
Browse files
flare-ui/src/app/components/apis/apis.component.ts
CHANGED
@@ -344,25 +344,21 @@ export class ApisComponent implements OnInit {
|
|
344 |
});
|
345 |
}
|
346 |
|
347 |
-
testAPI(api: API) {
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
this.snackBar.open('Failed to test API', 'Close', {
|
363 |
-
duration: 5000,
|
364 |
-
panelClass: 'error-snackbar'
|
365 |
-
});
|
366 |
}
|
367 |
});
|
368 |
}
|
|
|
344 |
});
|
345 |
}
|
346 |
|
347 |
+
async testAPI(api: API) {
|
348 |
+
const { default: ApiEditDialogComponent } = await import('../../dialogs/api-edit-dialog/api-edit-dialog.component');
|
349 |
+
|
350 |
+
const dialogRef = this.dialog.open(ApiEditDialogComponent, {
|
351 |
+
width: '800px',
|
352 |
+
data: {
|
353 |
+
mode: 'test', // Test modunda açıyoruz
|
354 |
+
api: { ...api },
|
355 |
+
activeTab: 3 // Test tab'ını aktif yap (0-based index)
|
356 |
+
}
|
357 |
+
});
|
358 |
+
|
359 |
+
dialogRef.afterClosed().subscribe((result: any) => {
|
360 |
+
if (result) {
|
361 |
+
this.loadAPIs();
|
|
|
|
|
|
|
|
|
362 |
}
|
363 |
});
|
364 |
}
|