add a link to create new kapacitors for hosts with no kapacitor

pull/1302/head
Jade McGough 2017-04-17 15:24:59 -07:00
parent b617827b93
commit 6d51ac876b
1 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ import Dropdown from 'shared/components/Dropdown'
const kapacitorDropdown = (kapacitors, source, router) => {
if (!kapacitors || kapacitors.length === 0) {
return (
<span>--</span>
<Link to={`/sources/${source.id}/kapacitors/new`}>Add Kapacitor</Link>
)
}
const kapacitorItems = kapacitors.map((k) => {
@ -67,7 +67,7 @@ const InfluxTable = ({
<td className="monotype">{s.url}</td>
<td>
{
kapacitorDropdown(s.kapacitors, source, router)
kapacitorDropdown(s.kapacitors, s, router)
}
</td>
<td className="text-right">