ui/app/components/dns-row/template.hbs

79 lines
2.2 KiB
Handlebars

<tr class="main-row">
<td class="row-check" rowspan={{if showLabelRow 2 1}}>
{{check-box nodeId=model.id}}
</td>
<td>
{{#if canExpand}}<i role="button" {{action "toggle"}} class="icon icon-play eased text-small text-muted {{if expanded 'icon-rotate-90'}}"></i>{{/if}}
</td>
<td data-title="{{dt.state}}" class="state">
{{badge-state model=model}}
</td>
<td data-title="{{dt.name}}" class="clip">
<a href="{{href-to "service" model.id}}">{{model.displayName}}</a>
</td>
<td data-title="{{dt.displayType}}">
{{model.displayType}}
</td>
<td data-title="{{dt.target}}">
{{#if model.linkedServices}}
{{#each linkedServicesArray as |entry idx|}}
{{~if (gt idx 0) ', '~}}
{{~#link-to 'service' projects.current.id entry.service.id~}}
{{~#unless (eq entry.service.stackId model.stackId)~}}
{{entry.service.displayStack}}/
{{~/unless~}}
{{entry.service.displayName}}
{{~/link-to~}}
{{/each}}
{{else if model.selectorContainer}}
<span>{{model.selectorContainer}}</span>
{{else}}
{{model.displayTargets}}
{{/if}}
</td>
<td data-title="{{dt.actions}}" class="actions">
{{action-menu model=model}}
</td>
</tr>
{{#if showLabelRow}}
<tr class="sub-row no-top">
<td colspan="{{sub fullColspan 3}}">
{{#each model.displayUserLabelStrings as |label|}}
<span class="tag-xs bg-info">{{label}}</span>
{{/each}}
</td>
<td>{{! actions}}</td>
</tr>
{{/if}}
{{#if model.showTransitioningMessage}}
{{error-sub-row fullColspan=fullColspan model=model}}
{{/if}}
{{#if canExpand}}
<tr class="sub-row {{unless expanded 'hide'}}">
<td colspan="2">{{! checkbox and expand}}</td>
<td colspan="{{sub fullColspan 3}}">
{{#liquid-if expanded}}
{{container-table
body=model.instances
stickyHeader=false
bulkActions=false
search=false
searchText=searchText
subRow=true
showHost=true
}}
{{/liquid-if}}
</td>
<td>{{! actions}}</td>
</tr>
{{#if expanded}}
<tr class="separator-row">
<td colspan="{{fullColspan}}"></td>
</tr>
{{/if}}
{{/if}}