From fe082f762f4eb57fff2412993b9d742e8957b155 Mon Sep 17 00:00:00 2001 From: andres-portainer <91705312+andres-portainer@users.noreply.github.com> Date: Tue, 1 Feb 2022 19:38:50 -0300 Subject: [PATCH] fix(fdo): add suffix to the device name supplied to /fdo/configure EE-2469 (#6505) --- .../views/devices/import/importDeviceController.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/portainer/views/devices/import/importDeviceController.js b/app/portainer/views/devices/import/importDeviceController.js index fb44d5ac0..ff9d7b8f1 100644 --- a/app/portainer/views/devices/import/importDeviceController.js +++ b/app/portainer/views/devices/import/importDeviceController.js @@ -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, };