ui/lib/shared/addon/components/cluster-row/template.hbs

83 lines
2.6 KiB
Handlebars

<tr class="main-row">
<td class="row-check" valign="middle" style="padding-top: 2px;">
{{check-box nodeId=model.id}}
</td>
<td data-title="{{dt.state}}" class="state">
{{badge-state model=model}}
</td>
<td data-title="{{dt.name}}">
{{#link-to-external 'authenticated.cluster' model.id}}{{model.displayName}}{{/link-to-external}}
</td>
<td data-title="{{dt.provider}}">
{{model.displayProvider}}
</td>
{{#if (eq model.state "inactive")}}
<td colspan="4" class="text-center">
{{#if (or model.registrationToken.hostCommand model.registrationToken.clusterCommand)}}
{{#if model.registrationToken.hostCommand}}
<div class="input-group inline-block" style="vertical-align: middle;" >
<span class="input-group-btn">
<button type="button" class="btn btn-sm bg-primary icon-btn" onclick={{action (action launchOnCluster) model}}>
<span class="darken"><i class="icon icon-host"></i></span>
<span>{{t 'clusterRow.addHost'}}</span>
</button>
</span>
</div>
{{/if}}
{{#if model.registrationToken.clusterCommand}}
<div class="input-group inline-block" style="vertical-align: middle;" >
<span class="input-group-btn">
<button type="button" class="btn btn-sm bg-primary icon-btn ml-20" onclick={{action (action useKubernetes) model}}>
<span class="darken"><i class="icon icon-download"></i></span>
<span>{{t 'clusterRow.importCluster'}}</span>
</button>
</span>
</div>
{{/if}}
{{else}}
{{t 'clusterRow.noHosts'}}
{{/if}}
</td>
{{else}}
<td data-title="{{dt.hosts}}">
{{model.machines.length}}
</td>
<td data-title="{{dt.cpu}}">
{{#if model.cpuUsage}}
{{model.cpuUsage}}
{{else}}
<span class="text-muted">
{{t 'generic.na'}}
</span>
{{/if}}
</td>
<td data-title="{{dt.memory}}">
{{#if model.memoryUsage}}
{{model.memoryUsage}}
{{else}}
<span class="text-muted">
{{t 'generic.na'}}
</span>
{{/if}}
</td>
<td data-title="{{dt.pod}}">
{{#if model.podUsage}}
{{model.podUsage}}
{{else}}
<span class="text-muted">
{{t 'generic.na'}}
</span>
{{/if}}
</td>
{{/if}}
<td data-title="{{dt.actions}} "class="actions">
{{action-menu model=model}}
</td>
</tr>
{{#if model.showTransitioningMessage}}
{{error-sub-row fullColspan=fullColspan model=model}}
{{/if}}