fixing conflicts (#29585)

This commit is contained in:
James Gowdy 2019-01-30 19:01:25 +00:00 committed by GitHub
parent deebf58fd2
commit a51debce68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 3 deletions

View file

@ -41,6 +41,9 @@ export class DataRecognizer extends Component {
));
if (typeof this.results === 'object') {
this.results.count = results.length;
if (typeof this.results.onChange === 'function') {
this.results.onChange();
}
}
this.setState({

View file

@ -92,7 +92,12 @@ module
$scope.metricFieldFilter = '';
$scope.fieldFilterIcon = 0;
$scope.fieldFilter = '';
$scope.recognizerResults = { count: 0 };
$scope.recognizerResults = {
count: 0,
onChange() {
$scope.$applyAsync();
}
};
$scope.showSidebar = isFullLicense();

View file

@ -541,6 +541,7 @@ module.controller('MlNewJob',
msgs.info('New Job \'' + result.resp.job_id + '\' added');
// update status
$scope.ui.saveStatus.job = 2;
$scope.$applyAsync();
// save successful, attempt to open the job
mlJobService.openJob($scope.job.job_id)
@ -563,10 +564,14 @@ module.controller('MlNewJob',
.catch((resp) => {
msgs.error('Could not create datafeed: ', resp);
$scope.saveLock = false;
})
.then(() => {
$scope.$applyAsync();
});
} else {
// no datafeed, so save is complete
$scope.saveLock = false;
$scope.$applyAsync();
}
}
@ -577,22 +582,26 @@ module.controller('MlNewJob',
$scope.ui.saveStatus.job = -1;
$scope.saveLock = false;
msgs.error('Save failed: ' + result.resp.message);
$scope.$applyAsync();
}
}).catch((result) => {
$scope.ui.saveStatus.job = -1;
$scope.saveLock = false;
msgs.error('Save failed: ' + result.resp.message);
$scope.$applyAsync();
});
}
})
.catch(() => {
msgs.error('Save failed');
console.log('save(): job validation failed. Jobs list could not be loaded.');
$scope.$applyAsync();
});
}
else {
msgs.error(jobValid.message);
console.log('save(): job validation failed');
$scope.$applyAsync();
}
};
@ -603,6 +612,7 @@ module.controller('MlNewJob',
})
.then(() => {
msgs.clear();
$scope.$applyAsync();
$location.path('jobs');
});
};

View file

@ -420,6 +420,7 @@ module
})
.catch((resp) => {
msgs.error('Save datafeed failed: ', resp);
$scope.$applyAsync();
});
}
};

View file

@ -30,7 +30,7 @@ import { ml } from 'plugins/ml/services/ml_api_service';
import chrome from 'ui/chrome';
const mlAnnotationsEnabled = chrome.getInjected('mlAnnotationsEnabled', false);
module.directive('mlTimeseriesChart', function () {
module.directive('mlTimeseriesChart', function ($timeout) {
function link(scope, element) {
// Key dimensions for the viz and constituent charts.
@ -81,7 +81,9 @@ module.directive('mlTimeseriesChart', function () {
renderReactComponent();
scope.$on('render', () => {
renderReactComponent();
$timeout(() => {
renderReactComponent();
});
});
function renderFocusChart() {