@spinnaker/core 0.14.1 → 0.16.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.
Files changed (224) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/dist/config/settings.d.ts +1 -1
  3. package/dist/core.module.d.ts +1 -1
  4. package/dist/index.js +89 -47
  5. package/dist/index.js.map +1 -1
  6. package/dist/instance/instanceType.service.d.ts +3 -2
  7. package/dist/managed/artifactActions/ArtifactActions.d.ts +24 -0
  8. package/dist/managed/constraints/registry.d.ts +13 -2
  9. package/dist/managed/environmentBaseElements/EnvironmentItem.d.ts +3 -2
  10. package/dist/managed/graphql/graphql-sdk.d.ts +123 -11
  11. package/dist/managed/overview/Resource.d.ts +5 -2
  12. package/dist/managed/overview/artifact/Artifact.d.ts +2 -1
  13. package/dist/managed/overview/artifact/ArtifactActionModal.d.ts +20 -9
  14. package/dist/managed/overview/artifact/ArtifactCollapsibleSection.d.ts +7 -0
  15. package/dist/managed/overview/artifact/ArtifactVersions.d.ts +9 -0
  16. package/dist/managed/overview/artifact/CurrentVersion.d.ts +7 -6
  17. package/dist/managed/overview/artifact/VersionTitle.d.ts +9 -0
  18. package/dist/managed/overview/artifact/hooks.d.ts +6 -11
  19. package/dist/managed/overview/artifact/useCreateRollbackActions.hook.d.ts +3 -0
  20. package/dist/managed/overview/artifact/utils.d.ts +15 -14
  21. package/dist/managed/overview/useIsUpdatingResources.hook.d.ts +1 -0
  22. package/dist/managed/resources/ResourceTitle.d.ts +3 -3
  23. package/dist/managed/resources/resourceRegistry.d.ts +1 -1
  24. package/dist/managed/utils/ActionModal.d.ts +1 -0
  25. package/dist/managed/utils/defaults.d.ts +1 -0
  26. package/dist/managed/versionMetadata/MetadataComponents.d.ts +18 -19
  27. package/dist/managed/versionMetadata/VersionMetadata.d.ts +6 -2
  28. package/dist/search/infrastructure/infrastructureSearch.service.d.ts +2 -1
  29. package/dist/securityGroup/index.d.ts +2 -1
  30. package/package.json +6 -6
  31. package/src/account/AccountSelectInput.spec.tsx +9 -4
  32. package/src/account/AccountService.spec.ts +6 -6
  33. package/src/api/ApiService.spec.ts +2 -2
  34. package/src/api/ApiServiceDeprecated.spec.ts +5 -2
  35. package/src/application/application.model.spec.ts +78 -79
  36. package/src/application/applications.state.provider.ts +1 -1
  37. package/src/application/config/applicationAttributes.directive.html +6 -2
  38. package/src/application/config/applicationAttributes.directive.js +4 -0
  39. package/src/application/config/applicationConfig.view.html +14 -1
  40. package/src/application/config/customBanner/CustomBannerConfig.spec.tsx +3 -3
  41. package/src/application/config/dataSources/applicationDataSourceEditor.component.spec.ts +4 -3
  42. package/src/application/config/footer/configSectionFooter.component.spec.ts +2 -1
  43. package/src/application/listExtractor/AppListExtractor.spec.ts +4 -4
  44. package/src/application/modal/PermissionsConfigurer.spec.tsx +3 -2
  45. package/src/application/modal/createApplication.modal.controller.js +7 -6
  46. package/src/application/modal/createApplication.modal.controller.spec.js +1 -0
  47. package/src/application/modal/editApplication.controller.modal.js +1 -0
  48. package/src/application/modal/editApplication.html +2 -2
  49. package/src/application/modal/validation/ApplicationNameValidator.spec.ts +2 -1
  50. package/src/application/modal/validation/validateApplicationName.directive.spec.ts +3 -2
  51. package/src/application/nav/ApplicationNavigation.spec.tsx +12 -11
  52. package/src/application/nav/NavItem.spec.tsx +7 -5
  53. package/src/application/nav/NavSection.spec.tsx +3 -2
  54. package/src/application/search/Applications.tsx +48 -0
  55. package/src/application/service/ApplicationReader.spec.ts +13 -8
  56. package/src/application/service/ApplicationWriter.spec.ts +4 -2
  57. package/src/application/service/InferredApplicationWarningService.spec.ts +2 -3
  58. package/src/artifact/expectedArtifact.service.spec.ts +2 -1
  59. package/src/artifact/react/ExpectedArtifactSelector.spec.tsx +2 -3
  60. package/src/authentication/AuthenticationInitializer.spec.ts +2 -1
  61. package/src/authentication/AuthenticationService.spec.ts +2 -1
  62. package/src/authentication/authentication.interceptor.spec.ts +4 -2
  63. package/src/cache/cacheInitializer.service.spec.ts +7 -4
  64. package/src/cache/infrastructureCaches.spec.ts +4 -4
  65. package/src/chaosMonkey/chaosMonkeyExceptions.component.spec.ts +4 -2
  66. package/src/cloudProvider/providerSelection/ProviderSelectionService.spec.ts +23 -21
  67. package/src/cluster/ClusterRuleMatcher.spec.ts +2 -1
  68. package/src/cluster/cluster.service.spec.ts +7 -7
  69. package/src/cluster/filter/ClusterFilterService.spec.ts +15 -14
  70. package/src/cluster/filter/LabelFilter.spec.tsx +3 -3
  71. package/src/cluster/filter/MultiselectModel.spec.ts +2 -2
  72. package/src/cluster/filter/labelFilterUtils.spec.ts +3 -7
  73. package/src/config/settings.ts +1 -3
  74. package/src/core.module.ts +1 -1
  75. package/src/filterModel/dependentFilter/DependentFilterService.spec.ts +1 -1
  76. package/src/function/filter/FunctionFilterService.spec.ts +5 -3
  77. package/src/function/function.read.service.spec.ts +4 -3
  78. package/src/header/customBanner/CustomBanner.spec.tsx +3 -4
  79. package/src/healthCounts/HealthCounts.spec.tsx +2 -2
  80. package/src/history/recentHistory.service.spec.ts +2 -1
  81. package/src/insight/InsightMenu.spec.tsx +9 -6
  82. package/src/insight/InsightMenu.tsx +3 -0
  83. package/src/instance/instance.write.service.spec.ts +8 -7
  84. package/src/instance/instanceType.service.ts +12 -2
  85. package/src/instance/instanceTypeService.spec.ts +2 -1
  86. package/src/loadBalancer/LoadBalancersTag.spec.tsx +8 -6
  87. package/src/loadBalancer/filter/LoadBalancerFilterService.spec.ts +2 -2
  88. package/src/managed/Environments.less +4 -4
  89. package/src/managed/Environments.tsx +1 -1
  90. package/src/managed/RelativeTimestamp.tsx +8 -6
  91. package/src/managed/artifactActions/ArtifactActions.tsx +77 -0
  92. package/src/managed/constraints/AllowedTimes.spec.ts +2 -1
  93. package/src/managed/constraints/registry.tsx +27 -1
  94. package/src/managed/environmentBaseElements/BaseEnvironment.less +3 -3
  95. package/src/managed/environmentBaseElements/EnvironmentItem.tsx +11 -4
  96. package/src/managed/graphql/graphql-sdk.ts +218 -29
  97. package/src/managed/graphql/schema.graphql +14 -1
  98. package/src/managed/overview/EnvironmentOverview.tsx +12 -15
  99. package/src/managed/overview/EnvironmentsOverview.less +6 -5
  100. package/src/managed/overview/PreviewEnvironments.tsx +0 -3
  101. package/src/managed/overview/Resource.less +1 -1
  102. package/src/managed/overview/Resource.tsx +62 -47
  103. package/src/managed/overview/artifact/Artifact.less +27 -52
  104. package/src/managed/overview/artifact/Artifact.tsx +86 -22
  105. package/src/managed/overview/artifact/ArtifactActionModal.less +19 -0
  106. package/src/managed/overview/artifact/ArtifactActionModal.tsx +150 -68
  107. package/src/managed/overview/artifact/ArtifactCollapsibleSection.tsx +32 -0
  108. package/src/managed/overview/artifact/ArtifactVersionTasks.tsx +2 -0
  109. package/src/managed/overview/artifact/{PendingVersion.tsx → ArtifactVersions.tsx} +35 -25
  110. package/src/managed/overview/artifact/Constraints.tsx +61 -21
  111. package/src/managed/overview/artifact/CurrentVersion.tsx +42 -27
  112. package/src/managed/overview/artifact/VersionTitle.tsx +18 -0
  113. package/src/managed/overview/artifact/hooks.ts +71 -34
  114. package/src/managed/overview/artifact/useCreateRollbackActions.hook.ts +75 -0
  115. package/src/managed/overview/artifact/utils.spec.ts +1 -1
  116. package/src/managed/overview/artifact/utils.ts +47 -80
  117. package/src/managed/overview/baseStyles.less +124 -88
  118. package/src/managed/overview/queries.graphql +54 -13
  119. package/src/managed/overview/useIsUpdatingResources.hook.ts +9 -0
  120. package/src/managed/resources/ResourceTitle.tsx +12 -5
  121. package/src/managed/utils/ActionModal.tsx +4 -1
  122. package/src/managed/utils/defaults.ts +3 -0
  123. package/src/managed/utils/useNotifyOnError.hook.ts +1 -1
  124. package/src/managed/versionMetadata/MetadataComponents.tsx +102 -70
  125. package/src/managed/versionMetadata/VersionMetadata.less +17 -18
  126. package/src/managed/versionMetadata/VersionMetadata.tsx +23 -31
  127. package/src/managed/versionsHistory/VersionContent.tsx +20 -13
  128. package/src/managed/versionsHistory/VersionHeading.tsx +2 -1
  129. package/src/managed/versionsHistory/VersionsHistory.less +11 -3
  130. package/src/manifest/PodNameProvider.spec.ts +1 -1
  131. package/src/navigation/customParamTypes.spec.ts +1 -1
  132. package/src/pagerDuty/pagerDuty.read.service.spec.ts +4 -2
  133. package/src/pagerDuty/pagerDutyTag.component.spec.ts +7 -3
  134. package/src/pipeline/config/PipelineRegistry.spec.ts +38 -37
  135. package/src/pipeline/config/actions/templateJson/ShowPipelineTemplateJsonModal.spec.tsx +3 -3
  136. package/src/pipeline/config/pipelineConfigurer.controller.spec.ts +3 -3
  137. package/src/pipeline/config/services/PipelineConfigService.spec.ts +4 -3
  138. package/src/pipeline/config/stages/bakeManifest/helm/BakeHelmConfigForm.spec.tsx +51 -8
  139. package/src/pipeline/config/stages/bakeManifest/helm/BakeHelmConfigForm.tsx +36 -6
  140. package/src/pipeline/config/stages/findArtifactFromExecution/findArtifactFromExecution.controller.spec.ts +2 -1
  141. package/src/pipeline/config/stages/manualJudgment/manualJudgment.service.spec.ts +6 -4
  142. package/src/pipeline/config/stages/travis/travisExecutionDetails.controller.spec.ts +5 -2
  143. package/src/pipeline/config/stages/travis/travisStage.controller.spec.ts +3 -2
  144. package/src/pipeline/config/stages/unmatchedStageTypeStage/unmatchedStageTypeStage.controller.spec.ts +2 -1
  145. package/src/pipeline/config/stages/wait/SkipWait.tsx +3 -1
  146. package/src/pipeline/config/stages/wercker/werckerExecutionDetails.controller.spec.ts +5 -2
  147. package/src/pipeline/config/stages/wercker/werckerStage.controller.spec.ts +3 -2
  148. package/src/pipeline/config/templates/Variable.spec.tsx +6 -5
  149. package/src/pipeline/config/templates/configurePipelineTemplateModal.controller.spec.ts +7 -8
  150. package/src/pipeline/config/templates/v2/configurePipelineTemplateModalV2.controller.spec.ts +7 -8
  151. package/src/pipeline/config/templates/v2/pipelineTemplateV2.service.spec.ts +1 -1
  152. package/src/pipeline/config/triggers/TriggersPageContent.spec.tsx +4 -4
  153. package/src/pipeline/config/triggers/TriggersPageContent.tsx +1 -2
  154. package/src/pipeline/config/triggers/artifacts/docker/defaultDocker.artifact.spec.ts +1 -2
  155. package/src/pipeline/config/validation/pipelineConfig.validator.spec.ts +14 -15
  156. package/src/pipeline/create/CreatePipelineModal.spec.tsx +9 -7
  157. package/src/pipeline/details/executionDetailsSection.service.spec.ts +3 -2
  158. package/src/pipeline/executions/Executions.spec.tsx +9 -6
  159. package/src/pipeline/executions/executionAction/ExecutionAction.spec.tsx +1 -1
  160. package/src/pipeline/executions/executionGroup/ExecutionGroup.tsx +2 -1
  161. package/src/pipeline/filter/executionFilter.service.spec.ts +1 -1
  162. package/src/pipeline/pipeline.dataSource.spec.ts +8 -7
  163. package/src/pipeline/service/ExecutionsTransformer.spec.ts +2 -2
  164. package/src/pipeline/service/execution.service.spec.ts +7 -5
  165. package/src/pipeline/status/Artifact.spec.tsx +7 -6
  166. package/src/pipeline/status/ArtifactList.spec.tsx +7 -6
  167. package/src/pipeline/status/ExecutionParameters.spec.tsx +5 -4
  168. package/src/pipeline/status/ResolvedArtifactList.spec.tsx +7 -6
  169. package/src/plugins/deck.plugin.spec.ts +4 -2
  170. package/src/plugins/plugin.registry.spec.ts +6 -4
  171. package/src/presentation/forms/SpinFormik.spec.tsx +3 -2
  172. package/src/presentation/forms/fields/FormikFormField.spec.tsx +3 -3
  173. package/src/presentation/forms/hooks/useSaveRestoreMutuallyExclusiveFields.hook.spec.tsx +4 -3
  174. package/src/presentation/forms/inputs/ChecklistInput.spec.tsx +1 -1
  175. package/src/presentation/forms/inputs/RadioButtonInput.spec.tsx +2 -1
  176. package/src/presentation/forms/inputs/SelectInput.spec.tsx +2 -1
  177. package/src/presentation/forms/inputs/hooks/useInternalValidator.hook.spec.tsx +4 -3
  178. package/src/presentation/forms/validation/FormValidator.spec.ts +2 -2
  179. package/src/presentation/forms/validation/useValidationData.spec.tsx +4 -3
  180. package/src/presentation/hooks/useContainerClassNames.hook.spec.tsx +2 -1
  181. package/src/presentation/hooks/useData.hook.spec.tsx +3 -2
  182. package/src/presentation/hooks/useDebouncedValue.hook.spec.tsx +1 -1
  183. package/src/presentation/hooks/useDeepObjectDiff.hook.spec.tsx +2 -1
  184. package/src/presentation/hooks/useEventListener.hook.spec.tsx +2 -1
  185. package/src/presentation/hooks/useForceUpdate.hook.spec.tsx +2 -1
  186. package/src/presentation/hooks/useInterval.hook.spec.tsx +2 -1
  187. package/src/presentation/hooks/useIsMountedRef.hook.spec.tsx +1 -1
  188. package/src/presentation/hooks/useLatestCallback.hook.spec.tsx +2 -1
  189. package/src/presentation/hooks/useLatestPromise.hook.spec.tsx +9 -3
  190. package/src/presentation/hooks/useMountStatusRef.hook.spec.tsx +3 -1
  191. package/src/presentation/hooks/usePollingData.hook.spec.tsx +3 -2
  192. package/src/presentation/hooks/usePrevious.hook.spec.tsx +2 -1
  193. package/src/presentation/navigation/pageNavigator.component.spec.ts +6 -6
  194. package/src/presentation/spel/SpelInput.spec.tsx +9 -4
  195. package/src/presentation/spel/SpelService.spec.ts +1 -1
  196. package/src/scheduler/SchedulerFactory.spec.ts +2 -1
  197. package/src/search/infrastructure/infrastructure.controller.js +3 -0
  198. package/src/search/infrastructure/infrastructureSearch.service.ts +3 -2
  199. package/src/search/widgets/Filter.spec.tsx +5 -3
  200. package/src/search/widgets/Filters.spec.tsx +5 -3
  201. package/src/search/widgets/Search.spec.tsx +4 -2
  202. package/src/securityGroup/index.ts +2 -1
  203. package/src/securityGroup/securityGroupReader.service.spec.ts +8 -10
  204. package/src/serverGroup/configure/common/deployInitializer.component.spec.ts +7 -3
  205. package/src/serverGroup/configure/common/v2instanceArchetypeSelector.component.ts +1 -1
  206. package/src/serverGroup/details/capacity/CapacityDetailsSection.spec.tsx +1 -1
  207. package/src/serverGroup/details/scalingActivities/ScalingActivitiesModal.spec.ts +2 -1
  208. package/src/serverGroup/details/serverGroupWarningMessage.service.spec.ts +4 -4
  209. package/src/serverGroup/serverGroupWriter.service.spec.ts +10 -8
  210. package/src/slack/SlackReader.spec.ts +2 -1
  211. package/src/subnet/subnet.read.service.spec.ts +4 -3
  212. package/src/task/monitor/taskMonitor.spec.ts +6 -5
  213. package/src/task/task.dataSource.spec.ts +5 -4
  214. package/src/task/task.write.service.spec.ts +3 -1
  215. package/src/utils/clipboard/CopyToClipboard.spec.tsx +2 -1
  216. package/src/utils/json/json.utility.service.spec.ts +2 -1
  217. package/src/utils/timeFormatters.spec.ts +3 -2
  218. package/src/utils/workerPool.spec.ts +2 -1
  219. package/src/widgets/ApplicationsPickerInput.spec.tsx +3 -2
  220. package/src/widgets/spelText/SpelAutocompleteService.spec.ts +4 -3
  221. package/src/widgets/tags/Tag.spec.tsx +4 -2
  222. package/src/widgets/tags/TagList.spec.tsx +5 -3
  223. package/src/yamlEditor/yamlEditorUtils.spec.ts +1 -1
  224. 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 interface VersionAction {
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'] & Partial<LifecycleEventSummary>;
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
- actions?: VersionAction[];
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
- buildLink?: 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 getBaseMetadata: (version: QueryArtifactVersion | SingleVersionArtifactVersion) => Omit<Partial<IVersionMetadataProps>, 'version'> & Pick<IVersionMetadataProps, 'version'>;
6
- export declare const VersionMetadata: ({ version, sha, build, author, deployedAt, createdAt, buildsBehind, bake, isDeploying, pinned, vetoed, actions, }: IVersionMetadataProps) => JSX.Element;
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]: (entry: ISearchResult, fromRoute?: boolean) => string;
16
+ [category: string]: ISearchResultFormatter;
16
17
  }
