|
|
@ -1,3 +1,4 @@
|
|
|
|
|
|
|
|
import _ from 'lodash-es';
|
|
|
|
import angular from 'angular';
|
|
|
|
import angular from 'angular';
|
|
|
|
|
|
|
|
|
|
|
|
import { configureFDO } from '@/portainer/hostmanagement/fdo/fdo.service';
|
|
|
|
import { configureFDO } from '@/portainer/hostmanagement/fdo/fdo.service';
|
|
|
@ -43,7 +44,22 @@ export default function SettingsEdgeComputeController($q, $async, $state, Notifi
|
|
|
|
function initView() {
|
|
|
|
function initView() {
|
|
|
|
$async(async () => {
|
|
|
|
$async(async () => {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
ctrl.settings = await SettingsService.settings();
|
|
|
|
const settings = await SettingsService.settings();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const defaultMTLS = {
|
|
|
|
|
|
|
|
..._.get(settings, 'Edge.MTLS', {}),
|
|
|
|
|
|
|
|
UseSeparateCert: _.get(settings, 'Edge.MTLS.UseSeparateCert', false),
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ctrl.settings = {
|
|
|
|
|
|
|
|
...settings,
|
|
|
|
|
|
|
|
EnableEdgeComputeFeatures: !!settings.EnableEdgeComputeFeatures,
|
|
|
|
|
|
|
|
EnforceEdgeID: !!settings.EnforceEdgeID,
|
|
|
|
|
|
|
|
Edge: {
|
|
|
|
|
|
|
|
...settings.Edge,
|
|
|
|
|
|
|
|
MTLS: defaultMTLS,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
} catch (err) {
|
|
|
|
} catch (err) {
|
|
|
|
Notifications.error('Failure', err, 'Unable to retrieve application settings');
|
|
|
|
Notifications.error('Failure', err, 'Unable to retrieve application settings');
|
|
|
|
}
|
|
|
|
}
|
|
|
|