Commit 8060b4f5 authored by Ioannis Tsafaras's avatar Ioannis Tsafaras
Browse files

Merge pull request #220 from efikalti/devel

Ember minor changes
parents 59d15d69 2dfdfa42
import Ember from 'ember';
export default Ember.Component.extend({
request: false,
failure: false,
actions: {
delete(lambdaApp) {
if (confirm("Are you sure you want to delete?")) {
var _this = this;
lambdaApp.deleteRecord();
lambdaApp.save().catch(function() {
_this.failure = true;
});
return false;
}
return false;
}
}
});
import Ember from 'ember';
export default Ember.Component.extend({
request: false,
failure: false,
actions: {
delete(lambdaInstance) {
var _this = this;
if (confirm("Are you sure you want to delete?")) {
lambdaInstance.deleteRecord();
lambdaInstance.save().catch(function() {
_this.failure = true;
});
// lambdaInstance.destroyRecord().catch(function() {
// _this.set('failure', true);
// });
return false;
}
return false;
}
}
});
<div>
<button name="del-btn" id="del-btn" class="btn btn-danger btn-xs" {{action "delete" lambdaApp on="click"}} >Delete</button>
</div>
{{#if (compare lambdaInstance.status_message '===' "DESTROYED")}}
<div>
<button name="del-btn" id="del-btn" class="btn btn-danger btn-xs disabled" disabled>Delete</button>
</div>
{{else if (compare lambdaInstance.status_message '===' "CLUSTER_FAILED")}}
<div>
<button name="del-btn" id="del-btn" class="btn btn-danger btn-xs disabled" disabled>Delete</button>
</div>
{{else}}
<div>
<button name="del-btn" id="del-btn" class="btn btn-danger btn-xs" {{action "delete" lambdaInstance on="click"}} >Delete</button>
</div>
{{/if}}
......@@ -50,7 +50,7 @@
actions you may take depending on the <i>status</i> of the Application.
</div>
<button name="del-btn" id="del-btn" class="btn btn-danger btn-primary pull-right" {{action "delete_app" model.application.id}}>Delete</button>
<button name="del-btn" id="del-btn" class="btn btn-danger btn-primary pull-right" {{action "delete_app" model.application.id}}><i class="fa fa-times"></i> Delete</button>
{{#if (compare model.application.status_code '==' '0')}}
{{#link-to 'deploy-app-1' model.application.id}}
<button class="btn btn-primary pull-right"
......
......@@ -109,7 +109,7 @@
<td>{{lower-case lambda-application.app_type}}</td>
<td>
<button name="del-btn" id="del-btn" class="btn btn-danger btn-xs" {{action "delete_app" lambda-application.id}}>Delete</button>
<button name="del-btn" id="del-btn" class="btn btn-danger btn-xs" {{action "delete_app" lambda-application.id}}><i class="fa fa-times"></i> Delete</button>
</td>
<td>
{{#link-to 'lambda-app' lambda-application.id}}
......
......@@ -58,7 +58,7 @@
</div>
<button name="del-btn" id="del-btn" class="btn btn-danger btn-primary pull-right" {{action "delete_instance" model.instance.id}}>Delete</button>
<button name="del-btn" id="del-btn" class="btn btn-danger btn-primary pull-right" {{action "delete_instance" model.instance.id}}><i class="fa fa-times"></i> Delete</button>
{{#if (compare model.instance.status_code '==' '0')}}
{{#link-to 'deploy-app-2' model.instance.id}}
<button class="btn btn-primary pull-right"
......@@ -78,14 +78,14 @@
{{/if}}
{{#tool-tip}}
{{#if (compare model.instance.status_code '==' '0')}}
{{instance-action start=true disabled=true status_message=model.instance.status_message}}
{{instance-action apps=model.apps check_apps=true stop=true instance=model.instance_action failure=failure instance-id=model.instance.id request=request message=message action="start_stop"}}
{{instance-action start=true disabled=true status_message=model.instance.status_message}}
{{else if (compare model.instance.status_code '==' '1')}}
{{instance-action stop=true disabled=true status_message=model.instance.status_message}}
{{instance-action start=true instance=model.instance_action instance-id=model.instance.id failure=failure request=request message=message action="start_stop"}}
{{else}}
{{instance-action start=true disabled=true status_message=model.instance.status_message}}
{{instance-action stop=true disabled=true status_message=model.instance.status_message}}
{{instance-action start=true disabled=true status_message=model.instance.status_message}}
{{/if}}
{{/tool-tip}}
</div>
......
......@@ -128,17 +128,17 @@
{{/link-to}}
</td>
<td>
<button name="del-btn" id="del-btn" class="btn btn-danger btn-xs" {{action "delete_instance" lambda-instance.id}}>Delete</button>
<button name="del-btn" id="del-btn" class="btn btn-danger btn-xs" {{action "delete_instance" lambda-instance.id}}><i class="fa fa-times"></i> Delete</button>
</td>
{{#if (compare lambda-instance.status_code '==' '0')}}
<td>
{{instance-action apps=apps xs=true stop=true check_apps=false started_app=lambda-instance.running_app instance=instance_action failure=failure instance-id=lambda-instance.id request=request message=message action="start_stop"}}
</td>
{{#tool-tip}}
<td>
{{instance-action start=true xs=true disabled=true status_message=lambda-instance.status_message}}
</td>
{{/tool-tip}}
<td>
{{instance-action apps=apps xs=true stop=true check_apps=false started_app=lambda-instance.running_app instance=instance_action failure=failure instance-id=lambda-instance.id request=request message=message action="start_stop"}}
</td>
<td>
{{#link-to "deploy-app-2" lambda-instance.id}}
<button class="btn btn-primary btn-xs"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment