Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/pods/container/shell/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default OverlayRoute.extend({
attachStdin: true,
attachStdout: true,
tty: true,
command: ['/bin/sh'],
command: ["/bin/sh","-c",'[ -x /bin/bash ] && exec /bin/bash || exec /bin/sh'],
};
var promise = container.doAction('execute',opt).then(function(exec) {
exec.set('instance', container);
Expand Down
7 changes: 6 additions & 1 deletion app/pods/container/shell/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default Overlay.extend({
templateName: 'container/shell',

status: 'Connecting...',
useClosed: false,
socket: null,
term: null,

Expand Down Expand Up @@ -49,13 +50,17 @@ export default Overlay.extend({
socket.onclose = function() {
self.set('status','Closed');
term.destroy();
self.send('overlayClose');
if ( !self.get('userClosed') )
{
self.send('overlayClose');
}
};
};
},

willDestroyElement: function() {
this.set('status','Closed');
this.set('userClosed',true);

var term = this.get('term');
if (term)
Expand Down
9 changes: 5 additions & 4 deletions app/pods/overlay/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,19 @@ export default Ember.Route.extend({

actions: {
goToPrevious: function() {
var route = this.get('previousRoute');
var self = this;
var route = self.get('previousRoute');
if ( route === 'loading' )
{
route = 'index';
}

var args = (this.get('previousParams')||[]).slice();
var args = (self.get('previousParams')||[]).slice();
args.unshift(route);
var res = this.transitionTo.apply(this,args);
var res = self.transitionTo.apply(self,args);

res.catch(function() {
this.transitionTo('index');
self.transitionTo('index');
});
},
}
Expand Down