@spinnaker/amazon 0.10.0 → 0.11.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.
@@ -0,0 +1 @@
1
+ export declare const SCALING_POLICY_SUMMARY_COMPONENT = "spinnaker.amazon.scalingPolicy.scalingPolicySummary.component";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spinnaker/amazon",
3
3
  "license": "Apache-2.0",
4
- "version": "0.10.0",
4
+ "version": "0.11.0",
5
5
  "module": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
7
7
  "scripts": {
@@ -13,7 +13,7 @@
13
13
  "lib": "npm run build"
14
14
  },
15
15
  "dependencies": {
16
- "@spinnaker/core": "^0.14.0",
16
+ "@spinnaker/core": "^0.14.1",
17
17
  "@uirouter/angularjs": "1.0.26",
18
18
  "@uirouter/core": "6.0.8",
19
19
  "@uirouter/react": "1.0.7",
@@ -55,5 +55,5 @@
55
55
  "shx": "0.3.3",
56
56
  "typescript": "4.3.5"
57
57
  },
58
- "gitHead": "2ddc8bd4f04d13a8712702cf75fca3cada520406"
58
+ "gitHead": "b36e5fa30e23cd60007e6839b0dab5e41bd410d5"
59
59
  }
@@ -10,6 +10,7 @@ export interface IAmazonFunctionSourceData extends IFunctionSourceData {
10
10
  publish: boolean;
11
11
  description: string;
12
12
  eventSourceMappings: string[];
13
+ aliasConfigurations: string[];
13
14
  functionArn: string;
14
15
  handler: string;
15
16
  layers: string;
@@ -131,6 +131,26 @@ export class AmazonFunctionDetails extends React.Component<IAmazonFunctionDetail
131
131
  </dl>
132
132
  );
133
133
 
134
+ const aliasConfigurationDetails = (
135
+ <dl className="horizontal-when-filters-collapsed dl-horizontal dl-narrow">
136
+ {functionDef.aliasConfigurations && functionDef.aliasConfigurations.length !== 0
137
+ ? functionDef.aliasConfigurations.map((value: any) => (
138
+ <>
139
+ <h5>
140
+ <strong>Alias Details</strong>
141
+ </h5>
142
+ <dl>
143
+ <dt>Name</dt>
144
+ <dd>{value.name}</dd>
145
+ <dt>ARN</dt>
146
+ <dd>{value.aliasArn}</dd>
147
+ </dl>
148
+ </>
149
+ ))
150
+ : 'None'}
151
+ </dl>
152
+ );
153
+
134
154
  const functionDetailsSection = (
135
155
  <CollapsibleSection heading="Function Details">{functionDetails}</CollapsibleSection>
136
156
  );
@@ -139,6 +159,10 @@ export class AmazonFunctionDetails extends React.Component<IAmazonFunctionDetail
139
159
  <CollapsibleSection heading="Event Source Details">{eventSourceDetails}</CollapsibleSection>
140
160
  );
141
161
 
162
+ const aliasConfigurationDetailsSection = (
163
+ <CollapsibleSection heading="Alias Configuration Details">{aliasConfigurationDetails}</CollapsibleSection>
164
+ );
165
+
142
166
  return (
143
167
  <Details loading={this.state.loading}>
144
168
  {isEmpty(this.state.functionDef) ? (
@@ -165,6 +189,9 @@ export class AmazonFunctionDetails extends React.Component<IAmazonFunctionDetail
165
189
  {!isEmpty(this.state.functionDef) && !isEmpty(this.state.functionDef.eventSourceMappings)
166
190
  ? eventSourceDetailsSection
167
191
  : ''}
192
+ {!isEmpty(this.state.functionDef) && !isEmpty(this.state.functionDef.aliasConfigurations)
193
+ ? aliasConfigurationDetailsSection
194
+ : ''}
168
195
  </Details>
169
196
  );
170
197
  }
@@ -1,6 +1,7 @@
1
1
  import { module } from 'angular';
2
2
 
3
3
  import { AMAZON_SERVERGROUP_DETAILS_SCALINGPOLICY_ALARMBASEDSUMMARY_COMPONENT } from './alarmBasedSummary.component';
4
+ import { SCALING_POLICY_SUMMARY_COMPONENT } from './scalingPolicySummary.component';
4
5
  import { STEP_POLICY_SUMMARY_COMPONENT } from './stepPolicySummary.component';
5
6
  import { TARGET_TRACKING_MODULE } from './targetTracking/targetTracking.module';
6
7
 
@@ -9,4 +10,5 @@ module(SCALING_POLICY_MODULE, [
9
10
  TARGET_TRACKING_MODULE,
10
11
  AMAZON_SERVERGROUP_DETAILS_SCALINGPOLICY_ALARMBASEDSUMMARY_COMPONENT,
11
12
  STEP_POLICY_SUMMARY_COMPONENT,
13
+ SCALING_POLICY_SUMMARY_COMPONENT,
12
14
  ]);
@@ -0,0 +1,10 @@
1
+ import { module } from 'angular';
2
+ import { react2angular } from 'react2angular';
3
+ import { withErrorBoundary } from '@spinnaker/core';
4
+ import { StepPolicySummary } from './StepPolicySummary';
5
+
6
+ export const SCALING_POLICY_SUMMARY_COMPONENT = 'spinnaker.amazon.scalingPolicy.scalingPolicySummary.component';
7
+ module(SCALING_POLICY_SUMMARY_COMPONENT, []).component(
8
+ 'scalingPolicySummary',
9
+ react2angular(withErrorBoundary(StepPolicySummary, 'scalingPolicySummary'), ['application', 'policy', 'serverGroup']),
10
+ );