@spinnaker/core 0.20.0 → 0.22.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.
@@ -818,7 +818,7 @@ export declare function useFetchApplicationQuery(baseOptions: Apollo.QueryHookOp
818
818
  appName: string;
819
819
  statuses?: MdArtifactStatusInEnvironment | MdArtifactStatusInEnvironment[];
820
820
  }>>;
821
- export declare function useFetchApplicationLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchApplicationQuery, FetchApplicationQueryVariables>): Apollo.QueryTuple<FetchApplicationQuery, Exact<{
821
+ export declare function useFetchApplicationLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchApplicationQuery, FetchApplicationQueryVariables>): Apollo.LazyQueryResultTuple<FetchApplicationQuery, Exact<{
822
822
  appName: string;
823
823
  statuses?: MdArtifactStatusInEnvironment | MdArtifactStatusInEnvironment[];
824
824
  }>>;
@@ -845,7 +845,7 @@ export declare const FetchCurrentVersionDocument: Apollo.DocumentNode;
845
845
  export declare function useFetchCurrentVersionQuery(baseOptions: Apollo.QueryHookOptions<FetchCurrentVersionQuery, FetchCurrentVersionQueryVariables>): Apollo.QueryResult<FetchCurrentVersionQuery, Exact<{
846
846
  appName: string;
847
847
  }>>;
848
- export declare function useFetchCurrentVersionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchCurrentVersionQuery, FetchCurrentVersionQueryVariables>): Apollo.QueryTuple<FetchCurrentVersionQuery, Exact<{
848
+ export declare function useFetchCurrentVersionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchCurrentVersionQuery, FetchCurrentVersionQueryVariables>): Apollo.LazyQueryResultTuple<FetchCurrentVersionQuery, Exact<{
849
849
  appName: string;
850
850
  }>>;
851
851
  export declare type FetchCurrentVersionQueryHookResult = ReturnType<typeof useFetchCurrentVersionQuery>;
@@ -873,7 +873,7 @@ export declare function useFetchVersionsHistoryQuery(baseOptions: Apollo.QueryHo
873
873
  appName: string;
874
874
  limit?: number;
875
875
  }>>;
876
- export declare function useFetchVersionsHistoryLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchVersionsHistoryQuery, FetchVersionsHistoryQueryVariables>): Apollo.QueryTuple<FetchVersionsHistoryQuery, Exact<{
876
+ export declare function useFetchVersionsHistoryLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchVersionsHistoryQuery, FetchVersionsHistoryQueryVariables>): Apollo.LazyQueryResultTuple<FetchVersionsHistoryQuery, Exact<{
877
877
  appName: string;
878
878
  limit?: number;
879
879
  }>>;
@@ -900,7 +900,7 @@ export declare const FetchPinnedVersionsDocument: Apollo.DocumentNode;
900
900
  export declare function useFetchPinnedVersionsQuery(baseOptions: Apollo.QueryHookOptions<FetchPinnedVersionsQuery, FetchPinnedVersionsQueryVariables>): Apollo.QueryResult<FetchPinnedVersionsQuery, Exact<{
901
901
  appName: string;
902
902
  }>>;
903
- export declare function useFetchPinnedVersionsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchPinnedVersionsQuery, FetchPinnedVersionsQueryVariables>): Apollo.QueryTuple<FetchPinnedVersionsQuery, Exact<{
903
+ export declare function useFetchPinnedVersionsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchPinnedVersionsQuery, FetchPinnedVersionsQueryVariables>): Apollo.LazyQueryResultTuple<FetchPinnedVersionsQuery, Exact<{
904
904
  appName: string;
905
905
  }>>;
906
906
  export declare type FetchPinnedVersionsQueryHookResult = ReturnType<typeof useFetchPinnedVersionsQuery>;
@@ -928,7 +928,7 @@ export declare function useFetchVersionQuery(baseOptions: Apollo.QueryHookOption
928
928
  appName: string;
929
929
  versions?: string | string[];
930
930
  }>>;
931
- export declare function useFetchVersionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchVersionQuery, FetchVersionQueryVariables>): Apollo.QueryTuple<FetchVersionQuery, Exact<{
931
+ export declare function useFetchVersionLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchVersionQuery, FetchVersionQueryVariables>): Apollo.LazyQueryResultTuple<FetchVersionQuery, Exact<{
932
932
  appName: string;
933
933
  versions?: string | string[];
934
934
  }>>;
@@ -955,7 +955,7 @@ export declare const FetchResourceStatusDocument: Apollo.DocumentNode;
955
955
  export declare function useFetchResourceStatusQuery(baseOptions: Apollo.QueryHookOptions<FetchResourceStatusQuery, FetchResourceStatusQueryVariables>): Apollo.QueryResult<FetchResourceStatusQuery, Exact<{
956
956
  appName: string;
957
957
  }>>;
