mirror of https://github.com/rancher/ui.git
Merge pull request #98 from vincent99/master
Move machine transitioning message, remove DigitalOcean 512mb
This commit is contained in:
commit
b3f17fc020
|
|
@ -8,13 +8,13 @@
|
||||||
{{model.displayName}}
|
{{model.displayName}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{#link-to "host" model.id}}{{model.displayName}}{{/link-to}}
|
{{#link-to "host" model.id}}{{model.displayName}}{{/link-to}}
|
||||||
|
{{#if model.showTransitioningMessage}}
|
||||||
|
<div {{bind-attr class=":host-message model.isError:text-danger:text-muted"}}>
|
||||||
|
{{model.transitioningMessage}}
|
||||||
|
</div>
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{#if model.showTransitioningMessage}}
|
|
||||||
<div {{bind-attr class=":host-message model.isError:text-danger:text-muted"}}>
|
|
||||||
{{model.transitioningMessage}}
|
|
||||||
</div>
|
|
||||||
{{/if}}
|
|
||||||
{{#if model.isTransitioning}}
|
{{#if model.isTransitioning}}
|
||||||
<div class="progress progress-striped active">
|
<div class="progress progress-striped active">
|
||||||
<div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" {{bind-attr aria-valuenow=model.displayProgress style=model.progressStyle}}>
|
<div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" {{bind-attr aria-valuenow=model.displayProgress style=model.progressStyle}}>
|
||||||
|
|
@ -26,11 +26,20 @@
|
||||||
|
|
||||||
{{#if isMachine}}
|
{{#if isMachine}}
|
||||||
<div class="machine-info">
|
<div class="machine-info">
|
||||||
<i class="fa fa-spinner fa-spin"></i>
|
|
||||||
{{#if isActive}}
|
{{#if isActive}}
|
||||||
|
<i class="fa fa-spinner fa-spin"></i>
|
||||||
Waiting for host to check in…
|
Waiting for host to check in…
|
||||||
{{else}}
|
{{else}}
|
||||||
Setting up machine…
|
{{#if model.isError}}
|
||||||
|
{{#if model.transitioningMessage}}
|
||||||
|
<span class="text-danger">{{model.transitioningMessage}}</span>
|
||||||
|
{{else}}
|
||||||
|
<span class="text-danger">Error creating machine</span>
|
||||||
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
<div class="color:black;">Setting up machine…</div>
|
||||||
|
{{model.transitioningMessage}}
|
||||||
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ export default {
|
||||||
"1gb",
|
"1gb",
|
||||||
"4gb",
|
"4gb",
|
||||||
"8gb",
|
"8gb",
|
||||||
"512mb",
|
|
||||||
"64gb",
|
"64gb",
|
||||||
"48gb"
|
"48gb"
|
||||||
],
|
],
|
||||||
|
|
@ -55,7 +54,6 @@ export default {
|
||||||
"1gb",
|
"1gb",
|
||||||
"4gb",
|
"4gb",
|
||||||
"8gb",
|
"8gb",
|
||||||
"512mb",
|
|
||||||
"64gb",
|
"64gb",
|
||||||
"48gb"
|
"48gb"
|
||||||
],
|
],
|
||||||
|
|
@ -78,7 +76,6 @@ export default {
|
||||||
"1gb",
|
"1gb",
|
||||||
"4gb",
|
"4gb",
|
||||||
"8gb",
|
"8gb",
|
||||||
"512mb",
|
|
||||||
"64gb",
|
"64gb",
|
||||||
"48gb"
|
"48gb"
|
||||||
],
|
],
|
||||||
|
|
@ -101,7 +98,6 @@ export default {
|
||||||
"1gb",
|
"1gb",
|
||||||
"4gb",
|
"4gb",
|
||||||
"8gb",
|
"8gb",
|
||||||
"512mb",
|
|
||||||
"64gb",
|
"64gb",
|
||||||
"48gb"
|
"48gb"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ export default Ember.Route.extend({
|
||||||
var config = store.createRecord({
|
var config = store.createRecord({
|
||||||
type: 'digitaloceanConfig',
|
type: 'digitaloceanConfig',
|
||||||
accessToken: '',
|
accessToken: '',
|
||||||
size: '512mb',
|
size: '1gb',
|
||||||
region: 'nyc3',
|
region: 'nyc3',
|
||||||
image: 'ubuntu-14-04-x64'
|
image: 'ubuntu-14-04-x64'
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ $instance_action: #ededed;
|
||||||
.host-info {
|
.host-info {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-bottom: 1px solid #f9fafc;
|
border-bottom: 1px solid $host_border;
|
||||||
|
|
||||||
.host-info-item {
|
.host-info-item {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
|
|
@ -148,7 +148,8 @@ $instance_action: #ededed;
|
||||||
.machine-info {
|
.machine-info {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 90px;
|
padding: 10px;
|
||||||
|
white-space: normal;
|
||||||
color: #d2d7de;
|
color: #d2d7de;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,7 @@ var TransitioningResource = Resource.extend({
|
||||||
transitioningMessage: null,
|
transitioningMessage: null,
|
||||||
transitioningProgress: null,
|
transitioningProgress: null,
|
||||||
isTransitioning: Ember.computed.equal('transitioning','yes'),
|
isTransitioning: Ember.computed.equal('transitioning','yes'),
|
||||||
|
isError: Ember.computed.equal('transitioning','error'),
|
||||||
|
|
||||||
replaceWith: function() {
|
replaceWith: function() {
|
||||||
this._super.apply(this,arguments);
|
this._super.apply(this,arguments);
|
||||||
|
|
@ -193,8 +194,6 @@ var TransitioningResourceController = ResourceController.extend({
|
||||||
return state.substr(0,1).toUpperCase() + state.substr(1);
|
return state.substr(0,1).toUpperCase() + state.substr(1);
|
||||||
}.property('state'),
|
}.property('state'),
|
||||||
|
|
||||||
isError: Ember.computed.equal('transitioning','error'),
|
|
||||||
|
|
||||||
showTransitioningMessage: function() {
|
showTransitioningMessage: function() {
|
||||||
var trans = this.get('transitioning');
|
var trans = this.get('transitioning');
|
||||||
return (trans === 'yes' || trans === 'error') && (this.get('transitioningMessage')||'').length > 0;
|
return (trans === 'yes' || trans === 'error') && (this.get('transitioningMessage')||'').length > 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue