@spinnaker/core 0.14.2 → 0.15.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 +26 -0
- package/dist/config/settings.d.ts +1 -0
- package/dist/core.module.d.ts +1 -1
- package/dist/index.js +89 -47
- package/dist/index.js.map +1 -1
- package/dist/instance/instanceType.service.d.ts +3 -2
- package/dist/managed/artifactActions/ArtifactActions.d.ts +24 -0
- package/dist/managed/constraints/registry.d.ts +13 -2
- package/dist/managed/environmentBaseElements/EnvironmentItem.d.ts +3 -2
- package/dist/managed/graphql/graphql-sdk.d.ts +123 -11
- package/dist/managed/overview/Resource.d.ts +5 -2
- package/dist/managed/overview/artifact/Artifact.d.ts +2 -1
- package/dist/managed/overview/artifact/ArtifactActionModal.d.ts +20 -9
- package/dist/managed/overview/artifact/ArtifactCollapsibleSection.d.ts +7 -0
- package/dist/managed/overview/artifact/ArtifactVersions.d.ts +9 -0
- package/dist/managed/overview/artifact/CurrentVersion.d.ts +7 -6
- package/dist/managed/overview/artifact/VersionTitle.d.ts +9 -0
- package/dist/managed/overview/artifact/hooks.d.ts +6 -11
- package/dist/managed/overview/artifact/useCreateRollbackActions.hook.d.ts +3 -0
- package/dist/managed/overview/artifact/utils.d.ts +15 -14
- package/dist/managed/overview/useIsUpdatingResources.hook.d.ts +1 -0
- package/dist/managed/resources/ResourceTitle.d.ts +3 -3
- package/dist/managed/resources/resourceRegistry.d.ts +1 -1
- package/dist/managed/utils/ActionModal.d.ts +1 -0
- package/dist/managed/utils/defaults.d.ts +1 -0
- package/dist/managed/versionMetadata/MetadataComponents.d.ts +18 -19
- package/dist/managed/versionMetadata/VersionMetadata.d.ts +6 -2
- package/dist/search/infrastructure/infrastructureSearch.service.d.ts +2 -1
- package/dist/securityGroup/index.d.ts +2 -1
- package/package.json +6 -6
- package/src/account/AccountSelectInput.spec.tsx +9 -4
- package/src/account/AccountService.spec.ts +6 -6
- package/src/api/ApiService.spec.ts +2 -2
- package/src/api/ApiServiceDeprecated.spec.ts +5 -2
- package/src/application/application.model.spec.ts +78 -79
- package/src/application/config/applicationAttributes.directive.html +6 -2
- package/src/application/config/applicationAttributes.directive.js +4 -0
- package/src/application/config/applicationConfig.view.html +14 -1
- package/src/application/config/customBanner/CustomBannerConfig.spec.tsx +3 -3
- package/src/application/config/dataSources/applicationDataSourceEditor.component.spec.ts +4 -3
- package/src/application/config/footer/configSectionFooter.component.spec.ts +2 -1
- package/src/application/listExtractor/AppListExtractor.spec.ts +4 -4
- package/src/application/modal/PermissionsConfigurer.spec.tsx +3 -2
- package/src/application/modal/editApplication.controller.modal.js +1 -0
- package/src/application/modal/editApplication.html +2 -2
- package/src/application/modal/validation/ApplicationNameValidator.spec.ts +2 -1
- package/src/application/modal/validation/validateApplicationName.directive.spec.ts +3 -2
- package/src/application/nav/ApplicationNavigation.spec.tsx +12 -11
- package/src/application/nav/NavItem.spec.tsx +7 -5
- package/src/application/nav/NavSection.spec.tsx +3 -2
- package/src/application/service/ApplicationReader.spec.ts +13 -8
- package/src/application/service/ApplicationWriter.spec.ts +4 -2
- package/src/application/service/InferredApplicationWarningService.spec.ts +2 -3
- package/src/artifact/expectedArtifact.service.spec.ts +2 -1
- package/src/artifact/react/ExpectedArtifactSelector.spec.tsx +2 -3
- package/src/authentication/AuthenticationInitializer.spec.ts +2 -1
- package/src/authentication/AuthenticationService.spec.ts +2 -1
- package/src/authentication/authentication.interceptor.spec.ts +4 -2
- package/src/cache/cacheInitializer.service.spec.ts +7 -4
- package/src/cache/infrastructureCaches.spec.ts +4 -4
- package/src/chaosMonkey/chaosMonkeyExceptions.component.spec.ts +4 -2
- package/src/cloudProvider/providerSelection/ProviderSelectionService.spec.ts +23 -21
- package/src/cluster/ClusterRuleMatcher.spec.ts +2 -1
- package/src/cluster/cluster.service.spec.ts +7 -7
- package/src/cluster/filter/ClusterFilterService.spec.ts +15 -14
- package/src/cluster/filter/LabelFilter.spec.tsx +3 -3
- package/src/cluster/filter/MultiselectModel.spec.ts +2 -2
- package/src/cluster/filter/labelFilterUtils.spec.ts +3 -7
- package/src/config/settings.ts +1 -1
- package/src/core.module.ts +1 -1
- package/src/filterModel/dependentFilter/DependentFilterService.spec.ts +1 -1
- package/src/function/filter/FunctionFilterService.spec.ts +5 -3
- package/src/function/function.read.service.spec.ts +4 -3
- package/src/header/customBanner/CustomBanner.spec.tsx +3 -4
- package/src/healthCounts/HealthCounts.spec.tsx +2 -2
- package/src/history/recentHistory.service.spec.ts +2 -1
- package/src/insight/InsightMenu.spec.tsx +9 -6
- package/src/instance/instance.write.service.spec.ts +8 -7
- package/src/instance/instanceType.service.ts +12 -2
- package/src/instance/instanceTypeService.spec.ts +2 -1
- package/src/loadBalancer/LoadBalancersTag.spec.tsx +8 -6
- package/src/loadBalancer/filter/LoadBalancerFilterService.spec.ts +2 -2
- package/src/managed/Environments.less +4 -4
- package/src/managed/Environments.tsx +1 -1
- package/src/managed/RelativeTimestamp.tsx +8 -6
- package/src/managed/artifactActions/ArtifactActions.tsx +77 -0
- package/src/managed/constraints/AllowedTimes.spec.ts +2 -1
- package/src/managed/constraints/registry.tsx +27 -1
- package/src/managed/environmentBaseElements/BaseEnvironment.less +3 -3
- package/src/managed/environmentBaseElements/EnvironmentItem.tsx +11 -4
- package/src/managed/graphql/graphql-sdk.ts +218 -29
- package/src/managed/graphql/schema.graphql +14 -1
- package/src/managed/overview/EnvironmentOverview.tsx +12 -15
- package/src/managed/overview/EnvironmentsOverview.less +6 -5
- package/src/managed/overview/PreviewEnvironments.tsx +0 -3
- package/src/managed/overview/Resource.less +1 -1
- package/src/managed/overview/Resource.tsx +62 -47
- package/src/managed/overview/artifact/Artifact.less +27 -52
- package/src/managed/overview/artifact/Artifact.tsx +86 -22
- package/src/managed/overview/artifact/ArtifactActionModal.less +19 -0
- package/src/managed/overview/artifact/ArtifactActionModal.tsx +150 -68
- package/src/managed/overview/artifact/ArtifactCollapsibleSection.tsx +32 -0
- package/src/managed/overview/artifact/ArtifactVersionTasks.tsx +2 -0
- package/src/managed/overview/artifact/{PendingVersion.tsx → ArtifactVersions.tsx} +35 -25
- package/src/managed/overview/artifact/Constraints.tsx +61 -21
- package/src/managed/overview/artifact/CurrentVersion.tsx +42 -27
- package/src/managed/overview/artifact/VersionTitle.tsx +18 -0
- package/src/managed/overview/artifact/hooks.ts +71 -34
- package/src/managed/overview/artifact/useCreateRollbackActions.hook.ts +75 -0
- package/src/managed/overview/artifact/utils.spec.ts +1 -1
- package/src/managed/overview/artifact/utils.ts +47 -80
- package/src/managed/overview/baseStyles.less +124 -88
- package/src/managed/overview/queries.graphql +54 -13
- package/src/managed/overview/useIsUpdatingResources.hook.ts +9 -0
- package/src/managed/resources/ResourceTitle.tsx +12 -5
- package/src/managed/utils/ActionModal.tsx +4 -1
- package/src/managed/utils/defaults.ts +3 -0
- package/src/managed/utils/useNotifyOnError.hook.ts +1 -1
- package/src/managed/versionMetadata/MetadataComponents.tsx +100 -68
- package/src/managed/versionMetadata/VersionMetadata.less +17 -18
- package/src/managed/versionMetadata/VersionMetadata.tsx +23 -31
- package/src/managed/versionsHistory/VersionContent.tsx +20 -13
- package/src/managed/versionsHistory/VersionHeading.tsx +2 -1
- package/src/managed/versionsHistory/VersionsHistory.less +11 -3
- package/src/manifest/PodNameProvider.spec.ts +1 -1
- package/src/navigation/customParamTypes.spec.ts +1 -1
- package/src/pagerDuty/pagerDuty.read.service.spec.ts +4 -2
- package/src/pagerDuty/pagerDutyTag.component.spec.ts +7 -3
- package/src/pipeline/config/PipelineRegistry.spec.ts +38 -37
- package/src/pipeline/config/actions/templateJson/ShowPipelineTemplateJsonModal.spec.tsx +3 -3
- package/src/pipeline/config/pipelineConfigurer.controller.spec.ts +3 -3
- package/src/pipeline/config/services/PipelineConfigService.spec.ts +4 -3
- package/src/pipeline/config/stages/bakeManifest/helm/BakeHelmConfigForm.spec.tsx +6 -8
- package/src/pipeline/config/stages/findArtifactFromExecution/findArtifactFromExecution.controller.spec.ts +2 -1
- package/src/pipeline/config/stages/manualJudgment/manualJudgment.service.spec.ts +6 -4
- package/src/pipeline/config/stages/travis/travisExecutionDetails.controller.spec.ts +5 -2
- package/src/pipeline/config/stages/travis/travisStage.controller.spec.ts +3 -2
- package/src/pipeline/config/stages/unmatchedStageTypeStage/unmatchedStageTypeStage.controller.spec.ts +2 -1
- package/src/pipeline/config/stages/wait/SkipWait.tsx +3 -1
- package/src/pipeline/config/stages/wercker/werckerExecutionDetails.controller.spec.ts +5 -2
- package/src/pipeline/config/stages/wercker/werckerStage.controller.spec.ts +3 -2
- package/src/pipeline/config/templates/Variable.spec.tsx +6 -5
- package/src/pipeline/config/templates/configurePipelineTemplateModal.controller.spec.ts +7 -8
- package/src/pipeline/config/templates/v2/configurePipelineTemplateModalV2.controller.spec.ts +7 -8
- package/src/pipeline/config/templates/v2/pipelineTemplateV2.service.spec.ts +1 -1
- package/src/pipeline/config/triggers/TriggersPageContent.spec.tsx +4 -4
- package/src/pipeline/config/triggers/TriggersPageContent.tsx +1 -2
- package/src/pipeline/config/triggers/artifacts/docker/defaultDocker.artifact.spec.ts +1 -2
- package/src/pipeline/config/validation/pipelineConfig.validator.spec.ts +14 -15
- package/src/pipeline/create/CreatePipelineModal.spec.tsx +9 -7
- package/src/pipeline/details/executionDetailsSection.service.spec.ts +3 -2
- package/src/pipeline/executions/Executions.spec.tsx +9 -6
- package/src/pipeline/executions/executionAction/ExecutionAction.spec.tsx +1 -1
- package/src/pipeline/executions/executionGroup/ExecutionGroup.tsx +2 -1
- package/src/pipeline/filter/executionFilter.service.spec.ts +1 -1
- package/src/pipeline/pipeline.dataSource.spec.ts +8 -7
- package/src/pipeline/service/ExecutionsTransformer.spec.ts +2 -2
- package/src/pipeline/service/execution.service.spec.ts +7 -5
- package/src/pipeline/status/Artifact.spec.tsx +7 -6
- package/src/pipeline/status/ArtifactList.spec.tsx +7 -6
- package/src/pipeline/status/ExecutionParameters.spec.tsx +5 -4
- package/src/pipeline/status/ResolvedArtifactList.spec.tsx +7 -6
- package/src/plugins/deck.plugin.spec.ts +4 -2
- package/src/plugins/plugin.registry.spec.ts +6 -4
- package/src/presentation/forms/SpinFormik.spec.tsx +3 -2
- package/src/presentation/forms/fields/FormikFormField.spec.tsx +3 -3
- package/src/presentation/forms/hooks/useSaveRestoreMutuallyExclusiveFields.hook.spec.tsx +4 -3
- package/src/presentation/forms/inputs/ChecklistInput.spec.tsx +1 -1
- package/src/presentation/forms/inputs/RadioButtonInput.spec.tsx +2 -1
- package/src/presentation/forms/inputs/SelectInput.spec.tsx +2 -1
- package/src/presentation/forms/inputs/hooks/useInternalValidator.hook.spec.tsx +4 -3
- package/src/presentation/forms/validation/FormValidator.spec.ts +2 -2
- package/src/presentation/forms/validation/useValidationData.spec.tsx +4 -3
- package/src/presentation/hooks/useContainerClassNames.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useData.hook.spec.tsx +3 -2
- package/src/presentation/hooks/useDebouncedValue.hook.spec.tsx +1 -1
- package/src/presentation/hooks/useDeepObjectDiff.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useEventListener.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useForceUpdate.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useInterval.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useIsMountedRef.hook.spec.tsx +1 -1
- package/src/presentation/hooks/useLatestCallback.hook.spec.tsx +2 -1
- package/src/presentation/hooks/useLatestPromise.hook.spec.tsx +9 -3
- package/src/presentation/hooks/useMountStatusRef.hook.spec.tsx +3 -1
- package/src/presentation/hooks/usePollingData.hook.spec.tsx +3 -2
- package/src/presentation/hooks/usePrevious.hook.spec.tsx +2 -1
- package/src/presentation/navigation/pageNavigator.component.spec.ts +3 -3
- package/src/presentation/spel/SpelInput.spec.tsx +9 -4
- package/src/presentation/spel/SpelService.spec.ts +1 -1
- package/src/scheduler/SchedulerFactory.spec.ts +2 -1
- package/src/search/infrastructure/infrastructureSearch.service.ts +3 -2
- package/src/search/widgets/Filter.spec.tsx +5 -3
- package/src/search/widgets/Filters.spec.tsx +5 -3
- package/src/search/widgets/Search.spec.tsx +4 -2
- package/src/securityGroup/index.ts +2 -1
- package/src/securityGroup/securityGroupReader.service.spec.ts +8 -10
- package/src/serverGroup/configure/common/deployInitializer.component.spec.ts +7 -3
- package/src/serverGroup/configure/common/v2instanceArchetypeSelector.component.ts +1 -1
- package/src/serverGroup/details/capacity/CapacityDetailsSection.spec.tsx +1 -1
- package/src/serverGroup/details/scalingActivities/ScalingActivitiesModal.spec.ts +2 -1
- package/src/serverGroup/details/serverGroupWarningMessage.service.spec.ts +4 -4
- package/src/serverGroup/serverGroupWriter.service.spec.ts +10 -8
- package/src/slack/SlackReader.spec.ts +2 -1
- package/src/subnet/subnet.read.service.spec.ts +4 -3
- package/src/task/monitor/taskMonitor.spec.ts +6 -5
- package/src/task/task.dataSource.spec.ts +5 -4
- package/src/task/task.write.service.spec.ts +3 -1
- package/src/utils/clipboard/CopyToClipboard.spec.tsx +2 -1
- package/src/utils/json/json.utility.service.spec.ts +2 -1
- package/src/utils/timeFormatters.spec.ts +3 -2
- package/src/utils/workerPool.spec.ts +2 -1
- package/src/widgets/ApplicationsPickerInput.spec.tsx +3 -2
- package/src/widgets/spelText/SpelAutocompleteService.spec.ts +4 -3
- package/src/widgets/tags/Tag.spec.tsx +4 -2
- package/src/widgets/tags/TagList.spec.tsx +5 -3
- package/src/yamlEditor/yamlEditorUtils.spec.ts +1 -1
- package/dist/managed/overview/artifact/PendingVersion.d.ts +0 -7
|
@@ -2,14 +2,10 @@ import { groupBy } from 'lodash';
|
|
|
2
2
|
import { DateTime } from 'luxon';
|
|
3
3
|
|
|
4
4
|
import { ACTION_DISPLAY_NAMES, getActionStatusData } from './VersionOperation';
|
|
5
|
-
import type {
|
|
6
|
-
import { useMarkVersionAsBad, useMarkVersionAsGood, usePinVersion, useUnpinVersion } from './hooks';
|
|
7
|
-
import { useApplicationContextSafe } from '../../../presentation';
|
|
5
|
+
import type { FetchCurrentVersionQuery } from '../../graphql/graphql-sdk';
|
|
8
6
|
import type { QueryArtifactVersion, QueryConstraint, QueryLifecycleStep } from '../types';
|
|
9
7
|
import { timeDiffToString } from '../../../utils';
|
|
10
|
-
import {
|
|
11
|
-
import { getIsDebugMode } from '../../utils/debugMode';
|
|
12
|
-
import type { VersionAction } from '../../versionMetadata/MetadataComponents';
|
|
8
|
+
import type { HistoryArtifactVersionExtended, SingleVersionArtifactVersion } from '../../versionsHistory/types';
|
|
13
9
|
|
|
14
10
|
export const getConstraintsStatusSummary = (constraints: QueryConstraint[]) => {
|
|
15
11
|
let finalStatus: QueryConstraint['status'] = 'PASS';
|
|
@@ -84,82 +80,53 @@ export const getLifecycleEventSummary = (
|
|
|
84
80
|
};
|
|
85
81
|
};
|
|
86
82
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
83
|
+
export const isVersionVetoed = (version?: QueryArtifactVersion | SingleVersionArtifactVersion) =>
|
|
84
|
+
version?.status === 'VETOED';
|
|
85
|
+
|
|
86
|
+
export const isVersionPending = (version?: QueryArtifactVersion | SingleVersionArtifactVersion) =>
|
|
87
|
+
version?.status === 'APPROVED' || version?.status === 'PENDING';
|
|
88
|
+
|
|
89
|
+
export type ICurrentVersion = NonNullable<
|
|
90
|
+
NonNullable<
|
|
91
|
+
NonNullable<FetchCurrentVersionQuery['application']>['environments'][number]['state']['artifacts']
|
|
92
|
+
>[number]['versions']
|
|
93
|
+
>[number];
|
|
94
|
+
|
|
95
|
+
export type IVersionRelativeAgeToCurrent = 'CURRENT' | 'NEWER' | 'OLDER';
|
|
96
|
+
|
|
97
|
+
export const getRelativeAgeToCurrent = ({
|
|
98
|
+
isCurrent,
|
|
99
|
+
createdAt,
|
|
100
|
+
currentVersion,
|
|
101
|
+
}: {
|
|
102
|
+
isCurrent?: boolean;
|
|
103
|
+
createdAt?: string;
|
|
104
|
+
currentVersion?: ICurrentVersion;
|
|
105
|
+
}): IVersionRelativeAgeToCurrent => {
|
|
106
|
+
if (isCurrent) return 'CURRENT';
|
|
107
|
+
if (
|
|
108
|
+
!createdAt ||
|
|
109
|
+
!currentVersion?.createdAt ||
|
|
110
|
+
new Date(createdAt).getTime() < new Date(currentVersion.createdAt).getTime()
|
|
111
|
+
)
|
|
112
|
+
return 'OLDER';
|
|
113
|
+
return 'NEWER';
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export interface IVersionDetails {
|
|
91
117
|
buildNumber?: string;
|
|
92
118
|
commitMessage?: string;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
compareLinks?: {
|
|
96
|
-
previous?: string;
|
|
97
|
-
current?: string;
|
|
98
|
-
};
|
|
119
|
+
commitSha?: string;
|
|
120
|
+
createdAt?: string;
|
|
99
121
|
}
|
|
100
122
|
|
|
101
|
-
export const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}: ICreateVersionActionsProps): VersionAction[] | undefined => {
|
|
111
|
-
const application = useApplicationContextSafe();
|
|
112
|
-
|
|
113
|
-
const basePayload = { application: application.name, environment, reference, version };
|
|
114
|
-
|
|
115
|
-
const onUnpin = useUnpinVersion(basePayload, [`Unpin #${buildNumber}`, commitMessage].filter(Boolean).join(' - '));
|
|
116
|
-
const onPin = usePinVersion(basePayload, [`Pin #${buildNumber}`, commitMessage].filter(Boolean).join(' - '));
|
|
117
|
-
|
|
118
|
-
const onMarkAsBad = useMarkVersionAsBad(
|
|
119
|
-
basePayload,
|
|
120
|
-
[`Mark #${buildNumber} as Bad`, commitMessage].filter(Boolean).join(' - '),
|
|
121
|
-
);
|
|
122
|
-
|
|
123
|
-
const onMarkAsGood = useMarkVersionAsGood(
|
|
124
|
-
basePayload,
|
|
125
|
-
[`Mark #${buildNumber} as Good`, commitMessage].filter(Boolean).join(' - '),
|
|
126
|
-
);
|
|
127
|
-
|
|
128
|
-
const actions: VersionAction[] = [
|
|
129
|
-
isPinned
|
|
130
|
-
? {
|
|
131
|
-
content: 'Unpin version',
|
|
132
|
-
onClick: onUnpin,
|
|
133
|
-
}
|
|
134
|
-
: {
|
|
135
|
-
content: 'Pin version',
|
|
136
|
-
onClick: onPin,
|
|
137
|
-
},
|
|
138
|
-
status === 'VETOED'
|
|
139
|
-
? {
|
|
140
|
-
content: 'Mark as good',
|
|
141
|
-
onClick: onMarkAsGood,
|
|
142
|
-
}
|
|
143
|
-
: {
|
|
144
|
-
content: 'Mark as bad',
|
|
145
|
-
onClick: onMarkAsBad,
|
|
146
|
-
},
|
|
147
|
-
];
|
|
148
|
-
if (compareLinks?.current) {
|
|
149
|
-
actions.push({ content: 'Compare to current version', href: compareLinks.current });
|
|
150
|
-
}
|
|
151
|
-
if (compareLinks?.previous) {
|
|
152
|
-
actions.push({ content: 'Compare to previous version', href: compareLinks.previous });
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
if (getIsDebugMode()) {
|
|
156
|
-
actions.push({
|
|
157
|
-
content: 'Copy artifact version [Debug]',
|
|
158
|
-
onClick: () => {
|
|
159
|
-
copyTextToClipboard(version);
|
|
160
|
-
},
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
return actions.length ? actions : undefined;
|
|
123
|
+
export const extractVersionRollbackDetails = (
|
|
124
|
+
version: QueryArtifactVersion | HistoryArtifactVersionExtended | ICurrentVersion,
|
|
125
|
+
): IVersionDetails => {
|
|
126
|
+
return {
|
|
127
|
+
buildNumber: version.buildNumber,
|
|
128
|
+
commitMessage: version.gitMetadata?.commitInfo?.message,
|
|
129
|
+
commitSha: version.gitMetadata?.commit,
|
|
130
|
+
createdAt: version.createdAt,
|
|
131
|
+
};
|
|
165
132
|
};
|
|
@@ -1,117 +1,153 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
grid-column: ~'1 / 3';
|
|
12
|
-
}
|
|
1
|
+
.Environments,
|
|
2
|
+
.ActionModal {
|
|
3
|
+
.environment-row-element {
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-template-columns: [icon] var(--row-element-icon-width) [details] 1fr;
|
|
6
|
+
position: relative;
|
|
7
|
+
|
|
8
|
+
&.with-padding {
|
|
9
|
+
padding: var(--l-spacing) var(--base-horizontal-padding) var(--s-spacing) var(--base-horizontal-padding);
|
|
10
|
+
}
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
flex-direction: column;
|
|
18
|
-
min-width: 0;
|
|
19
|
-
}
|
|
12
|
+
@media (max-width: 768px) {
|
|
13
|
+
grid-template-columns: [icon] 30px [details] 1fr;
|
|
14
|
+
}
|
|
20
15
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
align-self: flex-start;
|
|
25
|
-
padding-top: var(~'--2xs-spacing');
|
|
16
|
+
.no-items-message {
|
|
17
|
+
grid-column: ~'1 / 3';
|
|
18
|
+
}
|
|
26
19
|
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
.row-details {
|
|
21
|
+
grid-column: details;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
min-width: 0;
|
|
29
25
|
}
|
|
30
|
-
}
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
.row-icon {
|
|
28
|
+
grid-column: icon;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-self: flex-start;
|
|
31
|
+
padding-top: var(~'--2xs-spacing');
|
|
37
32
|
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
&.small {
|
|
34
|
+
padding-top: var(~'--3xs-spacing');
|
|
35
|
+
}
|
|
40
36
|
}
|
|
41
37
|
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
.row-title {
|
|
39
|
+
font-size: 18px;
|
|
40
|
+
font-weight: 600;
|
|
41
|
+
line-height: 1.3;
|
|
42
|
+
color: var(--color-charcoal);
|
|
43
|
+
display: grid;
|
|
44
|
+
grid-template-columns: 1fr auto;
|
|
45
|
+
|
|
46
|
+
&.small {
|
|
47
|
+
font-size: 14px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
& > a {
|
|
51
|
+
color: inherit;
|
|
52
|
+
}
|
|
44
53
|
}
|
|
45
54
|
}
|
|
46
|
-
}
|
|
47
55
|
|
|
48
|
-
.md-icon-success {
|
|
49
|
-
|
|
50
|
-
}
|
|
56
|
+
.md-icon-success {
|
|
57
|
+
color: var(--color-status-success);
|
|
58
|
+
}
|
|
51
59
|
|
|
52
|
-
.md-icon-pending {
|
|
53
|
-
|
|
54
|
-
}
|
|
60
|
+
.md-icon-pending {
|
|
61
|
+
color: var(--color-titanium);
|
|
62
|
+
}
|
|
55
63
|
|
|
56
|
-
.md-icon-fail {
|
|
57
|
-
|
|
58
|
-
}
|
|
64
|
+
.md-icon-fail {
|
|
65
|
+
color: var(--color-status-error);
|
|
66
|
+
}
|
|
59
67
|
|
|
60
|
-
.delimited-element {
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
.delimited-element {
|
|
69
|
+
&:not(:last-child) {
|
|
70
|
+
margin-right: 6px;
|
|
71
|
+
}
|
|
72
|
+
&:not(:first-child)::before {
|
|
73
|
+
content: '•';
|
|
74
|
+
margin-right: 6px;
|
|
75
|
+
}
|
|
63
76
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
77
|
+
|
|
78
|
+
.delimited-elements {
|
|
79
|
+
> * {
|
|
80
|
+
.delimited-element();
|
|
81
|
+
}
|
|
67
82
|
}
|
|
68
|
-
}
|
|
69
83
|
|
|
70
|
-
.
|
|
71
|
-
|
|
72
|
-
|
|
84
|
+
.truncate {
|
|
85
|
+
white-space: nowrap;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
text-overflow: ellipsis;
|
|
73
88
|
}
|
|
74
|
-
}
|
|
75
89
|
|
|
76
|
-
.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
90
|
+
button.md-btn {
|
|
91
|
+
background-color: transparent;
|
|
92
|
+
&:hover {
|
|
93
|
+
background-color: var(--color-cirrus);
|
|
94
|
+
}
|
|
95
|
+
box-shadow: 1px 2px 2px 0px rgb(0 0 0 / 6%), 0px 1px 3px 0px rgb(0 0 0 / 3%);
|
|
81
96
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
97
|
+
&:active,
|
|
98
|
+
&:focus {
|
|
99
|
+
outline: none;
|
|
100
|
+
}
|
|
86
101
|
}
|
|
87
|
-
}
|
|
88
102
|
|
|
89
|
-
button.md-btn-
|
|
90
|
-
button.md-btn-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
103
|
+
button.md-btn-accent,
|
|
104
|
+
button.md-btn-accent:hover {
|
|
105
|
+
color: var(--color-accent);
|
|
106
|
+
border-color: var(--color-accent);
|
|
107
|
+
}
|
|
94
108
|
|
|
95
|
-
button.md-btn-
|
|
96
|
-
button.md-btn-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
109
|
+
button.md-btn-success,
|
|
110
|
+
button.md-btn-success:hover {
|
|
111
|
+
color: var(--color-validation-success);
|
|
112
|
+
border-color: var(--color-validation-success);
|
|
113
|
+
}
|
|
100
114
|
|
|
101
|
-
button.md-btn-
|
|
102
|
-
button.md-btn-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
115
|
+
button.md-btn-danger,
|
|
116
|
+
button.md-btn-danger:hover {
|
|
117
|
+
color: var(--color-danger);
|
|
118
|
+
border: 1px solid var(--color-danger);
|
|
119
|
+
}
|
|
106
120
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
121
|
+
.md-action-button {
|
|
122
|
+
padding: 0 var(--xs-spacing);
|
|
123
|
+
text-transform: uppercase;
|
|
124
|
+
color: inherit;
|
|
125
|
+
font-size: 12px;
|
|
126
|
+
font-weight: 500;
|
|
127
|
+
padding: 2px var(--s-spacing);
|
|
128
|
+
color: var(--color-primary-g1);
|
|
129
|
+
letter-spacing: 0.2px;
|
|
130
|
+
|
|
131
|
+
&:hover {
|
|
132
|
+
background-color: var(--color-alabaster);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.no-underline {
|
|
137
|
+
text-decoration: none;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.md-actions-gap {
|
|
141
|
+
gap: var(--s-spacing);
|
|
142
|
+
}
|
|
112
143
|
|
|
113
|
-
.
|
|
114
|
-
|
|
144
|
+
.in-progress-dot {
|
|
145
|
+
height: 8px;
|
|
146
|
+
width: 8px;
|
|
147
|
+
border-radius: 999px;
|
|
148
|
+
display: flex;
|
|
149
|
+
animation: deployingAnimation 2s infinite;
|
|
150
|
+
}
|
|
115
151
|
}
|
|
116
152
|
|
|
117
153
|
@keyframes deployingAnimation {
|
|
@@ -90,11 +90,26 @@ fragment baseEnvironmentFields on MdEnvironment {
|
|
|
90
90
|
basedOn
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
fragment baesResourceFields on MdResource {
|
|
94
|
+
id
|
|
95
|
+
kind
|
|
96
|
+
displayName
|
|
97
|
+
moniker {
|
|
98
|
+
app
|
|
99
|
+
stack
|
|
100
|
+
detail
|
|
101
|
+
}
|
|
102
|
+
location {
|
|
103
|
+
account
|
|
104
|
+
regions
|
|
105
|
+
}
|
|
106
|
+
rawDefinition
|
|
107
|
+
}
|
|
108
|
+
|
|
93
109
|
query fetchApplication($appName: String!, $statuses: [MdArtifactStatusInEnvironment!]) {
|
|
94
110
|
application(appName: $appName) {
|
|
95
111
|
id
|
|
96
112
|
name
|
|
97
|
-
account
|
|
98
113
|
config {
|
|
99
114
|
id
|
|
100
115
|
previewEnvironmentsConfigured
|
|
@@ -114,21 +129,44 @@ query fetchApplication($appName: String!, $statuses: [MdArtifactStatusInEnvironm
|
|
|
114
129
|
...detailedVersionFields
|
|
115
130
|
}
|
|
116
131
|
...artifactPinnedVersionFields
|
|
132
|
+
resources {
|
|
133
|
+
...baesResourceFields
|
|
134
|
+
}
|
|
117
135
|
}
|
|
118
136
|
resources {
|
|
137
|
+
...baesResourceFields
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
query fetchCurrentVersion($appName: String!) {
|
|
145
|
+
application(appName: $appName) {
|
|
146
|
+
id
|
|
147
|
+
name
|
|
148
|
+
environments {
|
|
149
|
+
id
|
|
150
|
+
name
|
|
151
|
+
state {
|
|
152
|
+
artifacts {
|
|
119
153
|
id
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
154
|
+
name
|
|
155
|
+
reference
|
|
156
|
+
environment
|
|
157
|
+
versions(statuses: [CURRENT]) {
|
|
158
|
+
id
|
|
159
|
+
version
|
|
160
|
+
buildNumber
|
|
161
|
+
createdAt
|
|
162
|
+
gitMetadata {
|
|
163
|
+
commit
|
|
164
|
+
commitInfo {
|
|
165
|
+
sha
|
|
166
|
+
message
|
|
167
|
+
}
|
|
168
|
+
}
|
|
130
169
|
}
|
|
131
|
-
rawDefinition
|
|
132
170
|
}
|
|
133
171
|
}
|
|
134
172
|
}
|
|
@@ -139,7 +177,6 @@ query fetchVersionsHistory($appName: String!, $limit: Int) {
|
|
|
139
177
|
application(appName: $appName) {
|
|
140
178
|
id
|
|
141
179
|
name
|
|
142
|
-
account
|
|
143
180
|
environments {
|
|
144
181
|
...baseEnvironmentFields
|
|
145
182
|
state {
|
|
@@ -347,3 +384,7 @@ mutation ImportDeliveryConfig($application: String!) {
|
|
|
347
384
|
mutation ToggleResourceManagement($payload: MdToggleResourceManagementPayload) {
|
|
348
385
|
toggleResourceManagement(payload: $payload)
|
|
349
386
|
}
|
|
387
|
+
|
|
388
|
+
mutation RestartConstraintEvaluation($payload: MdRestartConstraintEvaluationPayload!) {
|
|
389
|
+
restartConstraintEvaluation(payload: $payload)
|
|
390
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useApplicationContextSafe } from '../..';
|
|
2
|
+
import { useFetchResourceStatusQuery } from '../graphql/graphql-sdk';
|
|
3
|
+
|
|
4
|
+
export const useIsUpdatingResources = (environment: string) => {
|
|
5
|
+
const app = useApplicationContextSafe();
|
|
6
|
+
const { data } = useFetchResourceStatusQuery({ variables: { appName: app.name } });
|
|
7
|
+
const resources = data?.application?.environments.find((env) => env.name === environment)?.state.resources;
|
|
8
|
+
return resources?.some((resource) => resource.state?.status !== 'UP_TO_DATE');
|
|
9
|
+
};
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { QueryResource } from '../overview/types';
|
|
4
4
|
import { useGenerateLink } from './useGetResourceLink.hook';
|
|
5
5
|
import { useLogEvent } from '../utils/logging';
|
|
6
6
|
|
|
7
|
-
export const ResourceTitle = ({
|
|
8
|
-
const
|
|
9
|
-
const
|
|
7
|
+
export const ResourceTitle = ({ resource }: { resource: QueryResource }) => {
|
|
8
|
+
const account = resource.location?.account;
|
|
9
|
+
const { displayName, kind } = resource;
|
|
10
|
+
const linkProps = useGenerateLink({
|
|
11
|
+
kind: kind,
|
|
12
|
+
displayName,
|
|
13
|
+
account,
|
|
14
|
+
detail: resource.moniker?.detail,
|
|
15
|
+
stack: resource.moniker?.stack,
|
|
16
|
+
});
|
|
10
17
|
const logEvent = useLogEvent('Resource');
|
|
11
18
|
|
|
12
19
|
return (
|
|
@@ -16,7 +23,7 @@ export const ResourceTitle = ({ props }: { props: IResourceLinkProps }) => {
|
|
|
16
23
|
href={linkProps.href}
|
|
17
24
|
{...(linkProps.isExternal ? { target: '_blank', rel: 'noopener noreferrer' } : undefined)}
|
|
18
25
|
onClick={() => {
|
|
19
|
-
logEvent({ action: 'OpenCommit', data: { kind
|
|
26
|
+
logEvent({ action: 'OpenCommit', data: { kind, account } });
|
|
20
27
|
}}
|
|
21
28
|
>
|
|
22
29
|
{displayName}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import classnames from 'classnames';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
|
|
3
4
|
import { Button } from './Button';
|
|
@@ -21,6 +22,7 @@ export interface IArtifactActionModalProps extends IModalComponentProps {
|
|
|
21
22
|
onAction: (comment?: string) => Promise<void> | PromiseLike<void>;
|
|
22
23
|
onSuccess?: () => void;
|
|
23
24
|
error?: string;
|
|
25
|
+
className?: string;
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
export const ActionModal: React.FC<IArtifactActionModalProps> = ({
|
|
@@ -32,6 +34,7 @@ export const ActionModal: React.FC<IArtifactActionModalProps> = ({
|
|
|
32
34
|
actionName,
|
|
33
35
|
withComment = true,
|
|
34
36
|
logCategory,
|
|
37
|
+
className,
|
|
35
38
|
children,
|
|
36
39
|
}) => {
|
|
37
40
|
const logEvent = useLogEvent(logCategory || 'ActionModal', actionName);
|
|
@@ -57,7 +60,7 @@ export const ActionModal: React.FC<IArtifactActionModalProps> = ({
|
|
|
57
60
|
return (
|
|
58
61
|
<>
|
|
59
62
|
<ModalBody>
|
|
60
|
-
<div className=
|
|
63
|
+
<div className={classnames('flex-container-v middle sp-padding-xl-yaxis ActionModal', className)}>
|
|
61
64
|
{children}
|
|
62
65
|
{withComment && (
|
|
63
66
|
<FormikFormField
|
|
@@ -10,6 +10,9 @@ export const tooltipShowHideProps: Partial<IHoverablePopoverProps> = {
|
|
|
10
10
|
delayHide: TOOLTIP_DELAY_HIDE,
|
|
11
11
|
};
|
|
12
12
|
export const MODAL_MAX_WIDTH = 750;
|
|
13
|
+
|
|
14
|
+
export const ACTION_BUTTON_CLASS_NAME = 'btn btn-default md-btn md-action-button';
|
|
15
|
+
|
|
13
16
|
export const spinnerProps: ISpinnerProps = {
|
|
14
17
|
size: 'medium',
|
|
15
18
|
fullWidth: true,
|
|
@@ -15,7 +15,7 @@ export const useNotifyOnError = ({
|
|
|
15
15
|
if (!error) return;
|
|
16
16
|
NotifierService.publish({
|
|
17
17
|
key,
|
|
18
|
-
content: content ? `${content} - ` : '' + error.message,
|
|
18
|
+
content: (content ? `${content} - ` : '') + error.message,
|
|
19
19
|
options: { type: 'error' },
|
|
20
20
|
});
|
|
21
21
|
}, [error]);
|