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, };