958
- export declare function useFetchResourceStatusLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchResourceStatusQuery, FetchResourceStatusQueryVariables>): Apollo.QueryTuple<FetchResourceStatusQuery, Exact<{
958
+ export declare function useFetchResourceStatusLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchResourceStatusQuery, FetchResourceStatusQueryVariables>): Apollo.LazyQueryResultTuple<FetchResourceStatusQuery, Exact<{
959
959
  appName: string;
960
960
  }>>;
961
961
  export declare type FetchResourceStatusQueryHookResult = ReturnType<typeof useFetchResourceStatusQuery>;
@@ -981,7 +981,7 @@ export declare const FetchNotificationsDocument: Apollo.DocumentNode;
981
981
  export declare function useFetchNotificationsQuery(baseOptions: Apollo.QueryHookOptions<FetchNotificationsQuery, FetchNotificationsQueryVariables>): Apollo.QueryResult<FetchNotificationsQuery, Exact<{
982
982
  appName: string;
983
983
  }>>;
984
- export declare function useFetchNotificationsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchNotificationsQuery, FetchNotificationsQueryVariables>): Apollo.QueryTuple<FetchNotificationsQuery, Exact<{
984
+ export declare function useFetchNotificationsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchNotificationsQuery, FetchNotificationsQueryVariables>): Apollo.LazyQueryResultTuple<FetchNotificationsQuery, Exact<{
985
985
  appName: string;
986
986
  }>>;
987
987
  export declare type FetchNotificationsQueryHookResult = ReturnType<typeof useFetchNotificationsQuery>;
@@ -1007,7 +1007,7 @@ export declare const FetchApplicationManagementDataDocument: Apollo.DocumentNode
1007
1007
  export declare function useFetchApplicationManagementDataQuery(baseOptions: Apollo.QueryHookOptions<FetchApplicationManagementDataQuery, FetchApplicationManagementDataQueryVariables>): Apollo.QueryResult<FetchApplicationManagementDataQuery, Exact<{
1008
1008
  appName: string;
1009
1009
  }>>;
1010
- export declare function useFetchApplicationManagementDataLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchApplicationManagementDataQuery, FetchApplicationManagementDataQueryVariables>): Apollo.QueryTuple<FetchApplicationManagementDataQuery, Exact<{
1010
+ export declare function useFetchApplicationManagementDataLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchApplicationManagementDataQuery, FetchApplicationManagementDataQueryVariables>): Apollo.LazyQueryResultTuple<FetchApplicationManagementDataQuery, Exact<{
1011
1011
  appName: string;
1012
1012
  }>>;
1013
1013
  export declare type FetchApplicationManagementDataQueryHookResult = ReturnType<typeof useFetchApplicationManagementDataQuery>;
@@ -1033,7 +1033,7 @@ export declare const FetchApplicationManagementStatusDocument: Apollo.DocumentNo
1033
1033
  export declare function useFetchApplicationManagementStatusQuery(baseOptions: Apollo.QueryHookOptions<FetchApplicationManagementStatusQuery, FetchApplicationManagementStatusQueryVariables>): Apollo.QueryResult<FetchApplicationManagementStatusQuery, Exact<{
1034
1034
  appName: string;
1035
1035
  }>>;
1036
- export declare function useFetchApplicationManagementStatusLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchApplicationManagementStatusQuery, FetchApplicationManagementStatusQueryVariables>): Apollo.QueryTuple<FetchApplicationManagementStatusQuery, Exact<{
1036
+ export declare function useFetchApplicationManagementStatusLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FetchApplicationManagementStatusQuery, FetchApplicationManagementStatusQueryVariables>): Apollo.LazyQueryResultTuple<FetchApplicationManagementStatusQuery, Exact<{
1037
1037
  appName: string;
1038
1038
  }>>;
1039
1039
  export declare type FetchApplicationManagementStatusQueryHookResult = ReturnType<typeof useFetchApplicationManagementStatusQuery>;
@@ -1060,7 +1060,7 @@ export declare type UpdateConstraintMutationFn = Apollo.MutationFunction<UpdateC
1060
1060
  */
1061
1061
  export declare function useUpdateConstraintMutation(baseOptions?: Apollo.MutationHookOptions<UpdateConstraintMutation, UpdateConstraintMutationVariables>): Apollo.MutationTuple<UpdateConstraintMutation, Exact<{
1062
1062
  payload: MdConstraintStatusPayload;
1063
- }>>;
1063
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1064
1064
  export declare type UpdateConstraintMutationHookResult = ReturnType<typeof useUpdateConstraintMutation>;
1065
1065
  export declare type UpdateConstraintMutationResult = Apollo.MutationResult<UpdateConstraintMutation>;
1066
1066
  export declare type UpdateConstraintMutationOptions = Apollo.BaseMutationOptions<UpdateConstraintMutation, UpdateConstraintMutationVariables>;
