46ac3f904e4908afbb01c184d2691337e92cdca7
[sdc/sdc-workflow-designer.git] /
1 /**
2  * Copyright (c) 2017 ZTE Corporation.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * and the Apache License 2.0 which both accompany this distribution,
6  * and are available at http://www.eclipse.org/legal/epl-v10.html
7  * and http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Contributors:
10  *     ZTE - initial API and implementation and/or initial documentation
11  */
12
13 import { AfterViewInit, Component, ViewChild } from '@angular/core';
14 import { ModalDirective } from 'ngx-bootstrap/modal';
15
16 import { RestService } from '../../../services/rest.service';
17 import { RestConfigListComponent } from './rest-config-list/rest-config-list.component';
18
19 /**
20  * toolbar component contains some basic operations(save) and all of the supported workflow nodes.
21  * The supported nodes can be dragged to container component. which will add a new node to the workflow.
22  */
23 @Component({
24     selector: 'wfm-rest-config',
25     templateUrl: 'rest-config.component.html',
26 })
27 export class RestConfigComponent {
28     @ViewChild('restConfigModal') public restConfigModal: ModalDirective;
29
30     public currentRestConfig: any = {};
31
32     constructor() {
33     }
34
35     public configSelected(restConfig: any) {
36         this.currentRestConfig = restConfig;
37     }
38
39     public show() {
40         this.restConfigModal.show();
41     }
42
43 }