@spinnaker/core 0.22.2 → 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/CHANGELOG.md +32 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/pipeline/config/stages/bake/bakeStageChooseManagedImage.component.d.ts +16 -0
- package/package.json +2 -2
- package/src/help/help.contents.ts +6 -2
- package/src/pipeline/config/graph/PipelineGraph.tsx +10 -3
- package/src/pipeline/config/stages/bake/bakeStage.module.js +2 -0
- package/src/pipeline/config/stages/bake/bakeStageChooseManagedImage.component.html +12 -0
- package/src/pipeline/config/stages/bake/bakeStageChooseManagedImage.component.ts +49 -0
- package/src/pipeline/config/stages/bake/bakeStageChooseOs.component.html +0 -1
- package/src/pipeline/config/stages/bakeManifest/helm/BakeHelmConfigForm.spec.tsx +44 -0
- package/src/pipeline/config/stages/bakeManifest/helm/BakeHelmConfigForm.tsx +14 -0
- package/src/pipeline/config/stages/pipeline/pipelineStage.html +3 -0
- package/src/pipeline/executions/execution/ExecutionMarker.tsx +17 -11
- package/src/serverGroup/configure/common/v2instanceArchetypeSelector.component.ts +10 -0
- package/src/widgets/accountNamespaceClusterSelector.component.js +59 -57
- package/src/widgets/accountRegionClusterSelector.component.js +96 -93
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { module } from 'angular';
|
|
4
4
|
import _ from 'lodash';
|
|
5
|
+
import { $log } from 'ngimport';
|
|
5
6
|
|
|
6
7
|
import { AccountService } from '../account/AccountService';
|
|
7
8
|
import { AppListExtractor } from '../application/listExtractor/AppListExtractor';
|
|
@@ -27,104 +28,106 @@ module(CORE_WIDGETS_ACCOUNTREGIONCLUSTERSELECTOR_COMPONENT, []).directive('accou
|
|
|
27
28
|
templateUrl: require('./accountRegionClusterSelector.component.html'),
|
|
28
29
|
controllerAs: 'vm',
|
|
29
30
|
controller: function controller() {
|
|
30
|
-
this
|
|
31
|
+
this.$onInit = () => {
|
|
32
|
+
this.clusterField = this.clusterField || 'cluster';
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
const vm = this;
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const showAllRegions = vm.showAllRegions || false;
|
|
39
|
-
|
|
40
|
-
let isTextInputForClusterFiled;
|
|
41
|
-
|
|
42
|
-
let regions;
|
|
43
|
-
|
|
44
|
-
const setRegionList = () => {
|
|
45
|
-
const accountFilter = (cluster) => (cluster ? cluster.account === vm.component.credentials : true);
|
|
46
|
-
const regionList = AppListExtractor.getRegions([vm.application], accountFilter);
|
|
47
|
-
vm.regions = showAllRegions ? regions : regionList.length ? regionList : regions;
|
|
48
|
-
(vm.regions || []).sort();
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const setClusterList = () => {
|
|
52
|
-
const regionField = this.singleRegion ? vm.component.region : vm.component.regions;
|
|
53
|
-
const clusterFilter = AppListExtractor.clusterFilterForCredentialsAndRegion(
|
|
54
|
-
vm.component.credentials,
|
|
55
|
-
regionField,
|
|
56
|
-
);
|
|
57
|
-
vm.clusterList = AppListExtractor.getClusters([vm.application], clusterFilter);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
vm.regionChanged = () => {
|
|
61
|
-
setClusterList();
|
|
62
|
-
if (!isTextInputForClusterFiled && !_.includes(vm.clusterList, vm.component[this.clusterField])) {
|
|
63
|
-
vm.component[this.clusterField] = undefined;
|
|
36
|
+
if (vm.showClusterSelect === undefined) {
|
|
37
|
+
vm.showClusterSelect = true;
|
|
64
38
|
}
|
|
65
|
-
};
|
|
66
39
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
isTextInputForClusterFiled
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
vm.component.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
40
|
+
const showAllRegions = vm.showAllRegions || false;
|
|
41
|
+
|
|
42
|
+
let isTextInputForClusterFiled;
|
|
43
|
+
|
|
44
|
+
let regions;
|
|
45
|
+
|
|
46
|
+
const setRegionList = () => {
|
|
47
|
+
const accountFilter = (cluster) => (cluster ? cluster.account === vm.component.credentials : true);
|
|
48
|
+
const regionList = AppListExtractor.getRegions([vm.application], accountFilter);
|
|
49
|
+
vm.regions = showAllRegions ? regions : regionList.length ? regionList : regions;
|
|
50
|
+
(vm.regions || []).sort();
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const setClusterList = () => {
|
|
54
|
+
const regionField = this.singleRegion ? vm.component.region : vm.component.regions;
|
|
55
|
+
const clusterFilter = AppListExtractor.clusterFilterForCredentialsAndRegion(
|
|
56
|
+
vm.component.credentials,
|
|
57
|
+
regionField,
|
|
58
|
+
);
|
|
59
|
+
vm.clusterList = AppListExtractor.getClusters([vm.application], clusterFilter);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
vm.regionChanged = () => {
|
|
63
|
+
setClusterList();
|
|
64
|
+
if (!isTextInputForClusterFiled && !_.includes(vm.clusterList, vm.component[this.clusterField])) {
|
|
65
|
+
vm.component[this.clusterField] = undefined;
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const setToggledState = () => {
|
|
70
|
+
vm.regions = regions;
|
|
71
|
+
isTextInputForClusterFiled = true;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const setUnToggledState = () => {
|
|
75
|
+
vm.component[this.clusterField] = undefined;
|
|
76
|
+
isTextInputForClusterFiled = false;
|
|
77
|
+
setRegionList();
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
vm.clusterSelectInputToggled = (isToggled) => {
|
|
81
|
+
isToggled ? setToggledState() : setUnToggledState();
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
vm.clusterChanged = (clusterName) => {
|
|
85
|
+
const filterByCluster = AppListExtractor.monikerClusterNameFilter(clusterName);
|
|
86
|
+
const clusterMoniker = _.first(_.uniq(AppListExtractor.getMonikers([vm.application], filterByCluster)));
|
|
87
|
+
if (_.isNil(clusterMoniker)) {
|
|
88
|
+
//remove the moniker from the stage if one doesn't exist.
|
|
89
|
+
vm.component.moniker = undefined;
|
|
90
|
+
} else {
|
|
91
|
+
//clusters don't contain sequences, so null it out.
|
|
92
|
+
clusterMoniker.sequence = null;
|
|
93
|
+
vm.component.moniker = clusterMoniker;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
vm.accountUpdated = () => {
|
|
98
|
+
vm.component[this.clusterField] = undefined;
|
|
99
|
+
setRegionList();
|
|
100
|
+
setClusterList();
|
|
101
|
+
if (vm.onAccountUpdate) {
|
|
102
|
+
vm.onAccountUpdate();
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const init = () => {
|
|
107
|
+
AccountService.getUniqueAttributeForAllAccounts(vm.component.cloudProviderType, 'regions')
|
|
108
|
+
.then((allRegions) => {
|
|
109
|
+
regions = allRegions;
|
|
110
|
+
|
|
111
|
+
// TODO(duftler): Remove this once we finish deprecating the old style regions/zones in clouddriver GCE credentials.
|
|
112
|
+
const regionObjs = _.filter(regions, (region) => _.isObject(region));
|
|
113
|
+
if (regionObjs.length) {
|
|
114
|
+
const oldStyleRegions = _.chain(regionObjs)
|
|
115
|
+
.map((regionObj) => _.keys(regionObj))
|
|
116
|
+
.flatten()
|
|
117
|
+
.value();
|
|
118
|
+
regions = _.chain(regions).difference(regionObjs).union(oldStyleRegions).value();
|
|
119
|
+
}
|
|
120
|
+
return regions.sort();
|
|
121
|
+
})
|
|
122
|
+
.then((allRegions) => {
|
|
123
|
+
setRegionList();
|
|
124
|
+
setClusterList();
|
|
125
|
+
vm.regions = _.includes(vm.clusterList, vm.component[this.clusterField]) ? vm.regions : allRegions;
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
init();
|
|
125
130
|
};
|
|
126
|
-
|
|
127
|
-
init();
|
|
128
131
|
},
|
|
129
132
|
};
|
|
130
133
|
});
|