mirror of https://github.com/rancher/ui.git
113 lines
3.1 KiB
Handlebars
113 lines
3.1 KiB
Handlebars
<tr class="main-row">
|
|
<td valign="middle" class="row-check" style="padding-top: 2px;">
|
|
{{check-box nodeId=model.id}}
|
|
</td>
|
|
|
|
{{#if showExpand}}
|
|
<td>
|
|
<i role="button" {{action "toggle"}} class="icon icon-play eased text-small text-muted {{if expanded 'icon-rotate-90'}}"><span class="visually-hidden">Open accordion</span></i>
|
|
</td>
|
|
{{/if}}
|
|
|
|
<td data-title="{{dt.state}}" class="state">
|
|
{{badge-state model=model}}
|
|
</td>
|
|
|
|
<td data-title="{{dt.name}}" class="clip">
|
|
{{#if linkName}}
|
|
<a href="{{href-to "host" model.id}}">{{model.displayName}}</a>
|
|
{{else}}
|
|
{{model.name}}
|
|
{{/if}}
|
|
{{#each model.displayUserLabelStrings as |label|}}
|
|
<span class="tag-xs bg-info">{{label}}</span>
|
|
{{/each}}
|
|
{{#each model.requireAnyLabelStrings as |label|}}
|
|
<span class="tag-xs bg-warning">{{label}}</span>
|
|
{{/each}}
|
|
</td>
|
|
|
|
<td data-title="{{dt.ip}}">
|
|
{{#copy-inline clipboardText=model.displayIp size="small"}}
|
|
{{format-ip model.displayIp}}
|
|
{{/copy-inline}}
|
|
</td>
|
|
|
|
{{#if showCpu}}
|
|
<td data-title="{{dt.cpu}}">
|
|
{{model.cpuUsage}}
|
|
</td>
|
|
{{/if}}
|
|
|
|
<td data-title="{{dt.memory}}">
|
|
{{model.memoryUsage}}
|
|
</td>
|
|
|
|
{{#if showPod}}
|
|
<td data-title="{{dt.pod}}">
|
|
{{model.podUsage}}
|
|
</td>
|
|
{{/if}}
|
|
|
|
{{#if showInstanceStates}}
|
|
<td data-title="{{dt.instanceState}}">
|
|
<div style="margin-top: 5px;">
|
|
{{progress-bar-multi
|
|
labelKey="state"
|
|
valueKey="count"
|
|
values=model.instanceStates.byColor
|
|
tooltipValues=model.instanceStates.byName
|
|
}}
|
|
|
|
<p class="text-muted m-0">
|
|
<small>
|
|
{{#if subMatches}}
|
|
{{#if (eq (get subMatches model.id) 0)}}
|
|
{{t 'pagination.containerNoSubset' count=model.arrangedInstances.length htmlSafe=true}}
|
|
{{else if (lt (get subMatches model.id) model.arrangedInstances.length)}}
|
|
{{t 'pagination.containerHighlightSubset' subset=(get subMatches model.id) count=model.arrangedInstances.length htmlSafe=true}}
|
|
{{else}}
|
|
<b>{{t 'pagination.container' pages=1 count=model.arrangedInstances.length}}</b>
|
|
{{/if}}
|
|
{{else}}
|
|
{{t 'pagination.container' pages=1 count=(concat model.arrangedInstances.length "")}}
|
|
{{/if}}
|
|
</small>
|
|
</p>
|
|
</div>
|
|
</td>
|
|
{{/if}}
|
|
|
|
<td data-title="{{dt.actions}}" class="actions">
|
|
{{action-menu model=model showPrimary=false}}
|
|
</td>
|
|
</tr>
|
|
|
|
{{#if model.showTransitioningMessage}}
|
|
{{error-sub-row fullColspan=fullColspan model=model}}
|
|
{{/if}}
|
|
|
|
<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
|
|
showNode=false
|
|
}}
|
|
{{/liquid-if}}
|
|
</td>
|
|
<td>{{! actions}}</td>
|
|
</tr>
|
|
|
|
{{#if expanded}}
|
|
<tr class="separator-row">
|
|
<td colspan="{{fullColspan}}"></td>
|
|
</tr>
|
|
{{/if}}
|