Created
March 9, 2016 20:09
-
-
Save Mariusio/dd1ae1e4d803b7e6781d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
showDashboardLink: false, | |
didReceiveAttrs() { | |
console.log("didReceiveAttrs"); | |
if (this.get('session.isAuthenticated')) { | |
return this.get('store').findAll('datasource').then((datasources) => { | |
return this.get('store').filter('datasource', {}, function(datasource) { | |
return datasource.get('id') != null; | |
}).then((datasources) => { | |
console.log("datasources.get('length')"); | |
console.log(datasources.get('length')); | |
if (datasources.get('length') != 0) { | |
this.set('showDashboardLink', true); | |
} | |
return datasources; | |
}); | |
}); | |
}; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment