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

+5 -1
View File
@@ -39,6 +39,8 @@ export interface DrawerProps {
onClose?: () => void;
toolbar?: React.ReactNode;
children?: SingleOrMany<React.ReactNode>;
"data-testid"?: string;
testIdForClose?: string;
}
const defaultProps = {
@@ -179,7 +181,7 @@ class NonInjectedDrawer extends React.Component<DrawerProps & Dependencies & typ
};
render() {
const { className, contentClass, animation, open, position, title, children, toolbar, size, usePortal } = this.props;
const { className, contentClass, animation, open, position, title, children, toolbar, size, usePortal, "data-testid": testId, testIdForClose } = this.props;
const { isCopied, width } = this.state;
const copyTooltip = isCopied ? "Copied!" : "Copy";
const copyIcon = isCopied ? "done" : "content_copy";
@@ -193,6 +195,7 @@ class NonInjectedDrawer extends React.Component<DrawerProps & Dependencies & typ
className={cssNames("Drawer", className, position)}
style={{ "--size": drawerSize } as React.CSSProperties}
ref={e => this.contentElem = e}
data-testid={testId}
>
<div className="drawer-wrapper flex column">
<div className="drawer-title flex align-center">
@@ -211,6 +214,7 @@ class NonInjectedDrawer extends React.Component<DrawerProps & Dependencies & typ
material="close"
tooltip="Close"
onClick={this.close}
data-testid={testIdForClose}
/>
</div>
<div