File

ecosystem/packages/deploy-application/deploy-application.component.ts

Implements

OnInit

Metadata

Index

Properties
Methods

Constructor

constructor(ecosystemService: EcosystemService, applicationService: ApplicationService, wizardComponent: WizardComponent, translate: TranslateService)
Parameters :
Name Type Optional
ecosystemService EcosystemService No
applicationService ApplicationService No
wizardComponent WizardComponent No
translate TranslateService No

Methods

cancel
cancel()
Returns : void
Async deployApp
deployApp()
Returns : any
Async ngOnInit
ngOnInit()
Returns : any

Properties

applicationPropertiesForm
Type : ApplicationPropertiesFormComponent
Decorators :
@ViewChild(ApplicationPropertiesFormComponent)
Readonly cancelLabel
Default value : gettext('Cancel')
deployedWithSuccess
Type : boolean
Default value : false
Readonly descriptionTemplate
Type : string
Default value : gettext( 'Deploy application using "{{ packageName }}" package' )
Readonly doneLabel
Default value : gettext('Done')
headerText
Type : string
inProgress
Type : boolean
Default value : true
isDeployed
Type : boolean
Default value : false
newAppConfig
Type : IApplication
package
Type : IApplication
Readonly successMessageTemplate
Default value : gettext('Application "{{ packageName }}" created')
<c8y-wizard-header>
  <div class="modal-header dialog-header">
    <h1 c8yIcon="output"></h1>
    <h4>{{ 'Deploy application' | translate }}</h4>
  </div>
</c8y-wizard-header>

<c8y-wizard-body>
  <ng-container *ngIf="!isDeployed">
    <div class="fadeIn animated d-flex a-i-center j-c-center d-col" style="min-height: 309px">
      <p
        class="bg-white fit-w p-16 text-center text-medium sticky-top bg-white separator-bottom"
        *ngIf="!inProgress"
      >
        {{ headerText | translate }}
      </p>
      <c8y-application-properties-form
        *ngIf="!inProgress"
        [application]="newAppConfig"
        class="d-block fit-w bg-gray-white"
      ></c8y-application-properties-form>

      <c8y-progress-bar
        *ngIf="inProgress"
        [message]="'Deploying…' | translate"
        class="text-center"
      ></c8y-progress-bar>
    </div>
  </ng-container>

  <ng-container *ngIf="isDeployed">
    <div
      *ngIf="deployedWithSuccess; else failedDeploy"
      class="modal-body fadeIn animated"
      style="min-height: 309px"
    >
      <div class="d-flex a-i-center j-c-center d-col">
        <c8y-operation-result
          type="success"
          [size]="84"
          [vertical]="true"
          [text]="successMessageTemplate | translate: { packageName: package.name }"
          class="lead d-block m-b-16"
        ></c8y-operation-result>
      </div>
    </div>
    <ng-template #failedDeploy>
      <div class="modal-body fadeIn animated text-center" style="min-height: 257px">
        <c8y-operation-result
          type="error"
          [size]="84"
          [vertical]="true"
          text="{{ 'Application creation failed' | translate }}"
          class="lead"
        ></c8y-operation-result>
      </div>
    </ng-template>
  </ng-container>
</c8y-wizard-body>

<c8y-wizard-footer>
  <button
    (click)="cancel()"
    type="button"
    class="btn btn-default"
    title="{{ (isDeployed && deployedWithSuccess ? doneLabel : cancelLabel) | translate }}"
  >
    {{ (isDeployed && deployedWithSuccess ? doneLabel : cancelLabel) | translate }}
  </button>

  <button
    (click)="deployApp()"
    *ngIf="!isDeployed"
    [disabled]="inProgress"
    [ngClass]="{ 'btn-pending': inProgress }"
    class="btn btn-primary"
    type="button"
    title="{{ 'Deploy' | translate }}"
  >
    {{ 'Deploy' | translate }}
  </button>
</c8y-wizard-footer>

results matching ""

    No results matching ""