Render Configure Kapacitor on empty Alerts Table only if at least Editor

pull/2453/head
Jared Scheib 2017-11-30 20:51:29 -08:00
parent 8861228f8d
commit 4b748528e1
1 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,8 @@
import React, {PropTypes} from 'react'
import {Link} from 'react-router'
import Authorized, {EDITOR_ROLE} from 'src/auth/Authorized'
const NoKapacitorError = React.createClass({
propTypes: {
source: PropTypes.shape({
@ -16,9 +18,11 @@ const NoKapacitorError = React.createClass({
The current source does not have an associated Kapacitor instance
<br />
<br />
<Link to={path} className="btn btn-sm btn-primary">
Configure Kapacitor
</Link>
<Authorized requiredRole={EDITOR_ROLE}>
<Link to={path} className="btn btn-sm btn-primary">
Configure Kapacitor
</Link>
</Authorized>
</p>
</div>
)