@@ -1087,7 +1087,7 @@ export declare type ToggleManagementMutationFn = Apollo.MutationFunction<ToggleM
1087
1087
  export declare function useToggleManagementMutation(baseOptions?: Apollo.MutationHookOptions<ToggleManagementMutation, ToggleManagementMutationVariables>): Apollo.MutationTuple<ToggleManagementMutation, Exact<{
1088
1088
  application: string;
1089
1089
  isPaused: boolean;
1090
- }>>;
1090
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1091
1091
  export declare type ToggleManagementMutationHookResult = ReturnType<typeof useToggleManagementMutation>;
1092
1092
  export declare type ToggleManagementMutationResult = Apollo.MutationResult<ToggleManagementMutation>;
1093
1093
  export declare type ToggleManagementMutationOptions = Apollo.BaseMutationOptions<ToggleManagementMutation, ToggleManagementMutationVariables>;
@@ -1112,7 +1112,7 @@ export declare type PinVersionMutationFn = Apollo.MutationFunction<PinVersionMut
1112
1112
  */
1113
1113
  export declare function usePinVersionMutation(baseOptions?: Apollo.MutationHookOptions<PinVersionMutation, PinVersionMutationVariables>): Apollo.MutationTuple<PinVersionMutation, Exact<{
1114
1114
  payload: MdArtifactVersionActionPayload;
1115
- }>>;
1115
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1116
1116
  export declare type PinVersionMutationHookResult = ReturnType<typeof usePinVersionMutation>;
1117
1117
  export declare type PinVersionMutationResult = Apollo.MutationResult<PinVersionMutation>;
1118
1118
  export declare type PinVersionMutationOptions = Apollo.BaseMutationOptions<PinVersionMutation, PinVersionMutationVariables>;
@@ -1137,7 +1137,7 @@ export declare type UnpinVersionMutationFn = Apollo.MutationFunction<UnpinVersio
1137
1137
  */
1138
1138
  export declare function useUnpinVersionMutation(baseOptions?: Apollo.MutationHookOptions<UnpinVersionMutation, UnpinVersionMutationVariables>): Apollo.MutationTuple<UnpinVersionMutation, Exact<{
1139
1139
  payload: MdUnpinArtifactVersionPayload;
1140
- }>>;
1140
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1141
1141
  export declare type UnpinVersionMutationHookResult = ReturnType<typeof useUnpinVersionMutation>;
1142
1142
  export declare type UnpinVersionMutationResult = Apollo.MutationResult<UnpinVersionMutation>;
1143
1143
  export declare type UnpinVersionMutationOptions = Apollo.BaseMutationOptions<UnpinVersionMutation, UnpinVersionMutationVariables>;
@@ -1162,7 +1162,7 @@ export declare type MarkVersionAsBadMutationFn = Apollo.MutationFunction<MarkVer
1162
1162
  */
1163
1163
  export declare function useMarkVersionAsBadMutation(baseOptions?: Apollo.MutationHookOptions<MarkVersionAsBadMutation, MarkVersionAsBadMutationVariables>): Apollo.MutationTuple<MarkVersionAsBadMutation, Exact<{
1164
1164
  payload: MdArtifactVersionActionPayload;
1165
- }>>;
1165
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1166
1166
  export declare type MarkVersionAsBadMutationHookResult = ReturnType<typeof useMarkVersionAsBadMutation>;
1167
1167
  export declare type MarkVersionAsBadMutationResult = Apollo.MutationResult<MarkVersionAsBadMutation>;
1168
1168
  export declare type MarkVersionAsBadMutationOptions = Apollo.BaseMutationOptions<MarkVersionAsBadMutation, MarkVersionAsBadMutationVariables>;
@@ -1187,7 +1187,7 @@ export declare type MarkVersionAsGoodMutationFn = Apollo.MutationFunction<MarkVe
1187
1187
  */
1188
1188
  export declare function useMarkVersionAsGoodMutation(baseOptions?: Apollo.MutationHookOptions<MarkVersionAsGoodMutation, MarkVersionAsGoodMutationVariables>): Apollo.MutationTuple<MarkVersionAsGoodMutation, Exact<{
1189
1189
  payload: MdMarkArtifactVersionAsGoodPayload;
1190
- }>>;
1190
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1191
1191
  export declare type MarkVersionAsGoodMutationHookResult = ReturnType<typeof useMarkVersionAsGoodMutation>;
1192
1192
  export declare type MarkVersionAsGoodMutationResult = Apollo.MutationResult<MarkVersionAsGoodMutation>;
1193
1193
  export declare type MarkVersionAsGoodMutationOptions = Apollo.BaseMutationOptions<MarkVersionAsGoodMutation, MarkVersionAsGoodMutationVariables>;
@@ -1212,7 +1212,7 @@ export declare type RetryVersionActionMutationFn = Apollo.MutationFunction<Retry
1212
1212
  */
1213
1213
  export declare function useRetryVersionActionMutation(baseOptions?: Apollo.MutationHookOptions<RetryVersionActionMutation, RetryVersionActionMutationVariables>): Apollo.MutationTuple<RetryVersionActionMutation, Exact<{
1214
1214
  payload: MdRetryArtifactActionPayload;
1215
- }>>;
1215
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1216
1216
  export declare type RetryVersionActionMutationHookResult = ReturnType<typeof useRetryVersionActionMutation>;
