diff --git a/ui-ngx/src/app/modules/home/components/widget/action/custom-sample-html.raw b/ui-ngx/src/app/modules/home/components/widget/action/custom-sample-html.raw index 11cda7cdbc..468d31d189 100644 --- a/ui-ngx/src/app/modules/home/components/widget/action/custom-sample-html.raw +++ b/ui-ngx/src/app/modules/home/components/widget/action/custom-sample-html.raw @@ -62,14 +62,14 @@ - + - + @@ -184,7 +184,6 @@ - @@ -270,14 +269,14 @@ - + - + @@ -345,7 +344,6 @@ - diff --git a/ui-ngx/src/app/modules/home/components/widget/action/custom-sample-js.raw b/ui-ngx/src/app/modules/home/components/widget/action/custom-sample-js.raw index 83986b4812..96dc54d998 100644 --- a/ui-ngx/src/app/modules/home/components/widget/action/custom-sample-js.raw +++ b/ui-ngx/src/app/modules/home/components/widget/action/custom-sample-js.raw @@ -186,28 +186,27 @@ // } // // function getEntityInfo() { -// entityService.getEntity(entityId.entityType, entityId.id).subscribe(function (entity) { -// vm.entity = entity; -// widgetContext.rxjs.forkJoin([ -// entityRelationService.findInfoByFrom(entityId), -// entityRelationService.findInfoByTo(entityId), -// attributeService.getEntityAttributes(entityId, 'SERVER_SCOPE') -// ]).subscribe( -// function (data) { -// getEntityRelations(data.slice(0,2)); -// getEntityAttributes(data[2]); -// vm.editEntityFormGroup.patchValue({ -// entityName: vm.entity.name, -// entityType: vm.entityType, -// entityLabel: vm.entity.label, -// type: vm.entity.type, -// attributes: vm.attributes, -// oldRelations: vm.oldRelationsData -// }, {emitEvent: false}); -// } -// ); -// }); -// } +// widgetContext.rxjs.forkJoin([ +// entityRelationService.findInfoByFrom(entityId), +// entityRelationService.findInfoByTo(entityId), +// attributeService.getEntityAttributes(entityId, 'SERVER_SCOPE'), +// entityService.getEntity(entityId.entityType, entityId.id) +// ]).subscribe( +// function (data) { +// getEntityRelations(data.slice(0,2)); +// getEntityAttributes(data[2]); +// vm.entity = data[3]; +// vm.editEntityFormGroup.patchValue({ +// entityName: vm.entity.name, +// entityType: vm.entityType, +// entityLabel: vm.entity.label, +// type: vm.entity.type, +// attributes: vm.attributes, +// oldRelations: vm.oldRelationsData +// }, {emitEvent: false}); +// } +// ); +// } // // function saveEntity() { // const formValues = vm.editEntityFormGroup.value; @@ -218,9 +217,8 @@ // } else if (formValues.entityType == 'DEVICE') { // return deviceService.saveDevice(vm.entity); // } -// } else { -// return widgetContext.rxjs.of([]); // } +// return widgetContext.rxjs.of([]); // } // // function saveAttributes(entityId) { @@ -233,9 +231,8 @@ // } // if (attributesArray.length > 0) { // return attributeService.saveEntityAttributes(entityId, "SERVER_SCOPE", attributesArray); -// } else { -// return widgetContext.rxjs.of([]); // } +// return widgetContext.rxjs.of([]); // } // // function saveRelations(entityId) { @@ -270,9 +267,8 @@ // } // if (tasks.length > 0) { // return widgetContext.rxjs.forkJoin(tasks); -// } else { -// return widgetContext.rxjs.of([]); // } +// return widgetContext.rxjs.of([]); // } //} // @@ -380,9 +376,8 @@ // } // if (attributesArray.length > 0) { // return attributeService.saveEntityAttributes(entityId, "SERVER_SCOPE", attributesArray); -// } else { -// return widgetContext.rxjs.of([]); // } +// return widgetContext.rxjs.of([]); // } // // function saveRelations(entityId) { @@ -404,8 +399,7 @@ // } // if (tasks.length > 0) { // return widgetContext.rxjs.forkJoin(tasks); -// } else { -// return widgetContext.rxjs.of([]); // } +// return widgetContext.rxjs.of([]); // } //}