Skip to content

Commit

Permalink
Hide commands to download application archive in embedded cluster (#4839
Browse files Browse the repository at this point in the history
)
  • Loading branch information
miaawong authored Aug 22, 2024
1 parent a0d1a56 commit 22ee54a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
8 changes: 7 additions & 1 deletion web/src/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,13 @@ const Root = () => {
/>
<Route
path=":slug/tree/:sequence?"
element={<DownstreamTree />}
element={
<DownstreamTree
isEmbeddedCluster={Boolean(
state.adminConsoleMetadata?.isEmbeddedCluster
)}
/>
}
/>

<Route
Expand Down
23 changes: 13 additions & 10 deletions web/src/components/tree/KotsApplicationTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type Props = {
appName: string;
appNameSpace: string;
};
isEmbeddedCluster: boolean;
};

type State = {
Expand Down Expand Up @@ -114,16 +115,18 @@ class KotsApplicationTree extends Component<Props, State> {
return (
<div className="flex-column flex1 ApplicationTree--wrapper u-paddingBottom--30">
<KotsPageTitle pageName="View Files" showAppSlug />
<div className="edit-files-banner u-fontSize--small u-fontWeight--medium">
Need to edit these files?{" "}
<span
onClick={this.toggleInstructionsModal}
className="u-fontWeight--bold u-cursor--pointer u-textDecoration--underlineOnHover"
>
Click here
</span>{" "}
to learn how
</div>
{!this.props.isEmbeddedCluster && (
<div className="edit-files-banner u-fontSize--small u-fontWeight--medium">
Need to edit these files?{" "}
<span
onClick={this.toggleInstructionsModal}
className="u-fontWeight--bold u-cursor--pointer u-textDecoration--underlineOnHover"
>
Click here
</span>{" "}
to learn how
</div>
)}
<div className="flex flex1 u-marginLeft--30 u-marginRight--30 u-marginTop--10">
<div className="flex1 dirtree-wrapper flex-column u-overflow-hidden">
<div className="u-overflow--auto dirtree">
Expand Down

0 comments on commit 22ee54a

Please sign in to comment.