This commit is contained in:
Vincent Fiduccia 2017-06-09 11:39:13 -07:00
parent f7d1d2d06a
commit c3abb3fd15
No known key found for this signature in database
GPG Key ID: 2B29AD6BB2BB2582
13 changed files with 105 additions and 134 deletions

View File

@ -27,10 +27,8 @@
{{action-menu model=model showPrimary=showPrimaryActions}}
</td>
{{/if}}
</tr>
{{!-- <tr class="sub-row hide">{{! make the alternating color match }}</tr>
<tr class="sub-row"> --}}
{{!--
</tr> --}}
{{partial "error-sub-row"}}
{{#if model.showTransitioningMessage}}
{{error-sub-row fullColspan=fullColspan model=model}}
{{/if}}

View File

@ -37,7 +37,6 @@
</tr>
{{#if showLabelRow}}
<tr class="sub-row hide">{{! make the alternating color match }}</tr>
<tr class="sub-row no-top">
<td colspan="{{sub fullColspan 3}}">
{{#each model.displayUserLabelStrings as |label|}}
@ -48,10 +47,11 @@
</tr>
{{/if}}
{{partial "error-sub-row"}}
{{#if model.showTransitioningMessage}}
{{error-sub-row fullColspan=fullColspan model=model}}
{{/if}}
{{#if canExpand}}
<tr class="sub-row hide">{{! make the alternating color match }}</tr>
<tr class="sub-row {{unless expanded 'hide'}}">
<td colspan="2">{{! checkbox and expand}}</td>
<td colspan="{{sub fullColspan 3}}">
@ -71,7 +71,6 @@
</tr>
{{#if expanded}}
<tr class="sub-row hide">{{! make the alternating color match }}</tr>
<tr class="separator-row">
<td colspan="{{fullColspan}}"></td>
</tr>

View File

@ -0,0 +1,14 @@
import Ember from 'ember';
export default Ember.Component.extend({
model: null,
fullColspan: null,
leftColspan: 1,
rightColspan: 1,
tagName: '',
mainColspan: Ember.computed('fullColspan', function() {
return (this.get('fullColspan')||2) - this.get('leftColspan') - this.get('rightColspan');
}),
});

View File

@ -0,0 +1,11 @@
<tr class="sub-row no-top">
{{#if leftColspan}}
<td colspan="{{leftColspan}}"></td>
{{/if}}
<td class="pb-5" colspan="{{mainColspan}}">
<small class="{{model.stateColor}}" >{{model.transitioningMessage}}</small>
</td>
{{#if rightColspan}}
<td colspan="{{rightColspan}}"></td>
{{/if}}
</tr>

View File

@ -1,8 +1,8 @@
<tr class="main-row">
<td class="row-check" rowspan={{if showLabelRow 2 1}}>
<td class="row-check">
{{check-box nodeId=model.id}}
</td>
<td rowspan={{if showLabelRow 2 1}}>
<td>
<i role="button" {{action "toggle"}} class="icon icon-play eased text-small text-muted {{if expanded 'icon-rotate-90'}}"></i>
</td>
<td data-title="{{dt.state}}" class="state">
@ -10,7 +10,6 @@
</td>
<td data-title="{{dt.name}}" class="clip">
<a href="{{href-to "host" model.id}}">{{model.displayName}}</a>
{{!-- labels--}}
{{#if showLabelRow}}
{{#each model.displayUserLabelStrings as |label|}}
<span class="tag-xs bg-info">{{label}}</span>
@ -30,7 +29,27 @@
{{model.memoryBlurb}}
</td>
<td data-title="{{dt.docker}}">
{{#if (eq model.supportState 'unsupported')}}
<span class="text-warning">
{{model.dockerEngineVersion}}
{{#tooltip-element type="tooltip-basic" model=(t 'hostPod.supportState.unsupported') tooltipTemplate='tooltip-static' aria-describedby="tooltip-base" tooltipFor="docker-version"}}
<a href="{{settings.docsBase}}/hosts/#supported-docker-versions" target="_blank" rel="nofollow noreferrer">
<i class="icon icon-alert text-warning"></i>
</a>
{{/tooltip-element}}
</span>
{{else if (eq model.supportState 'untested')}}
<span class="text-warning">
{{model.dockerEngineVersion}}
{{#tooltip-element type="tooltip-basic" model=(t 'hostPod.supportState.unsupported') tooltipTemplate='tooltip-static' aria-describedby="tooltip-base" tooltipFor="docker-version"}}
<a href="{{settings.docsBase}}/hosts/#supported-docker-versions" target="_blank" rel="nofollow noreferrer">
<i class="icon icon-alert text-warning"></i>
</a>
{{/tooltip-element}}
</span>
{{else}}
{{model.dockerEngineVersion}}
{{/if}}
</td>
<td data-title="{{dt.instanceState}}">
@ -41,7 +60,7 @@
values=model.instanceStates.byColor
tooltipValues=model.instanceStates.byName
}}
<!--count-->
<p class="text-muted m-0">
<small>
{{#if subMatches}}
@ -57,24 +76,12 @@
{{action-menu model=model showPrimary=false}}
</td>
</tr>
<tr class="sub-row"></tr>
{{!-- {{#if showLabelRow}}
<tr class="sub-row hide">{{! make the alternating color match }}</tr>
<tr class="sub-row no-top">
<td colspan="{{sub fullColspan 3}}" style="height: 30px; vertical-align:top;">
{{#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>{{! actions}}</td>
</tr>
{{/if}} --}}
<tr class="sub-row hide">{{! make the alternating color match }}</tr>
<tr class="sub-row {{unless expanded 'hide'}}">
{{#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}}
@ -90,11 +97,10 @@
{{/liquid-if}}
</td>
<td>{{! actions}}</td>
</tr>
</tr>
{{#if expanded}}
<tr class="sub-row hide">{{! make the alternating color match }}</tr>
{{#if expanded}}
<tr class="separator-row">
<td colspan="{{fullColspan}}"></td>
</tr>
{{/if}}
{{/if}}

View File

@ -56,7 +56,6 @@
</tr>
{{#if showLabelRow}}
<tr class="sub-row hide">{{! make the alternating color match }}</tr>
<tr class="sub-row no-top">
<td colspan="{{sub fullColspan 3}}">
{{#each model.displayUserLabelStrings as |label|}}
@ -67,10 +66,11 @@
</tr>
{{/if}}
{{partial "error-sub-row"}}
{{#if model.showTransitioningMessage}}
{{error-sub-row fullColspan=fullColspan model=model}}
{{/if}}
{{#if canExpand}}
<tr class="sub-row hide">{{! make the alternating color match }}</tr>
<tr class="sub-row {{unless expanded 'hide'}}">
<td>{{! checkbox and expand}}</td>
<td colspan="{{sub fullColspan 2}}">
@ -90,7 +90,6 @@
</tr>
{{#if expanded}}
<tr class="sub-row hide">{{! make the alternating color match }}</tr>
<tr class="separator-row">
<td colspan="{{fullColspan}}"></td>
</tr>

View File

@ -1,7 +1,7 @@
import Ember from 'ember';
import C from 'ui/utils/constants';
export function parseHostIcon(params/*, hash*/) {
return C.MACHINE_DRIVER_IMAGES[params[0].toUpperCase()] || 'other';
return C.MACHINE_DRIVER_IMAGES[(params[0]||'other').toUpperCase()] || 'other';
}
export default Ember.Helper.helper(parseHostIcon);

View File

@ -71,7 +71,7 @@ export default Ember.Controller.extend({
name: 'docker',
sort: ['dockerEngineVersion','displayName'],
searchField: 'dockerEngineVersion',
width: 90,
width: 110,
translationKey: 'hostsPage.index.table.docker',
},
{

View File

@ -223,7 +223,7 @@ export default Ember.Mixin.create(NewOrEdit, ManageLabels, {
});
// The hostTemplate was the first one, wait for it then add hosts
this.get('model').waitForState('active').then(() => {
return this.get('model').waitForState('active').then(() => {
return addHosts();
});
} else {

View File

@ -96,7 +96,7 @@ export default Ember.Route.extend({
},
afterModel: function(model) {
model.set('service.secondaryLaunchConfigs', this.setUiId(model.get('service.secondaryLaunchConfigs')));
model.set('service.secondaryLaunchConfigs', this.setUiId(model.get('service.secondaryLaunchConfigs')||[]));
},
setUiId: function(configs) {

View File

@ -12,7 +12,6 @@ $table-bg-hover : lighten($info, 15)!default;
$table-bg-active : $table-bg-hover!default;
$table-bg-selected : lighten($info, 30)!default;
$table-border-color : lighten($mid-grey, 30)!default;
$table-body-separation : 50px;
$table-body-separation : 25px;
$group-row-height : 50px;
@ -21,6 +20,22 @@ $group-row-height : 50px;
border-bottom: $table-border-color solid 2px;
border-collapse: collapse;
// General padding
> THEAD > TR > TH,
> TBODY > TR > TD {
padding: 0;
transition: ease-in-out all 200ms;
&:last-child {
height: 0;
}
}
> TBODY > TR.main-row > TD {
height: $group-row-height;
}
> TBODY {
background: transparent;
@ -95,21 +110,6 @@ TABLE {
text-align: left;
}
// General padding
> THEAD > TR > TH,
> TBODY > TR > TD {
padding: 0;
height: $group-row-height;
transition: ease-in-out all 200ms;
&:last-child {
height: 0;
}
}
> TBODY > TR > TD {
height: 50px;
}
&.cell-padding {
border-spacing: 10px 0;
border-collapse: separate;

View File

@ -1,7 +0,0 @@
{{#if model.showTransitioningMessage}}
<tr class="sub-row no-top">
<td class="pl-40 pb-5" style="height: 20px;" colspan="{{fullColspan}}">
<span class="{{model.stateColor}}"><small>{{model.transitioningMessage}}</small></span>
</td>
</tr>
{{/if}}

View File

@ -313,55 +313,6 @@ export let PacketPlans = [
"hour": 1.25
}
},
{
"id": "3bc8a214-b807-4058-ad4a-6925f2411155",
"slug": "baremetal_2a",
"name": "Type 2A",
"description": "Our Type 2A configuration is a 96-core dual socket ARM 64 beast based on Cavium ThunderX chips",
"line": "baremetal",
"specs": {
"cpus": [
{
"count": 2,
"type": "Cavium ThunderX CN8890 @2GHz"
}
],
"memory": {
"total": "128GB"
},
"drives": [
{
"count": 1,
"size": "340GB",
"type": "SSD"
}
],
"nics": [
{
"count": 2,
"type": "10Gbps"
}
],
"features": {}
},
"available_in": [
{
"href": "/facilities/8ea03255-89f9-4e62-9d3f-8817db82ceed"
},
{
"href": "/facilities/8e6470b3-b75e-47d1-bb93-45b225750975"
},
{
"href": "/facilities/2b70eb8f-fa18-47c0-aba7-222a842362fd"
},
{
"href": "/facilities/e1e9c52e-a0bc-4117-b996-0fc94843ea09"
}
],
"pricing": {
"hour": 0.5
}
},
{
"id": "741f3afb-bb2f-4694-93a0-fcbad7cd5e78",
"slug": "baremetal_3",