summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/services/services-list/mdons-detail/mdons-detail.component.ts
blob: ee4c71df6264e4a637c03422ecb58b2808195a54 (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
43
44
45
46
47
48
49
50
import { Component, Input, Output, OnInit, EventEmitter } from '@angular/core';
import { ServiceListService } from '../../../../core/services/serviceList.service';

@Component({
  selector: 'app-mdons-detail',
  templateUrl: './mdons-detail.component.html',
  styleUrls: ['./mdons-detail.component.less']
})
export class MdonsDetailComponent implements OnInit {

  constructor(private myhttp: ServiceListService) { }

  @Input() detailParams;
  @Output() closeDetail = new EventEmitter();
  serviceInstanceName: any;
  serviceType: any;
  input_parameters: any;
  e2e_requestInputs: any;

  service = {
    name: "",
    description: "",
  };

  getKeys(item) {
    return Object.keys(item);
  }

  ngOnInit() {

    console.log(this.detailParams);
    this.serviceInstanceName = this.detailParams['serviceDomain'] || this.detailParams["nsName"];
    this.input_parameters = JSON.parse(this.detailParams['input-parameters']);
      console.log(this.input_parameters);
    this.service = {
      name: this.input_parameters.service.name,
        description: this.input_parameters.service.description,
    };   
    if (this.input_parameters.service.parameters.requestInputs != undefined && Object.keys(this.input_parameters.service.parameters.requestInputs).length > 0) {
      this.e2e_requestInputs = this.input_parameters.service.parameters.requestInputs;
    }
  }

  goback() {
    this.closeDetail.emit();
  }

  

}