@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
|
@@ -5,17 +5,16 @@ import './VersionMetadata.less';
|
|
|
5
5
|
export declare const MetadataElement: React.FC<{
|
|
6
6
|
className?: string;
|
|
7
7
|
}>;
|
|
8
|
-
export
|
|
9
|
-
onClick?: () => void;
|
|
10
|
-
href?: string;
|
|
11
|
-
content: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
}
|
|
8
|
+
export declare const METADATA_TEXT_COLOR = "nobel";
|
|
14
9
|
export interface VersionMessageData {
|
|
15
10
|
by?: string;
|
|
16
11
|
at?: string;
|
|
17
12
|
comment?: string;
|
|
18
13
|
}
|
|
14
|
+
export interface ICompareLinks {
|
|
15
|
+
previous?: string;
|
|
16
|
+
current?: string;
|
|
17
|
+
}
|
|
19
18
|
export declare const toPinnedMetadata: (data: {
|
|
20
19
|
pinnedAt?: string;
|
|
21
20
|
pinnedBy?: string;
|
|
@@ -27,24 +26,17 @@ export declare const toVetoedMetadata: (data: {
|
|
|
27
26
|
comment?: string;
|
|
28
27
|
}) => VersionMessageData;
|
|
29
28
|
export interface IVersionMetadataProps {
|
|
30
|
-
build?: IVersionBuildProps['build']
|
|
31
|
-
version: string;
|
|
32
|
-
sha?: string;
|
|
29
|
+
build?: IVersionBuildProps['build'];
|
|
33
30
|
author?: string;
|
|
34
31
|
deployedAt?: string;
|
|
35
|
-
createdAt?: IVersionCreatedAtProps['createdAt'];
|
|
36
32
|
buildsBehind?: number;
|
|
37
33
|
isDeploying?: boolean;
|
|
34
|
+
isPending?: boolean;
|
|
38
35
|
bake?: LifecycleEventSummary;
|
|
39
36
|
pinned?: VersionMessageData;
|
|
40
37
|
vetoed?: VersionMessageData;
|
|
41
|
-
|
|
38
|
+
isCurrent?: boolean;
|
|
42
39
|
}
|
|
43
|
-
export interface IVersionMetadataActionsProps {
|
|
44
|
-
id: string;
|
|
45
|
-
actions: VersionAction[];
|
|
46
|
-
}
|
|
47
|
-
export declare const VersionMetadataActions: ({ id, actions }: IVersionMetadataActionsProps) => JSX.Element;
|
|
48
40
|
interface IVersionCreatedAtProps {
|
|
49
41
|
createdAt?: string | DateTime;
|
|
50
42
|
linkProps: Record<string, string>;
|
|
@@ -59,6 +51,10 @@ declare const badgeTypeToDetails: {
|
|
|
59
51
|
className: string;
|
|
60
52
|
text: string;
|
|
61
53
|
};
|
|
54
|
+
deployed: {
|
|
55
|
+
className: string;
|
|
56
|
+
text: string;
|
|
57
|
+
};
|
|
62
58
|
};
|
|
63
59
|
interface IMetadataBadgeProps {
|
|
64
60
|
type: keyof typeof badgeTypeToDetails;
|
|
@@ -83,9 +79,8 @@ export declare const VersionBranch: ({ branch }: IVersionBranchProps) => JSX.Ele
|
|
|
83
79
|
interface IVersionBuildProps {
|
|
84
80
|
build: {
|
|
85
81
|
buildNumber?: string;
|
|
86
|
-
link?: string;
|
|
87
82
|
version?: string;
|
|
88
|
-
}
|
|
83
|
+
} & Partial<LifecycleEventSummary>;
|
|
89
84
|
withPrefix?: boolean;
|
|
90
85
|
}
|
|
91
86
|
export declare const VersionBuild: ({ build, withPrefix }: IVersionBuildProps) => JSX.Element;
|
|
@@ -96,6 +91,10 @@ export declare const VersionBuilds: ({ builds }: IVersionBuildsProps) => JSX.Ele
|
|
|
96
91
|
export declare const BaseVersionMetadata: React.FC;
|
|
97
92
|
interface ILifecycleEventDetailsProps extends Partial<LifecycleEventSummary> {
|
|
98
93
|
title: string;
|
|
94
|
+
showLink?: boolean;
|
|
95
|
+
version?: string;
|
|
99
96
|
}
|
|
100
|
-
export declare const LifecycleEventDetails: ({ duration, link, startedAt, title }: ILifecycleEventDetailsProps) => JSX.Element;
|
|
97
|
+
export declare const LifecycleEventDetails: ({ version, duration, link, startedAt, title, showLink, }: ILifecycleEventDetailsProps) => JSX.Element;
|
|
98
|
+
declare type IDeploymentStatusProps = Pick<IVersionMetadataProps, 'deployedAt' | 'isPending' | 'isCurrent' | 'isDeploying'>;
|
|
99
|
+
export declare const DeploymentStatus: ({ deployedAt, isCurrent, isPending, isDeploying }: IDeploymentStatusProps) => JSX.Element;
|
|
101
100
|
export {};
|
|
@@ -2,5 +2,9 @@
|
|
|
2
2
|
import type { IVersionMetadataProps } from './MetadataComponents';
|
|
3
3
|
import type { QueryArtifactVersion } from '../overview/types';
|
|
4
4
|
import type { SingleVersionArtifactVersion } from '../versionsHistory/types';
|
|
5
|
-
export declare const
|
|
6
|
-
|
|
5
|
+
export declare const getVersionCompareLinks: (version: QueryArtifactVersion | SingleVersionArtifactVersion) => {
|
|
6
|
+
current: string;
|
|
7
|
+
previous: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const getBaseMetadata: (version: QueryArtifactVersion | SingleVersionArtifactVersion) => Partial<IVersionMetadataProps>;
|
|
10
|
+
export declare const VersionMetadata: ({ build, author, deployedAt, isPending, isCurrent, isDeploying, buildsBehind, bake, pinned, vetoed, }: IVersionMetadataProps) => JSX.Element;
|
|
@@ -11,8 +11,9 @@ export interface ISearchResultSet<T extends ISearchResult = ISearchResult> {
|
|
|
11
11
|
error?: any;
|
|
12
12
|
query?: string;
|
|
13
13
|
}
|
|
14
|
+
export declare type ISearchResultFormatter = (entry: ISearchResult, fromRoute?: boolean) => string | PromiseLike<string>;
|
|
14
15
|
export interface IProviderResultFormatter {
|
|
15
|
-
[category: string]:
|
|
16
|
+
[category: string]: ISearchResultFormatter;
|
|
16
17
|
}
|
|
17
18
|
export declare class InfrastructureSearcher {
|
|
18
19
|
private $q;
|
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.15.0",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"@uirouter/react-hybrid": "1.0.2",
|
|
26
26
|
"@uirouter/rx": "0.6.5",
|
|
27
27
|
"@uirouter/visualizer": "7.2.1",
|
|
28
|
-
"Select2": "git://github.com/select2/select2.git#3.4.8",
|
|
29
28
|
"angular": "1.6.10",
|
|
30
29
|
"angular-messages": "1.6.10",
|
|
31
30
|
"angular-sanitize": "1.6.10",
|
|
@@ -77,7 +76,8 @@
|
|
|
77
76
|
"react2angular": "3.2.1",
|
|
78
77
|
"recoil": "0.0.10",
|
|
79
78
|
"rxjs": "6.6.7",
|
|
80
|
-
"select2
|
|
79
|
+
"select2": "3.5.1",
|
|
80
|
+
"select2-bootstrap-css": "1.4.6",
|
|
81
81
|
"source-sans": "3.46.0",
|
|
82
82
|
"spel2js": "0.2.6",
|
|
83
83
|
"ui-select": "0.19.8"
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
"@graphql-codegen/typescript": "^1.22.4",
|
|
89
89
|
"@graphql-codegen/typescript-operations": "^1.18.3",
|
|
90
90
|
"@graphql-codegen/typescript-react-apollo": "^2.3.0",
|
|
91
|
-
"@spinnaker/eslint-plugin": "^3.0.
|
|
92
|
-
"@spinnaker/scripts": "^0.2.
|
|
91
|
+
"@spinnaker/eslint-plugin": "^3.0.1",
|
|
92
|
+
"@spinnaker/scripts": "^0.2.3",
|
|
93
93
|
"@types/angular": "1.6.26",
|
|
94
94
|
"@types/angular-mocks": "1.5.10",
|
|
95
95
|
"@types/angular-ui-bootstrap": "0.13.41",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"shx": "0.3.3",
|
|
121
121
|
"typescript": "4.3.5"
|
|
122
122
|
},
|
|
123
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "c4b42b16cee7d8746087e9e1bcc4b00751dd4bc7"
|
|
124
124
|
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import type { IScope } from 'angular';
|
|
2
|
+
import { mock } from 'angular';
|
|
3
|
+
import type { ShallowWrapper } from 'enzyme';
|
|
4
|
+
import { shallow } from 'enzyme';
|
|
1
5
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
+
|
|
7
|
+
import type { IAccountSelectInputProps, IAccountSelectInputState } from './AccountSelectInput';
|
|
8
|
+
import { AccountSelectInput } from './AccountSelectInput';
|
|
9
|
+
import type { IAccountDetails } from './AccountService';
|
|
10
|
+
import { AccountService } from './AccountService';
|
|
6
11
|
import Spy = jasmine.Spy;
|
|
7
12
|
|
|
8
13
|
const makeAccount = (name: string, cloudProvider: string, primaryAccount: boolean): IAccountDetails => {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { mock } from 'angular';
|
|
2
|
-
import { mockHttpClient } from '../api/mock/jasmine';
|
|
3
|
-
import { MockHttpClient } from '../api/mock/mockHttpClient';
|
|
4
|
-
|
|
5
|
-
import { SETTINGS } from '../config/settings';
|
|
6
2
|
import { $rootScope } from 'ngimport';
|
|
7
|
-
import { CloudProviderRegistry } from '../cloudProvider';
|
|
8
3
|
|
|
9
|
-
import {
|
|
4
|
+
import type { IAccount } from './AccountService';
|
|
5
|
+
import { AccountService } from './AccountService';
|
|
6
|
+
import { mockHttpClient } from '../api/mock/jasmine';
|
|
7
|
+
import type { MockHttpClient } from '../api/mock/mockHttpClient';
|
|
8
|
+
import { CloudProviderRegistry } from '../cloudProvider';
|
|
9
|
+
import { SETTINGS } from '../config/settings';
|
|
10
10
|
|
|
11
11
|
function flush<T>(http: MockHttpClient, promise: PromiseLike<T>): Promise<T> {
|
|
12
12
|
return http
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IHttpClientImplementation } from './ApiService';
|
|
2
|
-
import { SETTINGS } from '../config/settings';
|
|
1
|
+
import type { IHttpClientImplementation } from './ApiService';
|
|
3
2
|
import { makeRequestBuilderConfig, RequestBuilder } from './ApiService';
|
|
3
|
+
import { SETTINGS } from '../config/settings';
|
|
4
4
|
|
|
5
5
|
describe('RequestBuilder backend', () => {
|
|
6
6
|
const createBackend = (): IHttpClientImplementation => jasmine.createSpyObj(['get', 'post', 'put', 'delete']);
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
/* eslint-disable @spinnaker/api-deprecation, @spinnaker/api-no-slashes, @spinnaker/migrate-to-mock-http-client */
|
|
2
|
+
|
|
1
3
|
import Spy = jasmine.Spy;
|
|
2
4
|
import { mock, noop } from 'angular';
|
|
3
|
-
|
|
4
|
-
import { ICache } from '../cache';
|
|
5
|
+
|
|
5
6
|
import { API, InvalidAPIResponse, invalidContentMessage } from './ApiService';
|
|
7
|
+
import { AuthenticationInitializer } from '../authentication/AuthenticationInitializer';
|
|
8
|
+
import type { ICache } from '../cache';
|
|
6
9
|
import { SETTINGS } from '../config/settings';
|
|
7
10
|
|
|
8
11
|
describe('API Service', function () {
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { mock } from 'angular';
|
|
2
2
|
|
|
3
|
-
import { Application } from './application.model';
|
|
3
|
+
import type { Application } from './application.model';
|
|
4
4
|
import { ApplicationModelBuilder } from './applicationModel.builder';
|
|
5
|
-
import {
|
|
5
|
+
import type { IEntityTag, IEntityTags, IInstanceCounts, ILoadBalancer, IServerGroup } from '../domain';
|
|
6
6
|
import { LOAD_BALANCER_DATA_SOURCE } from '../loadBalancer/loadBalancer.dataSource';
|
|
7
|
-
import { SecurityGroupReader } from '../securityGroup/securityGroupReader.service';
|
|
8
|
-
import { SERVER_GROUP_DATA_SOURCE } from '../serverGroup/serverGroup.dataSource';
|
|
9
7
|
import { SECURITY_GROUP_DATA_SOURCE } from '../securityGroup/securityGroup.dataSource';
|
|
10
|
-
|
|
11
|
-
import {
|
|
8
|
+
import type { SecurityGroupReader } from '../securityGroup/securityGroupReader.service';
|
|
9
|
+
import { SERVER_GROUP_DATA_SOURCE } from '../serverGroup/serverGroup.dataSource';
|
|
10
|
+
import { ApplicationDataSourceRegistry } from './service/ApplicationDataSourceRegistry';
|
|
12
11
|
|
|
13
12
|
describe('Application Model', function () {
|
|
14
13
|
let application: Application,
|
|
@@ -187,19 +186,19 @@ describe('Application Model', function () {
|
|
|
187
186
|
describe('setting default credentials and regions', function () {
|
|
188
187
|
it('sets default credentials and region from server group when only one account/region found', function () {
|
|
189
188
|
const serverGroups: IServerGroup[] = [
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
189
|
+
{
|
|
190
|
+
name: 'deck-test-v001',
|
|
191
|
+
cluster: 'deck-test',
|
|
192
|
+
account: 'test',
|
|
193
|
+
region: 'us-west-2',
|
|
194
|
+
type: 'aws',
|
|
195
|
+
cloudProvider: 'aws',
|
|
196
|
+
instances: [],
|
|
197
|
+
instanceCounts: {} as IInstanceCounts,
|
|
198
|
+
},
|
|
199
|
+
];
|
|
200
|
+
const loadBalancers: ILoadBalancer[] = [];
|
|
201
|
+
const securityGroupsByApplicationName: any[] = [];
|
|
203
202
|
|
|
204
203
|
configureApplication(serverGroups, loadBalancers, securityGroupsByApplicationName);
|
|
205
204
|
expect(application.defaultCredentials.aws).toBe('test');
|
|
@@ -207,11 +206,11 @@ describe('Application Model', function () {
|
|
|
207
206
|
});
|
|
208
207
|
|
|
209
208
|
it('sets default credentials and region from load balancer when only one account/region found', function () {
|
|
210
|
-
const serverGroups: IServerGroup[] = []
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
209
|
+
const serverGroups: IServerGroup[] = [];
|
|
210
|
+
const loadBalancers: ILoadBalancer[] = [
|
|
211
|
+
{ name: 'deck-frontend', cloudProvider: 'gce', vpcId: 'vpc0', region: 'us-central-1', account: 'prod' },
|
|
212
|
+
];
|
|
213
|
+
const securityGroupsByApplicationName: any[] = [];
|
|
215
214
|
|
|
216
215
|
configureApplication(serverGroups, loadBalancers, securityGroupsByApplicationName);
|
|
217
216
|
expect(application.defaultCredentials.gce).toBe('prod');
|
|
@@ -219,11 +218,11 @@ describe('Application Model', function () {
|
|
|
219
218
|
});
|
|
220
219
|
|
|
221
220
|
it('sets default credentials and region from firewall', function () {
|
|
222
|
-
const serverGroups: any[] = []
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
221
|
+
const serverGroups: any[] = [];
|
|
222
|
+
const loadBalancers: ILoadBalancer[] = [];
|
|
223
|
+
const securityGroupsByApplicationName: any[] = [
|
|
224
|
+
{ name: 'deck-test', provider: 'cf', accountName: 'test', region: 'us-south-7' },
|
|
225
|
+
];
|
|
227
226
|
|
|
228
227
|
configureApplication(serverGroups, loadBalancers, securityGroupsByApplicationName);
|
|
229
228
|
expect(application.defaultCredentials.cf).toBe('test');
|
|
@@ -231,13 +230,13 @@ describe('Application Model', function () {
|
|
|
231
230
|
});
|
|
232
231
|
|
|
233
232
|
it('does not set defaults when multiple values found for the same provider', function () {
|
|
234
|
-
const serverGroups: IServerGroup[] = []
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
233
|
+
const serverGroups: IServerGroup[] = [];
|
|
234
|
+
const loadBalancers: ILoadBalancer[] = [
|
|
235
|
+
{ name: 'deck-frontend', cloudProvider: 'aws', vpcId: 'vpcId', region: 'us-west-1', account: 'prod' },
|
|
236
|
+
];
|
|
237
|
+
const securityGroupsByApplicationName: any[] = [
|
|
238
|
+
{ name: 'deck-test', provider: 'aws', accountName: 'test', region: 'us-east-1' },
|
|
239
|
+
];
|
|
241
240
|
|
|
242
241
|
configureApplication(serverGroups, loadBalancers, securityGroupsByApplicationName);
|
|
243
242
|
expect(application.defaultCredentials.aws).toBeUndefined();
|
|
@@ -245,13 +244,13 @@ describe('Application Model', function () {
|
|
|
245
244
|
});
|
|
246
245
|
|
|
247
246
|
it('sets default region or default credentials if possible', function () {
|
|
248
|
-
const serverGroups: IServerGroup[] = []
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
247
|
+
const serverGroups: IServerGroup[] = [];
|
|
248
|
+
const loadBalancers: ILoadBalancer[] = [
|
|
249
|
+
{ name: 'deck-frontend', cloudProvider: 'aws', vpcId: 'vpcId', region: 'us-east-1', account: 'prod' },
|
|
250
|
+
];
|
|
251
|
+
const securityGroupsByApplicationName: any[] = [
|
|
252
|
+
{ name: 'deck-test', provider: 'aws', accountName: 'test', region: 'us-east-1' },
|
|
253
|
+
];
|
|
255
254
|
|
|
256
255
|
configureApplication(serverGroups, loadBalancers, securityGroupsByApplicationName);
|
|
257
256
|
expect(application.defaultCredentials.aws).toBeUndefined();
|
|
@@ -259,13 +258,13 @@ describe('Application Model', function () {
|
|
|
259
258
|
});
|
|
260
259
|
|
|
261
260
|
it('sets default credentials, even if region cannot be set', function () {
|
|
262
|
-
const serverGroups: IServerGroup[] = []
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
261
|
+
const serverGroups: IServerGroup[] = [];
|
|
262
|
+
const loadBalancers: ILoadBalancer[] = [
|
|
263
|
+
{ name: 'deck-frontend', cloudProvider: 'aws', vpcId: 'vpc0', region: 'us-east-1', account: 'test' },
|
|
264
|
+
];
|
|
265
|
+
const securityGroupsByApplicationName: any[] = [
|
|
266
|
+
{ name: 'deck-test', provider: 'aws', accountName: 'test', region: 'us-west-1' },
|
|
267
|
+
];
|
|
269
268
|
|
|
270
269
|
configureApplication(serverGroups, loadBalancers, securityGroupsByApplicationName);
|
|
271
270
|
expect(application.defaultCredentials.aws).toBe('test');
|
|
@@ -274,35 +273,35 @@ describe('Application Model', function () {
|
|
|
274
273
|
|
|
275
274
|
it('should set defaults for multiple providers', function () {
|
|
276
275
|
const serverGroups: any[] = [
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
276
|
+
{
|
|
277
|
+
name: 'deck-test-v001',
|
|
278
|
+
account: 'test',
|
|
279
|
+
region: 'us-west-2',
|
|
280
|
+
provider: 'aws',
|
|
281
|
+
instances: [],
|
|
282
|
+
instanceCounts: { up: 0, down: 0, starting: 0, unknown: 0, outOfService: 0 },
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
name: 'deck-gce-v001',
|
|
286
|
+
account: 'gce-test',
|
|
287
|
+
region: 'us-central-1',
|
|
288
|
+
provider: 'gce',
|
|
289
|
+
instances: [],
|
|
290
|
+
instanceCounts: { up: 0, down: 0, starting: 0, unknown: 0, outOfService: 0 },
|
|
291
|
+
},
|
|
292
|
+
];
|
|
293
|
+
const loadBalancers: ILoadBalancer[] = [
|
|
294
|
+
{
|
|
295
|
+
name: 'deck-frontend',
|
|
296
|
+
account: 'gce-test',
|
|
297
|
+
cloudProvider: 'gce',
|
|
298
|
+
region: 'us-central-1',
|
|
299
|
+
serverGroups: [],
|
|
300
|
+
},
|
|
301
|
+
];
|
|
302
|
+
const securityGroupsByApplicationName: any[] = [
|
|
303
|
+
{ name: 'deck-test', provider: 'aws', accountName: 'test', region: 'us-west-2' },
|
|
304
|
+
];
|
|
306
305
|
|
|
307
306
|
configureApplication(serverGroups, loadBalancers, securityGroupsByApplicationName);
|
|
308
307
|
expect(application.defaultCredentials.aws).toBe('test');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<dl class="dl-horizontal">
|
|
1
|
+
<dl class="dl-horizontal" ng-if="(config.application.attributes && config.application.attributes.email)">
|
|
2
2
|
<dt>Owner</dt>
|
|
3
3
|
<dd>{{vm.application.attributes.email}}</dd>
|
|
4
4
|
<dt ng-if="vm.application.attributes.appGroup">App Group <help-field key="application.group"></help-field></dt>
|
|
@@ -55,7 +55,11 @@
|
|
|
55
55
|
<dd>{{vm.permissions}}</dd>
|
|
56
56
|
</render-if-feature>
|
|
57
57
|
</dl>
|
|
58
|
+
<p ng-if="(!config.application.attributes || !config.application.attributes.email)">
|
|
59
|
+
This application has not been configured.
|
|
60
|
+
</p>
|
|
58
61
|
<button class="btn btn-link" ng-click="vm.editApplication()">
|
|
59
62
|
<span class="glyphicon glyphicon-cog"></span>
|
|
60
|
-
Edit Application
|
|
63
|
+
{{ (!config.application.attributes || !config.application.attributes.email) ? "Create Application" : "Edit Application
|
|
64
|
+
Attributes"}}
|
|
61
65
|
</button>
|
|
@@ -110,6 +110,10 @@ module(CORE_APPLICATION_CONFIG_APPLICATIONATTRIBUTES_DIRECTIVE, [
|
|
|
110
110
|
.catch(() => {});
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
+
if (this.application && (!this.application.attributes || !this.application.attributes.email)) {
|
|
114
|
+
this.editApplication();
|
|
115
|
+
}
|
|
116
|
+
|
|
113
117
|
this.slackBaseUrl = get(SETTINGS, 'slack.baseUrl', '');
|
|
114
118
|
},
|
|
115
119
|
]);
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
<div style="overflow-y: auto" sticky-headers>
|
|
2
|
-
<page-navigator
|
|
2
|
+
<page-navigator
|
|
3
|
+
scrollable-container="[sticky-headers]"
|
|
4
|
+
deep-link-param="section"
|
|
5
|
+
ng-if="(!config.application.attributes || !config.application.attributes.email)"
|
|
6
|
+
>
|
|
7
|
+
<page-section key="location" label="Application Attributes">
|
|
8
|
+
<application-attributes application="config.application"></application-attributes>
|
|
9
|
+
</page-section>
|
|
10
|
+
</page-navigator>
|
|
11
|
+
<page-navigator
|
|
12
|
+
scrollable-container="[sticky-headers]"
|
|
13
|
+
deep-link-param="section"
|
|
14
|
+
ng-if="(config.application.attributes && config.application.attributes.email)"
|
|
15
|
+
>
|
|
3
16
|
<page-section key="location" label="Application Attributes">
|
|
4
17
|
<application-attributes application="config.application"></application-attributes>
|
|
5
18
|
</page-section>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { shallow } from 'enzyme';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
|
|
4
|
+
import type { ICustomBannerConfig } from './CustomBannerConfig';
|
|
5
|
+
import { CustomBannerConfig } from './CustomBannerConfig';
|
|
4
6
|
import { noop } from '../../../utils';
|
|
5
7
|
|
|
6
|
-
import { CustomBannerConfig, ICustomBannerConfig } from './CustomBannerConfig';
|
|
7
|
-
|
|
8
8
|
describe('<CustomBannerConfig />', () => {
|
|
9
9
|
let bannerConfigs: ICustomBannerConfig[];
|
|
10
10
|
let wrapper: any;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { mock } from 'angular';
|
|
2
2
|
|
|
3
|
-
import { Application } from '../../application.model';
|
|
3
|
+
import type { Application } from '../../application.model';
|
|
4
|
+
import type { DataSourceEditorController } from './applicationDataSourceEditor.component';
|
|
5
|
+
import { APPLICATION_DATA_SOURCE_EDITOR } from './applicationDataSourceEditor.component';
|
|
4
6
|
import { ApplicationModelBuilder } from '../../applicationModel.builder';
|
|
5
|
-
import { APPLICATION_DATA_SOURCE_EDITOR, DataSourceEditorController } from './applicationDataSourceEditor.component';
|
|
6
|
-
import { ApplicationWriter } from '../../service/ApplicationWriter';
|
|
7
7
|
import { TaskReader } from '../../../index';
|
|
8
|
+
import { ApplicationWriter } from '../../service/ApplicationWriter';
|
|
8
9
|
|
|
9
10
|
describe('Component: Application Data Source Editor', () => {
|
|
10
11
|
let application: Application,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { mock } from 'angular';
|
|
2
2
|
|
|
3
|
+
import type { ConfigSectionFooterController } from './configSectionFooter.component';
|
|
4
|
+
import { CONFIG_SECTION_FOOTER } from './configSectionFooter.component';
|
|
3
5
|
import { ApplicationWriter } from '../../service/ApplicationWriter';
|
|
4
|
-
import { CONFIG_SECTION_FOOTER, ConfigSectionFooterController } from './configSectionFooter.component';
|
|
5
6
|
|
|
6
7
|
describe('Component: ConfigSectionFooter', () => {
|
|
7
8
|
let $componentController: ng.IComponentControllerService,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IInstance, IServerGroup } from '../../domain';
|
|
2
|
-
import { Application } from '../application.model';
|
|
3
|
-
import { ApplicationModelBuilder } from '../applicationModel.builder';
|
|
4
1
|
import { AppListExtractor } from './AppListExtractor';
|
|
5
|
-
import {
|
|
2
|
+
import type { Application } from '../application.model';
|
|
3
|
+
import { ApplicationModelBuilder } from '../applicationModel.builder';
|
|
4
|
+
import type { IInstance, IServerGroup } from '../../domain';
|
|
5
|
+
import type { IMoniker } from '../../naming/IMoniker';
|
|
6
6
|
|
|
7
7
|
describe('AppListExtractor', function () {
|
|
8
8
|
const buildApplication = (serverGroups: any[] = []): Application => {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { mock } from 'angular';
|
|
3
2
|
import { mount } from 'enzyme';
|
|
3
|
+
import React from 'react';
|
|
4
4
|
|
|
5
|
+
import type { IPermissions, IPermissionsConfigurerProps } from './PermissionsConfigurer';
|
|
6
|
+
import { PermissionsConfigurer } from './PermissionsConfigurer';
|
|
5
7
|
import { AuthenticationService } from '../../authentication';
|
|
6
8
|
import { REACT_MODULE } from '../../reactShims';
|
|
7
|
-
import { IPermissions, IPermissionsConfigurerProps, PermissionsConfigurer } from './PermissionsConfigurer';
|
|
8
9
|
|
|
9
10
|
describe('PermissionsConfigurer', () => {
|
|
10
11
|
const createComponent = (props: IPermissionsConfigurerProps) => {
|
|
@@ -32,6 +32,7 @@ angular
|
|
|
32
32
|
};
|
|
33
33
|
vm.errorMsgs = [];
|
|
34
34
|
vm.application = application;
|
|
35
|
+
vm.isNew = !application.attributes || !application.attributes.email;
|
|
35
36
|
vm.applicationAttributes = _.cloneDeep(application.attributes);
|
|
36
37
|
|
|
37
38
|
AccountService.listProviders().then((providers) => (vm.data.cloudProviders = providers));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div class="modal-page">
|
|
2
2
|
<modal-close dismiss="$dismiss()"></modal-close>
|
|
3
3
|
<div class="modal-header">
|
|
4
|
-
<h4 class="modal-title">Edit Application</h4>
|
|
4
|
+
<h4 class="modal-title">{{editApp.isNew ? "Create" : "Edit"}} Application</h4>
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
7
|
<form role="form" class="container-fluid" novalidate name="editApplicationForm">
|
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
<div class="modal-footer">
|
|
253
253
|
<a href class="btn btn-default" ng-click="$dismiss()">Cancel</a>
|
|
254
254
|
<submit-button
|
|
255
|
-
is-new="
|
|
255
|
+
is-new="editApp.isNew"
|
|
256
256
|
is-disabled="!editApplicationForm.$valid || editApp.state.submitting || editApp.data.showOverrideWarning || editApp.state.permissionsInvalid"
|
|
257
257
|
submitting="editApp.state.submitting"
|
|
258
258
|
on-click="editApp.submit()"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { mock } from 'angular';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import type { IApplicationNameValidationResult } from './ApplicationNameValidator';
|
|
4
|
+
import { ApplicationNameValidator } from './ApplicationNameValidator';
|
|
4
5
|
import { ExampleApplicationNameValidator, ExampleApplicationNameValidator2 } from './ExampleApplicationNameValidator';
|
|
5
6
|
import { AccountService } from '../../../account/AccountService';
|
|
6
7
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ICompileService, IQService, IRootScopeService
|
|
1
|
+
import type { ICompileService, IQService, IRootScopeService } from 'angular';
|
|
2
|
+
import { mock } from 'angular';
|
|
2
3
|
|
|
3
4
|
import { ExampleApplicationNameValidator, ExampleApplicationNameValidator2 } from './ExampleApplicationNameValidator';
|
|
4
|
-
import { VALIDATE_APPLICATION_NAME } from './validateApplicationName.directive';
|
|
5
5
|
import { AccountService } from '../../../account/AccountService';
|
|
6
|
+
import { VALIDATE_APPLICATION_NAME } from './validateApplicationName.directive';
|
|
6
7
|
|
|
7
8
|
describe('Validator: validateApplicationName', function () {
|
|
8
9
|
const validator1 = new ExampleApplicationNameValidator();
|