Add instanceId to ToSectionDTO and ToResourceDTO + update device controller for instanceId

This commit is contained in:
Fransolet Thomas 2022-10-20 16:37:37 +02:00
parent 79be291113
commit 499065bdb7
3 changed files with 6 additions and 2 deletions

View File

@ -43,7 +43,8 @@ namespace Manager.Interfaces.Models
label = Label, label = Label,
type = Type, type = Type,
data = isExport ? Data : null, data = isExport ? Data : null,
dateCreation = DateCreation dateCreation = DateCreation,
instanceId = InstanceId
}; };
} }
} }

View File

@ -81,7 +81,8 @@ namespace Manager.Interfaces.Models
isSubSection = IsSubSection, isSubSection = IsSubSection,
parentId = ParentId, parentId = ParentId,
data = Data, data = Data,
dateCreation = DateCreation dateCreation = DateCreation,
instanceId = InstanceId,
}; };
} }
} }

View File

@ -122,6 +122,7 @@ namespace ManagerService.Controllers
device.DateCreation = DateTime.Now; device.DateCreation = DateTime.Now;
} }
device.InstanceId = newDevice.instanceId;
device.Name = newDevice.name; device.Name = newDevice.name;
device.Configuration = configuration.Label; device.Configuration = configuration.Label;
device.ConfigurationId = newDevice.configurationId; device.ConfigurationId = newDevice.configurationId;
@ -179,6 +180,7 @@ namespace ManagerService.Controllers
// Todo add some verification ? // Todo add some verification ?
device.Name = updatedDevice.name; device.Name = updatedDevice.name;
device.InstanceId = updatedDevice.instanceId;
device.Identifier = updatedDevice.identifier; device.Identifier = updatedDevice.identifier;
device.IpAddressWLAN = updatedDevice.ipAddressWLAN; device.IpAddressWLAN = updatedDevice.ipAddressWLAN;
device.IpAddressETH = updatedDevice.ipAddressETH; device.IpAddressETH = updatedDevice.ipAddressETH;