Skip to content

Commit

Permalink
#83 Fix refresh analyzers button
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Apr 5, 2018
1 parent 2bc9adc commit abf26e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -157,13 +157,13 @@ export default class OrganizationAnalyzersController {

refreshAnalyzers() {
this.AnalyzerService.scan()
.then(() => this.AnalyzerService.definitions())
.then(() => this.AnalyzerService.definitions(true))
.then(defintions => {
this.analyzerDefinitions = defintions;
this.$onInit();
this.reload();
this.NotificationService.success('Analyzer definitions refreshed.');
})
.catch(err =>
.catch(() =>
this.NotificationService.error(
'Failed to refresh analyzer definitions.'
)
Expand Down
4 changes: 2 additions & 2 deletions www/src/app/pages/analyzers/analyzers.service.js
Expand Up @@ -23,10 +23,10 @@ export default class AnalyzerService {
return this.dataTypes;
}

definitions() {
definitions(force) {
let defered = this.$q.defer();

if (this.analyzerDefinitions === null) {
if (force || this.analyzerDefinitions === null) {
this.$http.get('./api/analyzerdefinition').then(
response => {
this.analyzerDefinitions = _.keyBy(response.data, 'id');
Expand Down

0 comments on commit abf26e2

Please sign in to comment.