diff options
author | Lvbo163 <lv.bo163@zte.com.cn> | 2017-09-17 14:54:05 +0800 |
---|---|---|
committer | Lvbo163 <lv.bo163@zte.com.cn> | 2017-09-17 14:54:05 +0800 |
commit | 3b9daa6af92637841b8a60a3f4ce0912b3dab240 (patch) | |
tree | 5f0369e5294d4dcf483a8a521229ad5c6b92b9f9 /sdc-workflow-designer-ui/src/app/services/data-access | |
parent | 091eb47f3daea6901cd4d3ca6357476caa4cf05b (diff) |
Add CRUD operation for workflows
Add CRUD and export operation for workflows.
Issue-ID: SDC-72
Change-Id: Ie2ef818a6979cc13b9e2dad7cea3b3121727146f
Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-ui/src/app/services/data-access')
-rw-r--r-- | sdc-workflow-designer-ui/src/app/services/data-access/catalog.service.ts | 1 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/services/data-access/sdc.service.ts | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sdc-workflow-designer-ui/src/app/services/data-access/catalog.service.ts b/sdc-workflow-designer-ui/src/app/services/data-access/catalog.service.ts index abd73558..d5d998fe 100644 --- a/sdc-workflow-designer-ui/src/app/services/data-access/catalog.service.ts +++ b/sdc-workflow-designer-ui/src/app/services/data-access/catalog.service.ts @@ -26,6 +26,7 @@ export abstract class CatalogService { constructor(protected httpService: HttpService) {}
public abstract loadWorkflow(workflowId: string): Observable<Workflow>;
+ public abstract loadWorkflows(): Observable<Workflow[]>;
public abstract saveWorkflow(workflow: Workflow): Observable<boolean>;
}
diff --git a/sdc-workflow-designer-ui/src/app/services/data-access/sdc.service.ts b/sdc-workflow-designer-ui/src/app/services/data-access/sdc.service.ts index 02ade955..81efbed9 100644 --- a/sdc-workflow-designer-ui/src/app/services/data-access/sdc.service.ts +++ b/sdc-workflow-designer-ui/src/app/services/data-access/sdc.service.ts @@ -28,10 +28,10 @@ export class SdcService extends CatalogService { super(httpService);
}
- public loadWorkflows(): Observable<WorkflowNode[]> {
+ public loadWorkflows(): Observable<Workflow[]> {
// TODO load data from sdc
const url = 'api/workflows';
- return this.httpService.get(url);
+ return this.httpService.get(url).map(response => response.data);
}
public loadWorkflow(workflowId: string): Observable<Workflow> {
|