ui: Moves/loads policy datacenters info into the detail panel (#7828)

This commit is contained in:
John Cowen 2020-05-11 15:05:25 +01:00 committed by John Cowen
parent 7c203a9220
commit 5ad139d220
1 changed files with 13 additions and 5 deletions

View File

@ -57,14 +57,22 @@
</td>
</BlockSlot>
<BlockSlot @name="details">
{{#if (eq item.template '')}}
<DataSource
@src={{concat '/' item.Namespace '/' item.Datacenter '/policy/' item.ID}}
@onchange={{action (mut loadedItem) value="data"}}
@loading="lazy"
/>
{{/if}}
<dl>
<dt>Datacenters:</dt>
<dd>
{{join ', ' (policy/datacenters (or loadedItem item))}}
</dd>
</dl>
<label class="type-text">
<span>Rules <a href="{{env 'CONSUL_DOCS_URL'}}/guides/acl.html#rule-specification" rel="help noopener noreferrer" target="_blank">(HCL Format)</a></span>
{{#if (eq item.template '')}}
<DataSource
@src={{concat '/' item.Namespace '/' item.Datacenter '/policy/' item.ID}}
@onchange={{action (mut loadedItem) value="data"}}
@loading="lazy"
/>
<CodeEditor @syntax="hcl" @readonly={{true}} @value={{or loadedItem.Rules item.Rules}} />
{{else}}
<CodeEditor @syntax="hcl" @readonly={{true}}>