consul/ui-v2/app/templates/dc/nodes/show.hbs

58 lines
2.4 KiB
Handlebars

{{title item.Node}}
<AppView @class="node show">
<BlockSlot @name="notification" as |status type|>
{{!TODO: Move sessions to its own folder within nodes }}
{{partial 'dc/nodes/notifications'}}
</BlockSlot>
<BlockSlot @name="breadcrumbs">
<ol>
<li><a data-test-back href={{href-to 'dc.nodes'}}>All Nodes</a></li>
</ol>
</BlockSlot>
<BlockSlot @name="header">
<h1>
{{ item.Node }}
</h1>
<label for="toolbar-toggle"></label>
<TabNav @items={{compact (array "Health Checks" "Services" (if tomography.distances "Round Trip Time" "") "Lock Sessions" "Meta Data")}} @selected={{selectedTab}} />
</BlockSlot>
<BlockSlot @name="actions">
<FeedbackDialog @type="inline">
<BlockSlot @name="action" as |success error|>
<CopyButton @success={{action success}} @error={{action error}} @clipboardText={{item.Address}} @title="copy IP address to clipboard">
{{item.Address}}
</CopyButton>
</BlockSlot>
<BlockSlot @name="success" as |transition|>
<p class={{transition}}>
Copied IP Address!
</p>
</BlockSlot>
<BlockSlot @name="error" as |transition|>
<p class={{transition}}>
Sorry, something went wrong!
</p>
</BlockSlot>
</FeedbackDialog>
</BlockSlot>
<BlockSlot @name="content">
{{#each
(compact
(array
(hash id=(slugify 'Health Checks') partial='dc/nodes/healthchecks')
(hash id=(slugify 'Services') partial='dc/nodes/services')
(if tomography.distances (hash id=(slugify 'Round Trip Time') partial='dc/nodes/rtt') '')
(hash id=(slugify 'Lock Sessions') partial='dc/nodes/sessions')
(hash id=(slugify 'Meta Data') partial='dc/nodes/metadata')
)
) key="id" as |panel|
}}
{{#if (or (not-eq panel.id 'round-trip-time') (gt tomography.distances.length 0)) }}
<TabSection @id={{panel.id}} @selected={{eq (if selectedTab selectedTab "") panel.id}} @onchange={{action "change"}}>
{{partial panel.partial}}
</TabSection>
{{/if}}
{{/each}}
</BlockSlot>
</AppView>