Minor improvements to preview pane

This commit is contained in:
Itay Mizeretz 2017-10-16 17:54:00 +03:00
parent e277bf6694
commit 377a7a3c5e
1 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@ class PreviewPaneComponent extends React.Component {
return ( return (
<tr> <tr>
<th>Operating System</th> <th>Operating System</th>
<td>{asset.os}</td> <td>{asset.os.charAt(0).toUpperCase() + asset.os.slice(1)}</td>
</tr> </tr>
); );
} }
@ -40,11 +40,11 @@ class PreviewPaneComponent extends React.Component {
); );
} }
aliveRow(asset) { statusRow(asset) {
return ( return (
<tr> <tr>
<th>Alive</th> <th>Status</th>
<td>{(!asset.dead).toString()}</td> <td>{(asset.dead) ? 'Dead' : 'Alive'}</td>
</tr> </tr>
); );
} }
@ -65,7 +65,7 @@ class PreviewPaneComponent extends React.Component {
<tr> <tr>
<th>Force Kill</th> <th>Force Kill</th>
<td> <td>
<Toggle id={asset.id} checked={!asset.config.alive} icons={false} <Toggle id={asset.id} checked={!asset.config.alive} icons={false} disabled={asset.dead}
onChange={(e) => this.forceKill(e, asset)} /> onChange={(e) => this.forceKill(e, asset)} />
</td> </td>
</tr> </tr>
@ -115,8 +115,8 @@ class PreviewPaneComponent extends React.Component {
<div> <div>
<table className="table table-condensed"> <table className="table table-condensed">
<tbody> <tbody>
{this.aliveRow(asset)}
{this.osRow(asset)} {this.osRow(asset)}
{this.statusRow(asset)}
{this.ipsRow(asset)} {this.ipsRow(asset)}
{this.servicesRow(asset)} {this.servicesRow(asset)}
{this.accessibleRow(asset)} {this.accessibleRow(asset)}