mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Merge pull request #2784 from jlmitch5/fixClusterLicenseInfo
use post response if config get request erroneously doesnt have licen…
This commit is contained in:
commit
dc9f3b2b51
@ -98,11 +98,11 @@ export default
|
||||
$scope.submit = function() {
|
||||
Wait('start');
|
||||
CheckLicense.post($scope.newLicense.file, $scope.newLicense.eula)
|
||||
.then(() => {
|
||||
.then((licenseInfo) => {
|
||||
reset();
|
||||
|
||||
ConfigService.delete();
|
||||
ConfigService.getConfig()
|
||||
ConfigService.getConfig(licenseInfo)
|
||||
.then(function(config) {
|
||||
delete($rootScope.features);
|
||||
FeaturesService.get();
|
||||
|
||||
@ -21,7 +21,7 @@ export default
|
||||
delete(this.config);
|
||||
},
|
||||
|
||||
getConfig: function () {
|
||||
getConfig: function (licenseInfo) {
|
||||
var config = this.get(),
|
||||
that = this,
|
||||
deferred = $q.defer();
|
||||
@ -31,6 +31,11 @@ export default
|
||||
Wait('start');
|
||||
var promise = Rest.get();
|
||||
promise.then(function (response) {
|
||||
// if applicable, use the license POSTs response if the config GET request is not returned due to a
|
||||
// cluster cache update race condition
|
||||
if (_.isEmpty(response.data.license_info) && !_.isEmpty(licenseInfo)) {
|
||||
response.data.license_info = licenseInfo;
|
||||
}
|
||||
var config = response.data;
|
||||
$rootScope.configReady = true;
|
||||
Wait('stop');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user