1217
1217
  export declare type RetryVersionActionMutationResult = Apollo.MutationResult<RetryVersionActionMutation>;
1218
1218
  export declare type RetryVersionActionMutationOptions = Apollo.BaseMutationOptions<RetryVersionActionMutation, RetryVersionActionMutationVariables>;
@@ -1237,7 +1237,7 @@ export declare type UpdateGitIntegrationMutationFn = Apollo.MutationFunction<Upd
1237
1237
  */
1238
1238
  export declare function useUpdateGitIntegrationMutation(baseOptions?: Apollo.MutationHookOptions<UpdateGitIntegrationMutation, UpdateGitIntegrationMutationVariables>): Apollo.MutationTuple<UpdateGitIntegrationMutation, Exact<{
1239
1239
  payload: MdUpdateGitIntegrationPayload;
1240
- }>>;
1240
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1241
1241
  export declare type UpdateGitIntegrationMutationHookResult = ReturnType<typeof useUpdateGitIntegrationMutation>;
1242
1242
  export declare type UpdateGitIntegrationMutationResult = Apollo.MutationResult<UpdateGitIntegrationMutation>;
1243
1243
  export declare type UpdateGitIntegrationMutationOptions = Apollo.BaseMutationOptions<UpdateGitIntegrationMutation, UpdateGitIntegrationMutationVariables>;
@@ -1262,7 +1262,7 @@ export declare type DismissNotificationMutationFn = Apollo.MutationFunction<Dism
1262
1262
  */
1263
1263
  export declare function useDismissNotificationMutation(baseOptions?: Apollo.MutationHookOptions<DismissNotificationMutation, DismissNotificationMutationVariables>): Apollo.MutationTuple<DismissNotificationMutation, Exact<{
1264
1264
  payload: MdDismissNotificationPayload;
1265
- }>>;
1265
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1266
1266
  export declare type DismissNotificationMutationHookResult = ReturnType<typeof useDismissNotificationMutation>;
1267
1267
  export declare type DismissNotificationMutationResult = Apollo.MutationResult<DismissNotificationMutation>;
1268
1268
  export declare type DismissNotificationMutationOptions = Apollo.BaseMutationOptions<DismissNotificationMutation, DismissNotificationMutationVariables>;
@@ -1287,7 +1287,7 @@ export declare type ImportDeliveryConfigMutationFn = Apollo.MutationFunction<Imp
1287
1287
  */
1288
1288
  export declare function useImportDeliveryConfigMutation(baseOptions?: Apollo.MutationHookOptions<ImportDeliveryConfigMutation, ImportDeliveryConfigMutationVariables>): Apollo.MutationTuple<ImportDeliveryConfigMutation, Exact<{
1289
1289
  application: string;
1290
- }>>;
1290
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1291
1291
  export declare type ImportDeliveryConfigMutationHookResult = ReturnType<typeof useImportDeliveryConfigMutation>;
1292
1292
  export declare type ImportDeliveryConfigMutationResult = Apollo.MutationResult<ImportDeliveryConfigMutation>;
1293
1293
  export declare type ImportDeliveryConfigMutationOptions = Apollo.BaseMutationOptions<ImportDeliveryConfigMutation, ImportDeliveryConfigMutationVariables>;
@@ -1312,7 +1312,7 @@ export declare type ToggleResourceManagementMutationFn = Apollo.MutationFunction
1312
1312
  */
1313
1313
  export declare function useToggleResourceManagementMutation(baseOptions?: Apollo.MutationHookOptions<ToggleResourceManagementMutation, ToggleResourceManagementMutationVariables>): Apollo.MutationTuple<ToggleResourceManagementMutation, Exact<{
1314
1314
  payload?: MdToggleResourceManagementPayload;
1315
- }>>;
1315
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1316
1316
  export declare type ToggleResourceManagementMutationHookResult = ReturnType<typeof useToggleResourceManagementMutation>;
1317
1317
  export declare type ToggleResourceManagementMutationResult = Apollo.MutationResult<ToggleResourceManagementMutation>;
1318
1318
  export declare type ToggleResourceManagementMutationOptions = Apollo.BaseMutationOptions<ToggleResourceManagementMutation, ToggleResourceManagementMutationVariables>;
@@ -1337,7 +1337,7 @@ export declare type RestartConstraintEvaluationMutationFn = Apollo.MutationFunct
1337
1337
  */
1338
1338
  export declare function useRestartConstraintEvaluationMutation(baseOptions?: Apollo.MutationHookOptions<RestartConstraintEvaluationMutation, RestartConstraintEvaluationMutationVariables>): Apollo.MutationTuple<RestartConstraintEvaluationMutation, Exact<{
1339
1339
  payload: MdRestartConstraintEvaluationPayload;
1340
- }>>;
1340
+ }>, Apollo.DefaultContext, Apollo.ApolloCache<any>>;
1341
1341
  export declare type RestartConstraintEvaluationMutationHookResult = ReturnType<typeof useRestartConstraintEvaluationMutation>;
