Check if ip_addresses exist in the interface

This commit is contained in:
Ildar Kamalov 2019-02-07 15:17:27 +03:00
parent f9d1948f6a
commit c466f8cc73
2 changed files with 12 additions and 7 deletions

View File

@ -10,7 +10,7 @@ class Greeting extends Component {
<h1 className="setup__title">
<Trans>install_welcome_title</Trans>
</h1>
<p className="setup__desc">
<p className="setup__desc text-center">
<Trans>install_welcome_desc</Trans>
</p>
</div>

View File

@ -30,13 +30,18 @@ const renderInterfaces = (interfaces => (
Object.keys(interfaces).map((item) => {
const option = interfaces[item];
const { name } = option;
const ip = getInterfaceIp(option);
return (
<option value={ip} key={name}>
{name} - {ip}
</option>
);
if (option.ip_addresses && option.ip_addresses.length > 0) {
const ip = getInterfaceIp(option);
return (
<option value={ip} key={name}>
{name} - {ip}
</option>
);
}
return false;
})
));