Skip to content

Instantly share code, notes, and snippets.

@humorless
Created June 29, 2016 03:04
Show Gist options
  • Save humorless/4936b10123e18dda6b30644b7672d9f6 to your computer and use it in GitHub Desktop.
Save humorless/4936b10123e18dda6b30644b7672d9f6 to your computer and use it in GitHub Desktop.
alertRows.push (
<tr key={`${key} ${alert.process}`} className={trClassName}>
<td>
<input type="checkbox"
key={`{alert.hash} ${OWL.state.alert.checkboxesIgnoredColumns.indexOf(alert.hash) > -1}`}
value={alert.hash}
checked={OWL.state.alert.checkboxesIgnoredColumns.indexOf(alert.hash) > -1}
onChange={this.checkboxOnChangeIgnored} />
</td>
<td>
<i className="hide">{alert.priority}</i>
<PriorityIcon size="48x48" thickness={4} priorityIndex={~~alert.priority + 1} counter={alert.metric} />
</td>
<td><I18N>{`alarm:${alert.status}`}</I18N></td>
<td className='moreOnly'><p>{alert.platform}</p></td>
<td><p>{alert.idc}</p></td>
<td><a href={url} className="_linkText">{alert.hostname}</a><p>{alert.ip}</p></td>
<td><p>{alert.metric}</p><span className='_info-note'>{alert.content}</span></td>
<td>{alert.time}</td>
<td>{alert.duration}</td>
<td>{alert.note.length}</td>
<td><p>{contacts[0]}</p><p>{contacts[1]}</p></td>
<td className='moreOnly'><I18N>{`alarm:${alert.process}`}</I18N></td>
<td className='moreOnly'>
<div className="_tdAdapter">
<div className="btn" data-key={key} onClick={this.alertToggleMenu}>
<Icon className="" size="22x22" link="more" />
</div>
<div className={`_menu ${OWL.state.alert.dropDownMenu[key]}`}>
<ul>
<li>
<button className="btn _btn-menu" data-key={key} data-hash={alert.hash} onClick={this.showAlertNotePopup}>
<I18N>alarm:note and process</I18N></button>
</li>
<li>
<button className="btn _btn-menu" data-hash={alert.hash} onClick={this.viewGraph}>
<I18N>alarm:view graph</I18N></button>
</li>
<li>
<button className="btn _btn-menu _js-copy-alert" data-clipboard-text={copyInfo} onClick={this.copyClickHandler}>
<I18N>alarm:copy info</I18N></button>
</li>
</ul>
</div>
</div>
</td>
</tr>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment