import { Component , Input , OnDestroy , Injector } from '@angular/core' ; import { ContainerConfigureData , ContinuousDeploymentOption } from '../../container-settings' ; import { ContainerSettingsManager } from '../../container-settings-manager' ; import { FormGroup } from '@angular/forms' ; import { FeatureComponent } from '../../../../shared/components/feature-component' ; import { Observable } from 'rxjs/Observable' ; @ Component ( { selector : 'container-continuous-delivery' , templateUrl : './container-continuos-delivery.component.html' , styleUrls : [ './../../container-settings.component.scss' , './../container-image-source.component.scss' , './container-continuos-delivery.component.scss' , ] , } ) export class ContainerContinuousDeliveryComponent extends FeatureComponent < ContainerConfigureData > implements OnDestroy { @ Input ( ) set containerConfigureInfoInput ( containerConfigureInfo ) { this . urlVisible = false ; this . setInput ( containerConfigureInfo ) ; } public containerConfigureInfo : ContainerConfigureData ; public selectedDeploymentOption : ContinuousDeploymentOption ; public form : FormGroup ; public urlVisible = false ; constructor ( public containerSettingsManager , injector ) { super ( 'ContainerContinuousDeliveryComponent' , injector , 'dashboard' ) ; this . featureName = 'ContainerSettings' ; } protected setup ( inputEvents ) { return inputEvents . distinctUntilChanged ( ) . do ( containerConfigureInfo => { this . containerConfigureInfo = containerConfigureInfo ; this . form = containerConfigureInfo . form ; } ) ; } public toggleUrl ( ) { this . urlVisible = ! this . urlVisible ; } }