summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services/services-list/delete-model/delete-model.component.ts
blob: f9bf9a9c96f26244b25c2666060d941f106b0bbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';

@Component({
  selector: 'app-delete-model',
  templateUrl: './delete-model.component.html',
  styleUrls: ['./delete-model.component.less']
})
export class DeleteModelComponent implements OnInit {
  @Input()deleteModalVisible: boolean;
  @Input()thisService;
  @Input()terminationType;
  @Input()loadingAnimateShow;
  @Input()templateDeleteSuccessFaild;
  @Input()gracefulTerminationTimeout;

  @Output() cancel = new EventEmitter<boolean>();
  @Output() deleteModalOK = new EventEmitter<any>();

  constructor() { }

  ngOnInit() {
  }

    deleteOk() {
        this.deleteModalVisible = false;
        this.loadingAnimateShow = true;

        if (this.thisService["serviceDomain"] === "Network Service") {
            this.deleteModalOK.emit({
                terminationType: this.terminationType,
                gracefulTerminationTimeout: this.gracefulTerminationTimeout
            })
        } else {
            this.deleteModalOK.emit()
        }
    }
    deleteCancel() {
        this.deleteModalVisible = false;
    }


}