@spinnaker/core 0.10.0 → 0.11.3
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 +45 -0
- package/dist/config/settings.d.ts +8 -1
- package/dist/domain/IManagedEntity.d.ts +2 -1
- package/dist/index.js +33 -32
- package/dist/index.js.map +1 -1
- package/dist/managed/config/GitIntegration.d.ts +1 -1
- package/dist/managed/graphql/graphql-sdk.d.ts +36 -1
- package/dist/managed/utils/defaults.d.ts +2 -0
- package/package.json +2 -2
- package/src/config/settings.ts +9 -1
- package/src/domain/IManagedEntity.ts +1 -0
- package/src/managed/UnmanagedMessage.tsx +2 -5
- package/src/managed/config/Configuration.tsx +3 -3
- package/src/managed/config/GitIntegration.less +15 -0
- package/src/managed/config/GitIntegration.tsx +64 -1
- package/src/managed/externals/ManagedResourceConfig.tsx +2 -5
- package/src/managed/externals/ManagedResourceDetailsIndicator.tsx +2 -5
- package/src/managed/externals/managedResourceStatusConfig.tsx +12 -3
- package/src/managed/graphql/graphql-sdk.ts +55 -1
- package/src/managed/graphql/schema.graphql +51 -0
- package/src/managed/overview/artifact/ArtifactActionModal.tsx +3 -2
- package/src/managed/overview/baseStyles.less +12 -0
- package/src/managed/overview/queries.graphql +1 -0
- package/src/managed/utils/defaults.ts +13 -0
- package/src/managed/versionMetadata/MetadataComponents.tsx +1 -1
- package/src/managed/versionMetadata/VersionMetadata.less +4 -3
- package/src/managed/versionsHistory/VersionHeading.tsx +1 -1
- package/src/widgets/notifier/notifier.component.less +5 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FetchApplicationManagementDataQuery } from '../graphql/graphql-sdk';
|
|
2
2
|
import './GitIntegration.less';
|
|
3
3
|
declare type IGitIntegrationProps = NonNullable<NonNullable<FetchApplicationManagementDataQuery['application']>['gitIntegration']>;
|
|
4
|
-
export declare const GitIntegration: ({ isEnabled, branch, link, repository }: IGitIntegrationProps) => JSX.Element;
|
|
4
|
+
export declare const GitIntegration: ({ isEnabled, branch, link, repository, manifestPath }: IGitIntegrationProps) => JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -126,6 +126,18 @@ export interface MdConstraintStatusPayload {
|
|
|
126
126
|
reference: Scalars['String'];
|
|
127
127
|
status: MdConstraintStatus;
|
|
128
128
|
}
|
|
129
|
+
export interface MdDeployLocation {
|
|
130
|
+
__typename?: 'MdDeployLocation';
|
|
131
|
+
account?: Maybe<Scalars['String']>;
|
|
132
|
+
region?: Maybe<Scalars['String']>;
|
|
133
|
+
sublocations?: Maybe<Array<Scalars['String']>>;
|
|
134
|
+
}
|
|
135
|
+
export interface MdDeployTarget {
|
|
136
|
+
__typename?: 'MdDeployTarget';
|
|
137
|
+
cloudProvider?: Maybe<Scalars['String']>;
|
|
138
|
+
location?: Maybe<MdDeployLocation>;
|
|
139
|
+
status?: Maybe<MdRolloutTargetStatus>;
|
|
140
|
+
}
|
|
129
141
|
export interface MdDismissNotificationPayload {
|
|
130
142
|
application: Scalars['String'];
|
|
131
143
|
id: Scalars['String'];
|
|
@@ -147,6 +159,15 @@ export interface MdEnvironmentState {
|
|
|
147
159
|
artifacts?: Maybe<Array<MdArtifact>>;
|
|
148
160
|
}
|
|
149
161
|
export declare type MdEventLevel = 'SUCCESS' | 'INFO' | 'WARNING' | 'ERROR';
|
|
162
|
+
export interface MdExecutionSummary {
|
|
163
|
+
__typename?: 'MdExecutionSummary';
|
|
164
|
+
status: MdTaskStatus;
|
|
165
|
+
currentStage?: Maybe<MdStageDetail>;
|
|
166
|
+
stages?: Maybe<Array<MdStageDetail>>;
|
|
167
|
+
deployTargets?: Maybe<Array<MdDeployTarget>>;
|
|
168
|
+
completedDeployTargets?: Maybe<Array<MdDeployTarget>>;
|
|
169
|
+
error?: Maybe<Scalars['String']>;
|
|
170
|
+
}
|
|
150
171
|
export interface MdGitIntegration {
|
|
151
172
|
__typename?: 'MdGitIntegration';
|
|
152
173
|
id: Scalars['String'];
|
|
@@ -276,6 +297,7 @@ export interface MdResourceTask {
|
|
|
276
297
|
__typename?: 'MdResourceTask';
|
|
277
298
|
id: Scalars['String'];
|
|
278
299
|
name: Scalars['String'];
|
|
300
|
+
summary?: Maybe<MdExecutionSummary>;
|
|
279
301
|
}
|
|
280
302
|
export interface MdRetryArtifactActionPayload {
|
|
281
303
|
application: Scalars['String'];
|
|
@@ -285,6 +307,19 @@ export interface MdRetryArtifactActionPayload {
|
|
|
285
307
|
actionId: Scalars['String'];
|
|
286
308
|
actionType: MdActionType;
|
|
287
309
|
}
|
|
310
|
+
export declare type MdRolloutTargetStatus = 'NOT_STARTED' | 'RUNNING' | 'SUCCEEDED' | 'FAILED';
|
|
311
|
+
export interface MdStageDetail {
|
|
312
|
+
__typename?: 'MdStageDetail';
|
|
313
|
+
id?: Maybe<Scalars['String']>;
|
|
314
|
+
type?: Maybe<Scalars['String']>;
|
|
315
|
+
name?: Maybe<Scalars['String']>;
|
|
316
|
+
startTime?: Maybe<Scalars['InstantTime']>;
|
|
317
|
+
endTime?: Maybe<Scalars['InstantTime']>;
|
|
318
|
+
status?: Maybe<MdTaskStatus>;
|
|
319
|
+
refId?: Maybe<Scalars['String']>;
|
|
320
|
+
requisiteStageRefIds?: Maybe<Array<Scalars['String']>>;
|
|
321
|
+
}
|
|
322
|
+
export declare type MdTaskStatus = 'NOT_STARTED' | 'RUNNING' | 'PAUSED' | 'SUSPENDED' | 'SUCCEEDED' | 'FAILED_CONTINUE' | 'TERMINAL' | 'CANCELED' | 'REDIRECT' | 'STOPPED' | 'BUFFERED' | 'SKIPPED';
|
|
288
323
|
export interface MdToggleResourceManagementPayload {
|
|
289
324
|
id: Scalars['ID'];
|
|
290
325
|
isPaused: Scalars['Boolean'];
|
|
@@ -604,7 +639,7 @@ export declare type FetchApplicationManagementDataQuery = {
|
|
|
604
639
|
} & Pick<MdConfig, 'id' | 'updatedAt' | 'rawConfig' | 'processedConfig'>>;
|
|
605
640
|
gitIntegration?: Maybe<{
|
|
606
641
|
__typename?: 'MdGitIntegration';
|
|
607
|
-
} & Pick<MdGitIntegration, 'id' | 'repository' | 'branch' | 'isEnabled' | 'link'>>;
|
|
642
|
+
} & Pick<MdGitIntegration, 'id' | 'repository' | 'branch' | 'isEnabled' | 'link' | 'manifestPath'>>;
|
|
608
643
|
}>;
|
|
609
644
|
};
|
|
610
645
|
export declare type FetchApplicationManagementStatusQueryVariables = Exact<{
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IManagedDeliveryURLs } from '../../config/settings';
|
|
1
2
|
import { IHoverablePopoverProps } from '../../presentation';
|
|
2
3
|
import { ISpinnerProps } from '../../widgets';
|
|
3
4
|
export declare const TOOLTIP_DELAY_SHOW = 400;
|
|
@@ -7,3 +8,4 @@ export declare const MODAL_MAX_WIDTH = 750;
|
|
|
7
8
|
export declare const spinnerProps: ISpinnerProps;
|
|
8
9
|
export declare const ABSOLUTE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss ZZZZ";
|
|
9
10
|
export declare const MD_CATEGORY = "ManagedDelivery";
|
|
11
|
+
export declare const getDocsUrl: (doc: keyof IManagedDeliveryURLs) => string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spinnaker/core",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.3",
|
|
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": "67fd3038a84114b28ef578bd474d5ed88841b568"
|
|
124
124
|
}
|
package/src/config/settings.ts
CHANGED
|
@@ -67,6 +67,14 @@ export interface INewApplicationDefaults {
|
|
|
67
67
|
chaosMonkey?: boolean;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
export interface IManagedDeliveryURLs {
|
|
71
|
+
gettingStarted: string;
|
|
72
|
+
root: string;
|
|
73
|
+
pinning: string;
|
|
74
|
+
resourceStatus: string;
|
|
75
|
+
markAsBad: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
70
78
|
export interface ISpinnakerSettings {
|
|
71
79
|
[key: string]: any;
|
|
72
80
|
|
|
@@ -111,9 +119,9 @@ export interface ISpinnakerSettings {
|
|
|
111
119
|
gitSources: string[];
|
|
112
120
|
hiddenStages: string[];
|
|
113
121
|
managedDelivery?: {
|
|
114
|
-
gettingStartedUrl?: string;
|
|
115
122
|
defaultManifest: string;
|
|
116
123
|
manifestBasePath: string;
|
|
124
|
+
urls?: Partial<IManagedDeliveryURLs>;
|
|
117
125
|
};
|
|
118
126
|
maxPipelineAgeDays: number;
|
|
119
127
|
newApplicationDefaults: INewApplicationDefaults;
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { SETTINGS } from '../config';
|
|
4
|
-
|
|
5
|
-
const defaultGettingStartedUrl = 'https://www.spinnaker.io/guides/user/managed-delivery/getting-started/';
|
|
2
|
+
import { getDocsUrl } from './utils/defaults';
|
|
6
3
|
|
|
7
4
|
export const UnmanagedMessage = () => {
|
|
8
|
-
const gettingStartedLink =
|
|
5
|
+
const gettingStartedLink = getDocsUrl('gettingStarted');
|
|
9
6
|
return (
|
|
10
7
|
<div style={{ width: '100%' }}>
|
|
11
8
|
Welcome! This application does not have any environments or artifacts. Check out the{' '}
|
|
@@ -17,7 +17,7 @@ import { Messages } from '../messages/Messages';
|
|
|
17
17
|
import { showModal, useApplicationContextSafe } from '../../presentation';
|
|
18
18
|
import { ActionModal, IArtifactActionModalProps } from '../utils/ActionModal';
|
|
19
19
|
import { getIsDebugMode } from '../utils/debugMode';
|
|
20
|
-
import { MODAL_MAX_WIDTH, spinnerProps } from '../utils/defaults';
|
|
20
|
+
import { getDocsUrl, MODAL_MAX_WIDTH, spinnerProps } from '../utils/defaults';
|
|
21
21
|
import { useLogEvent } from '../utils/logging';
|
|
22
22
|
import { Spinner } from '../../widgets';
|
|
23
23
|
|
|
@@ -158,14 +158,14 @@ export const DisableManagementModal = ({ application, ...props }: InternalModalP
|
|
|
158
158
|
Careful! You’re about to stop Spinnaker from managing all resources in your application.
|
|
159
159
|
</span>
|
|
160
160
|
This feature should only be used if management is not working properly and manual intervention is required.{' '}
|
|
161
|
-
<a href=
|
|
161
|
+
<a href={getDocsUrl('root')} target="_blank">
|
|
162
162
|
Check our documentation for more information
|
|
163
163
|
</a>
|
|
164
164
|
.
|
|
165
165
|
</p>
|
|
166
166
|
<p>
|
|
167
167
|
Need to rollback?{' '}
|
|
168
|
-
<a href=
|
|
168
|
+
<a href={getDocsUrl('pinning')} target="_blank">
|
|
169
169
|
Try pinning a version instead
|
|
170
170
|
</a>
|
|
171
171
|
.
|
|
@@ -4,4 +4,19 @@
|
|
|
4
4
|
color: var(--color-dovegray);
|
|
5
5
|
margin-left: 20px;
|
|
6
6
|
}
|
|
7
|
+
|
|
8
|
+
.ManifestPath {
|
|
9
|
+
min-height: 30px;
|
|
10
|
+
|
|
11
|
+
.manifest-input {
|
|
12
|
+
width: auto;
|
|
13
|
+
min-width: 200px;
|
|
14
|
+
padding-right: 24px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
code {
|
|
18
|
+
color: var(--color-accent);
|
|
19
|
+
background-color: transparent;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
7
22
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
+
import { SETTINGS } from '../../config';
|
|
3
4
|
import {
|
|
4
5
|
FetchApplicationManagementDataDocument,
|
|
5
6
|
FetchApplicationManagementDataQuery,
|
|
@@ -15,7 +16,68 @@ type IGitIntegrationProps = NonNullable<
|
|
|
15
16
|
NonNullable<FetchApplicationManagementDataQuery['application']>['gitIntegration']
|
|
16
17
|
>;
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
const ManifestPath = ({ manifestPath }: Pick<IGitIntegrationProps, 'manifestPath'>) => {
|
|
20
|
+
const [currentPath, setCurrentPath] = React.useState(manifestPath);
|
|
21
|
+
const [isEditing, setIsEditing] = React.useState(false);
|
|
22
|
+
const appName = useApplicationContextSafe().name;
|
|
23
|
+
const [updateIntegration, { loading }] = useUpdateGitIntegrationMutation({
|
|
24
|
+
refetchQueries: [{ query: FetchApplicationManagementDataDocument, variables: { appName } }],
|
|
25
|
+
onCompleted: () => {
|
|
26
|
+
setIsEditing(false);
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const baseManifestPath = SETTINGS.managedDelivery?.manifestBasePath + '/';
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div className="sp-margin-s-top horizontal middle ManifestPath">
|
|
34
|
+
Config file path:{' '}
|
|
35
|
+
{isEditing ? (
|
|
36
|
+
<form
|
|
37
|
+
className="horizontal middle"
|
|
38
|
+
onSubmit={(e) => {
|
|
39
|
+
e.preventDefault();
|
|
40
|
+
updateIntegration({ variables: { payload: { application: appName, manifestPath: currentPath } } });
|
|
41
|
+
}}
|
|
42
|
+
>
|
|
43
|
+
<code>{baseManifestPath}</code>
|
|
44
|
+
<input
|
|
45
|
+
value={currentPath}
|
|
46
|
+
className="form-control horizontal manifest-input input-sm sp-margin-xs-left"
|
|
47
|
+
onChange={(e) => setCurrentPath(e.target.value)}
|
|
48
|
+
autoFocus
|
|
49
|
+
/>
|
|
50
|
+
<button
|
|
51
|
+
className="btn md-btn md-btn-accent sp-padding-xs-yaxis sp-padding-s-xaxis sp-margin-s-left"
|
|
52
|
+
type="submit"
|
|
53
|
+
disabled={loading}
|
|
54
|
+
>
|
|
55
|
+
Save
|
|
56
|
+
</button>
|
|
57
|
+
</form>
|
|
58
|
+
) : (
|
|
59
|
+
<code>
|
|
60
|
+
{baseManifestPath}
|
|
61
|
+
{manifestPath}
|
|
62
|
+
</code>
|
|
63
|
+
)}
|
|
64
|
+
{loading ? (
|
|
65
|
+
<Spinner mode="circular" size="nano" color="var(--color-accent)" className="sp-margin-s-left" />
|
|
66
|
+
) : (
|
|
67
|
+
<button
|
|
68
|
+
className="btn-link no-padding no-border sp-margin-s-left"
|
|
69
|
+
onClick={() => {
|
|
70
|
+
setIsEditing((state) => !state);
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
73
|
+
<i className={isEditing ? 'fas fa-times' : 'far fa-edit'} />
|
|
74
|
+
</button>
|
|
75
|
+
)}
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const GitIntegration = ({ isEnabled, branch, link, repository, manifestPath }: IGitIntegrationProps) => {
|
|
19
81
|
const appName = useApplicationContextSafe().name;
|
|
20
82
|
const [updateIntegration, { loading }] = useUpdateGitIntegrationMutation({
|
|
21
83
|
refetchQueries: [{ query: FetchApplicationManagementDataDocument, variables: { appName } }],
|
|
@@ -56,6 +118,7 @@ export const GitIntegration = ({ isEnabled, branch, link, repository }: IGitInte
|
|
|
56
118
|
Turning this on will automatically import your config from git when a new commit is made to{' '}
|
|
57
119
|
{branch || 'your main branch'}
|
|
58
120
|
</div>
|
|
121
|
+
<ManifestPath manifestPath={manifestPath} />
|
|
59
122
|
</div>
|
|
60
123
|
);
|
|
61
124
|
};
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
import { withErrorBoundary } from '../../presentation/SpinErrorBoundary';
|
|
15
15
|
import { ValidationMessage } from '../../presentation/forms/validation';
|
|
16
16
|
import { logger } from '../../utils';
|
|
17
|
+
import { getDocsUrl } from '../utils/defaults';
|
|
17
18
|
import { Spinner } from '../../widgets/spinners/Spinner';
|
|
18
19
|
|
|
19
20
|
import './ManagedResourceConfig.less';
|
|
@@ -95,11 +96,7 @@ const ManagedResourceConfigInternal = ({ application }: IManagedResourceConfigPr
|
|
|
95
96
|
)}
|
|
96
97
|
<div className="color-text-caption sp-margin-l-top">
|
|
97
98
|
Not sure what this means?{' '}
|
|
98
|
-
<a
|
|
99
|
-
target="_blank"
|
|
100
|
-
onClick={() => logClick('Documentation', application.name)}
|
|
101
|
-
href="https://www.spinnaker.io/guides/user/managed-delivery"
|
|
102
|
-
>
|
|
99
|
+
<a target="_blank" onClick={() => logClick('Documentation', application.name)} href={getDocsUrl('root')}>
|
|
103
100
|
Check out our documentation
|
|
104
101
|
</a>
|
|
105
102
|
</div>
|
|
@@ -11,6 +11,7 @@ import { ReactInjector } from '../../reactShims';
|
|
|
11
11
|
import { showManagedResourceHistoryModal } from '../resourceHistory/ManagedResourceHistoryModal';
|
|
12
12
|
import { toggleResourcePause } from './toggleResourceManagement';
|
|
13
13
|
import { logger } from '../../utils/Logger';
|
|
14
|
+
import { getDocsUrl } from '../utils/defaults';
|
|
14
15
|
|
|
15
16
|
import './ManagedResourceDetailsIndicator.css';
|
|
16
17
|
|
|
@@ -43,11 +44,7 @@ export const ManagedResourceDetailsIndicator = ({
|
|
|
43
44
|
</p>
|
|
44
45
|
<p>
|
|
45
46
|
If a difference from the desired state is detected, Spinnaker will act to correct it.{' '}
|
|
46
|
-
<a
|
|
47
|
-
target="_blank"
|
|
48
|
-
onClick={() => logClick('Learn More', id)}
|
|
49
|
-
href="https://www.spinnaker.io/guides/user/managed-delivery/"
|
|
50
|
-
>
|
|
47
|
+
<a target="_blank" onClick={() => logClick('Learn More', id)} href={getDocsUrl('root')}>
|
|
51
48
|
Learn More
|
|
52
49
|
</a>
|
|
53
50
|
</p>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import { IconNames } from '@spinnaker/presentation';
|
|
4
|
+
|
|
4
5
|
import { Application } from '../../application';
|
|
5
6
|
import { IManagedResourceSummary, ManagedResourceStatus } from '../../domain';
|
|
6
7
|
import { logger } from '../../utils';
|
|
8
|
+
import { getDocsUrl } from '../utils/defaults';
|
|
7
9
|
|
|
8
10
|
interface IViewConfiguration {
|
|
9
11
|
appearance: 'info' | 'warning' | 'error';
|
|
@@ -22,15 +24,22 @@ const LearnMoreLink = ({ resourceSummary }: { resourceSummary: IManagedResourceS
|
|
|
22
24
|
<a
|
|
23
25
|
target="_blank"
|
|
24
26
|
onClick={() => logClick('Status docs link', resourceSummary.id, resourceSummary.status)}
|
|
25
|
-
href={
|
|
26
|
-
.toLowerCase()
|
|
27
|
-
.replace('_', '-')}`}
|
|
27
|
+
href={`${getDocsUrl('resourceStatus')}#${resourceSummary.status.toLowerCase().replace('_', '-')}`}
|
|
28
28
|
>
|
|
29
29
|
Learn more
|
|
30
30
|
</a>
|
|
31
31
|
);
|
|
32
32
|
|
|
33
33
|
export const viewConfigurationByStatus: { [status in ManagedResourceStatus]: IViewConfiguration } = {
|
|
34
|
+
DELETING: {
|
|
35
|
+
appearance: 'warning',
|
|
36
|
+
iconName: 'mdActuating',
|
|
37
|
+
popoverContents: () => (
|
|
38
|
+
<p>
|
|
39
|
+
<b>Spinnaker is deleting this temporary managed resource</b>
|
|
40
|
+
</p>
|
|
41
|
+
),
|
|
42
|
+
},
|
|
34
43
|
ACTUATING: {
|
|
35
44
|
appearance: 'info',
|
|
36
45
|
iconName: 'mdActuating',
|
|
@@ -144,6 +144,20 @@ export interface MdConstraintStatusPayload {
|
|
|
144
144
|
status: MdConstraintStatus;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
+
export interface MdDeployLocation {
|
|
148
|
+
__typename?: 'MdDeployLocation';
|
|
149
|
+
account?: Maybe<Scalars['String']>;
|
|
150
|
+
region?: Maybe<Scalars['String']>;
|
|
151
|
+
sublocations?: Maybe<Array<Scalars['String']>>;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface MdDeployTarget {
|
|
155
|
+
__typename?: 'MdDeployTarget';
|
|
156
|
+
cloudProvider?: Maybe<Scalars['String']>;
|
|
157
|
+
location?: Maybe<MdDeployLocation>;
|
|
158
|
+
status?: Maybe<MdRolloutTargetStatus>;
|
|
159
|
+
}
|
|
160
|
+
|
|
147
161
|
export interface MdDismissNotificationPayload {
|
|
148
162
|
application: Scalars['String'];
|
|
149
163
|
id: Scalars['String'];
|
|
@@ -169,6 +183,16 @@ export interface MdEnvironmentState {
|
|
|
169
183
|
|
|
170
184
|
export type MdEventLevel = 'SUCCESS' | 'INFO' | 'WARNING' | 'ERROR';
|
|
171
185
|
|
|
186
|
+
export interface MdExecutionSummary {
|
|
187
|
+
__typename?: 'MdExecutionSummary';
|
|
188
|
+
status: MdTaskStatus;
|
|
189
|
+
currentStage?: Maybe<MdStageDetail>;
|
|
190
|
+
stages?: Maybe<Array<MdStageDetail>>;
|
|
191
|
+
deployTargets?: Maybe<Array<MdDeployTarget>>;
|
|
192
|
+
completedDeployTargets?: Maybe<Array<MdDeployTarget>>;
|
|
193
|
+
error?: Maybe<Scalars['String']>;
|
|
194
|
+
}
|
|
195
|
+
|
|
172
196
|
export interface MdGitIntegration {
|
|
173
197
|
__typename?: 'MdGitIntegration';
|
|
174
198
|
id: Scalars['String'];
|
|
@@ -317,6 +341,7 @@ export interface MdResourceTask {
|
|
|
317
341
|
__typename?: 'MdResourceTask';
|
|
318
342
|
id: Scalars['String'];
|
|
319
343
|
name: Scalars['String'];
|
|
344
|
+
summary?: Maybe<MdExecutionSummary>;
|
|
320
345
|
}
|
|
321
346
|
|
|
322
347
|
export interface MdRetryArtifactActionPayload {
|
|
@@ -328,6 +353,34 @@ export interface MdRetryArtifactActionPayload {
|
|
|
328
353
|
actionType: MdActionType;
|
|
329
354
|
}
|
|
330
355
|
|
|
356
|
+
export type MdRolloutTargetStatus = 'NOT_STARTED' | 'RUNNING' | 'SUCCEEDED' | 'FAILED';
|
|
357
|
+
|
|
358
|
+
export interface MdStageDetail {
|
|
359
|
+
__typename?: 'MdStageDetail';
|
|
360
|
+
id?: Maybe<Scalars['String']>;
|
|
361
|
+
type?: Maybe<Scalars['String']>;
|
|
362
|
+
name?: Maybe<Scalars['String']>;
|
|
363
|
+
startTime?: Maybe<Scalars['InstantTime']>;
|
|
364
|
+
endTime?: Maybe<Scalars['InstantTime']>;
|
|
365
|
+
status?: Maybe<MdTaskStatus>;
|
|
366
|
+
refId?: Maybe<Scalars['String']>;
|
|
367
|
+
requisiteStageRefIds?: Maybe<Array<Scalars['String']>>;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export type MdTaskStatus =
|
|
371
|
+
| 'NOT_STARTED'
|
|
372
|
+
| 'RUNNING'
|
|
373
|
+
| 'PAUSED'
|
|
374
|
+
| 'SUSPENDED'
|
|
375
|
+
| 'SUCCEEDED'
|
|
376
|
+
| 'FAILED_CONTINUE'
|
|
377
|
+
| 'TERMINAL'
|
|
378
|
+
| 'CANCELED'
|
|
379
|
+
| 'REDIRECT'
|
|
380
|
+
| 'STOPPED'
|
|
381
|
+
| 'BUFFERED'
|
|
382
|
+
| 'SKIPPED';
|
|
383
|
+
|
|
331
384
|
export interface MdToggleResourceManagementPayload {
|
|
332
385
|
id: Scalars['ID'];
|
|
333
386
|
isPaused: Scalars['Boolean'];
|
|
@@ -695,7 +748,7 @@ export type FetchApplicationManagementDataQuery = { __typename?: 'Query' } & {
|
|
|
695
748
|
gitIntegration?: Maybe<
|
|
696
749
|
{ __typename?: 'MdGitIntegration' } & Pick<
|
|
697
750
|
MdGitIntegration,
|
|
698
|
-
'id' | 'repository' | 'branch' | 'isEnabled' | 'link'
|
|
751
|
+
'id' | 'repository' | 'branch' | 'isEnabled' | 'link' | 'manifestPath'
|
|
699
752
|
>
|
|
700
753
|
>;
|
|
701
754
|
}
|
|
@@ -1309,6 +1362,7 @@ export const FetchApplicationManagementDataDocument = gql`
|
|
|
1309
1362
|
branch
|
|
1310
1363
|
isEnabled
|
|
1311
1364
|
link
|
|
1365
|
+
manifestPath
|
|
1312
1366
|
}
|
|
1313
1367
|
}
|
|
1314
1368
|
}
|
|
@@ -197,6 +197,42 @@ type MdResourceActuationState {
|
|
|
197
197
|
type MdResourceTask {
|
|
198
198
|
id: String!
|
|
199
199
|
name: String!
|
|
200
|
+
summary: MdExecutionSummary
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
type MdExecutionSummary {
|
|
204
|
+
status: MdTaskStatus!
|
|
205
|
+
currentStage: MdStageDetail,
|
|
206
|
+
stages: [MdStageDetail!]
|
|
207
|
+
deployTargets: [MdDeployTarget!]
|
|
208
|
+
completedDeployTargets: [MdDeployTarget!]
|
|
209
|
+
error: String
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
type MdDeployTarget {
|
|
213
|
+
cloudProvider: String
|
|
214
|
+
location: MdDeployLocation
|
|
215
|
+
status: MdRolloutTargetStatus
|
|
216
|
+
}
|
|
217
|
+
enum MdRolloutTargetStatus {
|
|
218
|
+
NOT_STARTED, RUNNING, SUCCEEDED, FAILED
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
type MdDeployLocation {
|
|
222
|
+
account: String
|
|
223
|
+
region: String
|
|
224
|
+
sublocations: [String!]
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
type MdStageDetail {
|
|
228
|
+
id: String
|
|
229
|
+
type: String
|
|
230
|
+
name: String
|
|
231
|
+
startTime: InstantTime
|
|
232
|
+
endTime: InstantTime
|
|
233
|
+
status: MdTaskStatus
|
|
234
|
+
refId: String
|
|
235
|
+
requisiteStageRefIds: [String!]
|
|
200
236
|
}
|
|
201
237
|
|
|
202
238
|
type MdResource {
|
|
@@ -354,6 +390,21 @@ enum MdEventLevel {
|
|
|
354
390
|
SUCCESS, INFO, WARNING, ERROR
|
|
355
391
|
}
|
|
356
392
|
|
|
393
|
+
enum MdTaskStatus {
|
|
394
|
+
NOT_STARTED,
|
|
395
|
+
RUNNING,
|
|
396
|
+
PAUSED,
|
|
397
|
+
SUSPENDED,
|
|
398
|
+
SUCCEEDED,
|
|
399
|
+
FAILED_CONTINUE,
|
|
400
|
+
TERMINAL,
|
|
401
|
+
CANCELED,
|
|
402
|
+
REDIRECT,
|
|
403
|
+
STOPPED,
|
|
404
|
+
BUFFERED,
|
|
405
|
+
SKIPPED
|
|
406
|
+
}
|
|
407
|
+
|
|
357
408
|
input MdDismissNotificationPayload {
|
|
358
409
|
application: String!
|
|
359
410
|
id: String!
|
|
@@ -3,11 +3,12 @@ import React from 'react';
|
|
|
3
3
|
import { Illustration } from '@spinnaker/presentation';
|
|
4
4
|
import { logger } from '../../../utils';
|
|
5
5
|
import { ActionModal, IArtifactActionModalProps } from '../../utils/ActionModal';
|
|
6
|
+
import { getDocsUrl } from '../../utils/defaults';
|
|
6
7
|
|
|
7
8
|
type InternalModalProps = Omit<IArtifactActionModalProps, 'logCategory'> & { application: string };
|
|
8
9
|
|
|
9
|
-
const MARK_BAD_DOCS_URL = '
|
|
10
|
-
const PINNING_DOCS_URL = '
|
|
10
|
+
const MARK_BAD_DOCS_URL = getDocsUrl('markAsBad');
|
|
11
|
+
const PINNING_DOCS_URL = getDocsUrl('pinning');
|
|
11
12
|
|
|
12
13
|
export const PinActionModal = ({ application, ...props }: InternalModalProps) => {
|
|
13
14
|
return (
|
|
@@ -86,6 +86,18 @@ button.md-btn {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
button.md-btn-primary,
|
|
90
|
+
button.md-btn-primary:hover {
|
|
91
|
+
color: var(--color-primary);
|
|
92
|
+
border-color: var(--color-primary);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
button.md-btn-accent,
|
|
96
|
+
button.md-btn-accent:hover {
|
|
97
|
+
color: var(--color-accent);
|
|
98
|
+
border-color: var(--color-accent);
|
|
99
|
+
}
|
|
100
|
+
|
|
89
101
|
button.md-btn-success,
|
|
90
102
|
button.md-btn-success:hover {
|
|
91
103
|
color: var(--color-validation-success);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IManagedDeliveryURLs, SETTINGS } from '../../config/settings';
|
|
1
2
|
import { IHoverablePopoverProps } from '../../presentation';
|
|
2
3
|
import { ISpinnerProps } from '../../widgets';
|
|
3
4
|
|
|
@@ -16,3 +17,15 @@ export const spinnerProps: ISpinnerProps = {
|
|
|
16
17
|
export const ABSOLUTE_TIME_FORMAT = 'yyyy-MM-dd HH:mm:ss ZZZZ';
|
|
17
18
|
|
|
18
19
|
export const MD_CATEGORY = 'ManagedDelivery';
|
|
20
|
+
|
|
21
|
+
const DOCS_URLS: IManagedDeliveryURLs = {
|
|
22
|
+
root: 'https://www.spinnaker.io/guides/user/managed-delivery',
|
|
23
|
+
pinning: 'https://www.spinnaker.io/guides/user/managed-delivery/pinning/',
|
|
24
|
+
gettingStarted: 'https://www.spinnaker.io/guides/user/managed-delivery/getting-started/',
|
|
25
|
+
markAsBad: 'https://www.spinnaker.io/guides/user/managed-delivery/marking-as-bad/',
|
|
26
|
+
resourceStatus: 'https://www.spinnaker.io/guides/user/managed-delivery/resource-status/',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const getDocsUrl = (doc: keyof IManagedDeliveryURLs): string => {
|
|
30
|
+
return SETTINGS.managedDelivery?.urls?.[doc] || DOCS_URLS[doc];
|
|
31
|
+
};
|
|
@@ -180,7 +180,7 @@ export const VersionMessage = ({ data, type, newRow = true }: IVersionMessage) =
|
|
|
180
180
|
<>
|
|
181
181
|
{newRow && <div className="flex-break sp-margin-s-top" />}
|
|
182
182
|
<div className={classnames('version-message', typeProps.className)}>
|
|
183
|
-
<Icon name={typeProps.icon} size="
|
|
183
|
+
<Icon name={typeProps.icon} size="14px" color="black" className="sp-margin-2xs-top" />
|
|
184
184
|
<div>
|
|
185
185
|
<div>
|
|
186
186
|
{typeProps.text} {data.by},{' '}
|
|
@@ -64,9 +64,10 @@
|
|
|
64
64
|
color: var(--color-mineshaft);
|
|
65
65
|
border-radius: 4px;
|
|
66
66
|
padding: var(--s-spacing);
|
|
67
|
-
padding-right: var(--
|
|
68
|
-
display:
|
|
69
|
-
|
|
67
|
+
padding-right: var(--l-spacing);
|
|
68
|
+
display: grid;
|
|
69
|
+
grid-gap: var(--xs-spacing);
|
|
70
|
+
grid-template-columns: auto auto;
|
|
70
71
|
align-items: flex-start;
|
|
71
72
|
}
|
|
72
73
|
|
|
@@ -146,7 +146,7 @@ const EnvironmentBadge = ({ name, data: { isPreview, versions, gitMetadata, isPi
|
|
|
146
146
|
return (
|
|
147
147
|
<Tooltip
|
|
148
148
|
delayShow={TOOLTIP_DELAY_SHOW}
|
|
149
|
-
value={isCurrent &&
|
|
149
|
+
value={isCurrent && statusSummary !== 'CURRENT' ? `Current & ${statusText}` : statusText}
|
|
150
150
|
>
|
|
151
151
|
<div
|
|
152
152
|
className={classnames(
|