Skip to content

Commit

Permalink
fix: Empty runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
liiil825 committed Feb 19, 2019
1 parent d3ba3aa commit 35f16b9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pages/Dashboard/Runtimes/Runtime/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { providers } from 'config/runtimes';
import routes, { toRoute } from 'routes';

import { Icon, Button, Notification } from 'components/Base';
import { Grid, Section } from 'components/Layout';
import { Card, Grid, Section } from 'components/Layout';
import Loading from 'components/Loading';
import Card from '../Card';
import RuntimeCard from '../Card';

import styles from '../index.scss';

Expand Down Expand Up @@ -85,14 +85,15 @@ export class Runtime extends React.Component {
const validRts = _.filter(runtimes, rt => rt.provider === platform);

if (_.isEmpty(validRts)) {
console.log(validRts);
return this.renderEmpty();
}

return (
<Grid className={styles.envs}>
{_.map(validRts, props => (
<Section size={6} key={props.runtime_id}>
<Card
<RuntimeCard
{...props}
onClick={() => this.handleClickClusterCnt(props)}
/>
Expand Down

0 comments on commit 35f16b9

Please sign in to comment.