Merge pull request #869 from vincent99/master

Bugs
This commit is contained in:
Vincent Fiduccia 2016-10-20 10:19:47 -07:00 committed by GitHub
commit b76302b3f3
19 changed files with 38 additions and 26 deletions

View File

@ -20,7 +20,7 @@ export default Ember.Component.extend(ThrottledResize, {
logHeight: 300,
onlyCombinedLog: Ember.computed.alias('context.instance.tty'),
onlyCombinedLog: Ember.computed.alias('instance.tty'),
which: 'combined',
isCombined: Ember.computed.equal('which','combined'),
isStdOut: Ember.computed.equal('which','stdout'),

View File

@ -1,4 +1,5 @@
import Ember from 'ember';
import C from 'ui/utils/constants';
export default Ember.Component.extend({
projects: Ember.inject.service(),
@ -13,6 +14,10 @@ export default Ember.Component.extend({
tagName: 'TR',
statsAvailable: function() {
return C.ACTIVEISH_STATES.indexOf(this.get('model.state')) >= 0 && this.get('model.healthState') !== 'started-once';
}.property('model.{state,healthState}'),
detailRoute: function() {
if ( this.get('model.isVm') ) {
return 'virtualmachine';

View File

@ -24,7 +24,7 @@
</td>
{{#if showStats}}
<td data-title="{{t 'containersPage.table.stats'}}:" class="spark-td">
{{#if model.cpuSpark}}
{{#if (and statsAvailable model.cpuSpark)}}
{{spark-line
data=model.cpuSpark
width=60 height=25 max=cpuMax
@ -51,6 +51,8 @@
prefix="containersPage.table.sparkPrefixStorage"
formatter="kbps"
type="storage"}}
{{else}}
<span class="text-muted">{{t 'generic.na'}}</span>
{{/if}}
</td>
{{else}}

View File

@ -1,4 +1,4 @@
{{format-ip displayIp noIp=noIp}}
{{format-ip ip noIp=noIp}}
{{#if ip}}
{{copy-to-clipboard clipboardText=ip size='small'}}
{{/if}}

View File

@ -3,7 +3,7 @@ import ModalBase from 'lacsso/components/modal-base';
import NewServiceAlias from 'ui/mixins/new-service-alias';
export default ModalBase.extend(NewServiceAlias, {
classNames: ['lacsso', 'modal-container', 'full-width-modal', 'modal-logs'],
classNames: ['lacsso', 'modal-container', 'full-width-modal'],
originalModel : Ember.computed.alias('modalService.modalOpts'),
allServicesService: Ember.inject.service('all-services'),
editing: true,

View File

@ -3,7 +3,7 @@ import NewBalancer from 'ui/mixins/new-balancer';
import ModalBase from 'lacsso/components/modal-base';
export default ModalBase.extend(NewBalancer, {
classNames : ['lacsso', 'modal-container', 'full-width-modal', 'modal-logs'],
classNames : ['lacsso', 'modal-container', 'full-width-modal'],
originalModel : Ember.computed.alias('modalService.modalOpts'),
actions: {

View File

@ -3,7 +3,7 @@ import Ember from 'ember';
import ModalBase from 'lacsso/components/modal-base';
export default ModalBase.extend(NewOrEdit, {
classNames : ['lacsso', 'modal-container', 'full-width-modal', 'modal-logs'],
classNames : ['lacsso', 'modal-container', 'full-width-modal'],
originalModel : Ember.computed.alias('modalService.modalOpts'),
existing: Ember.computed.alias('originalModel'),
editing: true,

View File

@ -66,12 +66,12 @@ export default Ember.Component.extend(ManageLabels, {
},
terminalDidChange: function() {
var val = this.get('terminal');
var val = this.get('terminal.type');
var stdinOpen = ( val === 'interactive' || val === 'both' );
var tty = (val.type === 'terminal' || val.type === 'both');
var tty = (val === 'terminal' || val === 'both');
this.set('instance.tty', tty);
this.set('instance.stdinOpen', stdinOpen);
}.observes('terminal'),
}.observes('terminal.type'),
// ----------------------------------
// Start Once

View File

@ -70,8 +70,8 @@
</div>
{{/input-or-display}}
</div>
<div class="row form-group">
{{#if editing}}
{{#if editing}}
<div class="row form-group">
<div class="hidden-xs hidden-sm col-md-2 form-label">&nbsp;</div>
<div class="col-xs-12 col-sm-6 col-md-4">
<div class="radio small">
@ -83,8 +83,8 @@
<label>{{radio-button selection=terminal.type value="none"}} {{format-html-message 'formCommand.console.none'}}</label>
</div>
</div>
{{/if}}
</div>
</div>
{{/if}}
{{#if isService}}
<div class="row {{unless editing 'form-group'}}">

View File

@ -22,6 +22,10 @@ export default Ember.Component.extend(ManageLabels, GroupedInstances, {
},
},
shouldUpdateLabels: function() {
this.initLabels(this.get('model.labels'));
}.observes('model.labels'),
filteredInstances: function() {
let out = this.get('model.instances')||[];

View File

@ -2,7 +2,7 @@ import Ember from 'ember';
import ModalBase from 'lacsso/components/modal-base';
export default ModalBase.extend({
classNames: ['lacsso', 'modal-container', 'full-width-modal', 'modal-logs'],
classNames: ['lacsso', 'modal-container', 'full-width-modal'],
requestObject : Ember.computed.alias('modalService.modalOpts.requestObject'),
responseObject : Ember.computed.alias('modalService.modalOpts.responseObject'),
requestJSON : null,

View File

@ -3,7 +3,7 @@ import { alternateLabel } from 'ui/utils/platform';
import ModalBase from 'lacsso/components/modal-base';
export default ModalBase.extend({
classNames: ['lacsso', 'modal-container', 'span-6', 'offset-3', 'modal-logs'],
classNames: ['lacsso', 'modal-container', 'span-6', 'offset-3'],
originalModel : Ember.computed.alias('modalService.modalOpts.originalModel'),
action : Ember.computed.alias('modalService.modalOpts.action'),
alternateLabel : alternateLabel,

View File

@ -2,7 +2,7 @@ import Ember from 'ember';
import ModalBase from 'lacsso/components/modal-base';
export default ModalBase.extend({
classNames: ['lacsso', 'modal-container', 'full-width-modal', 'modal-logs'],
classNames: ['lacsso', 'modal-container', 'full-width-modal'],
originalModel: Ember.computed.alias('modalService.modalOpts'),
});

View File

@ -2,7 +2,7 @@ import Ember from 'ember';
import ModalBase from 'lacsso/components/modal-base';
export default ModalBase.extend({
classNames: ['lacsso', 'modal-container', 'full-width-modal', 'modal-logs'],
classNames: ['lacsso', 'modal-container', 'full-width-modal'],
exception: Ember.computed.alias('modalService.modalOpts'),
actions: {
dismiss: function() {

View File

@ -29,7 +29,7 @@
</tr>
{{else}}
<tr>
<td colspan="2">
<td colspan="5">
<div class="text-muted text-center">{{t 'servicePage.logTab.table.body.noData'}}</div>
</td>
</tr>

View File

@ -1,13 +1,10 @@
.lacsso.modal-overlay.modal-open .modal-container.modal-logs {
max-height: 100%;
}
.lacsso {
&.full-width-modal {
&.modal-container {
width: calc(100% - 40px);
max-width: 990px;
margin: 0 auto;
margin-left: auto;
margin-right: auto;
}
}

View File

@ -243,6 +243,10 @@ UL.list-lines {
position : relative;
}
.modal-container .footer-actions {
margin-bottom: 0;
}
.well {
.footer-actions {
padding-bottom: 0;

View File

@ -28,8 +28,8 @@ export default Ember.Object.extend(Ember.Evented, {
},
available: function() {
return C.ACTIVEISH_STATES.indexOf(this.get('resource.state')) >= 0;
}.property('resource.state'),
return C.ACTIVEISH_STATES.indexOf(this.get('resource.state')) >= 0 && this.get('resource.healthState') !== 'started-once';
}.property('resource.{state,healthState}'),
active: Ember.computed.and('available', 'connected'),

View File

@ -54,7 +54,7 @@
"forever-agent": "^0.6.1",
"glob": "^5.0.3",
"http-proxy": "^1.11.1",
"lacsso": "^0.0.31",
"lacsso": "^0.0.32",
"liquid-fire": "0.26.1",
"loader.js": "^4.0.1",
"shell-quote": "^1.4.3",