mirror of https://github.com/rancher/ui.git
Bug fixes
This commit is contained in:
parent
d4ab881161
commit
222a26b05f
|
|
@ -113,7 +113,7 @@ export default Ember.Route.extend({
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.replaceWith('index');
|
this.replaceWith('authenticated');
|
||||||
}
|
}
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
this.controllerFor('application').setProperties({
|
this.controllerFor('application').setProperties({
|
||||||
|
|
|
||||||
|
|
@ -189,10 +189,10 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
return this.get('store').find('project', null, opt);
|
return this.get('store').find('project', null, opt);
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
|
||||||
activate: function() {
|
activate: function() {
|
||||||
|
this._super();
|
||||||
var store = this.get('store');
|
var store = this.get('store');
|
||||||
var boundTypeify = store._typeify.bind(store);
|
var boundTypeify = store._typeify.bind(store,0);
|
||||||
|
|
||||||
var url = "ws://"+window.location.host + this.get('app.wsEndpoint');
|
var url = "ws://"+window.location.host + this.get('app.wsEndpoint');
|
||||||
var session = this.get('session');
|
var session = this.get('session');
|
||||||
|
|
@ -208,20 +208,9 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on('message', (event) => {
|
socket.on('message', (event) => {
|
||||||
var d = JSON.parse(event.data, boundTypeify);
|
var d = boundTypeify(JSON.parse(event.data));
|
||||||
//this._trySend('subscribeMessage',d);
|
//this._trySend('subscribeMessage',d);
|
||||||
|
|
||||||
var str = d.name;
|
|
||||||
if ( d.resourceType )
|
|
||||||
{
|
|
||||||
str += ' ' + d.resourceType;
|
|
||||||
|
|
||||||
if ( d.resourceId )
|
|
||||||
{
|
|
||||||
str += ' ' + d.resourceId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var action;
|
var action;
|
||||||
if ( d.name === 'resource.change' )
|
if ( d.name === 'resource.change' )
|
||||||
{
|
{
|
||||||
|
|
@ -251,6 +240,7 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
},
|
},
|
||||||
|
|
||||||
deactivate: function() {
|
deactivate: function() {
|
||||||
|
this._super();
|
||||||
var socket = this.get('socket');
|
var socket = this.get('socket');
|
||||||
if ( socket )
|
if ( socket )
|
||||||
{
|
{
|
||||||
|
|
@ -261,6 +251,8 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
||||||
this.get('store').reset();
|
this.get('store').reset();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
actions: {
|
||||||
error: function(err,transition) {
|
error: function(err,transition) {
|
||||||
// Unauthorized error, send back to login screen
|
// Unauthorized error, send back to login screen
|
||||||
if ( err.status === 401 )
|
if ( err.status === 401 )
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ export default Ember.Route.extend({
|
||||||
this._super.apply(this,arguments);
|
this._super.apply(this,arguments);
|
||||||
if ( !this.get('app.authenticationEnabled') )
|
if ( !this.get('app.authenticationEnabled') )
|
||||||
{
|
{
|
||||||
this.transitionTo('index');
|
this.transitionTo('authenticated');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"broccoli-asset-rev": "^2.0.2",
|
"broccoli-asset-rev": "^2.0.2",
|
||||||
"broccoli-sass": "0.6.2",
|
"broccoli-sass": "0.6.2",
|
||||||
"ember-api-store": "^1.1.4",
|
"ember-api-store": "^1.1.5",
|
||||||
"ember-browserify": "^0.6.4",
|
"ember-browserify": "^0.6.4",
|
||||||
"ember-cli": "0.2.7",
|
"ember-cli": "0.2.7",
|
||||||
"ember-cli-app-version": "0.3.3",
|
"ember-cli-app-version": "0.3.3",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue