import { Component , EventEmitter , Input , OnInit , Output } from '@angular/core' ; import { ImporterConfig , ImporterFile , ImportResponse } from '../import-object.models' ; import { Router } from '@angular/router' ; @ Component ( { selector : 'cmdb-import-complete' , templateUrl : './import-complete.component.html' , styleUrls : [ './import-complete.component.scss' ] } ) export class ImportCompleteComponent implements OnInit { @ Input ( ) public importFile : ImporterFile = { } as ImporterFile ; @ Input ( ) public importerConfig : ImporterConfig = { } as ImporterConfig ; @ Input ( ) public parserConfig : any = { } ; @ Input ( ) public parsedData : any = undefined ; @ Input ( ) public importResponse : ImportResponse ; @ Output ( ) startImportEmitter : EventEmitter < any > ; public constructor ( private router ) { this . startImportEmitter = new EventEmitter ( ) ; } public ngOnInit ( ) { this . importResponse = undefined ; } public onStartImport ( ) { this . startImportEmitter . emit ( null ) ; } public onListRedirect ( ) { this . router . navigate ( [ '/framework/object/type/' , this . importerConfig . type_id ] ) ; } }