52705125a1
The WithEventSource mixin was responsible for catching EventSource errors and cleaning up events sources then the user left a Controller. As we are trying to avoid mixin usage, we moved this all to an `EventSource` component, which can clean up when the component is removed from the page, and also fires an onerror event. Moving to a component firing an onerror event means we can also remove all of our custom computed property work that we were using previously to catch errors (thrown when a service etc. is removed)
38 lines
1.6 KiB
Handlebars
38 lines
1.6 KiB
Handlebars
{{title item.Node}}
|
|
<EventSource @src={{item}} @onerror={{action "error"}} />
|
|
<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>
|
|
</BlockSlot>
|
|
<BlockSlot @name="nav">
|
|
<TabNav @items={{
|
|
compact
|
|
(array
|
|
(hash label="Health Checks" href=(href-to "dc.nodes.show.healthchecks") selected=(is-href "dc.nodes.show.healthchecks"))
|
|
(hash label="Services" href=(href-to "dc.nodes.show.services") selected=(is-href "dc.nodes.show.services"))
|
|
(if tomography.distances (hash label="Round Trip Time" href=(href-to "dc.nodes.show.rtt") selected=(is-href "dc.nodes.show.rtt")) '')
|
|
(hash label="Lock Sessions" href=(href-to "dc.nodes.show.sessions") selected=(is-href "dc.nodes.show.sessions"))
|
|
(hash label="Metadata" href=(href-to "dc.nodes.show.metadata") selected=(is-href "dc.nodes.show.metadata"))
|
|
)
|
|
}}/>
|
|
</BlockSlot>
|
|
<BlockSlot @name="actions">
|
|
<CopyButton @value={{item.Address}} @name="Address">{{item.Address}}</CopyButton>
|
|
</BlockSlot>
|
|
<BlockSlot @name="content">
|
|
{{outlet}}
|
|
</BlockSlot>
|
|
</AppView>
|