@spinnaker/core 0.24.1 → 0.26.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/CHANGELOG.md +43 -0
- package/dist/application/config/defaultTagFilter/DefaultTagFilterConfig.d.ts +27 -0
- package/dist/application/config/defaultTagFilter/defaultTagFilterConfig.component.d.ts +1 -0
- package/dist/config/settings.d.ts +1 -0
- package/dist/domain/IArtifact.d.ts +2 -0
- package/dist/domain/ITrigger.d.ts +5 -0
- package/dist/index.js +36 -36
- package/dist/index.js.map +1 -1
- package/dist/manifest/ManifestYaml.d.ts +10 -4
- package/dist/pipeline/config/stages/bakeManifest/ManifestRenderers.d.ts +2 -0
- package/dist/pipeline/config/stages/bakeManifest/helmfile/BakeHelmfileConfigForm.d.ts +18 -0
- package/dist/pipeline/config/stages/bakeManifest/utils/getBakedArtifacts.d.ts +4 -0
- package/dist/pipeline/config/stages/bakeManifest/utils/getContentReference.d.ts +1 -0
- package/dist/pipeline/config/triggers/artifacts/ArtifactService.d.ts +3 -0
- package/dist/pipeline/config/triggers/cdevents/CDEventsTrigger.d.ts +7 -0
- package/dist/pipeline/config/triggers/cdevents/cdevents.trigger.d.ts +1 -0
- package/dist/pipeline/config/triggers/index.d.ts +1 -0
- package/dist/pipeline/executions/Executions.d.ts +1 -0
- package/dist/pipeline/index.d.ts +2 -0
- package/dist/presentation/forms/inputs/NumberConcurrencyInput.d.ts +7 -0
- package/package.json +2 -2
- package/src/application/config/applicationConfig.controller.js +26 -0
- package/src/application/config/applicationConfig.view.html +9 -0
- package/src/application/config/defaultTagFilter/DefaultTagFilterConfig.spec.tsx +75 -0
- package/src/application/config/defaultTagFilter/DefaultTagFilterConfig.tsx +161 -0
- package/src/application/config/defaultTagFilter/defaultTagFilterConfig.component.ts +15 -0
- package/src/application/config/defaultTagFilter/defaultTagFilterConfig.less +8 -0
- package/src/artifact/ArtifactIconService.ts +1 -0
- package/src/artifact/ArtifactTypes.ts +1 -0
- package/src/config/settings.ts +1 -0
- package/src/domain/IArtifact.ts +3 -0
- package/src/domain/ITrigger.ts +4 -0
- package/src/help/help.contents.ts +10 -0
- package/src/manifest/ManifestYaml.tsx +29 -7
- package/src/pipeline/config/stages/bakeManifest/BakeManifestConfig.tsx +4 -1
- package/src/pipeline/config/stages/bakeManifest/BakeManifestDetailsTab.tsx +24 -12
- package/src/pipeline/config/stages/bakeManifest/BakeManifestStageForm.tsx +9 -2
- package/src/pipeline/config/stages/bakeManifest/ManifestRenderers.ts +2 -0
- package/src/pipeline/config/stages/bakeManifest/helmfile/BakeHelmfileConfigForm.spec.tsx +132 -0
- package/src/pipeline/config/stages/bakeManifest/helmfile/BakeHelmfileConfigForm.tsx +271 -0
- package/src/pipeline/config/stages/bakeManifest/utils/getBakedArtifacts.ts +13 -0
- package/src/pipeline/config/stages/bakeManifest/utils/getContentReference.ts +3 -0
- package/src/pipeline/config/triggers/artifacts/ArtifactService.ts +4 -0
- package/src/pipeline/config/triggers/cdevents/CDEventsTrigger.tsx +48 -0
- package/src/pipeline/config/triggers/cdevents/cdevents.trigger.ts +19 -0
- package/src/pipeline/config/triggers/index.ts +1 -0
- package/src/pipeline/create/CreatePipelineModal.tsx +1 -1
- package/src/pipeline/details/StageFailureMessage.tsx +10 -24
- package/src/pipeline/executions/Executions.tsx +13 -0
- package/src/pipeline/index.ts +2 -0
- package/src/pipeline/status/ExecutionCancellationReason.tsx +1 -1
- package/src/presentation/forms/inputs/NumberConcurrencyInput.tsx +29 -0
|
@@ -73,33 +73,19 @@ export class StageFailureMessage extends React.Component<IStageFailureMessagePro
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
public render() {
|
|
76
|
-
const { message, messages
|
|
76
|
+
const { message, messages } = this.props;
|
|
77
77
|
const { isFailed, failedTask, failedExecutionId, failedStageName, failedStageId } = this.state;
|
|
78
78
|
|
|
79
|
-
|
|
80
|
-
if (stageMessages.length > 0) {
|
|
79
|
+
if (isFailed || failedTask || message || messages.length) {
|
|
81
80
|
const exceptionTitle = isFailed ? (messages.length ? 'Exceptions' : 'Exception') : 'Warning';
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
if (shouldFilterExpressionFailures) {
|
|
92
|
-
stageMessages = stageMessages.filter((m) => !m.startsWith('Failed to evaluate'));
|
|
93
|
-
|
|
94
|
-
if (stageMessages.length === 0) {
|
|
95
|
-
// no messages to be displayed after filtering
|
|
96
|
-
return null;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const displayMessages = stageMessages.map((m, i) => (
|
|
101
|
-
<Markdown key={i} message={m || StageFailureMessages.NO_REASON_PROVIDED} className="break-word" />
|
|
102
|
-
));
|
|
81
|
+
const displayMessages =
|
|
82
|
+
message || !messages.length ? (
|
|
83
|
+
<Markdown message={message || StageFailureMessages.NO_REASON_PROVIDED} className="break-word" />
|
|
84
|
+
) : (
|
|
85
|
+
messages.map((m, i) => (
|
|
86
|
+
<Markdown key={i} message={m || StageFailureMessages.NO_REASON_PROVIDED} className="break-word" />
|
|
87
|
+
))
|
|
88
|
+
);
|
|
103
89
|
|
|
104
90
|
if (displayMessages) {
|
|
105
91
|
return (
|
|
@@ -4,6 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import type { Subscription } from 'rxjs';
|
|
5
5
|
|
|
6
6
|
import type { Application } from '../../application';
|
|
7
|
+
import type { IDefaultTagFilterConfig } from '../../application/config/defaultTagFilter/DefaultTagFilterConfig';
|
|
7
8
|
import { CreatePipeline } from '../config/CreatePipeline';
|
|
8
9
|
import { CreatePipelineButton } from '../create/CreatePipelineButton';
|
|
9
10
|
import type { IExecution, IPipeline, IPipelineCommand } from '../../domain';
|
|
@@ -74,6 +75,16 @@ export class Executions extends React.Component<IExecutionsProps, IExecutionsSta
|
|
|
74
75
|
}
|
|
75
76
|
};
|
|
76
77
|
|
|
78
|
+
private loadDefaultFilters = (): void => {
|
|
79
|
+
const defaultTags = this.props.app.attributes.defaultFilteredTags;
|
|
80
|
+
if (defaultTags != null) {
|
|
81
|
+
this.props.app.attributes.defaultFilteredTags.forEach((defaultTag: IDefaultTagFilterConfig) => {
|
|
82
|
+
ExecutionState.filterModel.asFilterModel.sortFilter.tags[`${defaultTag.tagName}:${defaultTag.tagValue}`] = true;
|
|
83
|
+
});
|
|
84
|
+
this.updateExecutionGroups(true);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
77
88
|
private clearFilters = (): void => {
|
|
78
89
|
ExecutionFilterService.clearFilters();
|
|
79
90
|
this.updateExecutionGroups(true);
|
|
@@ -235,6 +246,8 @@ export class Executions extends React.Component<IExecutionsProps, IExecutionsSta
|
|
|
235
246
|
() => this.dataInitializationFailure(),
|
|
236
247
|
);
|
|
237
248
|
|
|
249
|
+
this.loadDefaultFilters();
|
|
250
|
+
|
|
238
251
|
$q.all([app.executions.ready(), app.pipelineConfigs.ready()]).then(() => {
|
|
239
252
|
this.updateExecutionGroups();
|
|
240
253
|
const nameOrIdToStart = ReactInjector.$stateParams.startManualExecution;
|
package/src/pipeline/index.ts
CHANGED
|
@@ -23,3 +23,5 @@ export * from './manualExecution/TriggerTemplate';
|
|
|
23
23
|
export * from './service/ExecutionsTransformer';
|
|
24
24
|
export * from './service/execution.service';
|
|
25
25
|
export * from './status/ArtifactList';
|
|
26
|
+
export * from './config/stages/bakeManifest/utils/getBakedArtifacts';
|
|
27
|
+
export * from './config/stages/bakeManifest/utils/getContentReference';
|
|
@@ -7,7 +7,7 @@ interface IExecutionCancellationReasonProps {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export function ExecutionCancellationReason({ cancellationReason }: IExecutionCancellationReasonProps) {
|
|
10
|
-
const [isExpanded, setIsExpanded] = React.useState(
|
|
10
|
+
const [isExpanded, setIsExpanded] = React.useState(true);
|
|
11
11
|
return (
|
|
12
12
|
<>
|
|
13
13
|
<div className="execution-cancellation-reason-button">
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { useInternalValidator } from './hooks';
|
|
4
|
+
import type { IFormInputProps, OmitControlledInputPropsFrom } from './interface';
|
|
5
|
+
import { orEmptyString, validationClassName } from './utils';
|
|
6
|
+
import type { IValidator } from '../validation';
|
|
7
|
+
import { composeValidators, Validators } from '../validation';
|
|
8
|
+
|
|
9
|
+
interface INumberInputProps extends IFormInputProps, OmitControlledInputPropsFrom<React.InputHTMLAttributes<any>> {
|
|
10
|
+
inputClassName?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const isNumber = (val: any): val is number => typeof val === 'number';
|
|
14
|
+
|
|
15
|
+
export function NumberConcurrencyInput(props: INumberInputProps) {
|
|
16
|
+
const { value, validation, inputClassName, ...otherProps } = props;
|
|
17
|
+
|
|
18
|
+
const minMaxValidator: IValidator = (val: any, label?: string) => {
|
|
19
|
+
const minValidator = isNumber(props.min) ? Validators.minValue(props.min) : undefined;
|
|
20
|
+
const maxValidator = isNumber(props.max) ? Validators.maxValue(props.max) : undefined;
|
|
21
|
+
const validator = composeValidators([minValidator, maxValidator]);
|
|
22
|
+
return validator ? validator(val, label) : null;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
useInternalValidator(validation, minMaxValidator);
|
|
26
|
+
|
|
27
|
+
const className = `NumberInput form-control ${orEmptyString(inputClassName)} ${validationClassName(validation)}`;
|
|
28
|
+
return <input className={className} type="number" value={orEmptyString(value)} {...otherProps} />;
|
|
29
|
+
}
|