Commit 5ba37e2b authored by Steve Laskaridis's avatar Steve Laskaridis
Browse files

Merge pull request #212 from ioantsaf/ember-fixes

Various ember changes
parents d36de6c5 f9185c48
......@@ -23,6 +23,7 @@ module.exports = function(environment) {
};
ENV.host = "https://{{ ansible_hostname }}.vm.okeanos.grnet.gr"
ENV.port = 443
ENV.contentSecurityPolicy = {
'connect-src': "'self' https://{{ ansible_hostname }}.vm.okeanos.grnet.gr:443"
......@@ -37,6 +38,7 @@ module.exports = function(environment) {
ENV.refresh_interval = 2000;
ENV.redirect_delay = 3000;
ENV.message_dismiss = 4000;
if (environment === 'development') {
// ENV.APP.LOG_RESOLVER = true;
......
......@@ -3,7 +3,7 @@ import ENV from 'frontend/config/environment';
import DataAdapterMixin from 'ember-simple-auth/mixins/data-adapter-mixin';
export default DS.JSONAPIAdapter.extend(DataAdapterMixin, {
host: ENV.host + ':443',
host: ENV.host + ':' + ENV.port,
namespace: 'api',
headers: {
'Accept': 'application/json',
......
......@@ -2,6 +2,6 @@ import DS from "ember-data";
import ENV from 'frontend/config/environment';
export default DS.JSONAPIAdapter.extend({
host: ENV.host + ':443',
host: ENV.host + ':' + ENV.port,
namespace: 'api/apps/',
});
......@@ -14,7 +14,7 @@ export default Base.extend({
},
authenticate: function(token) {
let host = ENV.host + ':443',
let host = ENV.host + ':' + ENV.port,
namespace = 'api/authenticate',
authUrl = [ host, namespace ].join('/');
return new Ember.RSVP.Promise((resolve, reject) => {
......
import Ember from "ember";
import ENV from 'frontend/config/environment';
export default Ember.Controller.extend({
failure: false,
......@@ -13,14 +14,14 @@ export default Ember.Controller.extend({
Ember.run.later((function () {
_this.store.unloadAll('lambda-instance');
_this.set("request", false);
}), 2000);
}), ENV.message_dismiss);
},
start_stop: function()
{
var _this = this;
Ember.run.later((function () {
_this.set("request", false);
}), 4000);
}), ENV.message_dismiss);
},
close_alert: function()
{
......
import Ember from "ember";
import ENV from 'frontend/config/environment';
export default Ember.Controller.extend({
session: Ember.inject.service('session'),
......@@ -23,7 +24,7 @@ export default Ember.Controller.extend({
Ember.run.later((function () {
_this.set("request", false);
_this.set("app_request", false);
}), 4000);
}), ENV.message_dismiss);
},
withdraw: function()
{
......@@ -32,7 +33,7 @@ export default Ember.Controller.extend({
_this.store.unloadAll('lambda-app');
_this.set("request", false);
_this.set("app_request", false);
}), 3000);
}), ENV.message_dismiss);
},
delete_instance: function(instance_id) {
if (confirm("Are you sure you want to delete this lambda instance?")) {
......
import Ember from 'ember';
import pagedArray from 'ember-cli-pagination/computed/paged-array';
import ENV from 'frontend/config/environment';
export default Ember.ArrayController.extend({
success_delete: false,
......@@ -33,7 +34,7 @@ export default Ember.ArrayController.extend({
var _this = this;
Ember.run.later((function () {
_this.set("request", false);
}), 4000);
}), ENV.message_dismiss);
},
delete_instance: function(instance_id) {
......
......@@ -9,8 +9,10 @@ var LambdaApp = DS.Model.extend({
status_message: DS.attr(),
status_code: DS.attr('number'),
status_detail: DS.attr(),
status_failure_message: DS.attr(),
lambda_instances: DS.hasMany('lambda-instance'),
started: DS.attr('boolean')
started: DS.attr('boolean'),
execution_environment_name: DS.attr()
});
export default LambdaApp;
......@@ -71,6 +71,10 @@
<i class="fa fa-th"></i> <span>Applications</span>
{{/link-to}}
</li>
<li>
<a href="/api/docs">
<i class="fa fa-book"></i><span>API Documentation</span></a>
</li>
</ul>
</section>
<!-- /.sidebar -->
......
......@@ -105,6 +105,10 @@
<td>{{model.application.description}}</td>
</tr>
{{/if}}
<tr>
<th>Execution environment name</th>
<td>{{model.application.execution_environment_name}}</td>
</tr>
<tr>
<th>Status</th>
<td>{{lower-case model.application.status_message}}</td>
......@@ -117,6 +121,12 @@
<th>Status detail</th>
<td>{{model.application.status_detail}}</td>
</tr>
{{#if model.application.status_failure_message}}
<tr>
<th>Application failure message</th>
<td>{{model.application.status_failure_message}}</td>
</tr>
{{/if}}
</tbody>
</table>
......
......@@ -72,6 +72,7 @@
</div>
<!--box-tools-->
</div><!-- /.box-header -->
{{#if model.length}}
<div class="box-body">
<div class="row">
<div class="col-xs-12">
......@@ -135,8 +136,6 @@
{{/if}}
</td>
</tr>
{{else}}
No lambda applications under ownership.
{{/each}}
</tbody>
......@@ -153,6 +152,9 @@
</div><!--row-->
</div><!--box-body-->
{{else}}
<div class="pad">No lambda applications under ownership.</div>
{{/if}}
</div><!--box-->
</div><!--col-xs-12-->
</div><!--row-->
......
......@@ -86,6 +86,7 @@
{{/link-to}}
</div><!--box-tools-->
</div><!-- /.box-header -->
{{#if model.length}}
<div class="box-body">
<div class="row">
<div class="col-xs-12">
......@@ -191,8 +192,6 @@
</table>
</td>
</tr>
{{else}}
No lambda instances under ownership.
{{/each}}
</tbody>
......@@ -209,6 +208,9 @@
</div><!--row-->
</div><!--box-body-->
{{else}}
<div class="pad">No lambda instances under ownership.</div>
{{/if}}
</div><!--box-->
</div><!--col-xs-12-->
</div><!--row-->
......
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