fix(fdo): add suffix to the device name supplied to /fdo/configure EE-2469 (#6505)

pull/6516/head
andres-portainer 2022-02-01 19:38:50 -03:00 committed by GitHub
parent a8d3cda3fa
commit fe082f762f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -74,9 +74,11 @@ angular
let suffix = $scope.formValues.Suffix;
for (const deviceID of $scope.state.deviceIDs) {
let deviceName = $scope.formValues.DeviceName + suffix;
try {
var endpoint = await EndpointService.createRemoteEndpoint(
$scope.formValues.DeviceName + suffix,
deviceName,
PortainerEndpointCreationTypes.EdgeAgentEnvironment,
$scope.formValues.PortainerURL,
'',
@ -102,7 +104,7 @@ angular
const config = {
edgeID: endpoint.EdgeID || uuidv4(),
edgeKey: endpoint.EdgeKey,
name: $scope.formValues.DeviceName,
name: deviceName,
profile: $scope.formValues.DeviceProfile,
};