1342
1342
  export declare type RestartConstraintEvaluationMutationResult = Apollo.MutationResult<RestartConstraintEvaluationMutation>;
1343
1343
  export declare type RestartConstraintEvaluationMutationOptions = Apollo.BaseMutationOptions<RestartConstraintEvaluationMutation, RestartConstraintEvaluationMutationVariables>;
@@ -44,6 +44,7 @@ export declare class PipelineGraph extends React.Component<IPipelineGraphProps,
44
44
  */
45
45
  private curvedLink;
46
46
  private getLastPhase;
47
+ private collect;
47
48
  private createNodes;
48
49
  /**
49
50
  * Sets phases and adds children/parents to nodes
@@ -17,8 +17,9 @@ export declare class PipelineConfigService {
17
17
  }, isStrategy?: boolean): PromiseLike<void>;
18
18
  static renamePipeline(applicationName: string, pipeline: IPipeline, currentName: string, newName: string): PromiseLike<void>;
19
19
  static triggerPipeline(applicationName: string, pipelineName: string, body?: any): PromiseLike<string>;
20
- static getDownstreamStageIds(pipeline: IPipeline, stage: IStage): Array<string | number>;
20
+ static getDownstreamStageIds(map: Map<string | number, Array<string | number>>, stage: string | number): Array<string | number>;
21
21
  static getDependencyCandidateStages(pipeline: IPipeline, stage: IStage): IStage[];
22
+ private static groupStagesByRequisiteStageRefIds;
22
23
  static getAllUpstreamDependencies(pipeline: IPipeline, stage: IStage): IStage[];
23
24
  private static sortPipelines;
24
25
  }
@@ -1,6 +1,8 @@
1
1
  export declare enum ManifestRenderers {
2
2
  HELM2 = "HELM2",
3
3
  HELM3 = "HELM3",
4
- KUSTOMIZE = "KUSTOMIZE"
4
+ KUSTOMIZE = "KUSTOMIZE",
5
+ KUSTOMIZE4 = "KUSTOMIZE4"
5
6
  }
6
7
  export declare const HELM_RENDERERS: Readonly<ManifestRenderers[]>;
8
+ export declare const KUSTOMIZE_RENDERERS: Readonly<ManifestRenderers[]>;
@@ -1,4 +1,4 @@
1
- /// <reference types="dompurify" />
1
+ import DOMPurify from 'dompurify';
2
2
  import React from 'react';
3
3
  import './Markdown.less';
4
4
  export interface IMarkdownProps {
@@ -13,7 +13,7 @@ export interface IMarkdownProps {
13
13
  /** The className(s) to apply to the tag (.Markdown class is always applied) */
14
14
  className?: string;
15
15
  /** Options passed to DOMPurify. Examples: https://github.com/cure53/DOMPurify/tree/master/demos#what-is-this */
16
- options?: IDOMPurifyConfig;
16
+ options?: DOMPurify.Config;
17
17
  }
