Skip to content

Commit

Permalink
Service info page
Browse files Browse the repository at this point in the history
  • Loading branch information
relferreira committed Feb 10, 2019
1 parent 3aca03d commit 821c82a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ui/containers/ServiceInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import {
getServiceInfo
} from '../state-management/services-management';

const ServiceType = styled.h3`
margin-bottom: 16px;
`;

export default function ServiceInfo({ namespace, name }) {
const { response, loading } = getServiceInfo(namespace, name);

Expand All @@ -21,18 +25,27 @@ export default function ServiceInfo({ namespace, name }) {
return (
<div>
<h1>{metadata.name}</h1>
<ServiceType>Type: {spec.type}</ServiceType>
<h3>IPs</h3>
<Table>
<thead>
<tr>
<th>Cluster IP</th>
<th>Public IP</th>
<th>Ports</th>
</tr>
</thead>
<tbody>
<tr>
<td>{spec.clusterIP}</td>
<td>{getPublicIP(status.loadBalancer)}</td>
<td>
{spec.ports.map(portInfo => (
<p key={portInfo.port}>
{portInfo.port}/{portInfo.protocol}
</p>
))}
</td>
</tr>
</tbody>
</Table>
Expand Down

0 comments on commit 821c82a

Please sign in to comment.