Fix opening of release details (#5850)

* Make sure release details are updates when opening details

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Relax filtering of resources to prevent crashing when release has installed resources in another namespace

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Add Open Closed Principle compliant way to introduce global overrides without modification in getDiForUnitTesting

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Rework helm release details to fix multiple bugs

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove redundant optional chaining

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Simplify code

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen authored and GitHub committed 2022-07-26 14:57:46 +03:00
1 parent e7e8d1688c
commit bedc440d42
37 files changed
+17798 -566

No files matched your search

@@ -60,6 +60,8 @@ export interface ItemListLayoutContentProps<Item extends ItemObject, PreLoadStor
// other
customizeRemoveDialog?: (selectedItems: Item[]) => Partial<ConfirmDialogParams>;
spinnerTestId?: string;
/**
* Message to display when a store failed to load
*
@@ -221,7 +223,7 @@ class NonInjectedItemListLayoutContent<
}
if (!this.props.getIsReady()) {
return <Spinner center />;
return <Spinner center data-testid={this.props.spinnerTestId} />;
}
if (this.props.getFilters().length > 0) {
@@ -121,6 +121,8 @@ export type ItemListLayoutProps<Item extends ItemObject, PreLoadStores extends b
customizeRemoveDialog?: (selectedItems: Item[]) => Partial<ConfirmDialogParams>;
renderFooter?: (parent: NonInjectedItemListLayout<Item, PreLoadStores>) => React.ReactNode;
spinnerTestId?: string;
/**
* Message to display when a store failed to load
*
@@ -321,6 +323,7 @@ class NonInjectedItemListLayout<I extends ItemObject, PreLoadStores extends bool
onDetails={this.props.onDetails}
customizeRemoveDialog={this.props.customizeRemoveDialog}
failedToLoadMessage={this.props.failedToLoadMessage}
spinnerTestId={this.props.spinnerTestId}
/>
{this.props.renderFooter?.(this)}