|
17 | 17 | // SPDX-License-Identifier: Apache-2.0 |
18 | 18 |
|
19 | 19 | import { useCallback, useMemo, useState } from "react"; |
20 | | -import { Card, Col, Row, Tab, Tabs } from "react-bootstrap"; |
| 20 | +import { Card, Col, Row } from "react-bootstrap"; |
21 | 21 | import Tree, { useTreeState } from "react-hyper-tree"; |
22 | 22 | import { FormattedMessage, useIntl } from "react-intl"; |
23 | 23 | import { |
@@ -55,6 +55,7 @@ import { parseDeploymentState } from "@/components/DeploymentState"; |
55 | 55 | import Icon from "@/components/Icon"; |
56 | 56 | import ResourceStateIcon from "@/components/ResourceStateIcon"; |
57 | 57 | import { Link, Route, useNavigate } from "@/Navigation"; |
| 58 | +import FullHeightCard from "@/components/FullHeightCard"; |
58 | 59 |
|
59 | 60 | /* eslint-disable relay/unused-fields */ |
60 | 61 | const DEPLOYMENT_DETAILS_EVENTS_FRAGMENT = graphql` |
@@ -845,8 +846,8 @@ const DeploymentDetails = ({ |
845 | 846 | }, [setShowUpgradeModal]); |
846 | 847 |
|
847 | 848 | return ( |
848 | | - <div> |
849 | | - <Card className="mb-4"> |
| 849 | + <div className="d-flex flex-column h-100"> |
| 850 | + <Card className="mb-4 flex-shrink-0"> |
850 | 851 | <Card.Body> |
851 | 852 | <Row className="d-flex align-items-center justify-content-between flex-wrap"> |
852 | 853 | <Col |
@@ -1008,52 +1009,40 @@ const DeploymentDetails = ({ |
1008 | 1009 | /> |
1009 | 1010 | </ConfirmModal> |
1010 | 1011 | )} |
1011 | | - |
1012 | | - <Tabs |
1013 | | - defaultActiveKey="containers" |
1014 | | - id="deployment-details-tabs" |
1015 | | - className="mb-3" |
| 1012 | + <div |
| 1013 | + className="flex-md-fill" |
| 1014 | + style={{ |
| 1015 | + minHeight: 0, |
| 1016 | + }} |
1016 | 1017 | > |
1017 | | - <Tab |
1018 | | - eventKey="containers" |
1019 | | - title={intl.formatMessage({ |
1020 | | - id: "components.DeploymentDetails.containersTab", |
1021 | | - defaultMessage: "Containers", |
1022 | | - })} |
1023 | | - > |
1024 | | - <div> |
1025 | | - {containerNodes.length === 0 ? ( |
1026 | | - <div className="p-2"> |
1027 | | - <FormattedMessage |
1028 | | - id="components.DeploymentDetails.noContainers" |
1029 | | - defaultMessage="No containers" |
1030 | | - /> |
1031 | | - </div> |
1032 | | - ) : ( |
1033 | | - containerNodes.map((node, idx) => ( |
1034 | | - <ContainerDeploymentItem |
1035 | | - key={node.id || idx} |
1036 | | - index={idx} |
1037 | | - containerFragmentKey={node} |
1038 | | - imageDeployment={node.imageDeployment} |
1039 | | - containerState={node.state || ""} |
1040 | | - isReady={node.isReady} |
1041 | | - /> |
1042 | | - )) |
1043 | | - )} |
1044 | | - </div> |
1045 | | - </Tab> |
1046 | | - |
1047 | | - <Tab |
1048 | | - eventKey="events" |
1049 | | - title={intl.formatMessage({ |
1050 | | - id: "components.DeploymentDetails.eventsTab", |
1051 | | - defaultMessage: "Events", |
1052 | | - })} |
1053 | | - > |
1054 | | - <DeploymentEventsCard events={events} /> |
1055 | | - </Tab> |
1056 | | - </Tabs> |
| 1018 | + <Row className="align-items-stretch h-100"> |
| 1019 | + <FullHeightCard md={4} xs={12} className="h-100"> |
| 1020 | + <Card.Body className="d-flex flex-column overflow-auto me-3"> |
| 1021 | + {containerNodes.length === 0 ? ( |
| 1022 | + <div className="p-2"> |
| 1023 | + <FormattedMessage |
| 1024 | + id="components.DeploymentDetails.noContainers" |
| 1025 | + defaultMessage="No containers" |
| 1026 | + /> |
| 1027 | + </div> |
| 1028 | + ) : ( |
| 1029 | + containerNodes.map((node, idx) => ( |
| 1030 | + <ContainerDeploymentItem |
| 1031 | + key={node.id || idx} |
| 1032 | + index={idx} |
| 1033 | + containerFragmentKey={node} |
| 1034 | + imageDeployment={node.imageDeployment} |
| 1035 | + containerState={node.state || ""} |
| 1036 | + isReady={node.isReady} |
| 1037 | + /> |
| 1038 | + )) |
| 1039 | + )} |
| 1040 | + </Card.Body> |
| 1041 | + </FullHeightCard> |
| 1042 | + |
| 1043 | + <DeploymentEventsCard events={events} className="h-100" /> |
| 1044 | + </Row> |
| 1045 | + </div> |
1057 | 1046 | </div> |
1058 | 1047 | ); |
1059 | 1048 | }; |
|
0 commit comments