Merge pull request #13156 from deaflynx/fix/external-id-delete-save-widget
Fix overwrite of externalId on save widget
This commit is contained in:
commit
0cf9e48199
@ -115,6 +115,7 @@ import { DataKeySettingsFunction } from '@home/components/widget/lib/settings/co
|
||||
import { UtilsService } from '@core/services/utils.service';
|
||||
import { CompiledTbFunction } from '@shared/models/js-function.models';
|
||||
import { FormProperty } from '@shared/models/dynamic-form.models';
|
||||
import { ExportableEntity } from '@shared/models/base-data';
|
||||
|
||||
export interface IWidgetAction {
|
||||
name: string;
|
||||
@ -573,7 +574,7 @@ export interface IDynamicWidgetComponent {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export interface WidgetInfo extends WidgetTypeDescriptor, WidgetControllerDescriptor {
|
||||
export interface WidgetInfo extends WidgetTypeDescriptor, WidgetControllerDescriptor, ExportableEntity<WidgetTypeId> {
|
||||
widgetName: string;
|
||||
fullFqn: string;
|
||||
deprecated: boolean;
|
||||
@ -681,6 +682,7 @@ export const toWidgetInfo = (widgetTypeEntity: WidgetType): WidgetInfo => ({
|
||||
fullFqn: fullWidgetTypeFqn(widgetTypeEntity),
|
||||
deprecated: widgetTypeEntity.deprecated,
|
||||
scada: widgetTypeEntity.scada,
|
||||
externalId: widgetTypeEntity.externalId,
|
||||
type: widgetTypeEntity.descriptor.type,
|
||||
sizeX: widgetTypeEntity.descriptor.sizeX,
|
||||
sizeY: widgetTypeEntity.descriptor.sizeY,
|
||||
@ -736,6 +738,7 @@ export const toWidgetType = (widgetInfo: WidgetInfo, id: WidgetTypeId, tenantId:
|
||||
name: widgetInfo.widgetName,
|
||||
deprecated: widgetInfo.deprecated,
|
||||
scada: widgetInfo.scada,
|
||||
externalId: widgetInfo.externalId,
|
||||
descriptor
|
||||
};
|
||||
};
|
||||
|
||||
@ -206,7 +206,7 @@ export interface WidgetControllerDescriptor {
|
||||
actionSources?: {[actionSourceId: string]: WidgetActionSource};
|
||||
}
|
||||
|
||||
export interface BaseWidgetType extends BaseData<WidgetTypeId>, HasTenantId, HasVersion {
|
||||
export interface BaseWidgetType extends BaseData<WidgetTypeId>, HasTenantId, HasVersion, ExportableEntity<WidgetTypeId> {
|
||||
tenantId: TenantId;
|
||||
fqn: string;
|
||||
name: string;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user