Merge pull request #768 from influxdata/feature/337-proper-link
add links to hosts in alerts tablepull/771/head
commit
d12bc949bd
|
@ -1,6 +1,6 @@
|
||||||
// TODO: make with real data
|
|
||||||
import React, {PropTypes} from 'react';
|
import React, {PropTypes} from 'react';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
import {Link} from 'react-router';
|
||||||
|
|
||||||
const AlertsTable = React.createClass({
|
const AlertsTable = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
|
@ -61,6 +61,7 @@ const AlertsTable = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const {id} = this.props.source;
|
||||||
const alerts = this.sort(this.state.filteredAlerts, this.state.sortKey, this.state.sortDirection);
|
const alerts = this.sort(this.state.filteredAlerts, this.state.sortKey, this.state.sortDirection);
|
||||||
return (
|
return (
|
||||||
<div className="panel panel-minimal">
|
<div className="panel panel-minimal">
|
||||||
|
@ -87,7 +88,11 @@ const AlertsTable = React.createClass({
|
||||||
<td className="monotype">{name}</td>
|
<td className="monotype">{name}</td>
|
||||||
<td className={`monotype alert-level-${level.toLowerCase()}`}>{level}</td>
|
<td className={`monotype alert-level-${level.toLowerCase()}`}>{level}</td>
|
||||||
<td className="monotype">{(new Date(Number(time)).toISOString())}</td>
|
<td className="monotype">{(new Date(Number(time)).toISOString())}</td>
|
||||||
<td className="monotype">{host}</td>
|
<td className="monotype">
|
||||||
|
<Link to={`/sources/${id}/hosts/${host}`}>
|
||||||
|
{host}
|
||||||
|
</Link>
|
||||||
|
</td>
|
||||||
<td className="monotype">{value}</td>
|
<td className="monotype">{value}</td>
|
||||||
</tr>
|
</tr>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue