Skip to content

Commit 687f14c

Browse files
HDDS-13183. Create Cluster Capacity page UI (apache#9022).
(cherry picked from commit cc5cf02)
1 parent 64bb019 commit 687f14c

File tree

19 files changed

+1372
-5
lines changed

19 files changed

+1372
-5
lines changed

hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/db.json

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6866,5 +6866,89 @@
68666866
"selectedRowKeys": [
68676867
"b5907812-a5f2-11ea-bb37-0242ac130011"
68686868
]
6869+
},
6870+
"utilization": {
6871+
"globalStorage": {
6872+
"totalUsedSpace": 1632526336,
6873+
"totalFreeSpace": 596013527040,
6874+
"totalCapacity": 746331226935
6875+
},
6876+
"globalNamespace": {
6877+
"totalUsedSpace": 0,
6878+
"totalKeys": 0
6879+
},
6880+
"usedSpaceBreakdown": {
6881+
"openKeysBytes": 10000,
6882+
"committedBytes": 250100,
6883+
"containerPreAllocated": 1073725932,
6884+
"deletionPendingBytes": {
6885+
"total": 3765706484,
6886+
"byStage": {
6887+
"DN": {
6888+
"pendingBytes": 3758096384
6889+
},
6890+
"SCM": {
6891+
"pendingBytes": 3145600
6892+
},
6893+
"OM": {
6894+
"pendingKeyBytes": 1254500,
6895+
"totalBytes": 4464500,
6896+
"pendingDirectoryBytes": 3210000
6897+
}
6898+
}
6899+
}
6900+
},
6901+
"dataNodeUsage": [
6902+
{
6903+
"datanodeUuid": "ec4d37e4-04d7-4d1b-b0bb-aafa05d86b3c",
6904+
"hostName": "ozone-datanode-2.ozone_default",
6905+
"capacity": 125645656770,
6906+
"used": 4382720,
6907+
"remaining": 104675287040,
6908+
"committed": 0,
6909+
"pendingDeletion": 0,
6910+
"minimumFreeSpace": 125645664
6911+
},
6912+
{
6913+
"datanodeUuid": "ed34b38a-88b0-4dde-8ef6-6d158339064e",
6914+
"hostName": "ozone-datanode-4.ozone_default",
6915+
"capacity": 125645656770,
6916+
"used": 4382720,
6917+
"remaining": 104675291136,
6918+
"committed": 0,
6919+
"pendingDeletion": 0,
6920+
"minimumFreeSpace": 125645664
6921+
},
6922+
{
6923+
"datanodeUuid": "49d5a41b-ffb4-426f-bd46-93d9263296ef",
6924+
"hostName": "ozone-datanode-5.ozone_default",
6925+
"capacity": 125645656770,
6926+
"used": 4382720,
6927+
"remaining": 104675291136,
6928+
"committed": 0,
6929+
"pendingDeletion": 0,
6930+
"minimumFreeSpace": 125645664
6931+
},
6932+
{
6933+
"datanodeUuid": "08b69287-6fd0-42e0-b944-f5d527607ac9",
6934+
"hostName": "ozone-datanode-1.ozone_default",
6935+
"capacity": 125645656770,
6936+
"used": 4382720,
6937+
"remaining": 104675282944,
6938+
"committed": 0,
6939+
"pendingDeletion": 0,
6940+
"minimumFreeSpace": 125645664
6941+
},
6942+
{
6943+
"datanodeUuid": "3be0d2dc-b068-46c9-a6df-ff086e94fec5",
6944+
"hostName": "ozone-datanode-3.ozone_default",
6945+
"capacity": 125645656770,
6946+
"used": 4382720,
6947+
"remaining": 104675282944,
6948+
"committed": 0,
6949+
"pendingDeletion": 0,
6950+
"minimumFreeSpace": 125645664
6951+
}
6952+
]
68696953
}
68706954
}

hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/api/routes.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,7 @@
5353
"/keys/deletePending/dirs?limit=*": "/dirdeletePending",
5454
"/datanodes/decommission/info": "/decommissioninfo",
5555
"/datanodes/decommission/info/datanode?uuid=*": "/DatanodesDecommissionInfo",
56-
"/datanodes/remove": "/datanodesRemove"
56+
"/datanodes/remove": "/datanodesRemove",
57+
58+
"/storageDistribution": "/utilization"
5759
}

hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/utils/themeIcons.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,30 @@ export class ReplicationIcon extends React.PureComponent<IReplicationIconProps>
9898
return icon;
9999
}
100100
}
101+
102+
interface IGraphLegendIconProps {
103+
color: string;
104+
height?: number;
105+
};
106+
export class GraphLegendIcon extends React.PureComponent<IGraphLegendIconProps> {
107+
render() {
108+
const { color, height = 14 } = this.props;
109+
110+
return (
111+
<svg
112+
width="18"
113+
height={height}
114+
viewBox={`0 0 18 ${height}`}
115+
xmlns="http://www.w3.org/2000/svg"
116+
style={{ display: 'inline-block', verticalAlign: 'middle' }} // Optional: helps with alignment
117+
>
118+
<circle
119+
cx="6"
120+
cy="6"
121+
r="6"
122+
fill={color} // Use the color prop for the fill
123+
/>
124+
</svg>
125+
)
126+
}
127+
};

hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/overviewCard/overviewCardWrapper.tsx renamed to hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/cards/overviewCardWrapper.tsx

File renamed without changes.

hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/overviewCard/overviewSimpleCard.tsx renamed to hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/components/cards/overviewSimpleCard.tsx

File renamed without changes.

0 commit comments

Comments
 (0)