diff options
author | Lvbo163 <lv.bo163@zte.com.cn> | 2018-01-11 10:22:16 +0800 |
---|---|---|
committer | Lvbo163 <lv.bo163@zte.com.cn> | 2018-01-11 10:22:16 +0800 |
commit | 008518dc35ded3bb6dc3e6352472b5816271f583 (patch) | |
tree | 773453bb816e2c1fd15d74f308eab32f6da7bfe0 /sdc-workflow-designer-ui/src | |
parent | ccaa7ff4383e127b9c61d1e511ec6741c42dd37a (diff) |
adjust folder
change fold menu to menus
Issue-ID: SDC-900
Change-Id: Ifce180badf4f468a3291b118bfd4f631483541ec
Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-ui/src')
-rw-r--r-- | sdc-workflow-designer-ui/src/app/app.component.css | 2 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/app.module.ts | 40 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/menus/menus.component.css (renamed from sdc-workflow-designer-ui/src/app/components/menu/menus.component.css) | 0 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/menus/menus.component.html (renamed from sdc-workflow-designer-ui/src/app/components/menu/menus.component.html) | 0 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/menus/menus.component.spec.ts (renamed from sdc-workflow-designer-ui/src/app/components/menu/menus.component.spec.ts) | 0 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/menus/menus.component.ts (renamed from sdc-workflow-designer-ui/src/app/components/menu/menus.component.ts) | 0 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-detail/microservice-detail.component.html (renamed from sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-detail/microservice-detail.component.html) | 0 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-detail/microservice-detail.component.ts (renamed from sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-detail/microservice-detail.component.ts) | 0 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-list/microservice-list.component.css (renamed from sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-list/microservice-list.component.css) | 0 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-list/microservice-list.component.html (renamed from sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-list/microservice-list.component.html) | 0 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-list/microservice-list.component.ts (renamed from sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-list/microservice-list.component.ts) | 0 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice.component.html (renamed from sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice.component.html) | 0 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice.component.ts (renamed from sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice.component.ts) | 0 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/menus/workflows/workflows.component.html (renamed from sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.html) | 0 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/components/menus/workflows/workflows.component.ts (renamed from sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.ts) | 0 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/directive/resizable/resizable.directive.ts (renamed from sdc-workflow-designer-ui/src/app/directive/resizeable/resizable.directive.ts) | 2 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/util/http.service.ts | 33 | ||||
-rw-r--r-- | sdc-workflow-designer-ui/src/app/util/rxjs-operators.ts | 1 |
18 files changed, 46 insertions, 32 deletions
diff --git a/sdc-workflow-designer-ui/src/app/app.component.css b/sdc-workflow-designer-ui/src/app/app.component.css index 95166937..5ad27fed 100644 --- a/sdc-workflow-designer-ui/src/app/app.component.css +++ b/sdc-workflow-designer-ui/src/app/app.component.css @@ -9,7 +9,7 @@ * Contributors:
* ZTE - initial API and implementation and/or initial documentation
*/
- .loading-div{
+.loading-div{
position: absolute;
top: 0;
width: 100%;
diff --git a/sdc-workflow-designer-ui/src/app/app.module.ts b/sdc-workflow-designer-ui/src/app/app.module.ts index 3d5aa778..9785a69e 100644 --- a/sdc-workflow-designer-ui/src/app/app.module.ts +++ b/sdc-workflow-designer-ui/src/app/app.module.ts @@ -33,10 +33,10 @@ import { BroadcastService } from "./services/broadcast.service"; import { PropertiesComponent } from "./components/property/properties.component"; import { StartEventParametersComponent } from "./components/property/start-event-parameters/start-event-parameters.component"; import { ParameterComponent } from "./components/parameter/parameter.component"; -import { MenusComponent } from "./components/menu/menus.component"; -import { MicroserviceDetailComponent } from "./components/menu/microservice/microservice-detail/microservice-detail.component"; -import { MicroserviceComponent } from "./components/menu/microservice/microservice.component"; -import { MicroserviceListComponent } from "./components/menu/microservice/microservice-list/microservice-list.component"; +import { MenusComponent } from "./components/menus/menus.component"; +import { MicroserviceDetailComponent } from "./components/menus/microservice/microservice-detail/microservice-detail.component"; +import { MicroserviceComponent } from "./components/menus/microservice/microservice.component"; +import { MicroserviceListComponent } from "./components/menus/microservice/microservice-list/microservice-list.component"; import { ModalModule } from "ngx-bootstrap/modal"; import { WorkflowConfigService } from "./services/workflow-config.service"; import { RestTaskComponent } from "./components/property/rest-task/rest-task.component"; @@ -45,11 +45,11 @@ import { SwaggerTreeConverterService } from "./services/swagger-tree-converter.s import { IntermediateCatchEventComponent } from "./components/property/intermediate-catch-event/intermediate-catch-event.component"; import { SequenceFlowComponent } from "./components/sequence-flow/sequence-flow.component"; import { ScriptTaskComponent } from "./components/property/script-task/script-task.component"; -import { WorkflowsComponent } from "./components/menu/workflows/workflows.component"; +import { WorkflowsComponent } from "./components/menus/workflows/workflows.component"; import { ModelService } from './services/model.service'; import { ContainerComponent } from './components/container/container.component'; import { RestService } from './services/rest.service'; -import { ResizableDirective } from './directive/resizeable/resizable.directive'; +import { ResizableDirective } from './directive/resizable/resizable.directive'; import { StartEventComponent } from './components/property/start-event/start-event.component'; import { NodeParametersComponent } from './components/node-parameters/node-parameters.component'; import { ParameterTreeComponent } from './components/node-parameters/parameter-tree/parameter-tree.component'; @@ -78,6 +78,18 @@ import { ParameterTreeComponent } from './components/node-parameters/parameter-t ToolbarComponent, WorkflowsComponent, ], + providers: [ + BroadcastService, + DataAccessService, + HttpService, + JsPlumbService, + ModelService, + RestService, + SwaggerTreeConverterService, + WorkflowConfigService, + + WorkflowService + ], imports: [ AccordionModule.forRoot(), BrowserAnimationsModule, @@ -97,17 +109,9 @@ import { ParameterTreeComponent } from './components/node-parameters/parameter-t allowParentSelection: false }) ], - providers: [ - BroadcastService, - DataAccessService, - HttpService, - JsPlumbService, - RestService, - SwaggerTreeConverterService, - WorkflowConfigService, - ModelService, - WorkflowService + bootstrap: [ + AppComponent, ], - bootstrap: [AppComponent] }) -export class AppModule { } +export class AppModule { +} diff --git a/sdc-workflow-designer-ui/src/app/components/menu/menus.component.css b/sdc-workflow-designer-ui/src/app/components/menus/menus.component.css index 6ba4133b..6ba4133b 100644 --- a/sdc-workflow-designer-ui/src/app/components/menu/menus.component.css +++ b/sdc-workflow-designer-ui/src/app/components/menus/menus.component.css diff --git a/sdc-workflow-designer-ui/src/app/components/menu/menus.component.html b/sdc-workflow-designer-ui/src/app/components/menus/menus.component.html index 7e043829..7e043829 100644 --- a/sdc-workflow-designer-ui/src/app/components/menu/menus.component.html +++ b/sdc-workflow-designer-ui/src/app/components/menus/menus.component.html diff --git a/sdc-workflow-designer-ui/src/app/components/menu/menus.component.spec.ts b/sdc-workflow-designer-ui/src/app/components/menus/menus.component.spec.ts index b80edce7..b80edce7 100644 --- a/sdc-workflow-designer-ui/src/app/components/menu/menus.component.spec.ts +++ b/sdc-workflow-designer-ui/src/app/components/menus/menus.component.spec.ts diff --git a/sdc-workflow-designer-ui/src/app/components/menu/menus.component.ts b/sdc-workflow-designer-ui/src/app/components/menus/menus.component.ts index e5f68ad1..e5f68ad1 100644 --- a/sdc-workflow-designer-ui/src/app/components/menu/menus.component.ts +++ b/sdc-workflow-designer-ui/src/app/components/menus/menus.component.ts diff --git a/sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-detail/microservice-detail.component.html b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-detail/microservice-detail.component.html index d13895dd..d13895dd 100644 --- a/sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-detail/microservice-detail.component.html +++ b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-detail/microservice-detail.component.html diff --git a/sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-detail/microservice-detail.component.ts b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-detail/microservice-detail.component.ts index bffaef42..bffaef42 100644 --- a/sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-detail/microservice-detail.component.ts +++ b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-detail/microservice-detail.component.ts diff --git a/sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-list/microservice-list.component.css b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-list/microservice-list.component.css index f403890e..f403890e 100644 --- a/sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-list/microservice-list.component.css +++ b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-list/microservice-list.component.css diff --git a/sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-list/microservice-list.component.html b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-list/microservice-list.component.html index ce4730f7..ce4730f7 100644 --- a/sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-list/microservice-list.component.html +++ b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-list/microservice-list.component.html diff --git a/sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-list/microservice-list.component.ts b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-list/microservice-list.component.ts index b44d423f..b44d423f 100644 --- a/sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice-list/microservice-list.component.ts +++ b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice-list/microservice-list.component.ts diff --git a/sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice.component.html b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice.component.html index e8483c22..e8483c22 100644 --- a/sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice.component.html +++ b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice.component.html diff --git a/sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice.component.ts b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice.component.ts index eeedac47..eeedac47 100644 --- a/sdc-workflow-designer-ui/src/app/components/menu/microservice/microservice.component.ts +++ b/sdc-workflow-designer-ui/src/app/components/menus/microservice/microservice.component.ts diff --git a/sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.html b/sdc-workflow-designer-ui/src/app/components/menus/workflows/workflows.component.html index 0f6c7ff2..0f6c7ff2 100644 --- a/sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.html +++ b/sdc-workflow-designer-ui/src/app/components/menus/workflows/workflows.component.html diff --git a/sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.ts b/sdc-workflow-designer-ui/src/app/components/menus/workflows/workflows.component.ts index bf884983..bf884983 100644 --- a/sdc-workflow-designer-ui/src/app/components/menu/workflows/workflows.component.ts +++ b/sdc-workflow-designer-ui/src/app/components/menus/workflows/workflows.component.ts diff --git a/sdc-workflow-designer-ui/src/app/directive/resizeable/resizable.directive.ts b/sdc-workflow-designer-ui/src/app/directive/resizable/resizable.directive.ts index f591fe6f..b285b595 100644 --- a/sdc-workflow-designer-ui/src/app/directive/resizeable/resizable.directive.ts +++ b/sdc-workflow-designer-ui/src/app/directive/resizable/resizable.directive.ts @@ -26,7 +26,7 @@ export class ResizableDirective implements AfterViewInit { public ngAfterViewInit() {
console.log('init resizble.');
-
+
$(this.el.nativeElement).resizable({
handles: 'all',
resize: (event, ui) => {
diff --git a/sdc-workflow-designer-ui/src/app/util/http.service.ts b/sdc-workflow-designer-ui/src/app/util/http.service.ts index 32669555..f754d38e 100644 --- a/sdc-workflow-designer-ui/src/app/util/http.service.ts +++ b/sdc-workflow-designer-ui/src/app/util/http.service.ts @@ -16,13 +16,13 @@ import './rxjs-operators'; @Injectable() export class HttpService { - constructor(private http: Http) {} + constructor(private http: Http) { } - public get(uri: string): Observable<any> { - return this.getHttp('get', uri); + public get(uri: string, options?: RequestOptionsArgs): Observable<any> { + return this.getHttp('get', uri, options); } - public post(uri: string, data: any): Observable<any> { + public post(uri: string, data: any, options?: RequestOptionsArgs): Observable<any> { return this.getHttp('post', uri, data); } @@ -37,22 +37,31 @@ export class HttpService { public getHttp(type: string, uri: string, data?: any, options?: RequestOptionsArgs): Observable<any> { if (data) { return this.http[type](uri, data, options) - .map(response => - response.json() - ) + .map(response => { + if (response.text() === '') { + return {}; + } + + return response.json(); + }) .catch(this.handleError); } else { return this.http[type](uri, options) - .map(response => - response.json() - ) + .map(response => response.json()) .catch(this.handleError); } } private handleError(error: any) { - const errMsg = (error.message) ? error.message : - error.status ? `${error.status}-${error.statusText}` : 'Server error'; + let errMsg = ''; + try { + errMsg = error.json().message; + if (!errMsg) { + errMsg = error.json().msg; + } + } catch (e) { + errMsg = error.status ? `${error.status}-${error.statusText}` : 'Server error'; + } return Observable.throw(errMsg); } } diff --git a/sdc-workflow-designer-ui/src/app/util/rxjs-operators.ts b/sdc-workflow-designer-ui/src/app/util/rxjs-operators.ts index 00fa50b8..1a8f11c0 100644 --- a/sdc-workflow-designer-ui/src/app/util/rxjs-operators.ts +++ b/sdc-workflow-designer-ui/src/app/util/rxjs-operators.ts @@ -9,6 +9,7 @@ * Contributors: * ZTE - initial API and implementation and/or initial documentation */ +import 'rxjs/add/observable/forkJoin'; import 'rxjs/add/observable/throw'; import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/debounceTime'; |