The Project selected has a status of \"failed\". You must run a successful update before you can select an inventory file.";
- break;
- case 'never updated':
- msg = "
The Project selected has a status of \"never updated\". You must run a successful update before you can select an inventory file.";
- break;
- case 'missing':
- msg = '
The selected project has a status of \"missing\". Please check the server and make sure ' +
- ' the directory exists and file permissions are set correctly.
';
- break;
- }
- if (msg) {
- Alert('Warning', msg, 'alert-info alert-info--noTextTransform', null, null, null, null, true);
- }
- })
- .error(function (data, status) {
- ProcessErrors($scope, data, status, form, { hdr: 'Error!',
- msg: 'Failed to get project ' + $scope.project + '. GET returned status: ' + status });
- });
- }
- };
-
// Register a watcher on project_name
if ($scope.getInventoryFilesUnregister) {
$scope.getInventoryFilesUnregister();
@@ -84,7 +54,6 @@ export default ['$state', '$stateParams', '$scope', 'SourcesFormDefinition',
$scope.getInventoryFilesUnregister = $scope.$watch('project', function (newValue, oldValue) {
if (newValue !== oldValue) {
getInventoryFiles(newValue);
- checkSCMStatus();
}
});
diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js
index f4a68679ed..8075977ccf 100644
--- a/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js
+++ b/awx/ui/client/src/inventories-hosts/inventories/related/sources/edit/sources-edit.controller.js
@@ -8,12 +8,12 @@ export default ['$state', '$stateParams', '$scope', 'ParseVariableString',
'rbacUiControlService', 'ToJSON', 'ParseTypeChange', 'GroupsService',
'GetChoices', 'GetBasePath', 'CreateSelect2', 'GetSourceTypeOptions',
'inventorySourceData', 'SourcesService', 'inventoryData', 'inventorySourcesOptions', 'Empty',
- 'Wait', 'Rest', 'Alert', 'ProcessErrors',
+ 'Wait', 'Rest', 'Alert',
function($state, $stateParams, $scope, ParseVariableString,
rbacUiControlService, ToJSON,ParseTypeChange, GroupsService,
GetChoices, GetBasePath, CreateSelect2, GetSourceTypeOptions,
inventorySourceData, SourcesService, inventoryData, inventorySourcesOptions, Empty,
- Wait, Rest, Alert, ProcessErrors) {
+ Wait, Rest, Alert) {
function init() {
$scope.projectBasePath = GetBasePath('projects');
@@ -136,33 +136,6 @@ export default ['$state', '$stateParams', '$scope', 'ParseVariableString',
Wait('stop');
});
}
-
- if (!Empty($scope.project)) {
- Rest.setUrl(GetBasePath('projects') + $scope.project + '/');
- Rest.get()
- .success(function (data) {
- var msg;
- switch (data.status) {
- case 'failed':
- msg = "
The Project selected has a status of \"failed\". You must run a successful update before you can select an inventory file.";
- break;
- case 'never updated':
- msg = "
The Project selected has a status of \"never updated\". You must run a successful update before you can select an inventory file.";
- break;
- case 'missing':
- msg = '
The selected project has a status of \"missing\". Please check the server and make sure ' +
- ' the directory exists and file permissions are set correctly.
';
- break;
- }
- if (msg) {
- Alert('Warning', msg, 'alert-info alert-info--noTextTransform', null, null, null, null, true);
- }
- })
- .error(function (data, status) {
- ProcessErrors($scope, data, status, null, { hdr: 'Error!',
- msg: 'Failed to get project ' + $scope.project + '. GET returned status: ' + status });
- });
- }
}
function initSourceSelect() {