17
18
  export declare class InfrastructureSearcher {
18
19
  private $q;
@@ -1,3 +1,4 @@
1
- export * from './securityGroupReader.service';
2
1
  export * from './SecurityGroupWriter';
3
2
  export * from './label/FirewallLabels';
3
+ export * from './securityGroupReader.service';
4
+ export * from './securityGroupSearchResultType';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spinnaker/core",
3
3
  "license": "Apache-2.0",
4
- "version": "0.14.1",
4
+ "version": "0.16.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-bootstrap-css": "git://github.com/t0m/select2-bootstrap-css.git#v1.3.1",
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.0",
92
- "@spinnaker/scripts": "^0.2.2",
91
+ "@spinnaker/eslint-plugin": "^3.0.1",
92
+ "@spinnaker/scripts": "^0.2.4",
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": "b36e5fa30e23cd60007e6839b0dab5e41bd410d5"
123
+ "gitHead": "59026ea6af7b81ffb8e8c59e18f43396906ddafb"
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
- import { ShallowWrapper, shallow } from 'enzyme';
3
- import { IScope, mock } from 'angular';
4
- import { AccountService, IAccountDetails } from './AccountService';
5
- import { AccountSelectInput, IAccountSelectInputProps, IAccountSelectInputState } from './AccountSelectInput';
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 { AccountService, IAccount } from './AccountService';
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
- import { AuthenticationInitializer } from '../authentication/AuthenticationInitializer';
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 { ApplicationDataSourceRegistry } from './service/ApplicationDataSourceRegistry';
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 { IEntityTag, IEntityTags, IServerGroup, IInstanceCounts, ILoadBalancer } from '../domain';
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
- name: 'deck-test-v001',
192
- cluster: 'deck-test',
193
- account: 'test',
194
- region: 'us-west-2',
195
- type: 'aws',
196
- cloudProvider: 'aws',
197
- instances: [],
198
- instanceCounts: {} as IInstanceCounts,
199
- },
200
- ],
201
- loadBalancers: ILoadBalancer[] = [],
202
- securityGroupsByApplicationName: any[] = [];
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
- loadBalancers: ILoadBalancer[] = [
212
- { name: 'deck-frontend', cloudProvider: 'gce', vpcId: 'vpc0', region: 'us-central-1', account: 'prod' },
213
- ],
214
- securityGroupsByApplicationName: any[] = [];
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
- loadBalancers: ILoadBalancer[] = [],
224
- securityGroupsByApplicationName: any[] = [
225
- { name: 'deck-test', provider: 'cf', accountName: 'test', region: 'us-south-7' },
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
- loadBalancers: ILoadBalancer[] = [
236
- { name: 'deck-frontend', cloudProvider: 'aws', vpcId: 'vpcId', region: 'us-west-1', account: 'prod' },
237
- ],
238
- securityGroupsByApplicationName: any[] = [
239
- { name: 'deck-test', provider: 'aws', accountName: 'test', region: 'us-east-1' },
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
- loadBalancers: ILoadBalancer[] = [
250
- { name: 'deck-frontend', cloudProvider: 'aws', vpcId: 'vpcId', region: 'us-east-1', account: 'prod' },
251
- ],
252
- securityGroupsByApplicationName: any[] = [
253
- { name: 'deck-test', provider: 'aws', accountName: 'test', region: 'us-east-1' },
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
- loadBalancers: ILoadBalancer[] = [
264
- { name: 'deck-frontend', cloudProvider: 'aws', vpcId: 'vpc0', region: 'us-east-1', account: 'test' },
265
- ],
266
- securityGroupsByApplicationName: any[] = [
267
- { name: 'deck-test', provider: 'aws', accountName: 'test', region: 'us-west-1' },
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
- name: 'deck-test-v001',
279
- account: 'test',
280
- region: 'us-west-2',
281
- provider: 'aws',
282
- instances: [],
283
- instanceCounts: { up: 0, down: 0, starting: 0, unknown: 0, outOfService: 0 },
284
- },
285
- {
286
- name: 'deck-gce-v001',
287
- account: 'gce-test',
288
- region: 'us-central-1',
289
- provider: 'gce',
290
- instances: [],
291
- instanceCounts: { up: 0, down: 0, starting: 0, unknown: 0, outOfService: 0 },
292
- },
293
- ],
294
- loadBalancers: ILoadBalancer[] = [
295
- {
296
- name: 'deck-frontend',
297
- account: 'gce-test',
298
- cloudProvider: 'gce',
299
- region: 'us-central-1',
300
- serverGroups: [],
301
- },
302
- ],
303
- securityGroupsByApplicationName: any[] = [
304
- { name: 'deck-test', provider: 'aws', accountName: 'test', region: 'us-west-2' },
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');
@@ -13,7 +13,7 @@ module(APPLICATIONS_STATE_PROVIDER, [STATE_CONFIG_PROVIDER, APPLICATION_STATE_PR
13
13
  (stateConfigProvider: StateConfigProvider, applicationStateProvider: ApplicationStateProvider) => {
14
14
  const applicationsState: INestedState = {
15
15
  name: 'applications',
16
- url: '/applications',
16
+ url: '/applications?create',
17
17
  views: {
18
18
  'main@': {
19
19
  component: Applications,
@@ -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 Attributes
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 scrollable-container="[sticky-headers]" deep-link-param="section">
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 { IMoniker } from '../../naming/IMoniker';
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) => {
@@ -30,7 +30,8 @@ module(CORE_APPLICATION_MODAL_CREATEAPPLICATION_MODAL_CONTROLLER, [
30
30
  '$state',
31
31
  '$uibModalInstance',
32
32
  '$timeout',
33
- function ($scope, $q, $log, $state, $uibModalInstance, $timeout) {
33
+ 'name',
34
+ function ($scope, $q, $log, $state, $uibModalInstance, $timeout, name) {
34
35
  const applicationLoader = ApplicationReader.listApplications();
35
36
  applicationLoader.then((applications) => (this.data.appNameList = _.map(applications, 'name')));
36
37
 
@@ -59,6 +60,10 @@ module(CORE_APPLICATION_MODAL_CREATEAPPLICATION_MODAL_CONTROLLER, [
59
60
  instancePort: SETTINGS.defaultInstancePort || null,
60
61
  };
61
62
 
63
+ if (name) {
64
+ this.application.name = name;
65
+ }
66
+
62
67
  const submitting = () => {
63
68
  this.state.errorMessages = [];
64
69
  this.state.submitting = true;
@@ -71,11 +76,7 @@ module(CORE_APPLICATION_MODAL_CREATEAPPLICATION_MODAL_CONTROLLER, [
71
76
  let navigateTimeout = null;
72
77
 
73
78
  const routeToApplication = () => {
74
- navigateTimeout = $timeout(() => {
75
- $state.go('home.applications.application', {
76
- application: this.application.name,
77
- });
78
- }, 1000);
79
+ $uibModalInstance.close(this.application);
79
80
  };
80
81
 
81
82
  $scope.$on('$destroy', () => $timeout.cancel(navigateTimeout));
@@ -14,6 +14,7 @@ describe('Controller: CreateApplicationModalCtrl', function () {
14
14
  controller = $controller('CreateApplicationModalCtrl', {
15
15
  $scope: scope,
16
16
  $uibModalInstance: {},
17
+ name: 'deck',
17
18
  });
18
19
  }),
19
20
  );
@@ -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="false"
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()"