mirror of https://github.com/portainer/portainer
fix(fdo): generate an edgeID when the 'Enforce environment ID' setting is disabled EE-2446 (#6465)
parent
48f2e7316a
commit
8b4a74f06e
|
@ -70,13 +70,11 @@ export function FDOProfilesDatatableActions({
|
|||
try {
|
||||
const profile = selectedItems[0];
|
||||
const newProfile = await duplicateProfile(profile.id);
|
||||
console.log({ newProfile });
|
||||
notifications.success('Profile successfully duplicated', profile.name);
|
||||
router.stateService.go('portainer.endpoints.profile.edit', {
|
||||
id: newProfile.id,
|
||||
});
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
notifications.error(
|
||||
'Failure',
|
||||
err as Error,
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import uuidv4 from 'uuid/v4';
|
||||
|
||||
import { PortainerEndpointCreationTypes } from 'Portainer/models/endpoint/models';
|
||||
import { configureDevice, getProfiles } from 'Portainer/hostmanagement/fdo/fdo.service';
|
||||
|
||||
|
@ -98,7 +100,7 @@ angular
|
|||
suffix++;
|
||||
|
||||
const config = {
|
||||
edgeID: endpoint.EdgeID,
|
||||
edgeID: endpoint.EdgeID || uuidv4(),
|
||||
edgeKey: endpoint.EdgeKey,
|
||||
name: $scope.formValues.DeviceName,
|
||||
profile: $scope.formValues.DeviceProfile,
|
||||
|
|
|
@ -297,11 +297,9 @@ function EndpointController(
|
|||
try {
|
||||
$scope.endpoint.ManagementInfo = JSON.parse(amtInfo.RawOutput);
|
||||
} catch (err) {
|
||||
console.log('Failure', err, 'Unable to JSON parse AMT info: ' + amtInfo.RawOutput);
|
||||
clearAMTManagementInfo(amtInfo.RawOutput);
|
||||
}
|
||||
} catch (err) {
|
||||
console.log('Failure', err);
|
||||
clearAMTManagementInfo('Unable to retrieve AMT environment details');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue