@spinnaker/cloudrun 0.1.6
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 +70 -0
- package/LICENSE.txt +203 -0
- package/dist/cloudrun.module.d.ts +4 -0
- package/dist/cloudrun.settings.d.ts +7 -0
- package/dist/common/cloudrunHealth.d.ts +3 -0
- package/dist/common/componentUrlDetails.component.d.ts +1 -0
- package/dist/common/conditionalDescriptionListItem.component.d.ts +1 -0
- package/dist/common/domain/ICloudrunInstance.d.ts +20 -0
- package/dist/common/domain/ICloudrunLoadBalancer.d.ts +18 -0
- package/dist/common/domain/index.d.ts +2 -0
- package/dist/common/loadBalancerMessage.component.d.ts +1 -0
- package/dist/help/cloudrun.help.d.ts +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/instance/details/details.controller.d.ts +1 -0
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/infrastructure.types.d.ts +18 -0
- package/dist/loadBalancer/configure/wizard/allocationConfigurationRow.component.d.ts +1 -0
- package/dist/loadBalancer/configure/wizard/basicSettings.component.d.ts +1 -0
- package/dist/loadBalancer/configure/wizard/stageAllocationConfigurationRow.component.d.ts +1 -0
- package/dist/loadBalancer/configure/wizard/wizard.controller.d.ts +2 -0
- package/dist/loadBalancer/details/details.controller.d.ts +1 -0
- package/dist/loadBalancer/index.d.ts +3 -0
- package/dist/loadBalancer/loadBalancerTransformer.d.ts +38 -0
- package/dist/manifest/ManifestSource.d.ts +4 -0
- package/dist/manifest/index.d.ts +2 -0
- package/dist/manifest/manifest.service.d.ts +25 -0
- package/dist/manifest/manifestCommandBuilder.service.d.ts +30 -0
- package/dist/manifest/wizard/BasicSettings.d.ts +17 -0
- package/dist/pipeline/pipeline.module.d.ts +1 -0
- package/dist/pipeline/stages/deployManifest/DeployStageConfig.d.ts +15 -0
- package/dist/pipeline/stages/deployManifest/DeployStageForm.d.ts +23 -0
- package/dist/pipeline/stages/deployManifest/ManifestBindArtifactsSelector.d.ts +17 -0
- package/dist/pipeline/stages/deployManifest/deploy.validator.d.ts +2 -0
- package/dist/pipeline/stages/deployManifest/deployStage.d.ts +1 -0
- package/dist/pipeline/stages/deployManifest/manifestStatus/DeployStatus.d.ts +22 -0
- package/dist/pipeline/stages/deployManifest/manifestStatus/DeployStatusPills.d.ts +8 -0
- package/dist/pipeline/stages/deployManifest/manifestStatus/ManifestDetailsLink.d.ts +20 -0
- package/dist/pipeline/stages/deployManifest/manifestStatus/ManifestEvents.d.ts +9 -0
- package/dist/pipeline/stages/deployManifest/manifestStatus/ManifestStatus.d.ts +8 -0
- package/dist/pipeline/stages/deployManifest/serverGroupNamePreview.d.ts +9 -0
- package/dist/pipeline/stages/editLoadBalancer/cloudrunEditLoadBalancerStage.d.ts +1 -0
- package/dist/pipeline/stages/editLoadBalancer/loadBalancerChoice.modal.controller.d.ts +1 -0
- package/dist/rolloutStrategy/redblack.strategy.d.ts +2 -0
- package/dist/serverGroup/configure/serverGroupCommandBuilder.service.d.ts +74 -0
- package/dist/serverGroup/configure/wizard/BasicSettings.d.ts +29 -0
- package/dist/serverGroup/configure/wizard/ConfigFiles.d.ts +15 -0
- package/dist/serverGroup/configure/wizard/serverGroupWizard.d.ts +25 -0
- package/dist/serverGroup/details/details.controller.d.ts +1 -0
- package/dist/serverGroup/index.d.ts +3 -0
- package/dist/serverGroup/serverGroupTransformer.service.d.ts +31 -0
- package/package.json +57 -0
- package/src/cloudrun.module.ts +73 -0
- package/src/cloudrun.settings.ts +14 -0
- package/src/common/cloudrunHealth.ts +3 -0
- package/src/common/componentUrlDetails.component.ts +22 -0
- package/src/common/conditionalDescriptionListItem.component.ts +37 -0
- package/src/common/domain/ICloudrunInstance.ts +21 -0
- package/src/common/domain/ICloudrunLoadBalancer.ts +18 -0
- package/src/common/domain/index.ts +2 -0
- package/src/common/loadBalancerMessage.component.html +11 -0
- package/src/common/loadBalancerMessage.component.ts +13 -0
- package/src/help/cloudrun.help.ts +99 -0
- package/src/index.ts +3 -0
- package/src/instance/details/details.controller.ts +84 -0
- package/src/instance/details/details.html +68 -0
- package/src/interfaces/index.ts +1 -0
- package/src/interfaces/infrastructure.types.ts +23 -0
- package/src/loadBalancer/configure/wizard/allocationConfigurationRow.component.ts +70 -0
- package/src/loadBalancer/configure/wizard/basicSettings.component.html +44 -0
- package/src/loadBalancer/configure/wizard/basicSettings.component.ts +86 -0
- package/src/loadBalancer/configure/wizard/stageAllocationConfigurationRow.component.html +45 -0
- package/src/loadBalancer/configure/wizard/stageAllocationConfigurationRow.component.ts +84 -0
- package/src/loadBalancer/configure/wizard/wizard.controller.ts +157 -0
- package/src/loadBalancer/configure/wizard/wizard.html +39 -0
- package/src/loadBalancer/configure/wizard/wizard.less +9 -0
- package/src/loadBalancer/details/details.controller.ts +140 -0
- package/src/loadBalancer/details/details.html +89 -0
- package/src/loadBalancer/index.ts +3 -0
- package/src/loadBalancer/loadBalancerTransformer.ts +168 -0
- package/src/logo/cloudrun.icon.svg +27 -0
- package/src/logo/cloudrun.logo.less +6 -0
- package/src/logo/cloudrun.logo.png +0 -0
- package/src/manifest/ManifestSource.ts +4 -0
- package/src/manifest/index.ts +2 -0
- package/src/manifest/manifest.service.ts +89 -0
- package/src/manifest/manifestCommandBuilder.service.ts +116 -0
- package/src/manifest/wizard/BasicSettings.tsx +57 -0
- package/src/pipeline/pipeline.module.ts +6 -0
- package/src/pipeline/stages/deployManifest/DeployStageConfig.tsx +73 -0
- package/src/pipeline/stages/deployManifest/DeployStageForm.tsx +185 -0
- package/src/pipeline/stages/deployManifest/ManifestBindArtifactsSelector.tsx +69 -0
- package/src/pipeline/stages/deployManifest/deploy.validator.ts +38 -0
- package/src/pipeline/stages/deployManifest/deployStage.ts +28 -0
- package/src/pipeline/stages/deployManifest/manifestStatus/DeployStatus.tsx +108 -0
- package/src/pipeline/stages/deployManifest/manifestStatus/DeployStatusPills.tsx +47 -0
- package/src/pipeline/stages/deployManifest/manifestStatus/ManifestDetailsLink.tsx +92 -0
- package/src/pipeline/stages/deployManifest/manifestStatus/ManifestEvents.tsx +87 -0
- package/src/pipeline/stages/deployManifest/manifestStatus/ManifestStatus.less +24 -0
- package/src/pipeline/stages/deployManifest/manifestStatus/ManifestStatus.tsx +46 -0
- package/src/pipeline/stages/deployManifest/serverGroupNamePreview.tsx +28 -0
- package/src/pipeline/stages/editLoadBalancer/cloudrunEditLoadBalancerStage.ts +74 -0
- package/src/pipeline/stages/editLoadBalancer/editLoadBalancerExecutionDetails.html +33 -0
- package/src/pipeline/stages/editLoadBalancer/editLoadBalancerStage.html +51 -0
- package/src/pipeline/stages/editLoadBalancer/loadBalancerChoice.modal.controller.ts +65 -0
- package/src/pipeline/stages/editLoadBalancer/loadBalancerChoice.modal.html +53 -0
- package/src/rolloutStrategy/redblack.strategy.ts +7 -0
- package/src/serverGroup/configure/serverGroupCommandBuilder.service.ts +254 -0
- package/src/serverGroup/configure/wizard/BasicSettings.tsx +160 -0
- package/src/serverGroup/configure/wizard/ConfigFiles.tsx +75 -0
- package/src/serverGroup/configure/wizard/serverGroupWizard.tsx +150 -0
- package/src/serverGroup/details/details.controller.ts +134 -0
- package/src/serverGroup/details/details.html +94 -0
- package/src/serverGroup/index.ts +3 -0
- package/src/serverGroup/serverGroupTransformer.service.ts +61 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## [0.1.6](https://github.com/spinnaker/deck/compare/@spinnaker/cloudrun@0.1.5...@spinnaker/cloudrun@0.1.6) (2023-10-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **publish:** set access config in deck libraries ([#10049](https://github.com/spinnaker/deck/issues/10049)) ([2a5ebe2](https://github.com/spinnaker/deck/commit/2a5ebe25662eeb9d41b5071749266bf9d6d51104))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.1.5](https://github.com/spinnaker/deck/compare/@spinnaker/cloudrun@0.1.4...@spinnaker/cloudrun@0.1.5) (2023-09-06)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @spinnaker/cloudrun
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [0.1.4](https://github.com/spinnaker/deck/compare/@spinnaker/cloudrun@0.1.3...@spinnaker/cloudrun@0.1.4) (2023-07-20)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @spinnaker/cloudrun
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [0.1.3](https://github.com/spinnaker/deck/compare/@spinnaker/cloudrun@0.1.2...@spinnaker/cloudrun@0.1.3) (2023-06-02)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @spinnaker/cloudrun
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## [0.1.2](https://github.com/spinnaker/deck/compare/@spinnaker/cloudrun@0.1.1...@spinnaker/cloudrun@0.1.2) (2023-05-11)
|
|
42
|
+
|
|
43
|
+
**Note:** Version bump only for package @spinnaker/cloudrun
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## [0.1.1](https://github.com/spinnaker/deck/compare/@spinnaker/cloudrun@0.1.0...@spinnaker/cloudrun@0.1.1) (2023-05-03)
|
|
50
|
+
|
|
51
|
+
**Note:** Version bump only for package @spinnaker/cloudrun
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# [0.1.0](https://github.com/spinnaker/deck/compare/@spinnaker/cloudrun@0.0.2...@spinnaker/cloudrun@0.1.0) (2023-05-01)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
### Features
|
|
61
|
+
|
|
62
|
+
* **provider/google:** Added Cloud Run manifest functionality in Deck. ([#9971](https://github.com/spinnaker/deck/issues/9971)) ([f5e19c7](https://github.com/spinnaker/deck/commit/f5e19c77a0135963ca1f54beb5ef9abc48ba8968))
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
## [0.0.2](https://github.com/spinnaker/deck/compare/@spinnaker/cloudrun@0.0.1...@spinnaker/cloudrun@0.0.2) (2023-04-03)
|
|
69
|
+
|
|
70
|
+
**Note:** Version bump only for package @spinnaker/cloudrun
|
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2014 Netflix
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
203
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CLOUDRUN_COMPONENT_URL_DETAILS = "spinnaker.cloudrun.componentUrlDetails.component";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CLOUDRUN_CONDITIONAL_DESCRIPTION_LIST_ITEM = "spinnaker.cloudrun.conditionalDescriptionListItem";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IInstance } from '@spinnaker/core';
|
|
2
|
+
export interface ICloudrunInstance extends IInstance {
|
|
3
|
+
name: string;
|
|
4
|
+
id: string;
|
|
5
|
+
account?: string;
|
|
6
|
+
region?: string;
|
|
7
|
+
instanceStatus: 'DYNAMIC' | 'RESIDENT' | 'UNKNOWN';
|
|
8
|
+
launchTime: number;
|
|
9
|
+
loadBalancers: string[];
|
|
10
|
+
serverGroup: string;
|
|
11
|
+
vmDebugEnabled: boolean;
|
|
12
|
+
vmName: string;
|
|
13
|
+
vmStatus: string;
|
|
14
|
+
vmZoneName: string;
|
|
15
|
+
qps: number;
|
|
16
|
+
healthState: string;
|
|
17
|
+
cloudProvider: string;
|
|
18
|
+
errors: number;
|
|
19
|
+
averageLatency: number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ILoadBalancer } from '@spinnaker/core';
|
|
2
|
+
export interface ICloudrunLoadBalancer extends ILoadBalancer {
|
|
3
|
+
credentials?: string;
|
|
4
|
+
split?: ICloudrunTrafficSplit;
|
|
5
|
+
migrateTraffic: boolean;
|
|
6
|
+
dispatchRules?: ICloudrunDispatchRule[];
|
|
7
|
+
}
|
|
8
|
+
export interface ICloudrunTrafficSplit {
|
|
9
|
+
trafficTargets: [{
|
|
10
|
+
revisionName: string;
|
|
11
|
+
percent: number;
|
|
12
|
+
}];
|
|
13
|
+
}
|
|
14
|
+
export interface ICloudrunDispatchRule {
|
|
15
|
+
domain: string;
|
|
16
|
+
path: string;
|
|
17
|
+
service: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CLOUDRUN_LOAD_BALANCER_CREATE_MESSAGE = "spinnaker.cloudrun.loadBalancer.createMessage.component";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{module as e}from"angular";import{HelpContentsRegistry as t,RecentHistoryService as n,InstanceReader as a,StageConstants as r,LoadBalancerWriter as i,TaskMonitor as o,ConfirmationModalService as s,CloudProviderRegistry as l,Registry as c,StageArtifactSelector as d,ArtifactTypePatterns as u,HelpField as p,AccountSelectInput as m,yamlDocumentsToString as h,StageConfigField as g,RadioButtonInput as f,YamlEditor as v,StageArtifactSelectorDelegate as b,CheckboxInput as k,AccountService as B,FormikStageConfig as C,ReactInjector as w,relativeTime as y,JobManifestPodLogs as S,JobEventBasedPodNameProvider as E,CopyToClipboard as A,ManifestYaml as G,ManifestReader as D,ExecutionDetailsSection as x,StageFailureMessage as T,ExecutionDetailsTasks as $,ExecutionArtifactTab as N,ExpectedArtifactService as L,ArtifactReferenceService as M,SETTINGS as I,NameUtils as F,ServerGroupNamePreview as R,TextAreaInput as P,ReactModal as z,WizardModal as O,WizardPage as U,noop as V,SERVER_GROUP_WRITER as Y,ServerGroupReader as j,DeploymentStrategyRegistry as K}from"@spinnaker/core";import{flattenDeep as q,uniq as W,difference as H,reduce as X,filter as Q,chain as _,cloneDeep as Z,has as J,camelCase as ee,get as te,map as ne,capitalize as ae,isEmpty as re,trim as ie}from"lodash";import oe,{useState as se}from"react";import{Subject as le,from as ce}from"rxjs";import{takeUntil as de}from"rxjs/operators";import{dump as ue}from"js-yaml";import{DateTime as pe}from"luxon";import{$q as me}from"ngimport";const he={bindings:{component:"<"},template:'\n <dt>HTTPS</dt>\n <dl class="small">\n <a href="{{$ctrl.component.url}}" target="_blank">{{$ctrl.component.url}}</a>\n <copy-to-clipboard class="copy-to-clipboard copy-to-clipboard-sm"\n tool-tip="\'Copy URL to clipboard\'"\n text="$ctrl.component.httpsUrl"></copy-to-clipboard>\n </dl>\n '};e("spinnaker.cloudrun.componentUrlDetails.component",[]).component("cloudrunComponentUrlDetails",he);e("spinnaker.cloudrun.loadBalancer.createMessage.component",[]).component("cloudrunLoadBalancerMessage",{bindings:{showCreateMessage:"<",columnOffset:"@",columns:"@"},templateUrl:"cloudrun/src/common/loadBalancerMessage.component.html"}),window.angular.module("ng").run(["$templateCache",function(e){e.put("cloudrun/src/common/loadBalancerMessage.component.html",'<div class="row">\n <div class="col-md-offset-{{ $ctrl.columnOffset || 0 }} col-md-{{ $ctrl.columns || 12 }}">\n <div class="well">\n <p>\n <span ng-if="$ctrl.showCreateMessage">Spinnaker cannot create a load balancer for Cloud Run.</span>\n A Spinnaker load balancer maps to an Cloud Run Service, which will be created automatically alongside a\n Revision. Once created, the Service can be edited as a Load Balancer.\n </p>\n </div>\n </div>\n</div>\n')}]);[{key:"cloudrun.serverGroup.stack",value:"(Optional) <b>Stack</b> is one of the core naming components of a cluster, used to create vertical stacks of dependent services for integration testing."},{key:"cloudrun.serverGroup.file",value:"<pre>\n apiVersion: serving.knative.dev/v1\n kind: Service\n metadata:\n name: spinappcloud1\n namespace: '135005621049'\n labels:\n cloud.googleapis.com/location: us-central1\n annotations:\n run.googleapis.com/client-name: cloud-console\n serving.knative.dev/creator: kiran@opsmx.io\n serving.knative.dev/lastModifier: kiran@opsmx.io\n client.knative.dev/user-image: us-docker.pkg.dev/cloudrun/container/hello\n run.googleapis.com/ingress-status: all\n spec:\n template:\n metagoogleapis.com/ingress: all\n run.data:\n name: spinappcloud1\n annotations:\n run.googleapis.com/client-name: cloud-console\n autoscaling.knative.dev/minScale: '1'\n autoscaling.knative.dev/maxScale: '3'\n spec:\n containerConcurrency: 80\n timeoutSeconds: 200\n serviceAccountName:spinnaker-cloudrun-account@my-orbit-project-71824.iam.gserviceaccount.com\n containers:\n - image:us-docker.pkg.dev/cloudrun/container/hello\n ports:\n - name: http1\n containerPort: 8080\n resources:\n limits:\n cpu: 1000m\n memory: 256Mi \n</pre>\n "},{key:"cloudrun.serverGroup.detail",value:" (Optional) <b>Detail</b> is a string of free-form alphanumeric characters and hyphens to describe any other variables."},{key:"cloudrun.serverGroup.configFiles",value:"<p> The contents of a Cloud Run Service yaml </p>"},{key:"cloudrun.loadBalancer.allocations",value:"An allocation is the percent of traffic directed to a server group."},{key:"cloudrun.manifest.source",value:"\n <p>Where the manifest file content is read from.</p>\n <p>\n <b>text:</b> The manifest is supplied statically to the pipeline from the below text-box.\n </p>\n <p>\n <b>artifact:</b> The manifest is read from an artifact supplied/created upstream. The expected artifact must be referenced here, and will be bound at runtime.\n </p>"},{key:"cloudrun.manifest.expectedArtifact",value:"The artifact that is to be applied to the Cloud Run account for this stage. The artifact should represent a valid Cloud Run manifest."},{key:"cloudrun.manifest.skipExpressionEvaluation",value:'<p>Skip SpEL expression evaluation of the manifest artifact in this stage. Can be paired with the "Evaluate SpEL expressions in overrides at bake time" option in the Bake Manifest stage when baking a third-party manifest artifact with expressions not meant for Spinnaker to evaluate as SpEL.</p>'},{key:"cloudrun.manifest.requiredArtifactsToBind",value:'These artifacts must be present in the context for this stage to successfully complete. Artifacts specified will be <a href="https://www.spinnaker.io/reference/artifacts/in-cloudrun-v2/#binding-artifacts-in-manifests" target="_blank">bound to the deployed manifest.</a>'},{key:"cloudrun.manifest.account",value:"\n <p>A Spinnaker account corresponds to a physical Cloud Run cluster. If you are unsure which account to use, talk to your Spinnaker admin.</p>\n "}].forEach((e=>t.register(e.key,e.value)));class ge{constructor(e,t,n){this.$q=e,this.app=t,this.state={loading:!0},this.upToolTip="A Cloud Run instance is 'Up' if a load balancer is directing traffic to its server group.",this.outOfServiceToolTip="\n A Cloud Run instance is 'Out Of Service' if no load balancers are directing traffic to its server group.",this.app.ready().then((()=>this.retrieveInstance(n))).then((e=>{this.instance=e,this.state.loading=!1})).catch((()=>{this.instanceIdNotFound=n.instanceId,this.state.loading=!1}))}retrieveInstance(e){const t=q([this.app.getDataSource("serverGroups").data,this.app.getDataSource("loadBalancers").data,this.app.getDataSource("loadBalancers").data.map((e=>e.serverGroups))]).find((t=>t.instances.some((t=>t.id===e.instanceId))));if(t){const r={region:t.region,account:t.account};return"serverGroup"===t.category&&(r.serverGroup=t.name),n.addExtraDataToLatest("instances",r),a.getInstanceDetails(t.account,t.region,e.instanceId).then((e=>(e.account=t.account,e.region=t.region,e)))}return this.$q.reject()}}ge.$inject=["$q","app","instance"];e("spinnaker.cloudrun.instanceDetails.controller",[]).controller("cloudrunInstanceDetailsCtrl",ge);const fe={bindings:{allocationDescription:"<",removeAllocation:"&",serverGroupOptions:"<",onAllocationChange:"&"},template:'\n <div class="form-group">\n <div class="row">\n <div class="col-md-7">\n <ui-select ng-model="$ctrl.allocationDescription.revisionName"\n on-select="$ctrl.onAllocationChange()"\n class="form-control input-sm">\n <ui-select-match placeholder="Select...">\n {{$select.selected}}\n </ui-select-match>\n <ui-select-choices repeat="serverGroup as serverGroup in $ctrl.getServerGroupOptions() | filter: $select.search">\n <div ng-bind-html="serverGroup | highlight: $select.search"></div>\n </ui-select-choices>\n </ui-select>\n </div>\n <div class="col-md-3">\n <div class="input-group input-group-sm">\n <input type="number"\n ng-model="$ctrl.allocationDescription.percent"\n required\n class="form-control input-sm"\n min="0"\n ng-change="$ctrl.onAllocationChange()"\n max="100"/>\n <span class="input-group-addon">%</span>\n </div>\n </div>\n <div class="col-md-2">\n <a class="btn btn-link sm-label" ng-click="$ctrl.removeAllocation()">\n <span class="glyphicon glyphicon-trash"></span>\n </a>\n </div>\n </div>\n </div>\n ',controller:class{getServerGroupOptions(){return this.allocationDescription.revisionName?W(this.serverGroupOptions.concat(this.allocationDescription.revisionName)):this.serverGroupOptions}}};e("spinnaker.cloudrun.allocationConfigurationRow.component",[]).component("cloudrunAllocationConfigurationRow",fe);const ve={bindings:{loadBalancer:"=",forPipelineConfig:"<",application:"<"},controller:class{$onInit(){this.updateServerGroupOptions()}addAllocation(){const e=this.serverGroupsWithoutAllocation();e.length?(this.loadBalancer.splitDescription.allocationDescriptions.push({revisionName:e[0],percent:0}),this.updateServerGroupOptions()):this.forPipelineConfig&&this.loadBalancer.splitDescription.allocationDescriptions.push({percent:0,revisionName:""})}removeAllocation(e){this.loadBalancer.splitDescription.allocationDescriptions.splice(e,1),this.updateServerGroupOptions()}allocationIsInvalid(){return 100!==this.loadBalancer.splitDescription.allocationDescriptions.reduce(((e,t)=>e+t.percent),0)}updateServerGroupOptions(){this.serverGroupOptions=this.serverGroupsWithoutAllocation()}showAddButton(){return!!this.forPipelineConfig||this.serverGroupsWithoutAllocation().length>0}initializeAsTextInput(e){return!!this.forPipelineConfig&&!this.loadBalancer.serverGroups.map((e=>e.name)).includes(e)}serverGroupsWithoutAllocation(){const e=this.loadBalancer.splitDescription.allocationDescriptions.map((e=>e.revisionName)),t=this.loadBalancer.serverGroups.map((e=>e.name));return H(t,e)}},templateUrl:"cloudrun/src/loadBalancer/configure/wizard/basicSettings.component.html"};e("spinnaker.cloudrun.loadBalancerSettings.component",[]).component("cloudrunLoadBalancerBasicSettings",ve),window.angular.module("ng").run(["$templateCache",function(e){e.put("cloudrun/src/loadBalancer/configure/wizard/basicSettings.component.html",'<ng-form name="basicSettingsForm">\n <div class="row">\n <div class="form-group">\n <div class="col-md-3 sm-label-right">\n Allocations\n <help-field key="cloudrun.loadBalancer.allocations"></help-field>\n </div>\n <div class="col-md-9">\n <div ng-if="!$ctrl.forPipelineConfig">\n <cloudrun-allocation-configuration-row\n ng-repeat="description in $ctrl.loadBalancer.splitDescription.allocationDescriptions"\n allocation-description="description"\n server-group-options="$ctrl.serverGroupOptions"\n on-allocation-change="$ctrl.updateServerGroupOptions()"\n remove-allocation="$ctrl.removeAllocation($index)"\n >\n </cloudrun-allocation-configuration-row>\n </div>\n <div ng-if="$ctrl.forPipelineConfig">\n <cloudrun-stage-allocation-configuration-row\n ng-repeat="description in $ctrl.loadBalancer.splitDescription.allocationDescriptions"\n allocation-description="description"\n application="$ctrl.application"\n region="{{ $ctrl.loadBalancer.region }}"\n account="{{ $ctrl.loadBalancer.account || $ctrl.loadBalancer.credentials }}"\n name="{{ $ctrl.loadBalancer.name }}"\n server-group-options="$ctrl.serverGroupOptions"\n on-allocation-change="$ctrl.updateServerGroupOptions()"\n remove-allocation="$ctrl.removeAllocation($index)"\n >\n </cloudrun-stage-allocation-configuration-row>\n </div>\n <button class="add-new col-md-11" ng-if="$ctrl.showAddButton()" ng-click="$ctrl.addAllocation()">\n <span class="glyphicon glyphicon-plus-sign"></span> Add allocation\n </button>\n </div>\n </div>\n <div class="form-group" ng-if="$ctrl.allocationIsInvalid()">\n <div class="col-md-12 text-center">\n <p class="alert alert-warning">Allocations must sum to 100%.</p>\n </div>\n </div>\n </div>\n</ng-form>\n')}]);class be{static mapTargetCoordinateToLabel(e){const t=r.TARGET_LIST.find((t=>t.val===e));return t?t.label:null}$doCheck(){this.setInputViewValue()}setInputViewValue(){if(this.allocationDescription.cluster&&this.allocationDescription.target){const e=be.mapTargetCoordinateToLabel(this.allocationDescription.target);this.inputViewValue=`${e} (${this.allocationDescription.cluster})`}else this.inputViewValue=null}}const ke={bindings:{allocationDescription:"<"},controller:be,template:'<input ng-model="$ctrl.inputViewValue" type="text" class="form-control input-sm" readonly/>'};const Be={bindings:{application:"<",region:"@",account:"@",name:"@",allocationDescription:"<",removeAllocation:"&",serverGroupOptions:"<",onAllocationChange:"&"},controller:class{constructor(){this.targets=r.TARGET_LIST}$onInit(){this.allocationDescription.cluster=this.name}getServerGroupOptions(){return this.allocationDescription.revisionName?W(this.serverGroupOptions.concat(this.allocationDescription.revisionName)):this.serverGroupOptions}},templateUrl:"cloudrun/src/loadBalancer/configure/wizard/stageAllocationConfigurationRow.component.html"};e("spinnaker.cloudrun.stageAllocationConfigurationRow.component",[]).component("cloudrunStageAllocationConfigurationRow",Be).component("cloudrunStageAllocationLabel",ke),window.angular.module("ng").run(["$templateCache",function(e){e.put("cloudrun/src/loadBalancer/configure/wizard/stageAllocationConfigurationRow.component.html",'<div class="form-group">\n <div class="row">\n <div class="col-md-7">\n <cloudrun-stage-allocation-label allocation-description="$ctrl.allocationDescription">\n </cloudrun-stage-allocation-label>\n </div>\n <div class="col-md-3">\n <div class="input-group input-group-sm">\n <input\n type="number"\n ng-model="$ctrl.allocationDescription.percent"\n required\n class="form-control input-sm"\n min="0"\n ng-change="$ctrl.onAllocationChange()"\n max="100"\n />\n <span class="input-group-addon">%</span>\n </div>\n </div>\n <div class="col-md-2">\n <a class="btn btn-link sm-label" ng-click="$ctrl.removeAllocation()">\n <span class="glyphicon glyphicon-trash"></span>\n </a>\n </div>\n </div>\n</div>\n<div class="form-group">\n <div class="well col-md-11" style="padding-top: 5px; padding-bottom: 10px">\n <div class="row">\n <div class="form-group">\n <div>\n <div class="col-md-3 sm-label-right">Cluster</div>\n <div class="col-md-7" style="margin-bottom: 10px">\n <input ng-model="$ctrl.allocationDescription.cluster" type="text" class="form-control input-sm" readonly />\n </div>\n <div class="col-md-3 sm-label-right">Target</div>\n <div class="col-md-7">\n <target-select model="$ctrl.allocationDescription" options="$ctrl.targets"></target-select>\n </div>\n </div>\n </div>\n </div>\n </div>\n</div>\n')}]);class Ce{static convertTrafficSplitToTrafficSplitDescription(e){return{allocationDescriptions:X(e.trafficTargets,((e,t)=>{const{revisionName:n,percent:a}=t;return e.concat({percent:a,revisionName:n})}),[])}}constructor(e){this.credentials=e.account||e.credentials,this.account=this.credentials,this.cloudProvider=e.cloudProvider,this.loadBalancerName=e.name,this.name=e.name,this.region=e.region,this.migrateTraffic=e.migrateTraffic||!1,this.serverGroups=e.serverGroups}mapAllocationsToDecimals(){this.splitDescription.allocationDescriptions.forEach((e=>{e.percent=e.percent/100}))}mapAllocationsToPercentages(){this.splitDescription.allocationDescriptions.forEach((e=>{e.percent=Math.round(e.percent)}))}}class we{constructor(e){this.$q=e}normalizeLoadBalancer(e){e.provider=e.type,e.instanceCounts=this.buildInstanceCounts(e.serverGroups),e.instances=[],e.serverGroups.forEach((t=>{t.account=e.account,t.region=e.region,t.detachedInstances&&(t.detachedInstances=t.detachedInstances.map((e=>({id:e})))),t.instances=t.instances.concat(t.detachedInstances||[]).map((t=>this.transformInstance(t,e)))}));const t=Q(e.serverGroups,{isDisabled:!1});return e.instances=_(t).map("instances").flatten().value(),this.$q.resolve(e)}convertLoadBalancerForEditing(e,t){return t.getDataSource("loadBalancers").ready().then((()=>{const n=t.getDataSource("loadBalancers").data.find((t=>t.name===e.name&&(t.account===e.account||t.account===e.credentials)));return n&&(e.serverGroups=Z(n.serverGroups)),e}))}convertLoadBalancerToUpsertDescription(e){return new Ce(e)}buildInstanceCounts(e){const t=_(e).map("instances").flatten().reduce(((e,t)=>(J(t,"health.state")&&e[ee(t.health.state)]++,e)),{up:0,down:0,outOfService:0,succeeded:0,failed:0,starting:0,unknown:0}).value();return t.outOfService+=_(e).map("detachedInstances").flatten().value().length,t}transformInstance(e,t){e.provider=t.type,e.account=t.account,e.region=t.region,e.loadBalancers=[t.name];const n=e.health||{};return e.healthState=te(e,"health.state")||"OutOfService",e.health=[n],e}}we.$inject=["$q"];const ye="spinnaker.cloudrun.loadBalancer.transformer.service";function Se(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&a.firstChild?a.insertBefore(r,a.firstChild):a.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}e("spinnaker.cloudrun.loadBalancer.transformer.service",[]).service("cloudrunLoadBalancerTransformer",we);Se("cloudrun-load-balancer-basic-settings a.btn.btn-link {\n padding: 0;\n}\ncloudrun-load-balancer-basic-settings .form-group {\n margin-top: 0.4rem;\n}\n");class Ee{constructor(e,t,n,a,r,i,o,s,l){this.$scope=e,this.$state=t,this.$uibModalInstance=n,this.application=a,this.isNew=i,this.forPipelineConfig=o,this.cloudrunLoadBalancerTransformer=s,this.wizardSubFormValidation=l,this.state={loading:!0},this.submitButtonLabel=this.forPipelineConfig?"Done":"Update",this.isNew?this.heading="Create New Load Balancer":(this.heading=`Edit ${[r.name,r.region,r.account||r.credentials].join(":")}`,this.cloudrunLoadBalancerTransformer.convertLoadBalancerForEditing(r,a).then((e=>{this.loadBalancer=this.cloudrunLoadBalancerTransformer.convertLoadBalancerToUpsertDescription(e),r.split&&!this.loadBalancer.splitDescription?this.loadBalancer.splitDescription=Ce.convertTrafficSplitToTrafficSplitDescription(r.split):this.loadBalancer.splitDescription=r.splitDescription,this.loadBalancer.mapAllocationsToPercentages(),this.setTaskMonitor(),this.initializeFormValidation(),this.state.loading=!1})))}submit(){const e=Z(this.loadBalancer);return e.mapAllocationsToPercentages(),delete e.serverGroups,this.forPipelineConfig?this.$uibModalInstance.close(e):this.taskMonitor.submit((()=>i.upsertLoadBalancer(e,this.application,"Update")))}cancel(){this.$uibModalInstance.dismiss()}showSubmitButton(){return this.wizardSubFormValidation.subFormsAreValid()}setTaskMonitor(){this.taskMonitor=new o({application:this.application,title:"Updating your load balancer",modalInstance:this.$uibModalInstance,onTaskComplete:()=>this.onTaskComplete()})}initializeFormValidation(){this.wizardSubFormValidation.config({form:"form",scope:this.$scope}).register({page:"basic-settings",subForm:"basicSettingsForm",validators:[{watchString:"ctrl.loadBalancer.splitDescription",validator:e=>100===e.allocationDescriptions.reduce(((e,t)=>e+t.percent),0),watchDeep:!0}]})}onTaskComplete(){this.application.getDataSource("loadBalancers").refresh(),this.application.getDataSource("loadBalancers").onNextRefresh(this.$scope,(()=>this.onApplicationRefresh()))}onApplicationRefresh(){if(this.$scope.$$destroyed)return;this.$uibModalInstance.dismiss();const e={name:this.loadBalancer.name,accountId:this.loadBalancer.credentials,region:this.loadBalancer.region,provider:"cloudrun"};this.$state.includes("**.loadBalancerDetails")?this.$state.go("^.loadBalancerDetails",e):this.$state.go(".loadBalancerDetails",e)}}Ee.$inject=["$scope","$state","$uibModalInstance","application","loadBalancer","isNew","forPipelineConfig","cloudrunLoadBalancerTransformer","wizardSubFormValidation"];const Ae="spinnaker.cloudrun.loadBalancer.wizard.controller";e("spinnaker.cloudrun.loadBalancer.wizard.controller",[]).controller("cloudrunLoadBalancerWizardCtrl",Ee);class Ge{constructor(e,t,n,a,r){this.$uibModal=e,this.$state=t,this.$scope=n,this.app=r,this.state={loading:!0},this.loadBalancerFromParams=a,this.app.getDataSource("loadBalancers").ready().then((()=>this.extractLoadBalancer()))}editLoadBalancer(){this.$uibModal.open({templateUrl:"cloudrun/src/loadBalancer/configure/wizard/wizard.html",controller:"cloudrunLoadBalancerWizardCtrl as ctrl",size:"lg",resolve:{application:()=>this.app,loadBalancer:()=>Z(this.loadBalancer),isNew:()=>!1,forPipelineConfig:()=>!1}})}extractLoadBalancer(){this.loadBalancer=this.app.getDataSource("loadBalancers").data.find((e=>e.name===this.loadBalancerFromParams.name&&e.account===this.loadBalancerFromParams.accountId)),this.loadBalancer?(this.state.loading=!1,this.app.getDataSource("loadBalancers").onRefresh(this.$scope,(()=>this.extractLoadBalancer()))):this.autoClose()}deleteLoadBalancer(){const e={application:this.app,title:"Deleting "+this.loadBalancer.name};s.confirm({header:"Really delete "+this.loadBalancer.name+"?",buttonText:"Delete "+this.loadBalancer.name,body:this.getConfirmationModalBodyHtml(),account:this.loadBalancer.account,taskMonitorConfig:e,submitMethod:()=>{const e={cloudProvider:this.loadBalancer.cloudProvider,loadBalancerName:this.loadBalancer.name,credentials:this.loadBalancer.account};return i.deleteLoadBalancer(e,this.app)}})}canDeleteLoadBalancer(){return"default"!==this.loadBalancer.name}getConfirmationModalBodyHtml(){const e=this.loadBalancer.serverGroups.map((e=>e.name)),t=!!e&&e.length>0,n=!!e&&e.length>1;if(t){if(n){const t=e.map((e=>`<li>${e}</li>`)).join("");return`<div class="alert alert-warning">\n <p>\n Deleting <b>${this.loadBalancer.name}</b> will destroy the following server groups:\n <ul>\n ${t}\n </ul>\n </p>\n </div>\n `}return`<div class="alert alert-warning">\n <p>\n Deleting <b>${this.loadBalancer.name}</b> will destroy <b>${e[0]}</b>.\n </p>\n </div>\n `}return null}autoClose(){this.$scope.$$destroyed||(this.$state.params.allowModalToStayOpen=!0,this.$state.go("^",null,{location:"replace"}))}}Ge.$inject=["$uibModal","$state","$scope","loadBalancer","app"];const De="spinnaker.cloudrun.loadBalancerDetails.controller";e("spinnaker.cloudrun.loadBalancerDetails.controller",[]).controller("cloudrunLoadBalancerDetailsCtrl",Ge),window.angular.module("ng").run(["$templateCache",function(e){e.put("cloudrun/src/loadBalancer/configure/wizard/wizard.html",'<form name="form">\n <div ng-if="ctrl.state.loading && !ctrl.isNew" style="height: 200px" class="horizontal center middle">\n <loading-spinner size="\'small\'"></loading-spinner>\n </div>\n <v2-modal-wizard\n heading="{{::ctrl.heading}}"\n task-monitor="ctrl.taskMonitor"\n dismiss="$dismiss()"\n ng-if="!ctrl.state.loading || ctrl.isNew"\n >\n <div ng-if="!ctrl.isNew">\n <v2-wizard-page key="basic-settings" label="Basic Settings" mark-complete-on-view="false">\n <cloudrun-load-balancer-basic-settings\n load-balancer="ctrl.loadBalancer"\n application="ctrl.application"\n for-pipeline-config="ctrl.forPipelineConfig"\n ></cloudrun-load-balancer-basic-settings>\n </v2-wizard-page>\n </div>\n </v2-modal-wizard>\n <cloudrun-load-balancer-message\n ng-if="ctrl.isNew"\n column-offset="1"\n columns="10"\n show-create-message="true"\n ></cloudrun-load-balancer-message>\n <div class="modal-footer">\n <button class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button>\n <submit-button\n ng-if="!ctrl.isNew && ctrl.showSubmitButton()"\n label="ctrl.submitButtonLabel"\n is-disabled="cloudrunLoadBalancerForm.$invalid || ctrl.taskMonitor.submitting || ctrl.state.loading"\n submitting="ctrl.taskMonitor.submitting"\n on-click="ctrl.submit()"\n is-new="ctrl.isNew"\n >\n </submit-button>\n </div>\n</form>\n')}]);class xe{constructor(e,t,n){this.$uibModal=e,this.$uibModalInstance=t,this.application=n,this.state={loading:!0},this.initialize()}submit(){const e=l.getValue("cloudrun","loadBalancer"),t=this.$uibModal.open({templateUrl:e.createLoadBalancerTemplateUrl,controller:`${e.createLoadBalancerController} as ctrl`,size:"lg",resolve:{application:()=>this.application,loadBalancer:()=>Z(this.selectedLoadBalancer),isNew:()=>!1,forPipelineConfig:()=>!0}}).result;this.$uibModalInstance.close(t)}cancel(){this.$uibModalInstance.dismiss()}initialize(){this.application.getDataSource("loadBalancers").ready().then((()=>{this.loadBalancers=this.application.loadBalancers.data.filter((e=>"cloudrun"===e.cloudProvider)),this.loadBalancers.length&&(this.selectedLoadBalancer=this.loadBalancers[0]),this.state.loading=!1}))}}xe.$inject=["$uibModal","$uibModalInstance","application"];e("spinnaker.Cloudrun.loadBalancerChoiceModal.controller",[]).controller("cloudrunLoadBalancerChoiceModelCtrl",xe);class Te{constructor(e,t){this.$scope=e,this.$uibModal=t,e.stage.loadBalancers=e.stage.loadBalancers||[],e.stage.cloudProvider="cloudrun"}addLoadBalancer(){this.$uibModal.open({templateUrl:"cloudrun/src/pipeline/stages/editLoadBalancer/loadBalancerChoice.modal.html",controller:"cloudrunLoadBalancerChoiceModelCtrl as ctrl",resolve:{application:()=>this.$scope.application}}).result.then((e=>{this.$scope.stage.loadBalancers.push(e)})).catch((()=>{}))}editLoadBalancer(e){const t=l.getValue("cloudrun","loadBalancer");this.$uibModal.open({templateUrl:t.createLoadBalancerTemplateUrl,controller:`${t.createLoadBalancerController} as ctrl`,size:"lg",resolve:{application:()=>this.$scope.application,loadBalancer:()=>Z(this.$scope.stage.loadBalancers[e]),isNew:()=>!1,forPipelineConfig:()=>!0}}).result.then((t=>{this.$scope.stage.loadBalancers[e]=t})).catch((()=>{}))}removeLoadBalancer(e){this.$scope.stage.loadBalancers.splice(e,1)}}Te.$inject=["$scope","$uibModal"];e("spinnaker.cloudrun.pipeline.stage.editLoadBalancerStage",["spinnaker.Cloudrun.loadBalancerChoiceModal.controller"]).config((()=>{c.pipeline.registerStage({label:"Edit Load Balancer (Cloud Run)",description:"Edits a load balancer",key:"upsertCloudrunLoadBalancers",cloudProvider:"cloudrun",templateUrl:"cloudrun/src/pipeline/stages/editLoadBalancer/editLoadBalancerStage.html",executionDetailsUrl:"cloudrun/src/pipeline/stages/editLoadBalancer/editLoadBalancerExecutionDetails.html",executionConfigSections:["editLoadBalancerConfig","taskStatus"],controller:"cloudrunEditLoadBalancerStageCtrl",controllerAs:"editLoadBalancerStageCtrl",validators:[]})})).controller("cloudrunEditLoadBalancerStageCtrl",Te),window.angular.module("ng").run(["$templateCache",function(e){e.put("cloudrun/src/pipeline/stages/editLoadBalancer/loadBalancerChoice.modal.html",'<div modal-page>\n <modal-close dismiss="$dismiss()"></modal-close>\n <div class="modal-header">\n <h4 class="modal-title">Select Load Balancer</h4>\n </div>\n <div class="modal-body" ng-if="ctrl.state.loading" style="height: 200px" class="horizontal center middle">\n <loading-spinner size="\'small\'"></loading-spinner>\n </div>\n <div class="modal-body" ng-if="!ctrl.state.loading">\n <div class="alert alert-warning" ng-if="ctrl.loadBalancers.length === 0">\n <p>\n Spinnaker cannot create a load balancer for Cloud Run. A Spinnaker load balancer maps to a Cloud Run service\n which along with a Revision are created from Create Server Group page using a\n </p>\n <p><code>yaml file</code> <help-field key="cloudrun.serverGroup.file"></help-field></p>\n <p>\n If a service does not exist when a Revision is deployed, it will be created. It will then be editable as a load\n balancer within Spinnaker.\n </p>\n </div>\n <form\n role="form"\n name="form"\n class="form-horizontal"\n ng-submit="ctrl.submit()"\n ng-if="ctrl.loadBalancers.length > 0"\n >\n <div class="form-group">\n <div class="col-md-3 sm-label-right">\n <b>Load Balancer</b>\n </div>\n <div class="col-md-7">\n <ui-select class="form-control input-sm" ng-model="ctrl.selectedLoadBalancer">\n <ui-select-match>\n <account-tag account="$select.selected.account"></account-tag>\n <span style="margin-left: 5px">{{$select.selected.name}}</span>\n </ui-select-match>\n <ui-select-choices repeat="loadBalancer in ctrl.loadBalancers | filter: $select.search">\n <account-tag account="loadBalancer.account"></account-tag>\n <span style="margin-left: 5px" ng-bind-html="loadBalancer.name"></span>\n </ui-select-choices>\n </ui-select>\n </div>\n </div>\n </form>\n </div>\n <div class="modal-footer">\n <button class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button>\n <button class="btn btn-primary" ng-if="ctrl.loadBalancers.length > 0" ng-click="ctrl.submit()">\n <span class="far fa-check-circle"></span> Edit\n </button>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("cloudrun/src/pipeline/stages/editLoadBalancer/editLoadBalancerStage.html",'<div class="well well-sm clearfix" ng-if="!pipeline.strategy">\n <div class="row">\n <div class="col-md-12">\n <h4 class="text-left">Load Balancers</h4>\n </div>\n </div>\n <div class="row">\n <div class="col-md-12">\n <table class="table table-condensed">\n <thead>\n <tr>\n <th>Account</th>\n <th>Name</th>\n <th>Region</th>\n <th>Actions</th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="loadBalancer in stage.loadBalancers">\n <td>\n <account-tag account="loadBalancer.credentials"></account-tag>\n </td>\n <td>{{ loadBalancer.name }}</td>\n <td>{{ loadBalancer.region }}</td>\n <td class="condensed-actions">\n <a class="btn btn-sm btn-link" href ng-click="editLoadBalancerStageCtrl.editLoadBalancer($index)">\n <span class="glyphicon glyphicon-edit" uib-tooltip="Edit"></span\n ></a>\n <a\n class="btn btn-sm btn-link pad-left"\n href\n ng-click="editLoadBalancerStageCtrl.removeLoadBalancer($index)"\n >\n <span class="glyphicon glyphicon-trash" uib-tooltip="Remove"></span>\n </a>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <td colspan="8">\n <button class="btn btn-block btn-sm add-new" ng-click="editLoadBalancerStageCtrl.addLoadBalancer()">\n <span class="glyphicon glyphicon-plus-sign"></span> Add load balancer\n </button>\n </td>\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("cloudrun/src/pipeline/stages/editLoadBalancer/editLoadBalancerExecutionDetails.html",'<div ng-controller="BaseExecutionDetailsCtrl">\n <execution-details-section-nav sections="configSections"></execution-details-section-nav>\n <div class="step-section-details" ng-if="detailsSection === \'editLoadBalancerConfig\'">\n <div class="row">\n <div class="col-md-12">\n <table class="table table-condensed">\n <thead>\n <tr>\n <th>Account</th>\n <th>Name</th>\n <th>Region</th>\n </tr>\n </thead>\n <tbody>\n <tr ng-repeat="loadBalancer in stage.context.loadBalancers">\n <td>\n <account-tag account="loadBalancer.credentials"></account-tag>\n </td>\n <td>{{ loadBalancer.name }}</td>\n <td>{{ loadBalancer.region }}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <stage-failure-message stage="stage" message="stage.failureMessage"></stage-failure-message>\n </div>\n <div class="step-section-details" ng-if="detailsSection === \'taskStatus\'">\n <div class="row">\n <execution-step-details item="stage"></execution-step-details>\n </div>\n </div>\n</div>\n')}]);e("spinnaker.cloudrun.pipeline.module",["spinnaker.cloudrun.pipeline.stage.editLoadBalancerStage"]);class $e extends oe.Component{constructor(){super(...arguments),this.onChangeBinding=(e,t)=>{const n=(this.props.bindings||[]).slice(0);n[e]=t,this.props.onChangeBindings(n)},this.onRemoveBinding=e=>{const t=(this.props.bindings||[]).slice(0);t.splice(e,1),this.props.onChangeBindings(t)}}render(){const{stage:e,pipeline:t,bindings:n}=this.props,a=(a,r)=>{const i=(r?r.expectedArtifactId:"new")||r.artifact&&r.artifact.id;return oe.createElement("div",{className:"row",key:i},oe.createElement("div",{className:"col-md-10"},oe.createElement(d,{pipeline:t,stage:e,expectedArtifactId:r&&r.expectedArtifactId,artifact:!!r&&r.artifact,onArtifactEdited:e=>this.onChangeBinding(a,{artifact:e}),onExpectedArtifactSelected:e=>this.onChangeBinding(a,{expectedArtifactId:e.id}),excludedArtifactIds:n.map((e=>e.expectedArtifactId)),excludedArtifactTypePatterns:[u.FRONT50_PIPELINE_TEMPLATE]})),r&&oe.createElement("div",{className:"col-md-2"},oe.createElement("a",{className:"glyphicon glyphicon-trash",onClick:()=>this.onRemoveBinding(a)})))};return oe.createElement(oe.Fragment,null,n.map(((e,t)=>a(t,e))),a(n.length))}}var Ne,Le;function Me({accounts:e,onAccountSelect:t,selectedAccount:n}){return oe.createElement("div",{className:"form-horizontal"},oe.createElement("div",{className:"form-group"},oe.createElement("div",{className:"col-md-3 sm-label-right"},"Account ",oe.createElement(p,{id:"cloudrun.manifest.account"})),oe.createElement("div",{className:"col-md-8"},oe.createElement(m,{value:n,onChange:e=>t(e.target.value),readOnly:!1,accounts:e,provider:"cloudrun"}))))}(Le=Ne||(Ne={})).TEXT="text",Le.ARTIFACT="artifact";oe.Component;class Ie extends oe.Component{render(){const e=this.props.application?this.props.application:"",t=this.props.stack?`-${this.props.stack}`:"",n=this.props.details?`-${this.props.details}`:"";return oe.createElement("pre",{style:{textAlign:"center"}},oe.createElement("p",null," Your server group will be in the cluster:"),oe.createElement("p",null,oe.createElement("b",null,e,t,n)))}}class Fe extends oe.Component{constructor(e){super(e),this.excludedManifestArtifactTypes=[u.FRONT50_PIPELINE_TEMPLATE,u.MAVEN_FILE],this.getSourceOptions=()=>ne([Ne.TEXT,Ne.ARTIFACT],(e=>({label:ae(e),value:e}))),this.handleRawManifestChange=(e,t)=>{this.setState({rawManifest:e}),this.props.formik.setFieldValue("manifests",t)},this.onManifestArtifactSelected=e=>{this.props.formik.setFieldValue("manifestArtifactId",e),this.props.formik.setFieldValue("manifestArtifact",null)},this.onManifestArtifactEdited=e=>{this.props.formik.setFieldValue("manifestArtifactId",null),this.props.formik.setFieldValue("manifestArtifact",e)},this.getRequiredArtifacts=()=>{const{requiredArtifactIds:e,requiredArtifacts:t}=this.props.formik.values;return(e||[]).map((e=>({expectedArtifactId:e}))).concat(t||[])},this.onRequiredArtifactsChanged=e=>{this.props.formik.setFieldValue("requiredArtifactIds",e.filter((e=>e.expectedArtifactId)).map((e=>e.expectedArtifactId))),this.props.formik.setFieldValue("requiredArtifacts",e.filter((e=>e.artifact)))};const t=this.props.formik.values,n=te(e.formik.values,"manifests"),a=te(e.formik.values,"source")===Ne.TEXT;this.state={rawManifest:!re(n)&&a?h(n):"",application:this.props.application.name,stack:te(t,"stack"),details:te(t,"details")}}render(){const e=this.props.formik.values;return oe.createElement("div",{className:"form-horizontal"},oe.createElement("h4",null,"Basic Settings"),oe.createElement(Me,{accounts:this.props.accounts,onAccountSelect:e=>this.props.formik.setFieldValue("account",e),selectedAccount:e.account}),oe.createElement(g,{label:"Application"},oe.createElement("input",{className:"form-control input-sm",type:"text",value:this.props.application.name,onChange:e=>this.props.formik.setFieldValue("application",e.target.value),disabled:!0})),oe.createElement(g,{label:"Stack"},oe.createElement("input",{className:"form-control input-sm",type:"text",value:e.stack,onChange:e=>this.props.formik.setFieldValue("stack",e.target.value)})),oe.createElement(g,{label:"Details"},oe.createElement("input",{className:"form-control input-sm",type:"text",value:e.details,onChange:e=>this.props.formik.setFieldValue("details",e.target.value)})),oe.createElement(Ie,{application:this.props.application.name,stack:e.stack,details:e.details}),oe.createElement("hr",null),oe.createElement("h4",null,"Manifest Configuration"),oe.createElement(g,{label:"Manifest Source",helpKey:"cloudrun.manifest.source"},oe.createElement(f,{options:this.getSourceOptions(),onChange:e=>this.props.formik.setFieldValue("source",e.target.value),value:e.source})),e.source===Ne.TEXT&&oe.createElement(g,{label:"Manifest"},oe.createElement(v,{onChange:this.handleRawManifestChange,value:this.state.rawManifest})),e.source===Ne.ARTIFACT&&oe.createElement(oe.Fragment,null,oe.createElement(b,{artifact:e.manifestArtifact,excludedArtifactTypePatterns:this.excludedManifestArtifactTypes,expectedArtifactId:e.manifestArtifactId,helpKey:"cloudrun.manifest.expectedArtifact",label:"Manifest Artifact",onArtifactEdited:this.onManifestArtifactEdited,onExpectedArtifactSelected:e=>this.onManifestArtifactSelected(e.id),pipeline:this.props.pipeline,stage:e}),oe.createElement(g,{label:"Expression Evaluation",helpKey:"cloudrun.manifest.skipExpressionEvaluation"},oe.createElement(k,{checked:!0===e.skipExpressionEvaluation,onChange:e=>this.props.formik.setFieldValue("skipExpressionEvaluation",e.target.checked),text:"Skip SpEL expression evaluation"}))),oe.createElement(g,{label:"Required Artifacts to Bind",helpKey:"cloudrun.manifest.requiredArtifactsToBind"},oe.createElement($e,{bindings:this.getRequiredArtifacts(),onChangeBindings:this.onRequiredArtifactsChanged,pipeline:this.props.pipeline,stage:e})))}}class Re extends oe.Component{constructor(e){super(e),this.destroy$=new le,this.fetchAccounts=()=>{ce(B.getAllAccountDetailsForProvider("cloudrun")).pipe(de(this.destroy$)).subscribe((e=>{this.setState({accounts:e})}))},this.state={accounts:[]};const{stage:t}=e,n=Z(t);n.source||(n.source=Ne.TEXT),n.skipExpressionEvaluation||(n.skipExpressionEvaluation=!1),n.cloudProvider||(n.cloudProvider="cloudrun"),n.moniker||(n.moniker={}),n.moniker.app||(n.moniker.app=e.application.name),this.stage=n}componentDidMount(){this.fetchAccounts()}componentWillUnmount(){this.destroy$.next()}render(){return oe.createElement(C,{...this.props,stage:this.stage,onChange:this.props.updateStage,render:e=>oe.createElement(Fe,{...e,accounts:this.state.accounts})})}}const Pe="redblack",ze={available:"success",stable:"success",paused:"warn",failed:"danger"};class Oe extends oe.Component{render(){const{manifest:e}=this.props;return null==e||null==e.status?null:Object.keys(e.status).map(((t,n)=>{const a=e.status[t],r=ze[t]||"",i=a.state,o=!i&&a.message;return oe.createElement("span",{key:n},i&&oe.createElement("span",{title:a.message,className:`pill ${r}`},t),o&&oe.createElement("span",{title:a.message,className:"pill warn"},t),oe.createElement("span",null," "))}))}}class Ue extends oe.Component{constructor(e){super(e),this.spinnakerKindStateMap={serverGroupManagers:"serverGroupManager",serverGroups:"serverGroup"},this.state={url:""},this.loadUrl()}canOpen(){return!!this.props.manifest.manifest&&!!this.state.url}spinnakerKindFromCloudrunKind(e,t){return t[Object.keys(t).find((t=>t.toLowerCase()===e.toLowerCase()))]}resourceRegion(){return ie(te(this.props,["manifest","manifest","metadata","annotations","artifact.spinnaker.io/location"],""))}getStateParams(e){const t=this.props.manifest.manifest.kind.toLowerCase(),n=this.props.manifest.manifest.metadata.name,a=this.resourceRegion(),r={accountId:this.props.accountId,provider:"cloudrun",region:a,reg:a,[e]:`${t} ${n}`};return r.region||"namespace"!==t||"cloudrunResource"!==e||(r.region=n),r.region&&""!==r.region||(r.region="_"),r}loadUrl(){const e=te(this.props,["manifest","manifest","kind"],""),{accountId:t}=this.props;B.getAccountDetails(t).then((t=>{const n=this.spinnakerKindFromCloudrunKind(e,t.spinnakerKindMap),a=this.spinnakerKindStateMap[n]||"cloudrunResource",r=this.getStateParams(a),i=w.$state.href(`home.applications.application.insight.clusters.${a}`,r);this.setState({url:i})}))}render(){return this.canOpen()?oe.createElement("a",{href:this.state.url,className:"clickable"},this.props.linkName):null}}class Ve extends oe.Component{pillStyle(e){return"Warning"===e.type?"alert":"Normal"===e.type?"success":""}render(){if(!this.props.manifest)return null;if(this.props.manifest&&(!this.props.manifest.events||0===this.props.manifest.events.length))return oe.createElement("div",null,"No recent events found - Cloud Run does not store events for long.");const{events:e}=this.props.manifest,t=ie(te(this.props.manifest,["manifest","metadata","annotations","artifact.spinnaker.io/location"],""));return e.map(((n,a)=>{const r=te(n,"firstTimestamp",""),i=te(n,"lastTimestamp","");let o=0,s=0;return r&&(o=pe.fromISO(r).toMillis()),i&&(s=pe.fromISO(i).toMillis()),oe.createElement("div",{key:te(n,["metadata","uid"],String(a)),className:"info"},oe.createElement("div",{className:"horizontal"},n.count&&oe.createElement("div",{className:`pill ${this.pillStyle(n)}`},n.count," × ",oe.createElement("b",null,n.reason))),(n.firstTimestamp||n.lastTimestamp)&&oe.createElement("div",null,n.firstTimestamp===n.lastTimestamp&&oe.createElement("div",null,oe.createElement("i",null,y(o))),n.firstTimestamp!==n.lastTimestamp&&oe.createElement("div",null,oe.createElement("div",null,"First Occurrence: ",oe.createElement("i",null,y(o))),oe.createElement("div",null,"Last Occurrence: ",oe.createElement("i",null,y(s))))),oe.createElement("div",null,n.message),oe.createElement("div",null,oe.createElement(S,{account:this.props.manifest.account,location:t,podNamesProviders:[new E(this.props.manifest,n)],linkName:"Console Output (Raw)"})),a!==e.length-1&&oe.createElement("br",null))}))}}function Ye({account:e,manifest:t}){return oe.createElement(oe.Fragment,null,oe.createElement("dl",{className:"manifest-status",key:"manifest-status"},oe.createElement("dt",null,t.manifest.kind),oe.createElement("dd",null,oe.createElement(A,{displayText:!0,text:t.manifest.metadata.name,toolTip:`Copy ${t.manifest.metadata.name}`})," ",oe.createElement(Oe,{manifest:t}))),oe.createElement("div",{className:"manifest-support-links",key:"manifest-support-links"},oe.createElement(G,{linkName:"YAML",manifestText:ue(t.manifest),modalTitle:t.manifest.metadata.name}),oe.createElement(Ue,{linkName:"Details",manifest:t,accountId:e})),oe.createElement("div",{className:"manifest-events pad-left",key:"manifest-events"},oe.createElement(Ve,{manifest:t})))}Se("dl.manifest-status {\n display: block;\n margin: 0;\n}\ndl.manifest-status dt,\ndl.manifest-status dd {\n display: inline-block;\n}\ndl.manifest-status dt {\n margin-right: 4px;\n}\n.manifest-support-links {\n margin: 0 0 1em;\n}\n.manifest-support-links a {\n margin-right: 2em;\n}\n.manifest-events {\n margin: 0 0 2em;\n}\n");const je=class{static subscribe(e,t,n){return je.updateManifest(t,n),e.onRefresh(null,(()=>je.updateManifest(t,n)))}static updateManifest(e,t){D.getManifest(e.account,e.location,e.name).then((e=>t(e)))}static manifestIdentifier(e){const t=e.kind.toLowerCase(),n=(e.metadata.namespace||"_").toLowerCase(),a=e.metadata.name.toLowerCase();return`${n} ${t} ${(e.apiVersion||"_").toLowerCase()} ${a}`}static stageManifestToManifestParams(e,t){return{account:t,name:je.scopedKind(e)+" "+e.metadata.name,location:null==e.metadata.namespace?"_":e.metadata.namespace}}static apiGroup(e){const t=(e.apiVersion||"_").split("/");return t.length<2?"":t[0]}static isCRDGroup(e){return!je.BUILT_IN_GROUPS.includes(je.apiGroup(e))}static scopedKind(e){return je.isCRDGroup(e)?e.kind+"."+je.apiGroup(e):e.kind}};let Ke=je;Ke.BUILT_IN_GROUPS=["","core","batch","apps","extensions","storage.k8s.io","apiextensions.k8s.io","apiregistration.k8s.io","policy","scheduling.k8s.io","settings.k8s.io","authorization.k8s.io","authentication.k8s.io","rbac.authorization.k8s.io","certifcates.k8s.io","networking.k8s.io"];class qe extends oe.Component{constructor(e){super(e),this.state={subscriptions:[],manifestIds:[]}}componentDidMount(){this.componentDidUpdate(this.props,this.state)}componentWillUnmount(){this.unsubscribeAll()}componentDidUpdate(e,t){const n=te(this.props.stage,["context","outputs.manifests"],[]).filter((e=>!!e)),a=n.map((e=>Ke.manifestIdentifier(e))).sort();if(t.manifestIds.join("")!==a.join("")){this.unsubscribeAll();const e=n.map((e=>{const t=Ke.manifestIdentifier(e);return{id:t,unsubscribe:this.subscribeToManifestUpdates(t,e),manifest:this.stageManifestToIManifest(e,this.props.stage.context.account)}}));this.setState({subscriptions:e,manifestIds:a})}}subscribeToManifestUpdates(e,t){const n=Ke.stageManifestToManifestParams(t,this.props.stage.context.account);return Ke.subscribe(this.props.application,n,(t=>{const n=this.state.subscriptions.findIndex((t=>t.id===e));if(-1!==n){const e={...this.state.subscriptions[n],manifest:t},a=[...this.state.subscriptions];a[n]=e,this.setState({subscriptions:a})}}))}unsubscribeAll(){this.state.subscriptions.forEach((({unsubscribe:e})=>e()))}stageManifestToIManifest(e,t){return{name:te(e,"metadata.name",""),moniker:null,account:t,cloudProvider:"cloudrun",location:te(e,"metadata.namespace",""),manifest:e,status:{},artifacts:[],events:[]}}render(){const{name:e,current:t,stage:n}=this.props,a=this.state.subscriptions.filter((e=>!!e.manifest)).map((e=>e.manifest));return oe.createElement(x,{name:e,current:t},oe.createElement(T,{stage:n,message:n.failureMessage}),a&&oe.createElement("div",{className:"row"},oe.createElement("div",{className:"col-md-12"},oe.createElement("div",{className:"well alert alert-info"},a.map((e=>{const t=e.manifest.metadata.uid||Ke.manifestIdentifier(e.manifest);return oe.createElement(Ye,{key:t,manifest:e,account:n.context.account})}))))))}}qe.title="deployStatus",c.pipeline.registerStage({label:"Deploy (Cloud Run)",description:"Deploy a Cloud Run manifest yaml/json file.",key:"deployCloudrunManifest",cloudProvider:"cloudrun",component:Re,executionDetailsSections:[qe,$,N],producesArtifacts:!0,supportsCustomTimeout:!0,validators:[{type:"requiredField",fieldName:"account",fieldLabel:"Account"},{type:"requiredField",fieldName:"source",fieldLabel:"Source"},{type:"custom",validate:(e,t)=>{const n=te(t,"trafficManagement.enabled",!1),a=te(t,"trafficManagement.options.services",[]);if(n&&re(a))return"Select at least one <strong>Service</strong> to enable Spinnaker-managed rollout strategy options.";if(n&&t.source===Ne.TEXT){const e=te(t,"manifests",[]).filter((e=>"ReplicaSet"===e.kind)),n=te(t,"trafficManagement.options.strategy"),a=parseInt(te(e,[0,"metadata","annotations","strategy.spinnaker.io/max-version-history"]),10);if(n===Pe&&a<2)return"The max version history specified in your manifest conflicts with the behavior of the Red/Black rollout strategy. Please update your <strong>strategy.spinnaker.io/max-version-history</strong> annotation to a value greater than or equal to 2."}return null}}],accountExtractor:e=>e.account?[e.account]:[],configAccountExtractor:e=>e.account?[e.account]:[],artifactExtractor:L.accumulateArtifacts(["manifestArtifactId","requiredArtifactIds"]),artifactRemover:M.removeArtifactFromFields(["manifestArtifactId","requiredArtifactIds"])});const We=I.providers.cloudrun||{defaults:{}};var He,Xe;We&&(We.resetToOriginal=I.resetProvider("cloudrun")),(Xe=He||(He={})).TEXT="text",Xe.ARTIFACT="artifact";const Qe=e=>{switch(e){case"createPipeline":return"Add";case"editPipeline":return"Done";default:return"Create"}};class _e{buildNewServerGroupCommand(e){return Je.buildNewServerGroupCommand(e,"cloudrun","create")}buildNewServerGroupCommandForPipeline(e,t){return Je.buildNewServerGroupCommandForPipeline(e,t)}buildServerGroupCommandFromPipeline(e,t,n,a){return Je.buildServerGroupCommandFromPipeline(e,t,n,a)}}const Ze=class{static ServerGroupCommandIsValid(e){return!!e.moniker&&!!e.moniker.app}static copyAndCleanCommand(e){return Z(e)}static buildNewServerGroupCommandForPipeline(e,t){const n=this.buildNewServerGroupCommand({name:t.application},"cloudrun","createPipeline");return n.viewState={...n.viewState,pipeline:t,requiresTemplateSelection:!0,stage:e},n}static getExpectedArtifacts(e){return e.expectedArtifacts||[]}static buildServerGroupCommandFromPipeline(e,t,n,a){return Ze.buildNewServerGroupCommand(e,"cloudrun","editPipeline").then((e=>e={...e,...t,backingData:{...e.metadata.backingData.backingData,expectedArtifacts:Ze.getExpectedArtifacts(a)},credentials:t.account||e.metadata.backingData.credentials,viewState:{...e.metadata.backingData.viewState,stage:n,pipeline:a}}))}static getCredentials(e){const t=(e||[]).map((e=>e.name)),n=We.defaults.account;return t.includes(n)?n:t[0]}static getRegion(e,t){const n=e.find((e=>e.name===t));return n?n.region:null}static buildNewServerGroupCommand(e,t,n){const a={accounts:B.getAllAccountDetailsForProvider("cloudrun"),artifactAccounts:B.getArtifactAccounts()};return me.all(a).then((a=>{const{accounts:r}=a,i=r.some((e=>e.name===t))?r.find((e=>e.name===t)).name:r.length?r[0].name:null,o={mode:n,submitButtonLabel:Qe(n),disableStrategySelection:"create"===n},s=i||this.getCredentials(r),l=this.getRegion(a.accounts,s),c="cloudrun";return{command:{application:e.name,configFiles:[""],cloudProvider:c,selectedProvider:c,provider:c,region:l,credentials:s,gitCredentialType:"NONE",manifest:null,sourceType:"git",configArtifacts:[],interestingHealthProviderNames:[],fromArtifact:!1,account:i,viewState:o},metadata:{backingData:a}}}))}};let Je=Ze;Je.$inject=["$q"];const et="spinnaker.cloudrun.serverGroup.commandBuilder.service";function tt({accounts:e,onAccountSelect:t,selectedAccount:n,formik:a,onEnterStack:r,detailsChanged:i,app:o}){const{values:s}=a,{stack:l="",freeFormDetails:c}=s,d=F.getClusterName(o.name,l,c),u=!o.clusters.find((e=>e.name===d)),h=o.serverGroups.data.filter((e=>e.cluster===d&&e.account===s.command.credentials&&e.region===s.command.region)).sort(((e,t)=>e.createdTime-t.createdTime)),g=h.length?h.pop():null;return oe.createElement("div",{className:"form-horizontal"},oe.createElement("div",{className:"form-group"},oe.createElement("div",{className:"col-md-3 sm-label-right"},"Account"),oe.createElement("div",{className:"col-md-7"},oe.createElement(m,{value:n,onChange:e=>t(e.target.value),readOnly:!1,accounts:e,provider:"cloudrun"}))),oe.createElement("div",{className:"form-group"},oe.createElement("div",{className:"col-md-3 sm-label-right"},"Stack ",oe.createElement(p,{id:"cloudrun.serverGroup.stack"})),oe.createElement("div",{className:"col-md-7"},oe.createElement("input",{type:"text",className:"form-control input-sm no-spel",value:l,onChange:e=>r(e.target.value)}))),oe.createElement("div",{className:"form-group"},oe.createElement("div",{className:"col-md-3 sm-label-right"},"Detail ",oe.createElement(p,{id:"cloudrun.serverGroup.detail"})),oe.createElement("div",{className:"col-md-7"},oe.createElement("input",{type:"text",className:"form-control input-sm no-spel",value:c,onChange:e=>i(e.target.value)}))),!s.command.viewState.hideClusterNamePreview&&oe.createElement(R,{createsNewCluster:u,latestServerGroupName:null==g?void 0:g.name,mode:s.command.viewState.mode,namePreview:d,navigateToLatestServerGroup:()=>{const{values:e}=a,t={provider:e.command.selectedProvider,accountId:g.account,region:g.region,serverGroup:g.name},{$state:n}=w;n.is("home.applications.application.insight.clusters")?n.go(".serverGroup",t):n.go("^.serverGroup",t)}}))}e("spinnaker.cloudrun.serverGroup.commandBuilder.service",[]).service("cloudrunV2ServerGroupCommandBuilder",_e);class nt extends oe.Component{constructor(){super(...arguments),this.accountUpdated=e=>{const{formik:t}=this.props;t.values.command.account=e,t.setFieldValue("account",e)},this.stackChanged=e=>{const{setFieldValue:t,values:n}=this.props.formik;n.command.stack=e,t("stack",e)},this.freeFormDetailsChanged=e=>{const{setFieldValue:t,values:n}=this.props.formik;n.command.freeFormDetails=e,t("freeFormDetails",e)}}render(){var e,t,n;const{formik:a,app:r}=this.props;return oe.createElement(tt,{accounts:(null==(t=null==(e=a.values.metadata)?void 0:e.backingData)?void 0:t.accounts)||[],onAccountSelect:this.accountUpdated,selectedAccount:(null==(n=a.values.command)?void 0:n.account)||"",onEnterStack:this.stackChanged,formik:a,detailsChanged:this.freeFormDetailsChanged,app:r})}}function at({configFiles:e,onEnterConfig:t}){const[n,a]=se(e);return oe.createElement("div",{className:"form-horizontal"},oe.createElement("div",{className:"form-group"},n.map(((e,r)=>oe.createElement(oe.Fragment,null,oe.createElement("div",{className:"col-md-3 sm-label-right"},"Service Yaml",oe.createElement(p,{id:"cloudrun.serverGroup.configFiles"})," "),oe.createElement("div",{className:"col-md-8",key:r},oe.createElement(P,{name:"text"+r,value:e,rows:10,onChange:e=>function(e,r){if(9===e.which){e.preventDefault();const t=e.target.selectionStart,n=e.target.value;e.target.value=`${n.substring(0,t)} ${n.substring(t)}`,e.target.selectionStart+=2}const i=[...n];i[r]=e.target.value,a(i),t(i)}(e,r)})))))))}class rt extends oe.Component{constructor(){super(...arguments),this.configUpdated=e=>{const{formik:t}=this.props;t.values.command.configFiles=e,t.setFieldValue("configFiles",e)}}render(){const{formik:e}=this.props;return oe.createElement(at,{configFiles:e.values.configFiles||e.values.command.configFiles,onEnterConfig:this.configUpdated})}}const it=class extends oe.Component{constructor(e){super(e),this._isUnmounted=!1,this.onTaskComplete=()=>{this.props.application.serverGroups.refresh(),this.props.application.serverGroups.onNextRefresh(null,this.onApplicationRefresh)},this.onApplicationRefresh=()=>{if(this._isUnmounted)return;const{command:e}=this.props,{taskMonitor:t}=this.state,n=t.task.execution.stages.find((e=>"cloneServerGroup"===e.type));if(n&&n.context["deploy.server.groups"]){const t=n.context["deploy.server.groups"][e.command.region];if(t){const n={serverGroup:t,accountId:e.command.credentials,region:e.command.region,provider:"cloudrun"};let a="^.^.^.clusters.serverGroup";w.$state.includes("**.clusters.serverGroup")&&(a="^.serverGroup"),w.$state.includes("**.clusters.cluster.serverGroup")&&(a="^.^.serverGroup"),w.$state.includes("**.clusters")&&(a=".serverGroup"),w.$state.go(a,n)}}},this.submit=e=>{const t=Je.copyAndCleanCommand(e.command);if(!("editPipeline"===t.viewState.mode||"createPipeline"===t.viewState.mode)){const e=()=>w.serverGroupWriter.cloneServerGroup(t,this.props.application);return this.state.taskMonitor.submit(e),null}this.props.closeModal&&this.props.closeModal(t)},e.command||Je.buildNewServerGroupCommand(e.application,"cloudrun","create").then((e=>{Object.assign(this.state.command,e),this.setState({loaded:!0})})),this.state={loaded:!!e.command,command:e.command||{},taskMonitor:new o({application:e.application,title:("Create"===e.command.command.viewState.submitButtonLabel?"Creating":"Updating")+" your Server Group",modalInstance:o.modalInstanceEmulation((()=>this.props.dismissModal())),onTaskComplete:this.onTaskComplete})}}static show(e){return z.show(it,e,{dialogClassName:"wizard-modal modal-lg"})}render(){const{dismissModal:e,application:t}=this.props,{loaded:n,taskMonitor:a,command:r}=this.state,i=this.state.command.command.viewState.submitButtonLabel;return oe.createElement(O,{heading:("Add"===i||"Create"===i?"Create New":"Update")+" Server Group",initialValues:r,loading:!n,taskMonitor:a,dismissModal:e,closeModal:this.submit,submitButtonLabel:i,render:({formik:e,nextIdx:n,wizard:a})=>oe.createElement(oe.Fragment,null,oe.createElement(U,{label:"Basic Settings",wizard:a,order:n(),render:({innerRef:n})=>oe.createElement(nt,{ref:n,formik:e,app:t})}),oe.createElement(U,{label:"Service Yaml",wizard:a,order:n(),render:({innerRef:t})=>oe.createElement(rt,{ref:t,formik:e})}))})}};let ot=it;ot.defaultProps={closeModal:V,dismissModal:V};class st{}st.PLATFORM="Cloud Run Service";class lt{constructor(e,t,n,a,r){this.$state=e,this.$scope=t,this.app=a,this.serverGroupWriter=r,this.state={loading:!0},this.extractServerGroup(n).then((()=>{this.$scope.$$destroyed||this.app.getDataSource("serverGroups").onRefresh(this.$scope,(()=>this.extractServerGroup(n)))})).catch((()=>this.autoClose()))}canDestroyServerGroup(){if(this.serverGroup){return!this.serverGroup.tags.isLatest&&!!this.serverGroup.disabled}return!1}destroyServerGroup(){const e={name:this.serverGroup.name,accountId:this.serverGroup.account,region:this.serverGroup.region},t={application:this.app,title:"Destroying "+this.serverGroup.name,onTaskComplete:()=>{this.$state.includes("**.serverGroup",e)&&this.$state.go("^")}},n={header:"Really destroy "+this.serverGroup.name+"?",buttonText:"Destroy "+this.serverGroup.name,account:this.serverGroup.account,taskMonitorConfig:t,submitMethod:e=>this.serverGroupWriter.destroyServerGroup(this.serverGroup,this.app,e),askForReason:!0,platformHealthOnlyShowOverride:this.app.attributes.platformHealthOnlyShowOverride,platformHealthType:st.PLATFORM,interestingHealthProviderNames:[]};this.app.attributes.platformHealthOnlyShowOverride&&this.app.attributes.platformHealthOnly&&(n.interestingHealthProviderNames=[st.PLATFORM]),s.confirm(n)}autoClose(){this.$scope.$$destroyed||(this.$state.params.allowModalToStayOpen=!0,this.$state.go("^",null,{location:"replace"}))}extractServerGroup({name:e,accountId:t,region:n}){return j.getServerGroup(this.app.name,t,n,e).then((a=>{let r=this.app.getDataSource("serverGroups").data.find((a=>a.name===e&&a.account===t&&a.region===n));r||this.app.getDataSource("loadBalancers").data.some((n=>n.account===t&&n.serverGroups.some((t=>{let n=!1;return t.name===e&&(r=t,n=!0),n})))),this.serverGroup={...a,...r},this.state.loading=!1}))}}lt.$inject=["$state","$scope","serverGroup","app","serverGroupWriter"];const ct="spinnaker.cloudrun.serverGroup.details.controller";e("spinnaker.cloudrun.serverGroup.details.controller",[Y]).controller("cloudrunV2ServerGroupDetailsCtrl",lt);class dt{constructor(e){this.$q=e}normalizeServerGroup(e){return this.$q.resolve(e)}convertServerGroupCommandToDeployConfiguration(e){return new ut(e)}}dt.$inject=["$q"];class ut{constructor(e){this.cloudProvider="cloudrun",this.provider="cloudrun",this.credentials=e.credentials,this.account=e.credentials,this.application=e.application,this.stack=e.stack,this.freeFormDetails=e.freeFormDetails,this.region=e.region,this.strategy=e.strategy,this.type=e.type,this.fromArtifact=e.fromArtifact,this.gitCredentialType=e.gitCredentialType,this.configFiles=e.configFiles,this.sourceType=e.sourceType,this.interestingHealthProviderNames=e.interestingHealthProviderNames||[],this.configArtifacts=[]}}const pt="spinnaker.cloudrun.serverGroup.transformer.service";e("spinnaker.cloudrun.serverGroup.transformer.service",[]).service("cloudrunV2ServerGroupTransformer",dt);Se('.cloud-provider-logo .icon-cloudrun {\n -webkit-mask-image: url("data:image/svg+xml,%3Csvg width%3D%2224px%22 height%3D%2224px%22 viewBox%3D%220 0 24 24%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cdefs%3E %3Cstyle%3E .cls-1 %7B fill%3A %23aecbfa%3B %7D .cls-1%2C .cls-2 %7B fill-rule%3A evenodd%3B %7D .cls-2 %7B fill%3A %234285f4%3B %7D %3C%2Fstyle%3E %3C%2Fdefs%3E %3Ctitle%3EIcon_24px_CloudRun_Color%3C%2Ftitle%3E %3Cg data-name%3D%22Product Icons%22%3E %3Cg%3E %3Cpolygon class%3D%22cls-1%22 points%3D%228.9 2.63 12.02 12 21.38 12 8.9 2.63%22 %2F%3E %3Cpolygon class%3D%22cls-2%22 points%3D%2221.38 12 12.02 12 8.9 21.38 21.38 12%22 %2F%3E %3Cpolygon class%3D%22cls-2%22 points%3D%223.44 21.38 6.57 19.81 8.9 12 5.78 12 3.44 21.38%22 %2F%3E %3Cpolygon class%3D%22cls-1%22 points%3D%223.44 2.63 5.78 12 8.9 12 6.57 4.19 3.44 2.63%22 %2F%3E %3C%2Fg%3E %3C%2Fg%3E%3C%2Fsvg%3E");\n mask-image: url("data:image/svg+xml,%3Csvg width%3D%2224px%22 height%3D%2224px%22 viewBox%3D%220 0 24 24%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E %3Cdefs%3E %3Cstyle%3E .cls-1 %7B fill%3A %23aecbfa%3B %7D .cls-1%2C .cls-2 %7B fill-rule%3A evenodd%3B %7D .cls-2 %7B fill%3A %234285f4%3B %7D %3C%2Fstyle%3E %3C%2Fdefs%3E %3Ctitle%3EIcon_24px_CloudRun_Color%3C%2Ftitle%3E %3Cg data-name%3D%22Product Icons%22%3E %3Cg%3E %3Cpolygon class%3D%22cls-1%22 points%3D%228.9 2.63 12.02 12 21.38 12 8.9 2.63%22 %2F%3E %3Cpolygon class%3D%22cls-2%22 points%3D%2221.38 12 12.02 12 8.9 21.38 21.38 12%22 %2F%3E %3Cpolygon class%3D%22cls-2%22 points%3D%223.44 21.38 6.57 19.81 8.9 12 5.78 12 3.44 21.38%22 %2F%3E %3Cpolygon class%3D%22cls-1%22 points%3D%223.44 2.63 5.78 12 8.9 12 6.57 4.19 3.44 2.63%22 %2F%3E %3C%2Fg%3E %3C%2Fg%3E%3C%2Fsvg%3E");\n background-color: #4285f4;\n}\n');const mt="spinnaker.cloudrun";e("spinnaker.cloudrun",["spinnaker.cloudrun.componentUrlDetails.component","spinnaker.cloudrun.serverGroup.commandBuilder.service","spinnaker.cloudrun.serverGroup.details.controller","spinnaker.cloudrun.serverGroup.transformer.service","spinnaker.cloudrun.loadBalancer.transformer.service","spinnaker.cloudrun.loadBalancerDetails.controller","spinnaker.cloudrun.loadBalancer.wizard.controller","spinnaker.cloudrun.loadBalancer.createMessage.component","spinnaker.cloudrun.allocationConfigurationRow.component","spinnaker.cloudrun.loadBalancerSettings.component","spinnaker.cloudrun.stageAllocationConfigurationRow.component","spinnaker.cloudrun.pipeline.module","spinnaker.cloudrun.instanceDetails.controller"]).config((()=>{l.registerProvider("cloudrun",{name:"cloudrun",logo:{path:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAYAAAAe2bNZAAAFAUlEQVRYR82YfUwcRRjGn5m7veO4rZI2aKuk1kRNjQ012rRANB53YNpYtFHS1Aj9ktaPtGINpPWgKQ0sVNvUNGirgYBJSTSA1H6ltpTrVYtUS2u1aRS/LSRFEmqBPcC7vR2zixwc7N4tJ02c5P64zMwzv332fd+ZWYL/USNGWFL3MpvVJy4xMlZzTJA/7y0hw9HmR4VxlokVIGQzwOzRxCL0D4DgA4+bL4ykERHGKfiqAJb3HyAmTCXVniL7Bj09XRhXqZjBKJqnD2REicjIbNnOn9bS1YVxlvuOgrHl0w0DQo553PYswzAuQcxhwMFpB/lXkAC5LUV83UT9Sc44SpjZxPnaGLDoFsK0BwP2VG8JkcavMQnGWSYWgGD3rQIJ6TIUeor5PbowjrcGk6gktwFI0oKZk0Bw/SYLdSXNpOi6IcfK3SWbaap3a3zXqECYM85ycTcYCvTUX3JZ0NMn41D7iLt5Dgv6hhgavgrEBkSwZ3ztCcE4ynyLKGGKK2Y95ZT7TBBWxuHzH4LY2TSMBUkU+1bbcOn3IPZ95o/FJUlmJNVbbG9X0350YacgKtmTE+kRORNQs9GGO2+nyKsawrVeGe+vt+HyH0E88yiHmrP+WFyq8xTxuSEYV2n/ckbpUSNeFzxlxbKFZuxv9uPUFQkrUzgkz6U4/o2E7MUcbvgY3j01NZeILGe1bL/tmOpMernYTBgyjMBkLjBj29NWfNEhofKkH/MSKXatikPO/kEwBmQv4bA02YyD5wKGXWIEp8+4+UziFPrzAFplBEQZM4snqH8tHjcHGTZWD6nTKtfYUHvWr8aO0u6fTbHpSSt+6ZFR5THqkryBOAXfEYBplmc9wPfW2jD/Loqi+mH81C1jzeMWzEvU3lnmJFDUtfpx+GJYfdOSPkHSBbGHAIlGnRlN6efTOPU1KL+HkkzY8aw1okTLVQk1Xj+6+8bq1MQJJL1MrCYEL04FpjrPhnvvGHNm3RMWNai1mlIkFeBzHRL8QWBgSAeGkAbiKhWXMooTRmFmzSCo3xweMwfW29RYmthOfiepIP3jAAJBhP0PVV8Zy1QFpyDWAlhrBEhJ31cyLKFsevBuip3PxYVN7eyV8XFbABd+HQnoiU2Sgb7BMIc+9BTx61QYhyA+TAGl+oaragjtfSEOC+8xqXXG+72E3Mc4ZD3ChUYeuRRAw/kA/o4Sr0EZakYCGJaBVG8Rf3msApcPVoDJ26K50+K2QxF6tXYIf/mYuh0oG+hvPTLqWgO40qnthq5DQ2SXxx3/ptI/tjeViLMpp7ozTw8o7QETSrOVvUlSq2zyXBOKV1jRdCGgvpapNkrR+WcvW+wt4bvDYNTYKRNfB8E7eqJK5f365yC+vTby9EoWffmjhI7rsR0jgjLb2rSFfzsUxBMXdgnKKY+laAFZzQAfF/V2Y8ggAlysz7eHnSYnKbuEgVUM5CM9xekCCshs9adb+LBztuZjOgXfIYCt0AXiAN4au0MM9Hhjvm3SzUNT0VE64KCUnInkdxwH2GME8vtZ5uHCyXcn/XuT4DsAsJenG4gBNY35ds3tRxfGUd4/nzKqpHpCJCCbhSDeYihmAbB+2cTSPtk046rWjMh37dKBElCyI9pSRoEYUNGYb3fr6UWNQqcKRAuifYWItxDYdBwihIgyY5WRQCYVPT1io99nZvKc5jnCxKytDW+QkWNhhBbVmWgC09n/Dw0j4+SJOXQTAAAAAElFTkSuQmCC"},instance:{detailsTemplateUrl:"cloudrun/src/instance/details/details.html",detailsController:"cloudrunInstanceDetailsCtrl"},serverGroup:{CloneServerGroupModal:ot,commandBuilder:"cloudrunV2ServerGroupCommandBuilder",detailsController:"cloudrunV2ServerGroupDetailsCtrl",detailsTemplateUrl:"cloudrun/src/serverGroup/details/details.html",transformer:"cloudrunV2ServerGroupTransformer",skipUpstreamStageCheck:!0},loadBalancer:{transformer:"cloudrunLoadBalancerTransformer",createLoadBalancerTemplateUrl:"cloudrun/src/loadBalancer/configure/wizard/wizard.html",createLoadBalancerController:"cloudrunLoadBalancerWizardCtrl",detailsTemplateUrl:"cloudrun/src/loadBalancer/details/details.html",detailsController:"cloudrunLoadBalancerDetailsCtrl"}})})),K.registerProvider("cloudrun",["custom","redblack","rollingpush","rollingredblack"]),window.angular.module("ng").run(["$templateCache",function(e){e.put("cloudrun/src/instance/details/details.html",'<div class="details-panel">\n <div class="header">\n <instance-details-header\n health-state="ctrl.instance.healthState"\n instance-id="ctrl.instance ? ctrl.instance.name : ctrl.instanceIdNotFound"\n loading="ctrl.state.loading"\n standalone="false"\n ></instance-details-header>\n <div ng-if="!ctrl.state.loading">\n <div class="actions">\n <div class="dropdown" uib-dropdown dropdown-append-to-body>\n <button type="button" class="btn btn-sm btn-primary dropdown-toggle" uib-dropdown-toggle>\n Instance Actions <span class="caret"></span>\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class="content" ng-if="!ctrl.state.loading && ctrl.instance">\n <collapsible-section heading="Instance Information" expanded="true">\n <dl class="dl-horizontal dl-narrow">\n <dt>Launched</dt>\n <dd ng-if="ctrl.instance.launchTime">{{ctrl.instance.launchTime | timestamp}}</dd>\n <dt>In</dt>\n <dd><account-tag account="ctrl.instance.account" pad="right"></account-tag>{{}}</dd>\n <dt ng-if="ctrl.instance.serverGroup">Server Group</dt>\n <dd ng-if="ctrl.instance.serverGroup">\n <a\n ui-sref="^.serverGroup({region: ctrl.instance.region,\n accountId: ctrl.instance.account,\n serverGroup: ctrl.instance.serverGroup,\n provider: \'cloudrun\'})"\n >{{ctrl.instance.serverGroup}}</a\n >\n </dd>\n <dt>Region</dt>\n <dd>{{ctrl.instance.region}}</dd>\n <cloudrun-conditional-dt-dd\n component="ctrl.instance"\n key="vmZoneName"\n label="Zone"\n ></cloudrun-conditional-dt-dd>\n </dl>\n </collapsible-section>\n <collapsible-section heading="Status" expanded="true">\n <dl>\n <dt>Load Balancer</dt>\n <dd>\n <span\n class="pull-left"\n uib-tooltip="{{ctrl.instance.healthState === \'Up\' ? ctrl.upToolTip : ctrl.outOfServiceToolTip}}"\n tooltip-placement="right"\n >\n <span class="glyphicon glyphicon-{{ctrl.instance.healthState}}-triangle"></span>\n {{ctrl.instance.loadBalancers[0]}}\n </span>\n </dd>\n </dl>\n </collapsible-section>\n </div>\n <div class="content" ng-if="!ctrl.state.loading && !ctrl.instance">\n <div class="content-section">\n <div class="content-body text-center">\n <h3>Instance not found.</h3>\n </div>\n </div>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("cloudrun/src/serverGroup/details/details.html",'<div class="details-panel" ng-class="{disabled: ctrl.serverGroup.isDisabled || ctrl.serverGroup.disabled}">\n <div class="header" ng-if="ctrl.state.loading">\n <div class="close-button">\n <a class="btn btn-link" ui-sref="^">\n <span class="glyphicon glyphicon-remove"></span>\n </a>\n </div>\n <h4 class="text-center">\n <span us-spinner="{radius:20, width:6, length: 12}"></span>\n </h4>\n </div>\n\n <div class="header" ng-if="!ctrl.state.loading">\n <div class="close-button">\n <a class="btn btn-link" ui-sref="^">\n <span class="glyphicon glyphicon-remove"></span>\n </a>\n </div>\n <div class="header-text horizontal middle">\n <cloud-provider-logo provider="ctrl.serverGroup.type" height="\'36px\'" width="\'36px\'"></cloud-provider-logo>\n <h3 class="horizontal middle space-between flex-1" select-on-dbl-click>{{ctrl.serverGroup.name}}</h3>\n </div>\n <div class="actions">\n <div class="dropdown" uib-dropdown dropdown-append-to-body>\n <button type="button" class="btn btn-sm btn-primary dropdown-toggle" uib-dropdown-toggle>\n Server Group Actions <span class="caret"></span>\n </button>\n <ul class="dropdown-menu" uib-dropdown-menu role="menu">\n <li\n ng-if="ctrl.serverGroup.tags.isLatest"\n uib-tooltip="You cannot destroy the latest server group (revision) . \n You may be able to delete this server group\'s load balancer."\n class="disabled"\n >\n <a href>Destroy</a>\n </li>\n <li ng-if="ctrl.canDestroyServerGroup() && !ctrl.serverGroup.tags.isLatest">\n <a href ng-click="ctrl.destroyServerGroup()">Destroy</a>\n </li>\n <li\n ng-if="(!ctrl.canDestroyServerGroup() && !ctrl.serverGroup.tags.isLatest)"\n uib-tooltip="You cannot destroy this server group while it is receiving traffic. \n You may be able to delete this server group\'s load balancer."\n class="disabled"\n >\n <a href>Destroy</a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n <div class="content" ng-if="!ctrl.state.loading">\n <div class="band band-info" ng-if="ctrl.serverGroup.isDisabled || ctrl.serverGroup.disabled">Disabled</div>\n <server-group-running-tasks-details\n server-group="ctrl.serverGroup"\n application="ctrl.app"\n ></server-group-running-tasks-details>\n <collapsible-section heading="Server Group Information" expanded="true">\n <dl class="dl-horizontal dl-narrow">\n <dt>Created</dt>\n <dd>{{ctrl.serverGroup.createdTime | timestamp}}</dd>\n <dt>In</dt>\n <dd><account-tag account="ctrl.serverGroup.account"></account-tag></dd>\n <dt>Region</dt>\n <dd>{{ctrl.serverGroup.region}}</dd>\n </dl>\n </collapsible-section>\n\n <collapsible-section heading="Size" expanded="true">\n <dl class="dl-horizontal dl-narrow" ng-if="ctrl.serverGroup.capacity.min === ctrl.serverGroup.capacity.max">\n <dt>Min/Max</dt>\n <dd>{{ctrl.serverGroup.capacity.min}}</dd>\n <dt>Current</dt>\n <dd>{{ctrl.serverGroup.instances.length}}</dd>\n </dl>\n <dl class="dl-horizontal dl-narrow" ng-if="ctrl.serverGroup.capacity.min !== ctrl.serverGroup.capacity.max">\n <dt>Min</dt>\n <dd>{{ctrl.serverGroup.capacity.min}}</dd>\n <dt>Max</dt>\n <dd>{{ctrl.serverGroup.capacity.max}}</dd>\n <dt>Current</dt>\n <dd>{{ctrl.serverGroup.instances.length}}</dd>\n </dl>\n </collapsible-section>\n <collapsible-section heading="Health" expanded="true">\n <dl class="dl-horizontal dl-narrow" ng-if="ctrl.serverGroup">\n <dt>Instances</dt>\n <dd>\n <health-counts container="ctrl.serverGroup.instanceCounts" class="pull-left"></health-counts>\n </dd>\n </dl>\n </collapsible-section>\n </div>\n</div>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("cloudrun/src/loadBalancer/configure/wizard/wizard.html",'<form name="form">\n <div ng-if="ctrl.state.loading && !ctrl.isNew" style="height: 200px" class="horizontal center middle">\n <loading-spinner size="\'small\'"></loading-spinner>\n </div>\n <v2-modal-wizard\n heading="{{::ctrl.heading}}"\n task-monitor="ctrl.taskMonitor"\n dismiss="$dismiss()"\n ng-if="!ctrl.state.loading || ctrl.isNew"\n >\n <div ng-if="!ctrl.isNew">\n <v2-wizard-page key="basic-settings" label="Basic Settings" mark-complete-on-view="false">\n <cloudrun-load-balancer-basic-settings\n load-balancer="ctrl.loadBalancer"\n application="ctrl.application"\n for-pipeline-config="ctrl.forPipelineConfig"\n ></cloudrun-load-balancer-basic-settings>\n </v2-wizard-page>\n </div>\n </v2-modal-wizard>\n <cloudrun-load-balancer-message\n ng-if="ctrl.isNew"\n column-offset="1"\n columns="10"\n show-create-message="true"\n ></cloudrun-load-balancer-message>\n <div class="modal-footer">\n <button class="btn btn-default" ng-click="ctrl.cancel()">Cancel</button>\n <submit-button\n ng-if="!ctrl.isNew && ctrl.showSubmitButton()"\n label="ctrl.submitButtonLabel"\n is-disabled="cloudrunLoadBalancerForm.$invalid || ctrl.taskMonitor.submitting || ctrl.state.loading"\n submitting="ctrl.taskMonitor.submitting"\n on-click="ctrl.submit()"\n is-new="ctrl.isNew"\n >\n </submit-button>\n </div>\n</form>\n')}]),window.angular.module("ng").run(["$templateCache",function(e){e.put("cloudrun/src/loadBalancer/details/details.html",'<div class="details-panel">\n <div ng-if="ctrl.state.loading" class="header">\n <div class="close-button">\n <a class="btn btn-link" ui-sref="^">\n <span class="glyphicon glyphicon-remove"></span>\n </a>\n </div>\n <div class="horizontal center middle">\n <loading-spinner size="\'small\'"></loading-spinner>\n </div>\n </div>\n\n <div ng-if="!ctrl.state.loading" class="header">\n <div class="close-button">\n <a class="btn btn-link" ui-sref="^">\n <span class="glyphicon glyphicon-remove"></span>\n </a>\n </div>\n <div class="header-text horizontal middle">\n <i class="fa icon-sitemap"></i>\n <h3 class="horizontal middle space-between flex-1" select-on-dbl-click>{{ctrl.loadBalancer.name}}</h3>\n </div>\n <div>\n <div class="actions">\n <div class="dropdown" uib-dropdown dropdown-append-to-body>\n <button type="button" class="btn btn-sm btn-primary dropdown-toggle" uib-dropdown-toggle>\n Load Balancer Actions <span class="caret"></span>\n </button>\n <ul class="dropdown-menu" uib-dropdown-menu role="menu">\n <li><a href ng-click="ctrl.editLoadBalancer()">Edit Load Balancer</a></li>\n <li ng-if="ctrl.canDeleteLoadBalancer()">\n <a href ng-click="ctrl.deleteLoadBalancer()">Delete Load Balancer</a>\n </li>\n <li\n ng-if="!ctrl.canDeleteLoadBalancer()"\n uib-tooltip="You cannot delete a default service."\n class="disabled"\n >\n <a href>Delete Load Balancer</a>\n </li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n\n <div ng-if="!ctrl.state.loading" class="content">\n <collapsible-section heading="Load Balancer Details" expanded="true">\n <dl class="dl-horizontal dl-narrow">\n <dt>In</dt>\n <dd><account-tag account="ctrl.loadBalancer.account" pad="right"></account-tag></dd>\n <dt>Region</dt>\n <dd>{{ctrl.loadBalancer.region}}</dd>\n <dt ng-if="ctrl.loadBalancer.serverGroups.length">Server Groups</dt>\n <dd ng-if="ctrl.loadBalancer.serverGroups.length">\n <ul>\n <li ng-repeat="serverGroup in ctrl.loadBalancer.serverGroups | orderBy: [\'isDisabled\', \'-name\']">\n <a\n ui-sref="^.serverGroup({region: serverGroup.region,\n accountId: serverGroup.account,\n serverGroup: serverGroup.name,\n provider: \'cloudrun\'})"\n >\n {{serverGroup.name}}\n </a>\n </li>\n </ul>\n </dd>\n </dl>\n </collapsible-section>\n <collapsible-section heading="Status" expanded="true">\n <health-counts class="pull-left" container="ctrl.loadBalancer.instanceCounts"></health-counts>\n </collapsible-section>\n <collapsible-section heading="Traffic Split" expanded="true">\n <dl class="dl-horizontal dl-narrow">\n <ul>\n <li ng-repeat="trafficTarget in ctrl.loadBalancer.split.trafficTargets">\n {{trafficTarget.revisionName}}:<span class="pull-right">{{trafficTarget.percent}}</span>\n </li>\n </ul>\n </dl>\n </collapsible-section>\n <collapsible-section heading="DNS" expanded="true">\n <dl class="dl-narrow">\n <cloudrun-component-url-details component="ctrl.loadBalancer"></cloudrun-component-url-details>\n </dl>\n </collapsible-section>\n </div>\n</div>\n')}]);export{De as CLOUDRUN_LOAD_BALANCER_DETAILS_CTRL,ye as CLOUDRUN_LOAD_BALANCER_TRANSFORMER,Ae as CLOUDRUN_LOAD_BALANCER_WIZARD_CTRL,mt as CLOUDRUN_MODULE,et as CLOUDRUN_SERVER_GROUP_COMMAND_BUILDER,ct as CLOUDRUN_SERVER_GROUP_DETAILS_CTRL,pt as CLOUDRUN_SERVER_GROUP_TRANSFORMER,ut as CloudrunDeployDescription,we as CloudrunLoadBalancerTransformer,Ce as CloudrunLoadBalancerUpsertDescription,Je as CloudrunServerGroupCommandBuilder,_e as CloudrunV2ServerGroupCommandBuilder,dt as CloudrunV2ServerGroupTransformer,He as ServerGroupSource};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|