mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 20:51:21 -03:30
making insights credential required on projects page
and changing label to "Credential" instead of "Red Hat Insights"
This commit is contained in:
parent
7a11d85b72
commit
081a545158
@ -348,6 +348,7 @@ export function ProjectsAdd($scope, $rootScope, $compile, $location, $log,
|
||||
});
|
||||
|
||||
$scope.scmRequired = false;
|
||||
$scope.credRequired = false;
|
||||
master.scm_type = $scope.scm_type;
|
||||
});
|
||||
|
||||
@ -408,6 +409,7 @@ export function ProjectsAdd($scope, $rootScope, $compile, $location, $log,
|
||||
if ($scope.scm_type) {
|
||||
$scope.pathRequired = ($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';
|
||||
}
|
||||
|
||||
@ -442,7 +444,8 @@ export function ProjectsAdd($scope, $rootScope, $compile, $location, $log,
|
||||
case 'insights':
|
||||
$scope.pathRequired = false;
|
||||
$scope.scmRequired = false;
|
||||
$scope.credentialLabel = "Red Hat Insights";
|
||||
$scope.credRequired = true;
|
||||
$scope.credentialLabel = "Credential";
|
||||
break;
|
||||
default:
|
||||
$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.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';
|
||||
Wait('stop');
|
||||
|
||||
@ -706,6 +710,7 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
|
||||
if ($scope.scm_type) {
|
||||
$scope.pathRequired = ($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');
|
||||
}
|
||||
|
||||
@ -738,7 +743,8 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
|
||||
case 'insights':
|
||||
$scope.pathRequired = false;
|
||||
$scope.scmRequired = false;
|
||||
$scope.credentialLabel = "Red Hat Insights";
|
||||
$scope.credRequired = true;
|
||||
$scope.credentialLabel = "Credential";
|
||||
break;
|
||||
default:
|
||||
$scope.credentialLabel = "SCM Credential";
|
||||
|
||||
@ -136,6 +136,11 @@ angular.module('ProjectFormDefinition', ['SchedulesListDefinition'])
|
||||
search: {
|
||||
kind: 'scm'
|
||||
},
|
||||
autopopulateLookup: false,
|
||||
awRequiredWhen: {
|
||||
reqExpression: "credRequired",
|
||||
init: false
|
||||
},
|
||||
ngShow: "scm_type && scm_type.value !== 'manual'",
|
||||
sourceModel: 'credential',
|
||||
awLookupType: 'scm_credential',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user