@spinnaker/core 0.23.0 → 0.23.1
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spinnaker/core",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "0.23.
|
|
4
|
+
"version": "0.23.1",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"shx": "0.3.3",
|
|
121
121
|
"typescript": "4.3.5"
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "8abafe5c6a6680953aef7752b1a56cac093ec9ba"
|
|
124
124
|
}
|
|
@@ -117,15 +117,22 @@ export class PipelineGraph extends React.Component<IPipelineGraphProps, IPipelin
|
|
|
117
117
|
if (!node.children.length) {
|
|
118
118
|
return node.phase;
|
|
119
119
|
}
|
|
120
|
+
const checkedNodeIds = new Set<string | number>();
|
|
120
121
|
const result: number[] = [];
|
|
121
|
-
this.collect(node.children, result);
|
|
122
|
+
this.collect(node.children, result, checkedNodeIds);
|
|
122
123
|
return max(result);
|
|
123
124
|
}
|
|
124
125
|
|
|
125
|
-
private collect(nodes: IPipelineGraphNode[], result: number[]) {
|
|
126
|
+
private collect(nodes: IPipelineGraphNode[], result: number[], checkedNodeIds: Set<string | number>) {
|
|
126
127
|
nodes.forEach((node) => {
|
|
128
|
+
if (checkedNodeIds.has(node.id)) {
|
|
129
|
+
return;
|
|
130
|
+
} else {
|
|
131
|
+
checkedNodeIds.add(node.id);
|
|
132
|
+
}
|
|
133
|
+
|
|
127
134
|
if (node.children.length) {
|
|
128
|
-
this.collect(node.children, result);
|
|
135
|
+
this.collect(node.children, result, checkedNodeIds);
|
|
129
136
|
} else {
|
|
130
137
|
result.push(node.phase);
|
|
131
138
|
}
|
|
@@ -22,6 +22,16 @@ class V2InstanceArchetypeSelectorController implements IComponentController {
|
|
|
22
22
|
const { $scope } = this;
|
|
23
23
|
this.instanceTypeService.getCategories(this.command.selectedProvider).then((categories) => {
|
|
24
24
|
$scope.instanceProfiles = categories;
|
|
25
|
+
// Resetting the 'unavailable' properties to avoid caching initially.
|
|
26
|
+
categories.forEach((profile) => {
|
|
27
|
+
if (profile.type === this.command.viewState.instanceProfile) {
|
|
28
|
+
profile.families.forEach((family) => {
|
|
29
|
+
family.instanceTypes.forEach((instanceType) => {
|
|
30
|
+
instanceType.unavailable = false;
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
});
|
|
25
35
|
if ($scope.instanceProfiles.length % 3 === 0) {
|
|
26
36
|
$scope.columns = 3;
|
|
27
37
|
}
|