diff --git a/packages/amazon/src/serverGroup/details/AmazonServerGroupActions.tsx b/packages/amazon/src/serverGroup/details/AmazonServerGroupActions.tsx index e3708001915..48f49c8fbb1 100644 --- a/packages/amazon/src/serverGroup/details/AmazonServerGroupActions.tsx +++ b/packages/amazon/src/serverGroup/details/AmazonServerGroupActions.tsx @@ -289,7 +289,7 @@ export class AmazonServerGroupActions extends React.Component + SETTINGS.adHocInfraEditEnabled ? ( Server Group Actions {this.isRollbackEnabled() && ( @@ -336,7 +336,7 @@ export class AmazonServerGroupActions extends React.Component )} - + ):null ); } } diff --git a/packages/core/src/config/settings.ts b/packages/core/src/config/settings.ts index 1c7ea33c8ee..caa251b742b 100644 --- a/packages/core/src/config/settings.ts +++ b/packages/core/src/config/settings.ts @@ -139,6 +139,7 @@ export interface ISpinnakerSettings { triggerTypes: string[]; useClassicFirewallLabels: boolean; kubernetesAdHocInfraWritesEnabled: boolean; + adHocInfraEditEnabled: boolean; changelogUrl: string; } @@ -151,6 +152,7 @@ SETTINGS.analytics = SETTINGS.analytics || {}; SETTINGS.providers = SETTINGS.providers || {}; SETTINGS.defaultTimeZone = SETTINGS.defaultTimeZone || 'America/Los_Angeles'; SETTINGS.dockerInsights = SETTINGS.dockerInsights || { enabled: false, url: '' }; +SETTINGS.adHocInfraEditEnabled = SETTINGS.adHocInfraEditEnabled ?? true; SETTINGS.changelogUrl = SETTINGS.changelogUrl || 'https://www.spinnaker.io/community/releases/versions/:version-changelog'; SETTINGS.managedDelivery = SETTINGS.managedDelivery || { diff --git a/packages/ecs/src/serverGroup/details/serverGroupDetails.ecs.controller.js b/packages/ecs/src/serverGroup/details/serverGroupDetails.ecs.controller.js index e84f8b39638..7e1e8675c77 100644 --- a/packages/ecs/src/serverGroup/details/serverGroupDetails.ecs.controller.js +++ b/packages/ecs/src/serverGroup/details/serverGroupDetails.ecs.controller.js @@ -12,6 +12,7 @@ import { SERVER_GROUP_WRITER, ServerGroupReader, ServerGroupWarningMessageService, + SETTINGS, SubnetReader, } from '@spinnaker/core'; @@ -313,6 +314,8 @@ angular }); }; + this.isEditEnabled = () => SETTINGS.adHocInfraEditEnabled; + this.resizeServerGroup = () => { $uibModal.open({ templateUrl: overrideRegistry.getTemplate('ecs.resize.modal', require('./resize/resizeServerGroup.html')), diff --git a/packages/ecs/src/serverGroup/details/serverGroupDetails.html b/packages/ecs/src/serverGroup/details/serverGroupDetails.html index d47a884bdad..e1bb96f5722 100644 --- a/packages/ecs/src/serverGroup/details/serverGroupDetails.html +++ b/packages/ecs/src/serverGroup/details/serverGroupDetails.html @@ -34,7 +34,7 @@

-
+
-
+