18
18
  /**
19
19
  * Renders markdown into a div (or some other tag)
@@ -186,4 +186,4 @@ export declare function Markdown(props: IMarkdownProps): React.DOMElement<{
186
186
  onTransitionEnd?: React.TransitionEventHandler<any>;
187
187
  onTransitionEndCapture?: React.TransitionEventHandler<any>;
188
188
  }, Element>;
189
- export declare const toMarkdown: (message: string, options?: IDOMPurifyConfig, inline?: boolean) => JSX.Element;
189
+ export declare const toMarkdown: (message: string, options?: DOMPurify.Config, inline?: boolean) => JSX.Element;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spinnaker/core",
3
3
  "license": "Apache-2.0",
4
- "version": "0.20.0",
4
+ "version": "0.22.0",
5
5
  "module": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
7
7
  "scripts": {
@@ -14,10 +14,10 @@
14
14
  "lib": "npm run build"
15
15
  },
16
16
  "dependencies": {
17
- "@apollo/client": "3.3.14",
17
+ "@apollo/client": "^3.6.9",
18
18
  "@fortawesome/fontawesome-free": "5.5.0",
19
19
  "@spinnaker/mocks": "1.0.7",
20
- "@spinnaker/presentation": "^0.1.0",
20
+ "@spinnaker/presentation": "^0.2.0",
21
21
  "@spinnaker/styleguide": "2.0.0",
22
22
  "@uirouter/angularjs": "1.0.26",
23
23
  "@uirouter/core": "6.0.8",
@@ -34,7 +34,7 @@
34
34
  "angular2react": "3.0.2",
35
35
  "angulartics": "1.4.0",
36
36
  "angulartics-google-analytics": "0.2.1",
37
- "ansi_up": "4.0.4",
37
+ "ansi_up": "5.1.0",
38
38
  "bootstrap": "3.4.1",
39
39
  "brace": "0.11.1",
40
40
  "cachefactory": "3.0.0",
@@ -43,8 +43,8 @@
43
43
  "commonmark": "0.28.1",
44
44
  "date-fns": "2.21.1",
45
45
  "diff-match-patch": "1.0.4",
46
- "dompurify": "2.0.17",
47
- "enzyme": "3.10.0",
46
+ "dompurify": "^2.3.10",
47
+ "enzyme": "3.11.0",
48
48
  "formik": "1.5.1",
49
49
  "human-readable-ids": "1.0.4",
50
50
  "jquery": "3.5.1",
@@ -54,7 +54,7 @@
54
54
  "lodash": "4.17.21",
55
55
  "lodash-decorators": "4.5.0",
56
56
  "luxon": "1.23.0",
57
- "memoize-one": "4.0.2",
57
+ "memoize-one": "6.0.0",
58
58
  "ngimport": "0.6.1",
59
59
  "prop-types": "15.6.1",
60
60
  "react": "16.14.0",
@@ -76,7 +76,7 @@
76
76
  "react2angular": "3.2.1",
77
77
  "recoil": "0.7.2",
78
78
  "rxjs": "6.6.7",
79
- "select2": "3.5.1",
79
+ "select2": "^3.5.1",
80
80
  "select2-bootstrap-css": "1.4.6",
81
81
  "source-sans": "3.46.0",
82
82
  "spel2js": "0.2.6",
@@ -89,14 +89,14 @@
89
89
  "@graphql-codegen/typescript-operations": "^1.18.3",
90
90
  "@graphql-codegen/typescript-react-apollo": "^2.3.0",
91
91
  "@spinnaker/eslint-plugin": "^3.0.1",
92
- "@spinnaker/scripts": "^0.2.5",
92
+ "@spinnaker/scripts": "^0.3.0",
93
93
  "@types/angular": "1.6.26",
94
94
  "@types/angular-mocks": "1.5.10",
95
95
  "@types/angular-ui-bootstrap": "0.13.41",
96
96
  "@types/classnames": "2.2.0",
97
97
  "@types/clipboard": "1.5.33",
98
98
  "@types/commonmark": "0.27.0",
99
- "@types/dompurify": "0.0.29",
99
+ "@types/dompurify": "^2.3.3",
100
100
  "@types/enzyme": "3.10.3",
101
101
  "@types/jasmine": "3.6.9",
102
102
  "@types/jquery": "2.0.43",
@@ -120,5 +120,5 @@
120
120
  "shx": "0.3.3",
121
121
  "typescript": "4.3.5"
122
122
  },
123
- "gitHead": "d5ceedd9f745e6f1156f6b5e25275cc311d4f0ab"
123
+ "gitHead": "3efb67c7d040c3b549e9d3f589663f4e70c74390"
124
124
  }
@@ -117,7 +117,19 @@ export class PipelineGraph extends React.Component<IPipelineGraphProps, IPipelin
117
117
  if (!node.children.length) {
118
118
  return node.phase;
119
119
  }
120
- return max(node.children.map((n) => this.getLastPhase(n)));
120
+ const result: number[] = [];
121
+ this.collect(node.children, result);
122
+ return max(result);
123
+ }
124
+
125
+ private collect(nodes: IPipelineGraphNode[], result: number[]) {
126
+ nodes.forEach((node) => {
127
+ if (node.children.length) {
128
+ this.collect(node.children, result);
129
+ } else {
130
+ result.push(node.phase);
131
+ }
132
+ });
121
133
  }
122
134
 
123
135
  private createNodes(props: IPipelineGraphProps): IPipelineGraphNode[] {
@@ -574,7 +586,7 @@ export class PipelineGraph extends React.Component<IPipelineGraphProps, IPipelin
574
586
  </a>
575
587
  </p>
576
588
  )}
577
- {/* The SVG and Placholder elements need to be in the DOM even
589
+ {/* The SVG and Placholder elements need to be in the DOM even
578
590
  when minimized because applyNodeHeights needs the width values */}
579
591
  <svg
580
592
  className="pipeline-graph"
@@ -104,22 +104,30 @@ export class PipelineConfigService {
104
104
  });
105
105
  }
106
106
 
