Create warning banners for permissive default-allow and wildcard-intention

This commit is contained in:
kenia 2021-04-08 14:09:57 -04:00
parent 57d3bf59ee
commit cdf77e32f2
3 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,23 @@
<Notice
class="topology-metrics-notice-default-allow"
...attributes
@type={{or @type "warning"}}
as |notice|>
<notice.Header>
<h3>
{{t "components.consul.topology-metrics.notice.default-allow.header"}}
</h3>
</notice.Header>
<notice.Body>
<p>
{{t "components.consul.topology-metrics.notice.default-allow.body"}}
</p>
</notice.Body>
<notice.Footer>
<p>
<a href={{href-to 'dc.services.show.intentions'}}>
{{t "components.consul.topology-metrics.notice.default-allow.footer"}}
</a>
</p>
</notice.Footer>
</Notice>

View File

@ -0,0 +1,23 @@
<Notice
class="topology-metrics-notice-wildcard-intention"
...attributes
@type={{or @type "warning"}}
as |notice|>
<notice.Header>
<h3>
{{t "components.consul.topology-metrics.notice.wildcard-intention.header"}}
</h3>
</notice.Header>
<notice.Body>
<p>
{{t "components.consul.topology-metrics.notice.wildcard-intention.body"}}
</p>
</notice.Body>
<notice.Footer>
<p>
<a href={{href-to 'dc.services.show.intentions'}}>
{{t "components.consul.topology-metrics.notice.wildcard-intention.footer"}}
</a>
</p>
</notice.Footer>
</Notice>

View File

@ -25,6 +25,12 @@ as |route|>
{{#if topology.FilteredByACLs}}
<TopologyMetrics::Notice::LimitedAccess />
{{/if}}
{{#if topology.DefaultAllow}}
<TopologyMetrics::Notice::DefaultAllow />
{{/if}}
{{#if topology.WildcardIntention}}
<TopologyMetrics::Notice::WildcardIntention />
{{/if}}
<TopologyMetrics
@nspace={{nspace}}
@dc={{dc.Name}}