mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 14:27:42 -02:30
making insights credential required on projects page
and changing label to "Credential" instead of "Red Hat Insights"
This commit is contained in:
@@ -348,6 +348,7 @@ export function ProjectsAdd($scope, $rootScope, $compile, $location, $log,
|
|||||||
});
|
});
|
||||||
|
|
||||||
$scope.scmRequired = false;
|
$scope.scmRequired = false;
|
||||||
|
$scope.credRequired = false;
|
||||||
master.scm_type = $scope.scm_type;
|
master.scm_type = $scope.scm_type;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -408,6 +409,7 @@ export function ProjectsAdd($scope, $rootScope, $compile, $location, $log,
|
|||||||
if ($scope.scm_type) {
|
if ($scope.scm_type) {
|
||||||
$scope.pathRequired = ($scope.scm_type.value === 'manual') ? true : false;
|
$scope.pathRequired = ($scope.scm_type.value === 'manual') ? true : false;
|
||||||
$scope.scmRequired = ($scope.scm_type.value !== 'manual') ? true : false;
|
$scope.scmRequired = ($scope.scm_type.value !== 'manual') ? true : false;
|
||||||
|
$scope.credRequired = ($scope.scm_type.value === 'insights') ? true : false;
|
||||||
$scope.scmBranchLabel = ($scope.scm_type.value === 'svn') ? 'Revision #' : 'SCM Branch';
|
$scope.scmBranchLabel = ($scope.scm_type.value === 'svn') ? 'Revision #' : 'SCM Branch';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -442,7 +444,8 @@ export function ProjectsAdd($scope, $rootScope, $compile, $location, $log,
|
|||||||
case 'insights':
|
case 'insights':
|
||||||
$scope.pathRequired = false;
|
$scope.pathRequired = false;
|
||||||
$scope.scmRequired = false;
|
$scope.scmRequired = false;
|
||||||
$scope.credentialLabel = "Red Hat Insights";
|
$scope.credRequired = true;
|
||||||
|
$scope.credentialLabel = "Credential";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$scope.credentialLabel = "SCM Credential";
|
$scope.credentialLabel = "SCM Credential";
|
||||||
@@ -518,6 +521,7 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
|
|||||||
|
|
||||||
$scope.pathRequired = ($scope.scm_type.value === 'manual') ? true : false;
|
$scope.pathRequired = ($scope.scm_type.value === 'manual') ? true : false;
|
||||||
$scope.scmRequired = ($scope.scm_type.value !== 'manual') ? true : false;
|
$scope.scmRequired = ($scope.scm_type.value !== 'manual') ? true : false;
|
||||||
|
$scope.credRequired = ($scope.scm_type.value === 'insights') ? true : false;
|
||||||
$scope.scmBranchLabel = ($scope.scm_type.value === 'svn') ? 'Revision #' : 'SCM Branch';
|
$scope.scmBranchLabel = ($scope.scm_type.value === 'svn') ? 'Revision #' : 'SCM Branch';
|
||||||
Wait('stop');
|
Wait('stop');
|
||||||
|
|
||||||
@@ -706,6 +710,7 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
|
|||||||
if ($scope.scm_type) {
|
if ($scope.scm_type) {
|
||||||
$scope.pathRequired = ($scope.scm_type.value === 'manual') ? true : false;
|
$scope.pathRequired = ($scope.scm_type.value === 'manual') ? true : false;
|
||||||
$scope.scmRequired = ($scope.scm_type.value !== 'manual') ? true : false;
|
$scope.scmRequired = ($scope.scm_type.value !== 'manual') ? true : false;
|
||||||
|
$scope.credRequired = ($scope.scm_type.value === 'insights') ? true : false;
|
||||||
$scope.scmBranchLabel = ($scope.scm_type.value === 'svn') ? i18n._('Revision #') : i18n._('SCM Branch');
|
$scope.scmBranchLabel = ($scope.scm_type.value === 'svn') ? i18n._('Revision #') : i18n._('SCM Branch');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -738,7 +743,8 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
|
|||||||
case 'insights':
|
case 'insights':
|
||||||
$scope.pathRequired = false;
|
$scope.pathRequired = false;
|
||||||
$scope.scmRequired = false;
|
$scope.scmRequired = false;
|
||||||
$scope.credentialLabel = "Red Hat Insights";
|
$scope.credRequired = true;
|
||||||
|
$scope.credentialLabel = "Credential";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$scope.credentialLabel = "SCM Credential";
|
$scope.credentialLabel = "SCM Credential";
|
||||||
|
|||||||
@@ -136,6 +136,11 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
|||||||
search: {
|
search: {
|
||||||
kind: 'scm'
|
kind: 'scm'
|
||||||
},
|
},
|
||||||
|
autopopulateLookup: false,
|
||||||
|
awRequiredWhen: {
|
||||||
|
reqExpression: "credRequired",
|
||||||
|
init: false
|
||||||
|
},
|
||||||
ngShow: "scm_type && scm_type.value !== 'manual'",
|
ngShow: "scm_type && scm_type.value !== 'manual'",
|
||||||
sourceModel: 'credential',
|
sourceModel: 'credential',
|
||||||
awLookupType: 'scm_credential',
|
awLookupType: 'scm_credential',
|
||||||
|
|||||||
Reference in New Issue
Block a user