smitajoshi12 commented on code in PR #4665:
URL: https://github.com/apache/ozone/pull/4665#discussion_r1194857080
##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/views/insights/insights.tsx:
##########
@@ -215,69 +264,107 @@ export class Insights extends
React.Component<Record<string, object>, IInsightsS
render() {
const {plotData, isLoading, selectedBuckets, volumeOptions,
- selectedVolumes, fileCountsResponse, bucketOptions,
isBucketSelectionDisabled} = this.state;
+ selectedVolumes, fileCountsResponse, bucketOptions,
isBucketSelectionDisabled, containerCountResponse, containerData} = this.state;
return (
<div className='insights-container'>
<div className='page-header'>
Insights
</div>
+
<div className='content-div'>
- {isLoading ? <span><Icon type='loading'/> Loading...</span> :
- ((fileCountsResponse && fileCountsResponse.length > 0) ?
- <div>
- <Row>
- <Col xs={24} xl={18}>
- <Row>
- <Col>
- <div className='filter-block'>
- <h4>Volumes</h4>
- <MultiSelect
- allowSelectAll
- isMulti
- className='multi-select-container'
- options={volumeOptions}
- closeMenuOnSelect={false}
- hideSelectedOptions={false}
- value={selectedVolumes}
- allOption={allVolumesOption}
- onChange={this.handleVolumeChange}
- />
- </div>
- <div className='filter-block'>
- <h4>Buckets</h4>
- <MultiSelect
- allowSelectAll
- isMulti
- className='multi-select-container'
- options={bucketOptions}
- closeMenuOnSelect={false}
- hideSelectedOptions={false}
- value={selectedBuckets}
- allOption={allBucketsOption}
- isDisabled={isBucketSelectionDisabled}
- onChange={this.handleBucketChange}
- />
- </div>
- </Col>
- </Row>
- </Col>
- </Row>
- <Row>
- <Col>
- <Plot
- data={plotData}
- layout={
- {
- width: 800,
- height: 600,
- title: 'File Size Distribution',
- showlegend: true
- }
- }/>
- </Col>
- </Row>
- </div> :
- <div>No data to visualize file size distribution. Add files to
Ozone to see a visualization on file size distribution.</div>)}
+ <Tabs defaultActiveKey='1'>
+ <TabPane key='1' tab={`File Size`}>
+ {
+ <div className='content-div'>
+ {isLoading ? <span><Icon type='loading'/> Loading...</span> :
+ ((fileCountsResponse && fileCountsResponse.length > 0) ?
+ <div>
+ <Row>
+ <Col xs={24} xl={18}>
+ <Row>
+ <Col>
+ <div className='filter-block'>
+ <h4>Volumes</h4>
+ <MultiSelect
+ allowSelectAll
+ isMulti
+ className='multi-select-container'
+ options={volumeOptions}
+ closeMenuOnSelect={false}
+ hideSelectedOptions={false}
+ value={selectedVolumes}
+ allOption={allVolumesOption}
+ onChange={this.handleVolumeChange}
+ />
+ </div>
+ <div className='filter-block'>
+ <h4>Buckets</h4>
+ <MultiSelect
+ allowSelectAll
+ isMulti
+ className='multi-select-container'
+ options={bucketOptions}
+ closeMenuOnSelect={false}
+ hideSelectedOptions={false}
+ value={selectedBuckets}
+ allOption={allBucketsOption}
+ isDisabled={isBucketSelectionDisabled}
+ onChange={this.handleBucketChange}
+ />
+ </div>
+ </Col>
+ </Row>
+ </Col>
+ </Row>
+ <Row>
+ <Col>
+ <Plot
+ data={plotData}
+ layout={
+ {
+ width: 800,
+ height: 600,
+ title: 'File Size Distribution',
+ showlegend: false
+ }
+ } />
+ </Col>
+ </Row>
+ </div> :
+ <div>No data to visualize file size distribution. Add
files to Ozone to see a visualization on file size distribution.</div>)}
+ </div>
+ }
+ </TabPane>
+ <TabPane key='2' tab={`Container Size`}>
+ {
+ <div className='content-div'>
+ {isLoading ? <span><Icon type='loading'/> Loading...</span> :
+ ((containerCountResponse && containerCountResponse.length
> 0) ?
+ <div>
+ <Row>
+ <Col>
+ <Plot
+ data={containerData}
+ layout={
+ {
+ width: 850,
+ height: 750,
+ font: {
+ family: 'Roboto, sans-serif',
+ size: 15
+ },
+ title: 'Container Size Distribution',
+ showlegend: true
+ }
+ }/>
+ </Col>
+ </Row>
+ </div> :
+ <div>No data to visualize Container size distribution.
Add files to Ozone to see a visualization on Container size
distribution.</div>)}
Review Comment:
@dombizita
Completed Change Suggested by you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]