2 * Copyright (c) 2017 ZTE Corporation.
\r
3 * All rights reserved. This program and the accompanying materials
\r
4 * are made available under the terms of the Eclipse Public License v1.0
\r
5 * and the Apache License 2.0 which both accompany this distribution,
\r
6 * and are available at http://www.eclipse.org/legal/epl-v10.html
\r
7 * and http://www.apache.org/licenses/LICENSE-2.0
\r
10 * ZTE - initial API and implementation and/or initial documentation
\r
13 import { Injectable } from '@angular/core';
\r
14 import { WorkflowService } from "./workflow.service";
\r
15 import { Microservice } from "../model/workflow/microservice";
\r
16 import { Observable } from "rxjs/Rx";
\r
17 import { HttpService } from "../util/http.service";
\r
20 * WorkflowConfigService
\r
21 * provides all of the operations about workflow configs.
\r
24 export class WorkflowConfigService {
\r
25 constructor(private httpService: HttpService, private workflowService: WorkflowService) {}
\r
27 public getMicroservices(): Microservice[] {
\r
28 return this.workflowService.workflow.configs.microservices;
\r
31 public loadDynamicInfo(url: string): Observable<any> {
\r
32 const options: any = {
\r
34 Accept: 'application/json',
\r
37 return this.httpService.get(url).map(response => response.data);
\r