mirror of
https://github.com/ansible/awx.git
synced 2026-02-18 19:50:05 -03:30
Refresh the page after pendo flag changes to make change effective immediately
This commit is contained in:
@@ -100,6 +100,7 @@ export default [
|
|||||||
.OAUTH2_PROVIDER.AUTHORIZATION_CODE_EXPIRE_SECONDS;
|
.OAUTH2_PROVIDER.AUTHORIZATION_CODE_EXPIRE_SECONDS;
|
||||||
var currentKeys = _.keys(data);
|
var currentKeys = _.keys(data);
|
||||||
$scope.requiredLogValues = {};
|
$scope.requiredLogValues = {};
|
||||||
|
$scope.originalSettings = data;
|
||||||
_.each(currentKeys, function(key) {
|
_.each(currentKeys, function(key) {
|
||||||
if(key === "LOG_AGGREGATOR_HOST") {
|
if(key === "LOG_AGGREGATOR_HOST") {
|
||||||
$scope.requiredLogValues.LOG_AGGREGATOR_HOST = data[key];
|
$scope.requiredLogValues.LOG_AGGREGATOR_HOST = data[key];
|
||||||
@@ -385,6 +386,7 @@ export default [
|
|||||||
var saveDeferred = $q.defer();
|
var saveDeferred = $q.defer();
|
||||||
clearApiErrors();
|
clearApiErrors();
|
||||||
Wait('start');
|
Wait('start');
|
||||||
|
const payload = getFormPayload();
|
||||||
SettingsService.patchConfiguration(getFormPayload())
|
SettingsService.patchConfiguration(getFormPayload())
|
||||||
.then(function(data) {
|
.then(function(data) {
|
||||||
loginUpdate();
|
loginUpdate();
|
||||||
@@ -402,6 +404,12 @@ export default [
|
|||||||
Toast-successIcon"></i>` +
|
Toast-successIcon"></i>` +
|
||||||
i18n._('Save Complete')
|
i18n._('Save Complete')
|
||||||
});
|
});
|
||||||
|
if(payload.PENDO_TRACKING_STATE && payload.PENDO_TRACKING_STATE !== $scope.originalSettings.PENDO_TRACKING_STATE) {
|
||||||
|
// Refreshing the page will pull in the new config and
|
||||||
|
// properly set pendo up/shut it off depending on the
|
||||||
|
// action
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(function(data) {
|
.catch(function(data) {
|
||||||
ProcessErrors($scope, data.data, data.status, formDefs[formTracker.getCurrent()],
|
ProcessErrors($scope, data.data, data.status, formDefs[formTracker.getCurrent()],
|
||||||
|
|||||||
Reference in New Issue
Block a user