@spinnaker/amazon 2026.3.1 → 2026.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/AwsModalFooter.d.ts +1 -1
- package/dist/deploymentStrategy/AdditionalFields.d.ts +1 -1
- package/dist/function/CreateLambdaFunction.d.ts +1 -1
- package/dist/function/configure/ExecutionRole.d.ts +1 -1
- package/dist/function/configure/FunctionBasicInformation.d.ts +1 -1
- package/dist/function/configure/FunctionDebugAndErrorHandling.d.ts +1 -1
- package/dist/function/configure/FunctionEnvironmentVariables.d.ts +1 -1
- package/dist/function/configure/FunctionSettings.d.ts +1 -1
- package/dist/function/configure/FunctionTags.d.ts +1 -1
- package/dist/function/configure/Network.d.ts +1 -1
- package/dist/function/details/AmazonFunctionDetails.d.ts +1 -1
- package/dist/function/details/FunctionActions.d.ts +1 -1
- package/dist/index.js +279 -1
- package/dist/index.js.map +1 -1
- package/dist/instance/details/AmazonInstanceInformation.d.ts +2 -2
- package/dist/instance/details/CostFactor.d.ts +2 -2
- package/dist/instance/details/InstanceDns.d.ts +2 -2
- package/dist/instance/details/InstanceInformation.d.ts +2 -2
- package/dist/instance/details/InstanceSecurityGroups.d.ts +2 -2
- package/dist/instance/details/InstanceStatus.d.ts +2 -2
- package/dist/instance/details/InstanceTags.d.ts +2 -2
- package/dist/loadBalancer/configure/AmazonLoadBalancerChoiceModal.d.ts +1 -1
- package/dist/loadBalancer/configure/application/ALBListeners.d.ts +1 -1
- package/dist/loadBalancer/configure/application/ConfigureOidcConfigModal.d.ts +1 -1
- package/dist/loadBalancer/configure/application/ConfigureRedirectConfigModal.d.ts +1 -1
- package/dist/loadBalancer/configure/application/CreateApplicationLoadBalancer.d.ts +1 -1
- package/dist/loadBalancer/configure/application/TargetGroups.d.ts +1 -1
- package/dist/loadBalancer/configure/classic/AdvancedSettings.d.ts +1 -1
- package/dist/loadBalancer/configure/classic/HealthCheck.d.ts +1 -1
- package/dist/loadBalancer/configure/classic/Listeners.d.ts +1 -1
- package/dist/loadBalancer/configure/common/AmazonCertificateSelectField.d.ts +1 -1
- package/dist/loadBalancer/configure/common/LoadBalancerLocation.d.ts +1 -1
- package/dist/loadBalancer/configure/common/SecurityGroups.d.ts +1 -1
- package/dist/loadBalancer/configure/network/CertificateSelectors.d.ts +2 -2
- package/dist/loadBalancer/configure/network/NLBListeners.d.ts +1 -1
- package/dist/loadBalancer/configure/network/TargetGroups.d.ts +1 -1
- package/dist/loadBalancer/details/LoadBalancerActions.d.ts +1 -1
- package/dist/pipeline/stages/AmazonStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/bake/AwsBakeStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/cloneServerGroup/AwsCloneServerGroupStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/deleteLambda/DeleteLambdaFunctionStageForm.d.ts +2 -2
- package/dist/pipeline/stages/deleteLambda/LambdaDeleteStage.d.ts +2 -2
- package/dist/pipeline/stages/deleteLambda/constants/deleteVersion.picker.d.ts +1 -1
- package/dist/pipeline/stages/deployCloudFormation/CloudFormationChangeSetInfo.d.ts +2 -2
- package/dist/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/deployCloudFormation/deployCloudFormationExecutionDetails.d.ts +1 -1
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionApproval.d.ts +2 -2
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionDetails.d.ts +1 -1
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionLabel.d.ts +1 -1
- package/dist/pipeline/stages/deployCloudFormation/evaluateCloudFormationChangeSetExecutionMarkerIcon.d.ts +1 -1
- package/dist/pipeline/stages/deployLambda/components/AwsLambdaFunctionStageForm.d.ts +2 -2
- package/dist/pipeline/stages/deployLambda/components/BasicSettingsForm.d.ts +2 -2
- package/dist/pipeline/stages/deployLambda/components/EnvironmentForm.d.ts +2 -2
- package/dist/pipeline/stages/deployLambda/components/ExecutionRoleForm.d.ts +2 -2
- package/dist/pipeline/stages/deployLambda/components/LambdaAtEdgeForm.d.ts +2 -2
- package/dist/pipeline/stages/deployLambda/components/NetworkForm.d.ts +2 -2
- package/dist/pipeline/stages/deployLambda/components/TriggerEventsForm.d.ts +2 -2
- package/dist/pipeline/stages/deployLambda/config/LambdaDeploymentStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/deployLambda/config/LambdaDeploymentStageExecutionDetails.d.ts +2 -2
- package/dist/pipeline/stages/disableAsg/AwsDisableAsgStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/disableCluster/AwsDisableClusterStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/enableAsg/AwsEnableAsgStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/invokeLambda/InvokeLambdaFunctionStageForm.d.ts +2 -2
- package/dist/pipeline/stages/invokeLambda/LambdaInvokeStage.d.ts +2 -2
- package/dist/pipeline/stages/invokeLambda/components/InvokeLambdaOperation.d.ts +2 -2
- package/dist/pipeline/stages/modifyScalingProcess/ModifyScalingProcessStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/modifyWarmPool/ModifyWarmPoolStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/rollbackCluster/AwsRollbackClusterStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/routeLambda/LambdaRouteStage.d.ts +2 -2
- package/dist/pipeline/stages/routeLambda/RouteLambdaFunctionStageForm.d.ts +2 -2
- package/dist/pipeline/stages/routeLambda/TriggerEventsForm.d.ts +2 -2
- package/dist/pipeline/stages/routeLambda/components/BlueGreenDeployment/BlueGreenDeploymentForm.d.ts +2 -2
- package/dist/pipeline/stages/routeLambda/components/BlueGreenDeployment/HealthCheckStrategy.d.ts +2 -2
- package/dist/pipeline/stages/routeLambda/components/BlueGreenDeployment/InvocationHealthCheck.d.ts +2 -2
- package/dist/pipeline/stages/routeLambda/components/DeploymentStrategyForm.d.ts +2 -2
- package/dist/pipeline/stages/routeLambda/components/RenderStrategy.d.ts +2 -2
- package/dist/pipeline/stages/routeLambda/components/SimpleDeploymentForm.d.ts +2 -2
- package/dist/pipeline/stages/routeLambda/components/VersionPicker.d.ts +1 -1
- package/dist/pipeline/stages/routeLambda/components/WeightedDeploymentForm.d.ts +2 -2
- package/dist/pipeline/stages/routeLambda/constants/strategy.picker.d.ts +1 -1
- package/dist/pipeline/stages/scaleDownCluster/AwsScaleDownClusterStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/shrinkCluster/AwsShrinkClusterStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/tagImage/awsTagImageStage.d.ts +2 -2
- package/dist/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStageConfig.d.ts +2 -2
- package/dist/pipeline/stages/updateCodeLambda/LambdaUpdateCodeStageExecutionDetails.d.ts +2 -2
- package/dist/pipeline/stages/updateCodeLambda/components/UpdateCodeStageForm.d.ts +2 -2
- package/dist/securityGroup/details/IPRangeRules.d.ts +1 -1
- package/dist/serverGroup/configure/AmazonImageSelectInput.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/AmazonCloneServerGroupModal.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/ServerGroupTemplateSelection.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/capacity/CapacitySelector.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/capacity/MinMaxDesired.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/instanceType/CpuCreditsToggle.d.ts +2 -2
- package/dist/serverGroup/configure/wizard/instanceType/InstanceTypeSelector.d.ts +2 -2
- package/dist/serverGroup/configure/wizard/instanceType/InstanceTypeWarning.d.ts +2 -2
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/AdvancedModeSelector.d.ts +2 -2
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/AmazonInstanceTypeInfoRenderer.d.ts +2 -2
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceProfileSelector.d.ts +2 -2
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeRow.d.ts +2 -2
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeSelect.d.ts +2 -2
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTable.d.ts +2 -2
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTableBody.d.ts +2 -2
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstanceTypeTableParts.d.ts +4 -4
- package/dist/serverGroup/configure/wizard/instanceType/advancedMode/InstancesDistribution.d.ts +2 -2
- package/dist/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.d.ts +2 -2
- package/dist/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/pages/ServerGroupCapacity.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/pages/ServerGroupInstanceType.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/pages/ServerGroupLoadBalancers.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/pages/ServerGroupSecurityGroups.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/pages/ServerGroupZones.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettings.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsInner.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.d.ts +1 -1
- package/dist/serverGroup/configure/wizard/securityGroups/ServerGroupSecurityGroupsRemoved.d.ts +1 -1
- package/dist/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.d.ts +2 -1
- package/dist/serverGroup/details/resize/AmazonResizeServerGroupModal.d.ts +1 -1
- package/dist/serverGroup/details/scalingPolicy/CreateScalingPolicyButton.d.ts +1 -1
- package/dist/serverGroup/details/scalingPolicy/ScalingPolicySummary.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/StepPolicySummary.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/chart/DateLineChart.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/chart/MetricAlarmChart.d.ts +3 -3
- package/dist/serverGroup/details/scalingPolicy/popover/AlarmSummary.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/popover/StepPolicyPopoverContent.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/targetTracking/TargetMetricFields.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingAdditionalSettings.d.ts +2 -3
- package/dist/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingChart.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingSummary.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/targetTracking/UpsertTargetTrackingModal.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/upsert/PolicyTypeSelectionModal.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/upsert/ScalingPolicyAdditionalSettings.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/upsert/UpsertScalingPolicyModal.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/AlarmConfigurer.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/DimensionsEditor.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/upsert/alarm/MetricSelector.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/upsert/simple/SimplePolicyAction.d.ts +2 -2
- package/dist/serverGroup/details/scalingPolicy/upsert/step/StepPolicyAction.d.ts +2 -2
- package/dist/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.d.ts +1 -1
- package/dist/serverGroup/details/scheduledAction/ScheduledAction.d.ts +1 -1
- package/dist/serverGroup/details/scheduledActions/EditScheduledActionsModal.d.ts +1 -1
- package/dist/serverGroup/details/sections/InstancesDistributionDetailsSection.d.ts +2 -2
- package/dist/serverGroup/details/sections/LaunchTemplateDetailsSection.d.ts +2 -2
- package/dist/serverGroup/details/sections/MultipleInstanceTypesSubSection.d.ts +2 -2
- package/dist/serverGroup/details/securityGroups/EditSecurityGroupsModal.d.ts +1 -1
- package/dist/serverGroup/details/warmPool/ModifyWarmPoolModal.d.ts +1 -1
- package/dist/subnet/SubnetSelectField.d.ts +1 -1
- package/dist/subnet/SubnetSelectInput.d.ts +1 -1
- package/dist/vpc/VpcTag.d.ts +2 -2
- package/package.json +5 -7
- package/src/aws.module.spec.ts +20 -21
- package/src/function/details/AmazonFunctionDetails.tsx +1 -1
- package/src/function/details/FunctionActions.spec.tsx +56 -36
- package/src/instance/awsInstanceType.service.spec.js +24 -22
- package/src/instance/details/AmazonInstanceDetails.spec.tsx +7 -7
- package/src/instance/details/InstanceInformation.spec.tsx +44 -24
- package/src/loadBalancer/AmazonLoadBalancersTag.spec.tsx +1 -1
- package/src/loadBalancer/TargetGroupDetails.spec.tsx +5 -5
- package/src/loadBalancer/configure/application/TargetGroups.tsx +1 -1
- package/src/loadBalancer/configure/common/SecurityGroups.spec.tsx +4 -4
- package/src/loadBalancer/configure/network/TargetGroups.tsx +1 -1
- package/src/loadBalancer/details/amazonLoadBalancerDetails.spec.tsx +31 -53
- package/src/pipeline/stages/AmazonStageConfig.spec.tsx +37 -46
- package/src/pipeline/stages/deployCloudFormation/DeployCloudFormationStackStageConfig.tsx +1 -0
- package/src/pipeline/stages/deployCloudFormation/deployCloudFormationStackStage.spec.tsx +316 -279
- package/src/pipeline/stages/findImageFromTags/AwsFindImageFromTagsStageConfig.spec.tsx +70 -90
- package/src/pipeline/stages/modifyScalingProcess/modifyScalingProcessStage.spec.tsx +198 -130
- package/src/pipeline/stages/modifyWarmPool/modifyWarmPoolStage.spec.tsx +49 -40
- package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.spec.tsx +341 -427
- package/src/pipeline/stages/resizeAsg/AwsResizeAsgStageConfig.tsx +7 -0
- package/src/pipeline/stages/tagImage/awsTagImageStage.spec.tsx +62 -107
- package/src/routerConsumers.spec.tsx +23 -23
- package/src/securityGroup/configure/AmazonSecurityGroupModal.spec.tsx +38 -47
- package/src/securityGroup/details/AmazonSecurityGroupDetails.spec.tsx +7 -6
- package/src/serverGroup/configure/AmazonImageSelectInput.spec.tsx +47 -65
- package/src/serverGroup/configure/AmazonImageSelectInput.tsx +1 -1
- package/src/serverGroup/configure/serverGroupCommandBuilder.aws.service.spec.js +18 -19
- package/src/serverGroup/configure/serverGroupCommandBuilder.spec.js +41 -26
- package/src/serverGroup/configure/wizard/instanceType/simpleMode/SimpleModeSelector.spec.tsx +52 -75
- package/src/serverGroup/configure/wizard/pages/ServerGroupBasicSettings.spec.tsx +1 -1
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.spec.tsx +36 -33
- package/src/serverGroup/configure/wizard/pages/advancedSettings/ServerGroupAdvancedSettingsCommon.tsx +7 -1
- package/src/serverGroup/configure/wizard/securityGroups/SecurityGroupSelector.spec.tsx +2 -2
- package/src/serverGroup/details/AmazonServerGroupActions.spec.tsx +79 -67
- package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.spec.tsx +78 -66
- package/src/serverGroup/details/advancedSettings/EditAsgAdvancedSettingsModal.tsx +23 -6
- package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.spec.tsx +86 -94
- package/src/serverGroup/details/rollback/AmazonRollbackServerGroupModal.tsx +3 -0
- package/src/serverGroup/details/scalingPolicy/targetTracking/TargetTrackingAdditionalSettings.tsx +1 -39
- package/src/serverGroup/details/scalingPolicy/targetTracking/UpsertTargetTrackingModal.tsx +0 -1
- package/src/serverGroup/details/scalingProcesses/ModifyScalingProcessesModal.spec.tsx +5 -5
- package/src/serverGroup/details/scheduledActions/EditScheduledActionsModal.spec.tsx +8 -8
- package/src/serverGroup/details/sections/AmazonServerGroupMaintenanceActions.spec.tsx +71 -60
- package/src/serverGroup/details/sections/InstancesDistributionDetailsSection.spec.tsx +21 -39
- package/src/serverGroup/details/sections/LaunchTemplateDetailsSection.spec.tsx +56 -97
- package/src/serverGroup/details/securityGroups/EditSecurityGroupsModal.spec.tsx +48 -77
- package/src/serverGroup/details/warmPool/ModifyWarmPoolModal.spec.tsx +5 -5
- package/src/vpc/VpcReader.spec.ts +1 -1
- package/src/vpc/VpcTag.spec.tsx +11 -15
- /package/dist/{amazon.logo352d4e042476837f.svg → amazon.logoBzC5E-3F.svg} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import type { IAmazonServerGroup, IScalingPolicyAlarm, IStepAdjustment } from '../../../../../domain';
|
|
3
3
|
import './AlarmConfigurer.less';
|
|
4
4
|
export interface IAlarmConfigurerProps {
|
|
@@ -13,4 +13,4 @@ export declare const COMPARATORS: {
|
|
|
13
13
|
label: string;
|
|
14
14
|
value: string;
|
|
15
15
|
}[];
|
|
16
|
-
export declare const AlarmConfigurer: ({ alarm, multipleAlarms, serverGroup, stepAdjustments, stepsChanged, updateAlarm, }: IAlarmConfigurerProps) => JSX.Element;
|
|
16
|
+
export declare const AlarmConfigurer: ({ alarm, multipleAlarms, serverGroup, stepAdjustments, stepsChanged, updateAlarm, }: IAlarmConfigurerProps) => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import type { Subject } from 'rxjs';
|
|
3
3
|
import type { IMetricAlarmDimension, IServerGroup } from '@spinnaker/core';
|
|
4
4
|
import type { IScalingPolicyAlarmView } from '../../../../../domain';
|
|
@@ -8,4 +8,4 @@ export interface IDimensionsEditorProps {
|
|
|
8
8
|
serverGroup: IServerGroup;
|
|
9
9
|
updateAvailableMetrics: (dimensions: IMetricAlarmDimension[]) => void;
|
|
10
10
|
}
|
|
11
|
-
export declare const DimensionsEditor: ({ alarm, serverGroup, updateAvailableMetrics }: IDimensionsEditorProps) => JSX.Element;
|
|
11
|
+
export declare const DimensionsEditor: ({ alarm, serverGroup, updateAvailableMetrics }: IDimensionsEditorProps) => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import type { ICloudMetricDescriptor } from '@spinnaker/core';
|
|
3
3
|
import type { IAmazonServerGroup, IScalingPolicyAlarmView } from '../../../../../domain';
|
|
4
4
|
import './MetricSelector.less';
|
|
@@ -12,4 +12,4 @@ export interface IMetricSelectorProps {
|
|
|
12
12
|
serverGroup: IAmazonServerGroup;
|
|
13
13
|
updateAlarm: (alarm: IScalingPolicyAlarmView) => void;
|
|
14
14
|
}
|
|
15
|
-
export declare const MetricSelector: ({ alarm, updateAlarm, serverGroup }: IMetricSelectorProps) => JSX.Element;
|
|
15
|
+
export declare const MetricSelector: ({ alarm, updateAlarm, serverGroup }: IMetricSelectorProps) => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import './SimplePolicyAction.less';
|
|
3
3
|
type Operator = 'Add' | 'Remove' | 'Set to';
|
|
4
4
|
type AdjustmentTypeView = 'instances' | 'percent of group';
|
|
@@ -9,5 +9,5 @@ export interface ISimplePolicyActionProps {
|
|
|
9
9
|
scalingAdjustment: number;
|
|
10
10
|
updateScalingAdjustment: (adjustment: number) => void;
|
|
11
11
|
}
|
|
12
|
-
export declare const SimplePolicyAction: ({ adjustmentType, adjustmentTypeChanged, operator, scalingAdjustment, updateScalingAdjustment, }: ISimplePolicyActionProps) => JSX.Element;
|
|
12
|
+
export declare const SimplePolicyAction: ({ adjustmentType, adjustmentTypeChanged, operator, scalingAdjustment, updateScalingAdjustment, }: ISimplePolicyActionProps) => React.JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import type { IScalingPolicyAlarm, IStepAdjustment } from '../../../../../domain';
|
|
3
3
|
import './StepPolicyAction.less';
|
|
4
4
|
export type Operator = 'Add' | 'Remove' | 'Set to';
|
|
@@ -15,4 +15,4 @@ export interface IStepPolicyActionProps {
|
|
|
15
15
|
stepAdjustments?: IStepAdjustment[];
|
|
16
16
|
stepsChanged: (steps: IStepAdjustment[]) => void;
|
|
17
17
|
}
|
|
18
|
-
export declare const StepPolicyAction: ({ adjustmentType, adjustmentTypeChanged, alarm, isMin, operator, step, stepAdjustments, stepsChanged, }: IStepPolicyActionProps) => JSX.Element;
|
|
18
|
+
export declare const StepPolicyAction: ({ adjustmentType, adjustmentTypeChanged, alarm, isMin, operator, step, stepAdjustments, stepsChanged, }: IStepPolicyActionProps) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { IAmazonServerGroupDetailsSectionProps } from './IAmazonServerGroupDetailsSectionProps';
|
|
3
|
-
export declare const InstancesDistributionDetailsSection: ({ serverGroup }: IAmazonServerGroupDetailsSectionProps) => JSX.Element;
|
|
3
|
+
export declare const InstancesDistributionDetailsSection: ({ serverGroup }: IAmazonServerGroupDetailsSectionProps) => React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { IAmazonServerGroupDetailsSectionProps } from './IAmazonServerGroupDetailsSectionProps';
|
|
3
|
-
export declare const LaunchTemplateDetailsSection: ({ serverGroup }: IAmazonServerGroupDetailsSectionProps) => JSX.Element;
|
|
3
|
+
export declare const LaunchTemplateDetailsSection: ({ serverGroup }: IAmazonServerGroupDetailsSectionProps) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { IAmazonLaunchTemplateOverrides } from '../../../index';
|
|
3
3
|
import './multipleInstanceTypesSubSection.less';
|
|
4
4
|
export declare function MultipleInstanceTypesSubSection(props: {
|
|
5
5
|
instanceTypeOverrides: IAmazonLaunchTemplateOverrides[];
|
|
6
|
-
}): JSX.Element;
|
|
6
|
+
}): React.JSX.Element;
|
|
@@ -15,4 +15,4 @@ export interface ISubnetSelectInputProps extends Omit<ISelectInputProps, 'option
|
|
|
15
15
|
export interface ISubnetSelectInputState {
|
|
16
16
|
options: Array<Option<string>>;
|
|
17
17
|
}
|
|
18
|
-
export declare function SubnetSelectInput(props: ISubnetSelectInputProps): JSX.Element;
|
|
18
|
+
export declare function SubnetSelectInput(props: ISubnetSelectInputProps): React.JSX.Element;
|
package/dist/vpc/VpcTag.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "https://github.com/spinnaker/spinnaker.git"
|
|
6
6
|
},
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
|
-
"version": "2026.
|
|
8
|
+
"version": "2026.4.0",
|
|
9
9
|
"module": "dist/index.js",
|
|
10
10
|
"typings": "dist/index.d.ts",
|
|
11
11
|
"publishConfig": {
|
|
@@ -28,26 +28,24 @@
|
|
|
28
28
|
"chart.js": "3.0.0-rc.6",
|
|
29
29
|
"chartjs-adapter-luxon": "1.0.0-beta.2",
|
|
30
30
|
"classnames": "2.2.6",
|
|
31
|
-
"enzyme": "3.11.0",
|
|
32
31
|
"formik": "1.5.1",
|
|
33
32
|
"lodash": "4.18.1",
|
|
34
|
-
"react": "
|
|
33
|
+
"react": "17.0.2",
|
|
35
34
|
"react-bootstrap": "0.32.1",
|
|
36
35
|
"react-ga": "2.4.1",
|
|
37
36
|
"react-select": "1.2.1",
|
|
38
37
|
"react-sortable-hoc": "0.6.8",
|
|
39
38
|
"react-virtualized-select": "3.1.3",
|
|
40
|
-
"rxjs": "
|
|
39
|
+
"rxjs": "7.8.2"
|
|
41
40
|
},
|
|
42
41
|
"devDependencies": {
|
|
43
42
|
"@spinnaker/eslint-plugin": "^3.0.2",
|
|
44
43
|
"@spinnaker/mocks": "1.0.7",
|
|
45
44
|
"@spinnaker/scripts": "^0.4.0",
|
|
46
45
|
"@types/classnames": "2.2.0",
|
|
47
|
-
"@types/enzyme": "3.10.3",
|
|
48
46
|
"@types/jquery": "3.5.32",
|
|
49
47
|
"@types/lodash": "4.14.64",
|
|
50
|
-
"@types/react": "
|
|
48
|
+
"@types/react": "17.0.93",
|
|
51
49
|
"@types/react-bootstrap": "0.32.5",
|
|
52
50
|
"@types/react-select": "1.3.4",
|
|
53
51
|
"@types/react-sortable-hoc": "0.6.2",
|
|
@@ -55,5 +53,5 @@
|
|
|
55
53
|
"shx": "0.3.3",
|
|
56
54
|
"typescript": "5.0.4"
|
|
57
55
|
},
|
|
58
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "8d2819815061bd8ddc714287d229fce3d3d0a16b"
|
|
59
57
|
}
|
package/src/aws.module.spec.ts
CHANGED
|
@@ -32,22 +32,20 @@ import { AwsServerGroupTransformer } from './serverGroup/serverGroup.transformer
|
|
|
32
32
|
|
|
33
33
|
describe('Amazon package registration', () => {
|
|
34
34
|
function expectRegistered(path: string): void {
|
|
35
|
-
expect(CloudProviderRegistry.getValue('aws', path)
|
|
35
|
+
expect(CloudProviderRegistry.getValue('aws', path), path).not.toBeNull();
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
function expectNonEmptyRegistration(path: string): void {
|
|
39
39
|
const value = CloudProviderRegistry.getValue('aws', path);
|
|
40
40
|
const entries = Array.isArray(value) ? value : [];
|
|
41
|
-
expect(Array.isArray(value)
|
|
42
|
-
expect(entries.length
|
|
41
|
+
expect(Array.isArray(value), path).toBe(true);
|
|
42
|
+
expect(entries.length, path).toBeGreaterThan(0);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
it('does not register function details as a provider override', () => {
|
|
46
|
-
const overrideValue = spyOn(CloudProviderRegistry, 'overrideValue');
|
|
47
|
-
const functionDetailsModule = require.resolve('./function/details/AmazonFunctionDetails');
|
|
48
|
-
delete require.cache[functionDetailsModule];
|
|
45
|
+
it('does not register function details as a provider override', async () => {
|
|
46
|
+
const overrideValue = vi.spyOn(CloudProviderRegistry, 'overrideValue').mockReturnValue(undefined);
|
|
49
47
|
|
|
50
|
-
|
|
48
|
+
await import('./function/details/AmazonFunctionDetails');
|
|
51
49
|
|
|
52
50
|
expect(overrideValue).not.toHaveBeenCalled();
|
|
53
51
|
});
|
|
@@ -102,9 +100,9 @@ describe('Amazon package registration', () => {
|
|
|
102
100
|
});
|
|
103
101
|
|
|
104
102
|
it('constructs the server group configuration service with explicit dependencies', () => {
|
|
105
|
-
const securityGroupReader = { getAllSecurityGroups:
|
|
103
|
+
const securityGroupReader = { getAllSecurityGroups: vi.fn() };
|
|
106
104
|
const cacheInitializer = {
|
|
107
|
-
refreshCache:
|
|
105
|
+
refreshCache: vi.fn(),
|
|
108
106
|
};
|
|
109
107
|
|
|
110
108
|
const service = new AwsServerGroupConfigurationService(
|
|
@@ -172,8 +170,8 @@ describe('Amazon package registration', () => {
|
|
|
172
170
|
|
|
173
171
|
expectedStages.forEach((provides) => {
|
|
174
172
|
const stage = awsStages.find((candidate) => (candidate.provides || candidate.key) === provides);
|
|
175
|
-
expect(stage
|
|
176
|
-
expect(stage?.component
|
|
173
|
+
expect(stage, `aws ${provides} stage`).toBeDefined();
|
|
174
|
+
expect(stage?.component, `aws ${provides} stage component`).toBeDefined();
|
|
177
175
|
});
|
|
178
176
|
|
|
179
177
|
const structuredStages: Array<{
|
|
@@ -236,20 +234,21 @@ describe('Amazon package registration', () => {
|
|
|
236
234
|
|
|
237
235
|
structuredStages.forEach(({ component, key }) => {
|
|
238
236
|
const stage = awsStages.find((candidate) => (candidate.key || candidate.provides) === key);
|
|
239
|
-
expect(stage
|
|
240
|
-
expect(stage?.key
|
|
241
|
-
expect(stage?.cloudProvider
|
|
242
|
-
expect(stage?.component
|
|
237
|
+
expect(stage, `aws ${key} structured stage`).toBeDefined();
|
|
238
|
+
expect(stage?.key, `aws ${key} stage key`).toBe(key);
|
|
239
|
+
expect(stage?.cloudProvider, `aws ${key} cloud provider`).toBe('aws');
|
|
240
|
+
expect(stage?.component, `aws ${key} config component`).toBe(component);
|
|
243
241
|
});
|
|
244
242
|
|
|
245
243
|
const deployCloudFormation = awsStages.find((stage) => stage.key === 'deployCloudFormation');
|
|
246
|
-
expect(
|
|
247
|
-
|
|
248
|
-
|
|
244
|
+
expect(
|
|
245
|
+
deployCloudFormation?.executionDetailsSections?.length,
|
|
246
|
+
'aws deployCloudFormation React execution details',
|
|
247
|
+
).toBeGreaterThan(0);
|
|
249
248
|
|
|
250
249
|
['destroyServerGroup', 'findImage'].forEach((key) => {
|
|
251
250
|
const stage = awsStages.find((candidate) => (candidate.key || candidate.provides) === key);
|
|
252
|
-
expect(stage?.component
|
|
251
|
+
expect(stage?.component, `aws ${key} generic stage component`).toBe(AmazonStageConfig);
|
|
253
252
|
});
|
|
254
253
|
} finally {
|
|
255
254
|
Registry.pipeline = previousPipeline;
|
|
@@ -279,7 +278,7 @@ describe('Amazon package registration', () => {
|
|
|
279
278
|
|
|
280
279
|
expectedStages.forEach((provides) => {
|
|
281
280
|
const registrations = awsStages.filter((stage) => (stage.provides || stage.key) === provides);
|
|
282
|
-
expect(registrations.length
|
|
281
|
+
expect(registrations.length, `aws ${provides} registration count`).toBe(1);
|
|
283
282
|
});
|
|
284
283
|
});
|
|
285
284
|
|
|
@@ -22,7 +22,7 @@ export interface IAmazonFunctionDetailsProps extends IOverridableProps {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export class AmazonFunctionDetails extends React.Component<IAmazonFunctionDetailsProps, any> {
|
|
25
|
-
private destroy$ = new Subject();
|
|
25
|
+
private destroy$ = new Subject<void>();
|
|
26
26
|
constructor(props: IAmazonFunctionDetailsProps) {
|
|
27
27
|
super(props);
|
|
28
28
|
this.state = {
|
|
@@ -1,55 +1,75 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { render, screen } from '@testing-library/react';
|
|
2
|
+
import userEvent from '@testing-library/user-event';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
|
|
4
5
|
import type { Application } from '@spinnaker/core';
|
|
6
|
+
import { ConfirmationModalService, DeckRuntimeContext, FunctionWriter } from '@spinnaker/core';
|
|
5
7
|
|
|
6
8
|
import { AWSProviderSettings } from '../../aws.settings';
|
|
7
9
|
import type { IAmazonFunction } from '../../index';
|
|
8
|
-
import { FunctionActions } from '../../index';
|
|
10
|
+
import { CreateLambdaFunction, FunctionActions } from '../../index';
|
|
9
11
|
|
|
10
12
|
describe('FunctionActions', () => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
const originalAdHocInfraWritesEnabled = AWSProviderSettings.adHocInfraWritesEnabled;
|
|
14
|
+
const app = ({ functions: { refresh: vi.fn() }, name: 'app' } as any) as Application;
|
|
15
|
+
const functionDef = {
|
|
16
|
+
cloudProvider: 'aws',
|
|
17
|
+
credentials: 'test-account',
|
|
18
|
+
functionName: 'app-function',
|
|
19
|
+
region: 'us-east-1',
|
|
20
|
+
} as IAmazonFunction;
|
|
21
|
+
const functionFromParams = {
|
|
22
|
+
account: 'test-account',
|
|
23
|
+
region: 'us-east-1',
|
|
24
|
+
functionName: 'function-name',
|
|
25
|
+
};
|
|
26
|
+
const runtimeServices = {} as any;
|
|
27
|
+
const renderActions = () =>
|
|
28
|
+
render(
|
|
29
|
+
<DeckRuntimeContext.Provider value={{ services: runtimeServices } as any}>
|
|
30
|
+
<FunctionActions app={app} functionDef={functionDef} functionFromParams={functionFromParams} />
|
|
31
|
+
</DeckRuntimeContext.Provider>,
|
|
32
|
+
);
|
|
13
33
|
|
|
14
|
-
|
|
15
|
-
AWSProviderSettings.adHocInfraWritesEnabled =
|
|
34
|
+
afterEach(() => {
|
|
35
|
+
AWSProviderSettings.adHocInfraWritesEnabled = originalAdHocInfraWritesEnabled;
|
|
36
|
+
});
|
|
16
37
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
region: 'us-east-1',
|
|
24
|
-
functionName: 'function-name',
|
|
25
|
-
}}
|
|
26
|
-
/>,
|
|
27
|
-
);
|
|
38
|
+
it('opens edit and delete actions with the exact function state and command', async () => {
|
|
39
|
+
AWSProviderSettings.adHocInfraWritesEnabled = true;
|
|
40
|
+
const show = vi.spyOn(CreateLambdaFunction, 'show').mockReturnValue(undefined);
|
|
41
|
+
const confirm = vi.spyOn(ConfirmationModalService, 'confirm').mockReturnValue(undefined);
|
|
42
|
+
const deleteFunction = vi.spyOn(FunctionWriter, 'deleteFunction').mockResolvedValue({} as any);
|
|
43
|
+
renderActions();
|
|
28
44
|
|
|
29
|
-
|
|
45
|
+
await userEvent.click(screen.getByRole('button', { name: 'Function Actions' }));
|
|
46
|
+
await userEvent.click(screen.getByText('Edit Function'));
|
|
47
|
+
expect(show).toHaveBeenCalledExactlyOnceWith({ app, functionDef }, runtimeServices);
|
|
30
48
|
|
|
31
|
-
|
|
49
|
+
await userEvent.click(screen.getByText('Delete Function'));
|
|
50
|
+
expect(confirm).toHaveBeenCalledWith(
|
|
51
|
+
expect.objectContaining({
|
|
52
|
+
account: 'test-account',
|
|
53
|
+
buttonText: 'Delete function-name',
|
|
54
|
+
header: 'Really delete function-name in us-east-1: test-account?',
|
|
55
|
+
}),
|
|
56
|
+
);
|
|
57
|
+
confirm.mock.lastCall[0].submitMethod();
|
|
58
|
+
expect(deleteFunction).toHaveBeenCalledExactlyOnceWith(
|
|
59
|
+
{
|
|
60
|
+
cloudProvider: 'aws',
|
|
61
|
+
credentials: 'test-account',
|
|
62
|
+
functionName: 'app-function',
|
|
63
|
+
region: 'us-east-1',
|
|
64
|
+
},
|
|
65
|
+
app,
|
|
66
|
+
);
|
|
32
67
|
});
|
|
33
68
|
|
|
34
69
|
it('should not render DropdownToggle if aws.adHocInfraWritesEnabled is false', () => {
|
|
35
|
-
const app = { name: 'app' } as Application;
|
|
36
|
-
|
|
37
|
-
const functionDef = { functionName: 'app-function' } as IAmazonFunction;
|
|
38
70
|
AWSProviderSettings.adHocInfraWritesEnabled = false;
|
|
71
|
+
renderActions();
|
|
39
72
|
|
|
40
|
-
|
|
41
|
-
<FunctionActions
|
|
42
|
-
app={app}
|
|
43
|
-
functionDef={functionDef}
|
|
44
|
-
functionFromParams={{
|
|
45
|
-
account: 'test-account',
|
|
46
|
-
region: 'us-east-1',
|
|
47
|
-
functionName: 'function-name',
|
|
48
|
-
}}
|
|
49
|
-
/>,
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
const dropDown = wrapper.find('div');
|
|
53
|
-
expect(dropDown.children().length).toEqual(0);
|
|
73
|
+
expect(screen.queryByRole('button', { name: 'Function Actions' })).not.toBeInTheDocument();
|
|
54
74
|
});
|
|
55
75
|
});
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
import { map } from 'lodash';
|
|
3
|
-
import { mockHttpClient } from 'core/api/mock/
|
|
3
|
+
import { mockHttpClient } from 'core/api/mock/mockHttpSupport';
|
|
4
4
|
|
|
5
5
|
import { AwsInstanceTypeService } from './awsInstanceType.service';
|
|
6
6
|
|
|
7
|
+
const testContext = {};
|
|
8
|
+
|
|
7
9
|
describe('Service: InstanceType', function () {
|
|
8
10
|
beforeEach(function () {
|
|
9
|
-
|
|
11
|
+
testContext.awsInstanceTypeService = new AwsInstanceTypeService();
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
testContext.allTypes = [
|
|
12
14
|
{
|
|
13
15
|
account: 'test',
|
|
14
16
|
region: 'us-west-2',
|
|
@@ -141,10 +143,10 @@ describe('Service: InstanceType', function () {
|
|
|
141
143
|
describe('getAllTypesByRegion', function () {
|
|
142
144
|
it('returns types, indexed by region', async function () {
|
|
143
145
|
const http = mockHttpClient();
|
|
144
|
-
http.expectGET('/instanceTypes').respond(200,
|
|
146
|
+
http.expectGET('/instanceTypes').respond(200, testContext.allTypes);
|
|
145
147
|
|
|
146
148
|
let results = null;
|
|
147
|
-
|
|
149
|
+
testContext.awsInstanceTypeService.getAllTypesByRegion().then(function (result) {
|
|
148
150
|
results = result;
|
|
149
151
|
});
|
|
150
152
|
|
|
@@ -157,12 +159,12 @@ describe('Service: InstanceType', function () {
|
|
|
157
159
|
describe('getAvailableTypesForRegions', function () {
|
|
158
160
|
it('returns results for a single region', async function () {
|
|
159
161
|
const http = mockHttpClient();
|
|
160
|
-
http.expectGET('/instanceTypes').respond(200,
|
|
162
|
+
http.expectGET('/instanceTypes').respond(200, testContext.allTypes);
|
|
161
163
|
|
|
162
164
|
let results = null,
|
|
163
|
-
service =
|
|
165
|
+
service = testContext.awsInstanceTypeService;
|
|
164
166
|
|
|
165
|
-
|
|
167
|
+
testContext.awsInstanceTypeService.getAllTypesByRegion().then(function (result) {
|
|
166
168
|
results = service.getAvailableTypesForRegions(result, ['us-west-2']);
|
|
167
169
|
});
|
|
168
170
|
|
|
@@ -193,12 +195,12 @@ describe('Service: InstanceType', function () {
|
|
|
193
195
|
|
|
194
196
|
it('returns empty list for region with no instance types', async function () {
|
|
195
197
|
const http = mockHttpClient();
|
|
196
|
-
http.expectGET('/instanceTypes').respond(200,
|
|
198
|
+
http.expectGET('/instanceTypes').respond(200, testContext.allTypes);
|
|
197
199
|
|
|
198
200
|
let results = null,
|
|
199
|
-
service =
|
|
201
|
+
service = testContext.awsInstanceTypeService;
|
|
200
202
|
|
|
201
|
-
|
|
203
|
+
testContext.awsInstanceTypeService.getAllTypesByRegion().then(function (result) {
|
|
202
204
|
results = service.getAvailableTypesForRegions(result, ['us-west-3']);
|
|
203
205
|
});
|
|
204
206
|
|
|
@@ -208,12 +210,12 @@ describe('Service: InstanceType', function () {
|
|
|
208
210
|
|
|
209
211
|
it('returns an intersection when multiple regions are provided', async function () {
|
|
210
212
|
const http = mockHttpClient();
|
|
211
|
-
http.expectGET('/instanceTypes').respond(200,
|
|
213
|
+
http.expectGET('/instanceTypes').respond(200, testContext.allTypes);
|
|
212
214
|
|
|
213
215
|
let results = null,
|
|
214
|
-
service =
|
|
216
|
+
service = testContext.awsInstanceTypeService;
|
|
215
217
|
|
|
216
|
-
|
|
218
|
+
testContext.awsInstanceTypeService.getAllTypesByRegion().then(function (result) {
|
|
217
219
|
results = service.getAvailableTypesForRegions(result, ['us-west-2', 'eu-west-1']);
|
|
218
220
|
});
|
|
219
221
|
|
|
@@ -223,12 +225,12 @@ describe('Service: InstanceType', function () {
|
|
|
223
225
|
|
|
224
226
|
it('sorts instance types by family then class size', async function () {
|
|
225
227
|
const http = mockHttpClient();
|
|
226
|
-
http.expectGET('/instanceTypes').respond(200,
|
|
228
|
+
http.expectGET('/instanceTypes').respond(200, testContext.allTypes);
|
|
227
229
|
|
|
228
230
|
let results = null,
|
|
229
|
-
service =
|
|
231
|
+
service = testContext.awsInstanceTypeService;
|
|
230
232
|
|
|
231
|
-
|
|
233
|
+
testContext.awsInstanceTypeService.getAllTypesByRegion().then(function (result) {
|
|
232
234
|
results = service.getAvailableTypesForRegions(result, ['us-east-1']);
|
|
233
235
|
});
|
|
234
236
|
|
|
@@ -303,7 +305,7 @@ describe('Service: InstanceType', function () {
|
|
|
303
305
|
];
|
|
304
306
|
|
|
305
307
|
it('filters instance types by VPC, virtualization type and architecture, only if the information exists', function () {
|
|
306
|
-
const service =
|
|
308
|
+
const service = testContext.awsInstanceTypeService;
|
|
307
309
|
expect(map(service.filterInstanceTypes(instanceTypes, 'hvm', true, 'x86_64'), 'name')).toEqual([
|
|
308
310
|
'test.type.incomplete',
|
|
309
311
|
'm1.small',
|
|
@@ -331,7 +333,7 @@ describe('Service: InstanceType', function () {
|
|
|
331
333
|
});
|
|
332
334
|
|
|
333
335
|
it('matches architecture case-insensitively', function () {
|
|
334
|
-
const service =
|
|
336
|
+
const service = testContext.awsInstanceTypeService;
|
|
335
337
|
const armInstanceTypes = [
|
|
336
338
|
{
|
|
337
339
|
account: 'test',
|
|
@@ -350,7 +352,7 @@ describe('Service: InstanceType', function () {
|
|
|
350
352
|
});
|
|
351
353
|
|
|
352
354
|
it('matches virtualization type case-insensitively when the AMI attribute is uppercase', function () {
|
|
353
|
-
const service =
|
|
355
|
+
const service = testContext.awsInstanceTypeService;
|
|
354
356
|
const armInstanceTypes = [
|
|
355
357
|
{
|
|
356
358
|
account: 'test',
|
|
@@ -384,7 +386,7 @@ describe('Service: InstanceType', function () {
|
|
|
384
386
|
|
|
385
387
|
testInputs.forEach((testInput) => {
|
|
386
388
|
it(`identifies if bursting is supported for all instance types passed correctly for ${testInput.types}`, function () {
|
|
387
|
-
const actualResult =
|
|
389
|
+
const actualResult = testContext.awsInstanceTypeService.isBurstingSupportedForAllTypes(testInput.types);
|
|
388
390
|
expect(actualResult).toEqual(testInput.result);
|
|
389
391
|
});
|
|
390
392
|
});
|
|
@@ -408,7 +410,7 @@ describe('Service: InstanceType', function () {
|
|
|
408
410
|
|
|
409
411
|
testInputs.forEach((testInput) => {
|
|
410
412
|
it(`identifies instance types in category correctly for ${testInput.types}`, function () {
|
|
411
|
-
const actual =
|
|
413
|
+
const actual = testContext.awsInstanceTypeService.getInstanceTypesInCategory(testInput.types, testInput.cat);
|
|
412
414
|
expect(actual).toEqual(testInput.result);
|
|
413
415
|
});
|
|
414
416
|
});
|
|
@@ -14,7 +14,7 @@ describe('AmazonInstanceDetails', () => {
|
|
|
14
14
|
beforeEach(() => {
|
|
15
15
|
adHocInfraWritesEnabled = AWSProviderSettings.adHocInfraWritesEnabled;
|
|
16
16
|
AWSProviderSettings.adHocInfraWritesEnabled = true;
|
|
17
|
-
stateService = { go:
|
|
17
|
+
stateService = { go: vi.fn(), includes: vi.fn().mockReturnValue(true) };
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
afterEach(() => (AWSProviderSettings.adHocInfraWritesEnabled = adHocInfraWritesEnabled));
|
|
@@ -36,14 +36,14 @@ describe('AmazonInstanceDetails', () => {
|
|
|
36
36
|
const app = {
|
|
37
37
|
isStandalone: false,
|
|
38
38
|
serverGroups: {
|
|
39
|
-
ready:
|
|
40
|
-
onRefresh:
|
|
39
|
+
ready: vi.fn().mockReturnValue(Promise.resolve()),
|
|
40
|
+
onRefresh: vi.fn(),
|
|
41
41
|
},
|
|
42
42
|
loadBalancers: {
|
|
43
|
-
ready:
|
|
43
|
+
ready: vi.fn().mockReturnValue(Promise.resolve()),
|
|
44
44
|
},
|
|
45
45
|
} as any;
|
|
46
|
-
spyOn(Promise, 'all').
|
|
46
|
+
vi.spyOn(Promise, 'all').mockReturnValue(rejectedReadiness as any);
|
|
47
47
|
|
|
48
48
|
const component = new AmazonInstanceDetails({
|
|
49
49
|
app,
|
|
@@ -60,7 +60,7 @@ describe('AmazonInstanceDetails', () => {
|
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
it('closes terminated instance details through the injected state service', () => {
|
|
63
|
-
const confirmation = spyOn(ConfirmationModalService, 'confirm');
|
|
63
|
+
const confirmation = vi.spyOn(ConfirmationModalService, 'confirm').mockReturnValue(undefined);
|
|
64
64
|
const instance = { account: 'test', health: [], instanceId: 'i-123', placement: {} } as any;
|
|
65
65
|
const actions = AmazonInstanceActionsComponent({
|
|
66
66
|
app: { attributes: {} } as any,
|
|
@@ -71,7 +71,7 @@ describe('AmazonInstanceDetails', () => {
|
|
|
71
71
|
}).props.actions;
|
|
72
72
|
|
|
73
73
|
actions.find(({ label }: any) => label === 'Terminate').triggerAction();
|
|
74
|
-
confirmation.
|
|
74
|
+
confirmation.mock.lastCall[0].taskMonitorConfig.onTaskComplete();
|
|
75
75
|
|
|
76
76
|
expect(stateService.includes).toHaveBeenCalledWith('**.instanceDetails', { instanceId: 'i-123' });
|
|
77
77
|
expect(stateService.go).toHaveBeenCalledWith('^');
|