mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix show details and updating helm releases tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
042b679ca6
commit
d249c4c679
@ -2131,7 +2131,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
1.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -2212,7 +2212,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
2.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -3042,7 +3042,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
1.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -3123,7 +3123,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
2.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -4014,7 +4014,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
1.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -4095,7 +4095,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
2.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -4986,7 +4986,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
1.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -5067,7 +5067,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
2.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -5365,7 +5365,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
class="flex gaps align-center"
|
class="flex gaps align-center"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
some-chart
|
some-chart-1.0.0
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
class="Button box right upgrade primary"
|
class="Button box right upgrade primary"
|
||||||
@ -5419,7 +5419,9 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="version flex gaps align-center"
|
class="version flex gaps align-center"
|
||||||
>
|
>
|
||||||
<span />
|
<span>
|
||||||
|
1.0.0
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -6210,7 +6212,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
1.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -6291,7 +6293,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
2.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -6589,7 +6591,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
class="flex gaps align-center"
|
class="flex gaps align-center"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
some-chart
|
some-chart-1.0.0
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
class="Button box right upgrade primary"
|
class="Button box right upgrade primary"
|
||||||
@ -6643,7 +6645,9 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="version flex gaps align-center"
|
class="version flex gaps align-center"
|
||||||
>
|
>
|
||||||
<span />
|
<span>
|
||||||
|
1.0.0
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -7434,7 +7438,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
1.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -7515,7 +7519,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
2.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -7813,7 +7817,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
class="flex gaps align-center"
|
class="flex gaps align-center"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
some-chart
|
some-chart-1.0.0
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
class="Button box right upgrade primary"
|
class="Button box right upgrade primary"
|
||||||
@ -7867,7 +7871,9 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="version flex gaps align-center"
|
class="version flex gaps align-center"
|
||||||
>
|
>
|
||||||
<span />
|
<span>
|
||||||
|
1.0.0
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -8008,7 +8014,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
</body>
|
</body>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`showing details for helm release given application is started when navigating to helm releases when releases resolve when selecting release to see details when call for release resolve with release when configuration resolves when changing the configuration when saving when update resolves with failure renders 1`] = `
|
exports[`showing details for helm release given application is started when navigating to helm releases when releases resolve when selecting release to see details when call for release resolve with release when configuration resolves when changing the configuration when saving when requestHelmCharts resolves when requestHelmChartVersions resolves when update resolves with failure renders 1`] = `
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
@ -8864,7 +8870,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
class="flex gaps align-center"
|
class="flex gaps align-center"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
some-chart
|
some-chart-1.0.0
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
class="Button box right upgrade primary"
|
class="Button box right upgrade primary"
|
||||||
@ -8918,7 +8924,9 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="version flex gaps align-center"
|
class="version flex gaps align-center"
|
||||||
>
|
>
|
||||||
<span />
|
<span>
|
||||||
|
1.0.0
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -9059,7 +9067,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
</body>
|
</body>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`showing details for helm release given application is started when navigating to helm releases when releases resolve when selecting release to see details when call for release resolve with release when configuration resolves when changing the configuration when saving when update resolves with success renders 1`] = `
|
exports[`showing details for helm release given application is started when navigating to helm releases when releases resolve when selecting release to see details when call for release resolve with release when configuration resolves when changing the configuration when saving when requestHelmCharts resolves when requestHelmChartVersions resolves when update resolves with success renders 1`] = `
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
@ -9915,7 +9923,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
class="flex gaps align-center"
|
class="flex gaps align-center"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
some-chart
|
some-chart-1.0.0
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
class="Button box right upgrade primary"
|
class="Button box right upgrade primary"
|
||||||
@ -9969,7 +9977,9 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="version flex gaps align-center"
|
class="version flex gaps align-center"
|
||||||
>
|
>
|
||||||
<span />
|
<span>
|
||||||
|
1.0.0
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -10762,7 +10772,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
1.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -10843,7 +10853,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
2.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -11141,7 +11151,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
class="flex gaps align-center"
|
class="flex gaps align-center"
|
||||||
>
|
>
|
||||||
<span>
|
<span>
|
||||||
some-chart
|
some-chart-1.0.0
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
class="Button box right upgrade primary"
|
class="Button box right upgrade primary"
|
||||||
@ -11195,7 +11205,9 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="version flex gaps align-center"
|
class="version flex gaps align-center"
|
||||||
>
|
>
|
||||||
<span />
|
<span>
|
||||||
|
1.0.0
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -11986,7 +11998,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
1.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -12067,7 +12079,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
2.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -12295,147 +12307,8 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
style="flex-basis: 300px;"
|
style="flex-basis: 300px;"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="UpgradeChart flex column"
|
class="Spinner singleColor center"
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="InfoPanel flex gaps align-center"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="controls"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="upgrade flex gaps align-center"
|
|
||||||
>
|
|
||||||
<span>
|
|
||||||
Release
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="badge"
|
|
||||||
>
|
|
||||||
some-name
|
|
||||||
</div>
|
|
||||||
<span>
|
|
||||||
Namespace
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="badge"
|
|
||||||
>
|
|
||||||
some-namespace
|
|
||||||
</div>
|
|
||||||
<span>
|
|
||||||
Version
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="badge"
|
|
||||||
/>
|
/>
|
||||||
<span>
|
|
||||||
Upgrade version
|
|
||||||
</span>
|
|
||||||
<div
|
|
||||||
class="Select theme-outlined chart-version css-b62m3t-container"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="css-1f43avz-a11yText-A11yText"
|
|
||||||
id="react-select-char-version-input-live-region"
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
aria-atomic="false"
|
|
||||||
aria-live="polite"
|
|
||||||
aria-relevant="additions text"
|
|
||||||
class="css-1f43avz-a11yText-A11yText"
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
class="Select__control css-1s2u09g-control"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="Select__value-container css-319lph-ValueContainer"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="Select__placeholder css-14el2xx-placeholder"
|
|
||||||
id="react-select-char-version-input-placeholder"
|
|
||||||
>
|
|
||||||
Select...
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="Select__input-container css-6j8wv5-Input"
|
|
||||||
data-value=""
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
aria-autocomplete="list"
|
|
||||||
aria-describedby="react-select-char-version-input-placeholder"
|
|
||||||
aria-expanded="false"
|
|
||||||
aria-haspopup="true"
|
|
||||||
autocapitalize="none"
|
|
||||||
autocomplete="off"
|
|
||||||
autocorrect="off"
|
|
||||||
class="Select__input"
|
|
||||||
id="char-version-input"
|
|
||||||
role="combobox"
|
|
||||||
spellcheck="false"
|
|
||||||
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
|
|
||||||
tabindex="0"
|
|
||||||
type="text"
|
|
||||||
value=""
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="Select__indicators css-1hb7zxy-IndicatorsContainer"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
class="Select__indicator-separator css-1okebmr-indicatorSeparator"
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
aria-hidden="true"
|
|
||||||
class="Select__indicator Select__dropdown-indicator css-tlfecz-indicatorContainer"
|
|
||||||
>
|
|
||||||
<svg
|
|
||||||
aria-hidden="true"
|
|
||||||
class="css-tj5bde-Svg"
|
|
||||||
focusable="false"
|
|
||||||
height="20"
|
|
||||||
viewBox="0 0 20 20"
|
|
||||||
width="20"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
class="flex gaps align-center"
|
|
||||||
/>
|
|
||||||
<button
|
|
||||||
class="Button plain"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="Button active outlined"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
Upgrade
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
class="Button primary active"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
Upgrade & Close
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<textarea
|
|
||||||
data-testid="monaco-editor-for-some-tab-id"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -13094,7 +12967,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
1.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -13175,7 +13048,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
2.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -14069,7 +13942,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
1.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -14150,7 +14023,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
2.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -14980,7 +14853,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
1.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -15061,7 +14934,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
2.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -15952,7 +15825,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
1.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
@ -16033,7 +15906,7 @@ exports[`showing details for helm release given application is started when navi
|
|||||||
<div
|
<div
|
||||||
class="TableCell version"
|
class="TableCell version"
|
||||||
>
|
>
|
||||||
|
2.0.0
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="TableCell app-version"
|
class="TableCell app-version"
|
||||||
|
|||||||
@ -18,8 +18,8 @@ import requestHelmReleaseConfigurationInjectable from "../../common/k8s-api/endp
|
|||||||
import type { RequestHelmReleaseUpdate } from "../../common/k8s-api/endpoints/helm-releases.api/update.injectable";
|
import type { RequestHelmReleaseUpdate } from "../../common/k8s-api/endpoints/helm-releases.api/update.injectable";
|
||||||
import requestHelmReleaseUpdateInjectable from "../../common/k8s-api/endpoints/helm-releases.api/update.injectable";
|
import requestHelmReleaseUpdateInjectable from "../../common/k8s-api/endpoints/helm-releases.api/update.injectable";
|
||||||
import { useFakeTime } from "../../common/test-utils/use-fake-time";
|
import { useFakeTime } from "../../common/test-utils/use-fake-time";
|
||||||
import type { RequestHelmRelease, DetailedHelmRelease } from "../../renderer/components/+helm-releases/release-details/release-details-model/request-helm-release.injectable";
|
import type { RequestDetailedHelmRelease } from "../../renderer/components/+helm-releases/release-details/release-details-model/request-detailed-helm-release.injectable";
|
||||||
import requestHelmReleaseInjectable from "../../renderer/components/+helm-releases/release-details/release-details-model/request-helm-release.injectable";
|
import requestDetailedHelmReleaseInjectable from "../../renderer/components/+helm-releases/release-details/release-details-model/request-detailed-helm-release.injectable";
|
||||||
import showSuccessNotificationInjectable from "../../renderer/components/notifications/show-success-notification.injectable";
|
import showSuccessNotificationInjectable from "../../renderer/components/notifications/show-success-notification.injectable";
|
||||||
import showCheckedErrorInjectable from "../../renderer/components/notifications/show-checked-error.injectable";
|
import showCheckedErrorInjectable from "../../renderer/components/notifications/show-checked-error.injectable";
|
||||||
import getRandomUpgradeChartTabIdInjectable from "../../renderer/components/dock/upgrade-chart/get-random-upgrade-chart-tab-id.injectable";
|
import getRandomUpgradeChartTabIdInjectable from "../../renderer/components/dock/upgrade-chart/get-random-upgrade-chart-tab-id.injectable";
|
||||||
@ -31,11 +31,12 @@ import requestHelmChartsInjectable from "../../common/k8s-api/endpoints/helm-cha
|
|||||||
import requestHelmChartVersionsInjectable from "../../common/k8s-api/endpoints/helm-charts.api/get-versions.injectable";
|
import requestHelmChartVersionsInjectable from "../../common/k8s-api/endpoints/helm-charts.api/get-versions.injectable";
|
||||||
import requestHelmChartReadmeInjectable from "../../common/k8s-api/endpoints/helm-charts.api/get-readme.injectable";
|
import requestHelmChartReadmeInjectable from "../../common/k8s-api/endpoints/helm-charts.api/get-readme.injectable";
|
||||||
import requestHelmChartValuesInjectable from "../../common/k8s-api/endpoints/helm-charts.api/get-values.injectable";
|
import requestHelmChartValuesInjectable from "../../common/k8s-api/endpoints/helm-charts.api/get-values.injectable";
|
||||||
|
import { HelmChart } from "../../common/k8s-api/endpoints/helm-charts.api";
|
||||||
|
|
||||||
describe("showing details for helm release", () => {
|
describe("showing details for helm release", () => {
|
||||||
let builder: ApplicationBuilder;
|
let builder: ApplicationBuilder;
|
||||||
let requestHelmReleasesMock: AsyncFnMock<RequestHelmReleases>;
|
let requestHelmReleasesMock: AsyncFnMock<RequestHelmReleases>;
|
||||||
let requestHelmReleaseMock: AsyncFnMock<RequestHelmRelease>;
|
let requestDetailedHelmReleaseMock: AsyncFnMock<RequestDetailedHelmRelease>;
|
||||||
let requestHelmReleaseConfigurationMock: AsyncFnMock<RequestHelmReleaseConfiguration>;
|
let requestHelmReleaseConfigurationMock: AsyncFnMock<RequestHelmReleaseConfiguration>;
|
||||||
let requestHelmReleaseUpdateMock: AsyncFnMock<RequestHelmReleaseUpdate>;
|
let requestHelmReleaseUpdateMock: AsyncFnMock<RequestHelmReleaseUpdate>;
|
||||||
let requestHelmChartsMock: AsyncFnMock<RequestHelmCharts>;
|
let requestHelmChartsMock: AsyncFnMock<RequestHelmCharts>;
|
||||||
@ -53,7 +54,7 @@ describe("showing details for helm release", () => {
|
|||||||
builder.setEnvironmentToClusterFrame();
|
builder.setEnvironmentToClusterFrame();
|
||||||
|
|
||||||
requestHelmReleasesMock = asyncFn();
|
requestHelmReleasesMock = asyncFn();
|
||||||
requestHelmReleaseMock = asyncFn();
|
requestDetailedHelmReleaseMock = asyncFn();
|
||||||
requestHelmReleaseConfigurationMock = asyncFn();
|
requestHelmReleaseConfigurationMock = asyncFn();
|
||||||
requestHelmReleaseUpdateMock = asyncFn();
|
requestHelmReleaseUpdateMock = asyncFn();
|
||||||
requestHelmChartsMock = asyncFn();
|
requestHelmChartsMock = asyncFn();
|
||||||
@ -69,7 +70,7 @@ describe("showing details for helm release", () => {
|
|||||||
windowDi.override(showSuccessNotificationInjectable, () => showSuccessNotificationMock);
|
windowDi.override(showSuccessNotificationInjectable, () => showSuccessNotificationMock);
|
||||||
windowDi.override(showCheckedErrorInjectable, () => showCheckedErrorNotificationMock);
|
windowDi.override(showCheckedErrorInjectable, () => showCheckedErrorNotificationMock);
|
||||||
windowDi.override(requestHelmReleasesInjectable, () => requestHelmReleasesMock);
|
windowDi.override(requestHelmReleasesInjectable, () => requestHelmReleasesMock);
|
||||||
windowDi.override(requestHelmReleaseInjectable, () => requestHelmReleaseMock);
|
windowDi.override(requestDetailedHelmReleaseInjectable, () => requestDetailedHelmReleaseMock);
|
||||||
windowDi.override(requestHelmReleaseConfigurationInjectable, () => requestHelmReleaseConfigurationMock);
|
windowDi.override(requestHelmReleaseConfigurationInjectable, () => requestHelmReleaseConfigurationMock);
|
||||||
windowDi.override(requestHelmReleaseUpdateInjectable, () => requestHelmReleaseUpdateMock);
|
windowDi.override(requestHelmReleaseUpdateInjectable, () => requestHelmReleaseUpdateMock);
|
||||||
windowDi.override(requestHelmChartsInjectable, () => requestHelmChartsMock);
|
windowDi.override(requestHelmChartsInjectable, () => requestHelmChartsMock);
|
||||||
@ -139,7 +140,7 @@ describe("showing details for helm release", () => {
|
|||||||
appVersion: "some-app-version",
|
appVersion: "some-app-version",
|
||||||
name: "some-name",
|
name: "some-name",
|
||||||
namespace: "some-namespace",
|
namespace: "some-namespace",
|
||||||
chart: "some-chart",
|
chart: "some-chart-1.0.0",
|
||||||
status: "some-status",
|
status: "some-status",
|
||||||
updated: "some-updated",
|
updated: "some-updated",
|
||||||
revision: "some-revision",
|
revision: "some-revision",
|
||||||
@ -154,7 +155,7 @@ describe("showing details for helm release", () => {
|
|||||||
appVersion: "some-other-app-version",
|
appVersion: "some-other-app-version",
|
||||||
name: "some-other-name",
|
name: "some-other-name",
|
||||||
namespace: "some-other-namespace",
|
namespace: "some-other-namespace",
|
||||||
chart: "some-other-chart",
|
chart: "some-other-chart-2.0.0",
|
||||||
status: "some-other-status",
|
status: "some-other-status",
|
||||||
updated: "some-other-updated",
|
updated: "some-other-updated",
|
||||||
revision: "some-other-revision",
|
revision: "some-other-revision",
|
||||||
@ -193,7 +194,7 @@ describe("showing details for helm release", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("calls for release", () => {
|
it("calls for release", () => {
|
||||||
expect(requestHelmReleaseMock).toHaveBeenCalledWith(
|
expect(requestDetailedHelmReleaseMock).toHaveBeenCalledWith(
|
||||||
"some-name",
|
"some-name",
|
||||||
"some-namespace",
|
"some-namespace",
|
||||||
);
|
);
|
||||||
@ -207,7 +208,7 @@ describe("showing details for helm release", () => {
|
|||||||
|
|
||||||
describe("when opening details for second release", () => {
|
describe("when opening details for second release", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
requestHelmReleaseMock.mockClear();
|
requestDetailedHelmReleaseMock.mockClear();
|
||||||
|
|
||||||
const row = rendered.getByTestId(
|
const row = rendered.getByTestId(
|
||||||
"helm-release-row-for-some-other-namespace/some-other-name",
|
"helm-release-row-for-some-other-namespace/some-other-name",
|
||||||
@ -221,7 +222,7 @@ describe("showing details for helm release", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("calls for another release", () => {
|
it("calls for another release", () => {
|
||||||
expect(requestHelmReleaseMock).toHaveBeenCalledWith(
|
expect(requestDetailedHelmReleaseMock).toHaveBeenCalledWith(
|
||||||
"some-other-name",
|
"some-other-name",
|
||||||
"some-other-namespace",
|
"some-other-namespace",
|
||||||
);
|
);
|
||||||
@ -261,7 +262,7 @@ describe("showing details for helm release", () => {
|
|||||||
|
|
||||||
describe("when opening details for same release", () => {
|
describe("when opening details for same release", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
requestHelmReleaseMock.mockClear();
|
requestDetailedHelmReleaseMock.mockClear();
|
||||||
|
|
||||||
const row = rendered.getByTestId(
|
const row = rendered.getByTestId(
|
||||||
"helm-release-row-for-some-namespace/some-name",
|
"helm-release-row-for-some-namespace/some-name",
|
||||||
@ -275,15 +276,14 @@ describe("showing details for helm release", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("does not reload", () => {
|
it("does not reload", () => {
|
||||||
expect(requestHelmReleaseMock).not.toHaveBeenCalled();
|
expect(requestDetailedHelmReleaseMock).not.toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
describe("when call for release resolves with error", () => {
|
describe("when call for release resolves with error", () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await requestHelmReleaseMock.resolve({
|
await requestDetailedHelmReleaseMock.resolve({
|
||||||
callWasSuccessful: false,
|
callWasSuccessful: false,
|
||||||
error: "some-error",
|
error: "some-error",
|
||||||
});
|
});
|
||||||
@ -312,9 +312,49 @@ describe("showing details for helm release", () => {
|
|||||||
|
|
||||||
describe("when call for release resolve with release", () => {
|
describe("when call for release resolve with release", () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await requestHelmReleaseMock.resolve({
|
await requestDetailedHelmReleaseMock.resolve({
|
||||||
callWasSuccessful: true,
|
callWasSuccessful: true,
|
||||||
response: detailedReleaseFake,
|
response: {
|
||||||
|
release: {
|
||||||
|
appVersion: "some-app-version",
|
||||||
|
chart: "some-chart-1.0.0",
|
||||||
|
status: "some-status",
|
||||||
|
updated: "some-updated",
|
||||||
|
revision: "some-revision",
|
||||||
|
name: "some-name",
|
||||||
|
namespace: "some-namespace",
|
||||||
|
},
|
||||||
|
|
||||||
|
details: {
|
||||||
|
name: "some-name",
|
||||||
|
namespace: "some-namespace",
|
||||||
|
version: "some-version",
|
||||||
|
config: "some-config",
|
||||||
|
manifest: "some-manifest",
|
||||||
|
|
||||||
|
info: {
|
||||||
|
deleted: "some-deleted",
|
||||||
|
description: "some-description",
|
||||||
|
first_deployed: "some-first-deployed",
|
||||||
|
last_deployed: "some-last-deployed",
|
||||||
|
notes: "some-notes",
|
||||||
|
status: "some-status",
|
||||||
|
},
|
||||||
|
|
||||||
|
resources: [
|
||||||
|
{
|
||||||
|
kind: "some-kind",
|
||||||
|
apiVersion: "some-api-version",
|
||||||
|
metadata: {
|
||||||
|
uid: "some-uid",
|
||||||
|
name: "some-resource",
|
||||||
|
namespace: "some-namespace",
|
||||||
|
creationTimestamp: "2015-10-22T07:28:00Z",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -477,7 +517,26 @@ describe("showing details for helm release", () => {
|
|||||||
expect(saveButton).toHaveClass("waiting");
|
expect(saveButton).toHaveClass("waiting");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe("when requestHelmCharts resolves", () => {
|
||||||
|
beforeEach(async () => {
|
||||||
|
await requestHelmChartsMock.resolve([HelmChart.create({
|
||||||
|
apiVersion: "1.2.3",
|
||||||
|
version: "1.0.0",
|
||||||
|
created: "at-some-time",
|
||||||
|
name: "some-chart",
|
||||||
|
repo: "some-repo",
|
||||||
|
})]);
|
||||||
|
});
|
||||||
|
describe("when requestHelmChartVersions resolves", () => {
|
||||||
|
beforeEach(async () => {
|
||||||
|
await requestHelmChartVersionsMock.resolve([HelmChart.create({
|
||||||
|
apiVersion: "1.2.3",
|
||||||
|
version: "1.0.0",
|
||||||
|
created: "at-some-time",
|
||||||
|
name: "some-chart",
|
||||||
|
repo: "some-repo",
|
||||||
|
})]);
|
||||||
|
});
|
||||||
|
|
||||||
it("calls for update", () => {
|
it("calls for update", () => {
|
||||||
expect(requestHelmReleaseUpdateMock).toHaveBeenCalledWith(
|
expect(requestHelmReleaseUpdateMock).toHaveBeenCalledWith(
|
||||||
@ -486,9 +545,9 @@ describe("showing details for helm release", () => {
|
|||||||
|
|
||||||
{
|
{
|
||||||
chart: "some-chart",
|
chart: "some-chart",
|
||||||
repo: "",
|
repo: "some-repo",
|
||||||
values: "some-new-configuration",
|
values: "some-new-configuration",
|
||||||
version: "",
|
version: "1.0.0",
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -575,46 +634,6 @@ describe("showing details for helm release", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const detailedReleaseFake: DetailedHelmRelease = {
|
|
||||||
release: {
|
|
||||||
appVersion: "some-app-version",
|
|
||||||
chart: "some-chart",
|
|
||||||
status: "some-status",
|
|
||||||
updated: "some-updated",
|
|
||||||
revision: "some-revision",
|
|
||||||
name: "some-name",
|
|
||||||
namespace: "some-namespace",
|
|
||||||
},
|
|
||||||
|
|
||||||
details: {
|
|
||||||
name: "some-name",
|
|
||||||
namespace: "some-namespace",
|
|
||||||
version: "some-version",
|
|
||||||
config: "some-config",
|
|
||||||
manifest: "some-manifest",
|
|
||||||
|
|
||||||
info: {
|
|
||||||
deleted: "some-deleted",
|
|
||||||
description: "some-description",
|
|
||||||
first_deployed: "some-first-deployed",
|
|
||||||
last_deployed: "some-last-deployed",
|
|
||||||
notes: "some-notes",
|
|
||||||
status: "some-status",
|
|
||||||
},
|
|
||||||
|
|
||||||
resources: [
|
|
||||||
{
|
|
||||||
kind: "some-kind",
|
|
||||||
apiVersion: "some-api-version",
|
|
||||||
metadata: {
|
|
||||||
uid: "some-uid",
|
|
||||||
name: "some-resource",
|
|
||||||
namespace: "some-namespace",
|
|
||||||
creationTimestamp: "2015-10-22T07:28:00Z",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
||||||
import { asyncComputed } from "@ogre-tools/injectable-react";
|
import { asyncComputed } from "@ogre-tools/injectable-react";
|
||||||
|
import { when } from "mobx";
|
||||||
import { coerce } from "semver";
|
import { coerce } from "semver";
|
||||||
import requestHelmChartVersionsInjectable from "../../../../common/k8s-api/endpoints/helm-charts.api/get-versions.injectable";
|
import requestHelmChartVersionsInjectable from "../../../../common/k8s-api/endpoints/helm-charts.api/get-versions.injectable";
|
||||||
import type { HelmRelease } from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
import type { HelmRelease } from "../../../../common/k8s-api/endpoints/helm-releases.api";
|
||||||
@ -29,6 +30,7 @@ const helmChartVersionsInjectable = getInjectable({
|
|||||||
const helmCharts = di.inject(helmChartsInjectable);
|
const helmCharts = di.inject(helmChartsInjectable);
|
||||||
|
|
||||||
return asyncComputed(async () => {
|
return asyncComputed(async () => {
|
||||||
|
await when(() => !helmCharts.pending.get());
|
||||||
const rawVersions = await Promise.all((
|
const rawVersions = await Promise.all((
|
||||||
helmCharts.value.get()
|
helmCharts.value.get()
|
||||||
.filter(chart => chart.getName() === release.getChart())
|
.filter(chart => chart.getName() === release.getChart())
|
||||||
|
|||||||
@ -6,8 +6,8 @@ import { getInjectable, lifecycleEnum } from "@ogre-tools/injectable";
|
|||||||
import type { IComputedValue, IObservableValue } from "mobx";
|
import type { IComputedValue, IObservableValue } from "mobx";
|
||||||
import { runInAction, action, observable, computed } from "mobx";
|
import { runInAction, action, observable, computed } from "mobx";
|
||||||
import type { TargetHelmRelease } from "../target-helm-release.injectable";
|
import type { TargetHelmRelease } from "../target-helm-release.injectable";
|
||||||
import type { RequestHelmRelease, DetailedHelmRelease } from "./request-helm-release.injectable";
|
import type { RequestDetailedHelmRelease, DetailedHelmRelease } from "./request-detailed-helm-release.injectable";
|
||||||
import requestHelmReleaseInjectable from "./request-helm-release.injectable";
|
import requestDetailedHelmReleaseInjectable from "./request-detailed-helm-release.injectable";
|
||||||
import type { LensTheme } from "../../../../themes/store";
|
import type { LensTheme } from "../../../../themes/store";
|
||||||
import type { RequestHelmReleaseConfiguration } from "../../../../../common/k8s-api/endpoints/helm-releases.api/get-configuration.injectable";
|
import type { RequestHelmReleaseConfiguration } from "../../../../../common/k8s-api/endpoints/helm-releases.api/get-configuration.injectable";
|
||||||
import requestHelmReleaseConfigurationInjectable from "../../../../../common/k8s-api/endpoints/helm-releases.api/get-configuration.injectable";
|
import requestHelmReleaseConfigurationInjectable from "../../../../../common/k8s-api/endpoints/helm-releases.api/get-configuration.injectable";
|
||||||
@ -37,7 +37,7 @@ const releaseDetailsModelInjectable = getInjectable({
|
|||||||
|
|
||||||
instantiate: async (di, targetRelease: TargetHelmRelease) => {
|
instantiate: async (di, targetRelease: TargetHelmRelease) => {
|
||||||
const model = new ReleaseDetailsModel({
|
const model = new ReleaseDetailsModel({
|
||||||
requestHelmRelease: di.inject(requestHelmReleaseInjectable),
|
requestDetailedHelmRelease: di.inject(requestDetailedHelmReleaseInjectable),
|
||||||
targetRelease,
|
targetRelease,
|
||||||
activeTheme: di.inject(activeThemeInjectable),
|
activeTheme: di.inject(activeThemeInjectable),
|
||||||
requestHelmReleaseConfiguration: di.inject(requestHelmReleaseConfigurationInjectable),
|
requestHelmReleaseConfiguration: di.inject(requestHelmReleaseConfigurationInjectable),
|
||||||
@ -78,7 +78,7 @@ export interface ConfigurationInput {
|
|||||||
interface Dependencies {
|
interface Dependencies {
|
||||||
readonly targetRelease: TargetHelmRelease;
|
readonly targetRelease: TargetHelmRelease;
|
||||||
readonly activeTheme: IComputedValue<LensTheme>;
|
readonly activeTheme: IComputedValue<LensTheme>;
|
||||||
requestHelmRelease: RequestHelmRelease;
|
requestDetailedHelmRelease: RequestDetailedHelmRelease;
|
||||||
requestHelmReleaseConfiguration: RequestHelmReleaseConfiguration;
|
requestHelmReleaseConfiguration: RequestHelmReleaseConfiguration;
|
||||||
getResourceDetailsUrl: GetResourceDetailsUrl;
|
getResourceDetailsUrl: GetResourceDetailsUrl;
|
||||||
updateRelease: RequestHelmReleaseUpdate;
|
updateRelease: RequestHelmReleaseUpdate;
|
||||||
@ -165,7 +165,7 @@ export class ReleaseDetailsModel {
|
|||||||
load = async () => {
|
load = async () => {
|
||||||
const { name, namespace } = this.dependencies.targetRelease;
|
const { name, namespace } = this.dependencies.targetRelease;
|
||||||
|
|
||||||
const result = await this.dependencies.requestHelmRelease(
|
const result = await this.dependencies.requestDetailedHelmRelease(
|
||||||
name,
|
name,
|
||||||
namespace,
|
namespace,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -14,15 +14,15 @@ export interface DetailedHelmRelease {
|
|||||||
details: HelmReleaseDetails;
|
details: HelmReleaseDetails;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type RequestHelmRelease = (
|
export type RequestDetailedHelmRelease = (
|
||||||
name: string,
|
name: string,
|
||||||
namespace: string
|
namespace: string
|
||||||
) => Promise<AsyncResult<DetailedHelmRelease>>;
|
) => Promise<AsyncResult<DetailedHelmRelease>>;
|
||||||
|
|
||||||
const requestHelmReleaseInjectable = getInjectable({
|
const requestDetailedHelmReleaseInjectable = getInjectable({
|
||||||
id: "call-for-helm-release",
|
id: "request-detailed-helm-release",
|
||||||
|
|
||||||
instantiate: (di): RequestHelmRelease => {
|
instantiate: (di): RequestDetailedHelmRelease => {
|
||||||
const requestHelmReleases = di.inject(requestHelmReleasesInjectable);
|
const requestHelmReleases = di.inject(requestHelmReleasesInjectable);
|
||||||
const requestHelmReleaseDetails = di.inject(requestHelmReleaseDetailsInjectable);
|
const requestHelmReleaseDetails = di.inject(requestHelmReleaseDetailsInjectable);
|
||||||
|
|
||||||
@ -48,4 +48,4 @@ const requestHelmReleaseInjectable = getInjectable({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export default requestHelmReleaseInjectable;
|
export default requestDetailedHelmReleaseInjectable;
|
||||||
@ -73,13 +73,14 @@ const toHelmReleaseInjectable = getInjectable({
|
|||||||
// so we have to try to guess it by searching charts
|
// so we have to try to guess it by searching charts
|
||||||
async getRepo() {
|
async getRepo() {
|
||||||
const versionsComputed = helmChartVersions(this);
|
const versionsComputed = helmChartVersions(this);
|
||||||
|
const version = this.getVersion();
|
||||||
|
|
||||||
await when(() => !versionsComputed.pending.get());
|
await when(() => !versionsComputed.pending.get());
|
||||||
|
|
||||||
const version = this.getVersion();
|
return versionsComputed.value
|
||||||
const versions = versionsComputed.value.get();
|
.get()
|
||||||
|
.find((chartVersion) => chartVersion.version === version)?.repo
|
||||||
return versions.find((chartVersion) => chartVersion.version === version)?.repo ?? "";
|
?? "";
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -68,9 +68,11 @@ const upgradeChartModelInjectable = getInjectable({
|
|||||||
error: computed(() => configrationEditError.get()),
|
error: computed(() => configrationEditError.get()),
|
||||||
setError: action((error) => configrationEditError.set(String(error))),
|
setError: action((error) => configrationEditError.set(String(error))),
|
||||||
};
|
};
|
||||||
const versionValue = observable.box<ChartVersion | undefined>(versions.value.get()[0]);
|
const versionValue = observable.box<ChartVersion>(undefined, {
|
||||||
|
deep: false,
|
||||||
|
});
|
||||||
const version: UpgradeChartModel["version"] = {
|
const version: UpgradeChartModel["version"] = {
|
||||||
value: computed(() => versionValue.get()),
|
value: computed(() => versionValue.get() ?? versions.value.get()[0]),
|
||||||
set: action((option) => versionValue.set(option?.value)),
|
set: action((option) => versionValue.set(option?.value)),
|
||||||
};
|
};
|
||||||
const versionOptions = computed(() => (
|
const versionOptions = computed(() => (
|
||||||
@ -88,9 +90,9 @@ const upgradeChartModelInjectable = getInjectable({
|
|||||||
configration,
|
configration,
|
||||||
version,
|
version,
|
||||||
submit: async () => {
|
submit: async () => {
|
||||||
const version = versionValue.get();
|
const selectedVersion = version.value.get();
|
||||||
|
|
||||||
if (!version || configrationEditError.get()) {
|
if (!selectedVersion || configrationEditError.get()) {
|
||||||
return {
|
return {
|
||||||
completedSuccessfully: false,
|
completedSuccessfully: false,
|
||||||
};
|
};
|
||||||
@ -102,7 +104,7 @@ const upgradeChartModelInjectable = getInjectable({
|
|||||||
{
|
{
|
||||||
chart: release.getChart(),
|
chart: release.getChart(),
|
||||||
values: configration.value.get(),
|
values: configration.value.get(),
|
||||||
...version,
|
...selectedVersion,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
storedConfigration.invalidate();
|
storedConfigration.invalidate();
|
||||||
|
|||||||
@ -80,7 +80,7 @@ export class NonInjectedUpgradeChart extends React.Component<UpgradeChartProps &
|
|||||||
<Badge label={release.getNs()} />
|
<Badge label={release.getNs()} />
|
||||||
<span>Version</span>
|
<span>Version</span>
|
||||||
{" "}
|
{" "}
|
||||||
<Badge label={model.version.value.get()} />
|
<Badge label={release.getVersion()} />
|
||||||
<span>Upgrade version</span>
|
<span>Upgrade version</span>
|
||||||
<Select<ChartVersion, SelectOption<ChartVersion>, false>
|
<Select<ChartVersion, SelectOption<ChartVersion>, false>
|
||||||
id="char-version-input"
|
id="char-version-input"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user