Skip to content

Commit

Permalink
feat: final adjustments, refactored main view, MainMenu component stable
Browse files Browse the repository at this point in the history
  • Loading branch information
madecki committed Jul 20, 2020
1 parent 2f23fee commit 73deb80
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
9 changes: 2 additions & 7 deletions nerdlets/network-telemetry-overview/MainMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class MainMenu extends React.Component {
this.handleAccountChange = this.handleAccountChange.bind(this);
}

handleDataSourceChange = value => {
handleDataSourceChange = (evt, value) => {
const dataSource = parseInt(value, 10);
nerdlet.setUrlState({ dataSource });
};
Expand Down Expand Up @@ -87,10 +87,7 @@ export default class MainMenu extends React.Component {
<BlockText type={BlockText.TYPE.NORMAL}>
<strong>Source</strong>
</BlockText>
<RadioGroup
onChange={() => this.handleDataSourceChange(dataSource)}
value={`${dataSource}`}
>
<RadioGroup onChange={this.handleDataSourceChange} value={`${dataSource}`}>
{DATA_SOURCES.map((v, i) => (
<Radio key={i} label={v.name} value={`${i}`} />
))}
Expand All @@ -103,8 +100,6 @@ export default class MainMenu extends React.Component {
label='Hide Labels'
onChange={this.handleHideLabelsChange}
/>
<br />
<br />

<BlockText type={BlockText.TYPE.NORMAL}>
<strong>Limit results to about...</strong>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ export default class NetworkTelemetryNerdlet extends React.Component {
<div className='main-container'>
{isLoading && account.id && <Spinner fillContainer />}
{!account.id && accountsList.length > 0 && this.renderSelectAccountAlert()}
{!account.id && accountsList.length === 0 && this.renderAccountsListError()}
{!account.id &&
accountsList.length === 0 &&
!isLoading &&
this.renderAccountsListError()}
{!isLoading && account.id && this.renderDSComponent()}
</div>
</GridItem>
Expand Down
1 change: 1 addition & 0 deletions nerdlets/network-telemetry-overview/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ label {

.checkbox {
margin-right: 5px;
margin-bottom: 10px;
-webkit-box-align: center;
align-items: center;
}
Expand Down

0 comments on commit 73deb80

Please sign in to comment.