107
- public static getDownstreamStageIds(pipeline: IPipeline, stage: IStage): Array<string | number> {
108
- let downstream: Array<string | number> = [];
109
- const children = pipeline.stages.filter((stageToTest: IStage) => {
110
- return stageToTest.requisiteStageRefIds && stageToTest.requisiteStageRefIds.includes(stage.refId);
111
- });
112
- if (children.length) {
113
- downstream = children.map((c) => c.refId);
107
+ public static getDownstreamStageIds(
108
+ map: Map<string | number, Array<string | number>>,
109
+ stage: string | number,
110
+ ): Array<string | number> {
111
+ if (!map || !stage) {
112
+ return [];
113
+ }
114
+ let downstreamStages: Array<string | number> = [];
115
+
116
+ const children = map.get(stage);
117
+ if (children && children.length) {
118
+ downstreamStages = downstreamStages.concat(children);
114
119
  children.forEach((child) => {
115
- downstream = downstream.concat(this.getDownstreamStageIds(pipeline, child));
120
+ downstreamStages = downstreamStages.concat(PipelineConfigService.getDownstreamStageIds(map, child));
116
121
  });
117
122
  }
118
- return uniq(downstream);
123
+ return uniq(downstreamStages);
119
124
  }
120
125
 
121
126
  public static getDependencyCandidateStages(pipeline: IPipeline, stage: IStage): IStage[] {
122
- const downstreamIds: Array<string | number> = this.getDownstreamStageIds(pipeline, stage);
127
+ const grouped = PipelineConfigService.groupStagesByRequisiteStageRefIds(pipeline);
128
+
129
+ const downstreamIds: Array<string | number> = PipelineConfigService.getDownstreamStageIds(grouped, stage.refId);
130
+
123
131
  return pipeline.stages.filter((stageToTest: IStage) => {
124
132
  return (
125
133
  stage !== stageToTest &&
@@ -131,6 +139,21 @@ export class PipelineConfigService {
131
139
  });
132
140
  }
133
141
 
142
+ private static groupStagesByRequisiteStageRefIds(pipeline: IPipeline) {
143
+ return pipeline.stages.reduce((acc, obj) => {
144
+ const parent = obj['refId'];
145
+ obj.requisiteStageRefIds.forEach((child) => {
146
+ const values = acc.get(child);
147
+ if (values && values.length) {
148
+ values.push(parent);
149
+ } else {
150
+ acc.set(child, [parent]);
151
+ }
152
+ });
153
+ return acc;
154
+ }, new Map<string | number, Array<string | number>>());
155
+ }
156
+
134
157
  public static getAllUpstreamDependencies(pipeline: IPipeline, stage: IStage): IStage[] {
135
158
  if (!pipeline || !stage) {
136
159
  return [];
@@ -2,7 +2,7 @@ import { isNil } from 'lodash';
2
2
  import React from 'react';
3
3
 
4
4
  import type { IFormikStageConfigInjectedProps } from '../FormikStageConfig';
5
- import { HELM_RENDERERS, ManifestRenderers } from './ManifestRenderers';
5
+ import { HELM_RENDERERS, KUSTOMIZE_RENDERERS } from './ManifestRenderers';
6
6
  import { ExpectedArtifactService } from '../../../../artifact';
7
7
  import { StageConfigField } from '../common';
8
8
  import type { IExpectedArtifact } from '../../../../domain';
@@ -26,7 +26,7 @@ export function BakeManifestStageForm({ application, formik, pipeline }: IFormik
26
26
 
27
27
  // Clear renderer-specific fields when selected renderer changes
28
28
  React.useEffect(() => {
29
- if (stage.templateRenderer == ManifestRenderers.KUSTOMIZE && !isNil(stage.inputArtifacts)) {
29
+ if (KUSTOMIZE_RENDERERS.includes(stage.templateRenderer) && !isNil(stage.inputArtifacts)) {
30
30
  formik.setFieldValue('inputArtifacts', null);
31
31
  }
32
32
  if (HELM_RENDERERS.includes(stage.templateRenderer) && !isNil(stage.inputArtifact)) {
@@ -35,7 +35,7 @@ export function BakeManifestStageForm({ application, formik, pipeline }: IFormik
35
35
  }, [stage.templateRenderer]);
36
36
 
37
37
  const templateRenderers = React.useMemo(() => {
38
- return [...HELM_RENDERERS, ManifestRenderers.KUSTOMIZE];
38
+ return [...KUSTOMIZE_RENDERERS, ...HELM_RENDERERS];
39
39
  }, []);
40
40
 
41
41
  return (
@@ -56,7 +56,7 @@ export function BakeManifestStageForm({ application, formik, pipeline }: IFormik
56
56
  stringOptions={templateRenderers}
57
57
  />
58
58
  </StageConfigField>
59
- {stage.templateRenderer === ManifestRenderers.KUSTOMIZE && (
59
+ {KUSTOMIZE_RENDERERS.includes(stage.templateRenderer) && (
60
60
  <BakeKustomizeConfigForm pipeline={pipeline} application={application} formik={formik} />
61
61
  )}
62
62
  {HELM_RENDERERS.includes(stage.templateRenderer) && (
@@ -2,6 +2,11 @@ export enum ManifestRenderers {
2
2
  HELM2 = 'HELM2',
3
3
  HELM3 = 'HELM3',
4
4
  KUSTOMIZE = 'KUSTOMIZE',
5
+ KUSTOMIZE4 = 'KUSTOMIZE4',
5
6
  }
6
7
 
7
8
  export const HELM_RENDERERS: Readonly<ManifestRenderers[]> = [ManifestRenderers.HELM2, ManifestRenderers.HELM3];
9
+ export const KUSTOMIZE_RENDERERS: Readonly<ManifestRenderers[]> = [
10
+ ManifestRenderers.KUSTOMIZE,
11
+ ManifestRenderers.KUSTOMIZE4,
12
+ ];
@@ -16,7 +16,7 @@
16
16
  style="width: 250px"
17
17
  class="form-control input-sm"
18
18
  autofocus
19
- on-select="stageConfigCtrl.selectStageType($item)"
19
+ onselect="stageConfigCtrl.selectStageType($item)"
20
20
  >
21
21
  <ui-select-match>
22
22
  <strong>{{$select.selected.label}}</strong>
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  import { module } from 'angular';
4
- import { defaultsDeep, extend, omit, union } from 'lodash';
4
+ import { defaultsDeep, extend, isEqual, omit, union } from 'lodash';
5
+ import memoizeOne from 'memoize-one';
5
6
  import React from 'react';
6
7
  import ReactDOM from 'react-dom';
7
8
 
@@ -111,12 +112,12 @@ module(CORE_PIPELINE_CONFIG_STAGES_STAGE_MODULE, [
111
112
  $scope.stage.expectedArtifacts = artifacts;
112
113
  });
113
114
  };
114
-
115
+ const memoizedGetDependencyCandidateStages = memoizeOne(
116
+ PipelineConfigService.getDependencyCandidateStages,
117
+ isEqual,
118
+ );
115
119
  $scope.updateAvailableDependencyStages = function () {
116
- const availableDependencyStages = PipelineConfigService.getDependencyCandidateStages(
117
- $scope.pipeline,
118
- $scope.stage,
119
- );
120
+ const availableDependencyStages = memoizedGetDependencyCandidateStages($scope.pipeline, $scope.stage);
120
121
  $scope.options.dependencies = availableDependencyStages.map(function (stage) {
121
122
  return {
122
123
  name: stage.name,
@@ -7,7 +7,7 @@ import { OrchestratedItemRunningTime } from './OrchestratedItemRunningTime';
7
7
  import type { Application } from '../../../application/application.model';
8
8
  import { SETTINGS } from '../../../config/settings';
9
9
  import { ExecutionBarLabel } from '../../config/stages/common/ExecutionBarLabel';
10
- import type { IExecution, IExecutionStageSummary } from '../../../domain';
10
+ import type { IExecution, IExecutionStageSummary, IStage } from '../../../domain';
11
11
  import { logger } from '../../../utils';
12
12
  import { duration } from '../../../utils/timeFormatters';
13
13
 
@@ -94,7 +94,19 @@ export class ExecutionMarker extends React.Component<IExecutionMarkerProps, IExe
94
94
 
95
95
  public render() {
96
96
  const { stage, application, execution, active, previousStageActive, width } = this.props;
97
- const stageType = (stage.activeStageType || stage.type).toLowerCase(); // support groups
97
+ let stageType = (stage.activeStageType || stage.type).toLowerCase(); // support groups
98
+ stage.stages.forEach((childStage: IStage) => {
99
+ if (childStage.type == 'pipeline') {
100
+ const childPipeline = application.executions.data.find((p: any) => p.id === childStage.context.executionId);
101
+ if (childPipeline != undefined) {
102
+ childPipeline.stages.forEach((stageToCheck: IStage) => {
103
+ if (stageToCheck.type == 'manualJudgment' && stageToCheck.status == 'RUNNING') {
104
+ stageType = 'manualjudgment';
105
+ }
106
+ });
107
+ }
108
+ }
109
+ });
98
110
  const pipelineStatus = this.stageStatus(stage.status.toLowerCase());
99
111
  const markerClassName = [
100
112
  stage.type !== 'group' ? 'clickable' : '',
@@ -21,7 +21,7 @@ export interface IMarkdownProps {
21
21
  className?: string;
22
22
 
23
23
  /** Options passed to DOMPurify. Examples: https://github.com/cure53/DOMPurify/tree/master/demos#what-is-this */
24
- options?: IDOMPurifyConfig;
24
+ options?: DOMPurify.Config;
25
25
  }
26
26
 
27
27
  /**
@@ -44,11 +44,13 @@ export function Markdown(props: IMarkdownProps) {
44
44
  const restProps = rest as React.DOMAttributes<any>;
45
45
  const parsed = parser.parse(parseable.toString());
46
46
  const rendered = renderer.render(parsed);
47
- restProps.dangerouslySetInnerHTML = { __html: DOMPurify.sanitize(rendered, props.options) };
47
+ restProps.dangerouslySetInnerHTML = {
48
+ __html: DOMPurify.sanitize(rendered, { ...props.options, RETURN_DOM_FRAGMENT: false, RETURN_DOM: false }),
49
+ };
48
50
 
49
51
  return React.createElement(tag, { ...restProps, className });
50
52
  }
51
53
 
52
- export const toMarkdown = (message: string, options: IDOMPurifyConfig = {}, inline = false) => (
54
+ export const toMarkdown = (message: string, options: DOMPurify.Config = {}, inline = false) => (
53
55
  <Markdown message={message} tag={inline ? 'span' : 'div'} options={options} />
54
56
  );