Show alerts skeleton even when no kapacitor
parent
8802c82666
commit
5a3c902f58
|
@ -118,9 +118,9 @@ class AlertsApp extends Component {
|
||||||
|
|
||||||
renderSubComponents = () => {
|
renderSubComponents = () => {
|
||||||
const {source, isWidget, limit} = this.props
|
const {source, isWidget, limit} = this.props
|
||||||
const {isAlertsMaxedOut, alerts} = this.state
|
const {isAlertsMaxedOut, alerts, hasKapacitor} = this.state
|
||||||
|
|
||||||
return this.state.hasKapacitor ? (
|
return hasKapacitor ? (
|
||||||
<AlertsTable
|
<AlertsTable
|
||||||
source={source}
|
source={source}
|
||||||
alerts={this.state.alerts}
|
alerts={this.state.alerts}
|
||||||
|
|
|
@ -14,9 +14,6 @@ const KapacitorRules = ({
|
||||||
onDelete,
|
onDelete,
|
||||||
onChangeRuleStatus,
|
onChangeRuleStatus,
|
||||||
}) => {
|
}) => {
|
||||||
if (!hasKapacitor) {
|
|
||||||
return <NoKapacitorError source={source} />
|
|
||||||
}
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
@ -28,7 +25,11 @@ const KapacitorRules = ({
|
||||||
</div>
|
</div>
|
||||||
<div className="panel-body">
|
<div className="panel-body">
|
||||||
<div className="generic-empty-state">
|
<div className="generic-empty-state">
|
||||||
<p>Loading Rules...</p>
|
{hasKapacitor ? (
|
||||||
|
<p>Loading Rules...</p>
|
||||||
|
) : (
|
||||||
|
<NoKapacitorError source={source} />
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue