Spaces:
Building
Building
Update flare-ui/src/app/components/apis/apis.component.ts
Browse files
flare-ui/src/app/components/apis/apis.component.ts
CHANGED
@@ -619,15 +619,6 @@ export class ApisComponent implements OnInit, OnDestroy {
|
|
619 |
if (imported > 0) {
|
620 |
this.loadAPIs();
|
621 |
}
|
622 |
-
|
623 |
-
// Always show dialog for import results
|
624 |
-
try {
|
625 |
-
await this.showImportResultsDialog(imported, failed, errors, 'API');
|
626 |
-
} catch (dialogError) {
|
627 |
-
console.error('Failed to show import dialog:', dialogError);
|
628 |
-
// Fallback to snackbar
|
629 |
-
this.showImportResultsSnackbar(imported, failed, errors);
|
630 |
-
}
|
631 |
|
632 |
// Build detailed message
|
633 |
let message = '';
|
@@ -645,19 +636,15 @@ export class ApisComponent implements OnInit, OnDestroy {
|
|
645 |
});
|
646 |
}
|
647 |
|
648 |
-
//
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
//
|
654 |
-
this.
|
655 |
-
|
656 |
-
|
657 |
-
verticalPosition: 'top',
|
658 |
-
horizontalPosition: 'right'
|
659 |
-
});
|
660 |
-
}
|
661 |
} catch (error) {
|
662 |
this.loading = false;
|
663 |
this.snackBar.open('Failed to read file', 'Close', {
|
@@ -670,7 +657,7 @@ export class ApisComponent implements OnInit, OnDestroy {
|
|
670 |
input.click();
|
671 |
}
|
672 |
|
673 |
-
private async
|
674 |
try {
|
675 |
const { default: ImportResultsDialogComponent } = await import('../../dialogs/import-results-dialog/import-results-dialog.component');
|
676 |
|
|
|
619 |
if (imported > 0) {
|
620 |
this.loadAPIs();
|
621 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
622 |
|
623 |
// Build detailed message
|
624 |
let message = '';
|
|
|
636 |
});
|
637 |
}
|
638 |
|
639 |
+
// Always show dialog for import results
|
640 |
+
try {
|
641 |
+
await this.showImportResultsDialog(imported, failed, errors, 'API');
|
642 |
+
} catch (dialogError) {
|
643 |
+
console.error('Failed to show import dialog:', dialogError);
|
644 |
+
// Fallback to snackbar
|
645 |
+
this.showImportResultsSnackbar(imported, failed, errors);
|
646 |
+
}
|
647 |
+
|
|
|
|
|
|
|
|
|
648 |
} catch (error) {
|
649 |
this.loading = false;
|
650 |
this.snackBar.open('Failed to read file', 'Close', {
|
|
|
657 |
input.click();
|
658 |
}
|
659 |
|
660 |
+
private async showImportResultsDialog(imported: number, failed: number, errors: string[]) {
|
661 |
try {
|
662 |
const { default: ImportResultsDialogComponent } = await import('../../dialogs/import-results-dialog/import-results-dialog.component');
|
663 |
|