mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 12:20:45 -03:30
Merge branch 'release_3.3.0' into fixTokenScopeAddInUI
This commit is contained in:
commit
a75da0fd58
@ -1073,7 +1073,7 @@ class UserAuthorizedTokenSerializer(BaseOAuth2TokenSerializer):
|
||||
validated_data['expires'] = now() + timedelta(
|
||||
seconds=settings.OAUTH2_PROVIDER['ACCESS_TOKEN_EXPIRE_SECONDS']
|
||||
)
|
||||
obj = super(OAuth2TokenSerializer, self).create(validated_data)
|
||||
obj = super(UserAuthorizedTokenSerializer, self).create(validated_data)
|
||||
obj.save()
|
||||
if obj.application is not None:
|
||||
RefreshToken.objects.create(
|
||||
|
||||
@ -366,6 +366,8 @@
|
||||
}
|
||||
|
||||
.JobResults-resultRowText {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
width: ~"calc(70% - 20px)";
|
||||
flex: 1 0 auto;
|
||||
text-transform: none;
|
||||
|
||||
@ -389,27 +389,29 @@ function getResultTracebackDetails () {
|
||||
}
|
||||
|
||||
function getCredentialDetails () {
|
||||
const credential = resource.model.get('summary_fields.credential');
|
||||
const credentials = resource.model.get('summary_fields.credentials');
|
||||
|
||||
if (!credential) {
|
||||
let credentialTags = [];
|
||||
|
||||
if (!credentials || credentials.length < 1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let label = strings.get('labels.CREDENTIAL');
|
||||
credentialTags = credentials.map((cred) => buildCredentialDetails(cred));
|
||||
|
||||
if (resource.type === 'playbook') {
|
||||
label = strings.get('labels.MACHINE_CREDENTIAL');
|
||||
}
|
||||
const label = strings.get('labels.CREDENTIAL');
|
||||
const value = credentialTags;
|
||||
|
||||
if (resource.type === 'inventory') {
|
||||
label = strings.get('labels.SOURCE_CREDENTIAL');
|
||||
}
|
||||
return { label, value };
|
||||
}
|
||||
|
||||
function buildCredentialDetails (credential) {
|
||||
const icon = `${credential.kind}`;
|
||||
const link = `/#/credentials/${credential.id}`;
|
||||
const tooltip = strings.get('tooltips.CREDENTIAL');
|
||||
const value = $filter('sanitize')(credential.name);
|
||||
|
||||
return { label, link, tooltip, value };
|
||||
return { icon, link, tooltip, value };
|
||||
}
|
||||
|
||||
function getForkDetails () {
|
||||
@ -679,7 +681,7 @@ function JobDetailsController (
|
||||
vm.launchedBy = getLaunchedByDetails();
|
||||
vm.jobExplanation = getJobExplanationDetails();
|
||||
vm.verbosity = getVerbosityDetails();
|
||||
vm.credential = getCredentialDetails();
|
||||
vm.credentials = getCredentialDetails();
|
||||
vm.forks = getForkDetails();
|
||||
vm.limit = getLimitDetails();
|
||||
vm.instanceGroup = getInstanceGroupDetails();
|
||||
|
||||
@ -216,15 +216,18 @@
|
||||
</div>
|
||||
|
||||
<!-- CREDENTIAL DETAIL -->
|
||||
<div class="JobResults-resultRow" ng-if="vm.credential">
|
||||
<label class="JobResults-resultRowLabel">{{ vm.credential.label }}</label>
|
||||
<div class="JobResults-resultRow" ng-if="vm.credentials">
|
||||
<label class="JobResults-resultRowLabel">{{ vm.credentials.label }}</label>
|
||||
<div class="JobResults-resultRowText">
|
||||
<a href="{{ vm.credential.link }}"
|
||||
aw-tool-tip="{{ vm.credential.tooltip }}"
|
||||
<at-tag
|
||||
ng-repeat="credential in vm.credentials.value"
|
||||
tag="credential.value"
|
||||
icon="{{ credential.icon }}"
|
||||
link="{{ credential.link }}"
|
||||
aw-tool-tip="{{ credential.tooltip }}"
|
||||
data-placement="top"
|
||||
data-tip-watch="vm.credential.tooltip">
|
||||
{{ vm.credential.value }}
|
||||
</a>
|
||||
data-tip-watch="credential.tooltip">
|
||||
</at-tag>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ function OutputStrings (BaseString) {
|
||||
|
||||
ns.search = {
|
||||
ADDITIONAL_INFORMATION_HEADER: t.s('ADDITIONAL_INFORMATION'),
|
||||
ADDITIONAL_INFORMATION: t.s('For additional information on advanced search search syntax please see the Ansible Tower'),
|
||||
ADDITIONAL_INFORMATION: t.s('For additional information on advanced search syntax please see the Ansible Tower'),
|
||||
CLEAR_ALL: t.s('CLEAR ALL'),
|
||||
DOCUMENTATION: t.s('documentation'),
|
||||
EXAMPLES: t.s('EXAMPLES'),
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
</form>
|
||||
|
||||
<div class="jobz-tagz">
|
||||
<div class="TagComponentWrapper" ng-repeat="tag in vm.tags track by $index">
|
||||
<div ng-repeat="tag in vm.tags track by $index">
|
||||
<at-tag tag="tag" remove-tag="vm.removeSearchTag($index)"></at-tag>
|
||||
</div>
|
||||
<div class="jobz-searchClearAllContainer">
|
||||
|
||||
@ -170,7 +170,6 @@
|
||||
}
|
||||
|
||||
.at-RowItem-tag {
|
||||
text-transform: uppercase;
|
||||
font-weight: 100;
|
||||
background-color: @at-color-list-row-item-tag-background;
|
||||
border-radius: @at-border-radius;
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
.TagComponentWrapper {
|
||||
padding: @at-space;
|
||||
}
|
||||
.TagComponent {
|
||||
color: white;
|
||||
color: @at-white;
|
||||
cursor: default;
|
||||
background: @at-blue;
|
||||
border-radius: @at-space;
|
||||
font-size: 12px;
|
||||
@ -12,30 +10,48 @@
|
||||
min-height: @at-space-4x;
|
||||
overflow: hidden;
|
||||
max-width: 200px;
|
||||
margin: @at-space;
|
||||
}
|
||||
|
||||
.TagComponent-name {
|
||||
color: @at-white;
|
||||
margin: 2px @at-space-2x;
|
||||
align-self: center;
|
||||
word-break: break-word;
|
||||
text-transform: lowercase;
|
||||
}
|
||||
|
||||
.TagComponent--cloud {
|
||||
&:before {
|
||||
content: '\f0c2';
|
||||
color: white;
|
||||
height: @at-space-4x;
|
||||
width: @at-space-4x;
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: @at-white;
|
||||
}
|
||||
}
|
||||
|
||||
.TagComponent--key {
|
||||
&:before {
|
||||
.TagComponent-icon {
|
||||
line-height: 20px;
|
||||
margin-left: @at-space-2x;
|
||||
|
||||
&--cloud:before {
|
||||
content: '\f0c2';
|
||||
}
|
||||
|
||||
&--insights:before {
|
||||
content: '\f129';
|
||||
}
|
||||
|
||||
&--net:before {
|
||||
content: '\f0e8';
|
||||
}
|
||||
|
||||
&--scm:before {
|
||||
content: '\f126';
|
||||
}
|
||||
|
||||
&--ssh:before {
|
||||
content: '\f084';
|
||||
color: white;
|
||||
height: @at-space-4x;
|
||||
width: @at-space-4x;
|
||||
}
|
||||
|
||||
&--vault:before {
|
||||
content: '\f187';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,6 +8,8 @@ function atTag () {
|
||||
templateUrl,
|
||||
scope: {
|
||||
tag: '=',
|
||||
icon: '@?',
|
||||
link: '@?',
|
||||
removeTag: '&?',
|
||||
},
|
||||
};
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
<div class="TagComponent" ng-transclude>
|
||||
<div class="TagComponent-name">{{ tag }}</div>
|
||||
<div ng-if="icon" class="fa TagComponent-icon TagComponent-icon--{{icon}}"></div>
|
||||
<a ng-if="link" class="TagComponent-name" href="{{ link }}">{{ tag }}</a>
|
||||
<div ng-if="!link" class="TagComponent-name">{{ tag }}</div>
|
||||
<div ng-if="removeTag" class="TagComponent-button" ng-click="removeTag(index)">
|
||||
<i class="fa fa-times TagComponent-button__delete"></i>
|
||||
</div>
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
</div>
|
||||
<div class="SmartSearch-keyRow">
|
||||
<b>{{ 'ADDITIONAL INFORMATION' | translate }}:</b>
|
||||
<span>{{ 'For additional information on advanced search search syntax please see the Ansible Tower' | translate }}
|
||||
<span>{{ 'For additional information on advanced search syntax please see the Ansible Tower' | translate }}
|
||||
<a ng-attr-href="{{ documentationLink || undefined }}" target="_blank"> {{ 'documentation' | translate }}</a>.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user