mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 03:47:36 -02:30
add selected credential tray to input source lookup
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
@import 'portalMode/_index';
|
@import 'portalMode/_index';
|
||||||
@import 'output/_index';
|
@import 'output/_index';
|
||||||
|
@import 'credentials/_index';
|
||||||
|
|
||||||
/** @define Popup Modal after create new token and applicaiton and save form */
|
/** @define Popup Modal after create new token and applicaiton and save form */
|
||||||
.PopupModal {
|
.PopupModal {
|
||||||
|
|||||||
21
awx/ui/client/features/credentials/_index.less
Normal file
21
awx/ui/client/features/credentials/_index.less
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
.InputSourceLookup-selectedItem {
|
||||||
|
display: flex;
|
||||||
|
flex: 0 0 100%;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 50px;
|
||||||
|
margin-top: 16px;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: @default-no-items-bord;
|
||||||
|
border: 1px solid @default-border;
|
||||||
|
}
|
||||||
|
|
||||||
|
.InputSourceLookup-selectedItemLabel {
|
||||||
|
color: @default-interface-txt;
|
||||||
|
text-transform: uppercase;
|
||||||
|
margin-right: 10px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.InputSourceLookup-selectedItemText {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
@@ -338,7 +338,7 @@ function AddEditCredentialsController (
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
vm.onInputSourceRowClick = ({ id, credential_type, name }) => {
|
vm.onInputSourceItemSelect = ({ id, credential_type, name }) => {
|
||||||
vm.inputSources.credentialId = id;
|
vm.inputSources.credentialId = id;
|
||||||
vm.inputSources.credentialName = name;
|
vm.inputSources.credentialName = name;
|
||||||
vm.inputSources.credentialTypeId = credential_type;
|
vm.inputSources.credentialTypeId = credential_type;
|
||||||
|
|||||||
@@ -46,13 +46,14 @@
|
|||||||
<at-input-source-lookup
|
<at-input-source-lookup
|
||||||
ng-if="vm.inputSources.field"
|
ng-if="vm.inputSources.field"
|
||||||
selected-id="vm.inputSources.credentialId"
|
selected-id="vm.inputSources.credentialId"
|
||||||
|
selected-name="vm.inputSources.credentialName"
|
||||||
tabs="vm.inputSources.tabs"
|
tabs="vm.inputSources.tabs"
|
||||||
form="vm.inputSources.form"
|
form="vm.inputSources.form"
|
||||||
on-close="vm.onInputSourceClose"
|
on-close="vm.onInputSourceClose"
|
||||||
on-next="vm.onInputSourceNext"
|
on-next="vm.onInputSourceNext"
|
||||||
on-select="vm.onInputSourceSelect"
|
on-select="vm.onInputSourceSelect"
|
||||||
on-tab-select="vm.onInputSourceTabSelect"
|
on-tab-select="vm.onInputSourceTabSelect"
|
||||||
on-row-click="vm.onInputSourceRowClick"
|
on-item-select="vm.onInputSourceItemSelect"
|
||||||
on-test="vm.onInputSourceTest"
|
on-test="vm.onInputSourceTest"
|
||||||
results-filter="vm.filterInputSourceCredentialResults"
|
results-filter="vm.filterInputSourceCredentialResults"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ function CredentialsStrings (BaseString) {
|
|||||||
METADATA: t.s('METADATA'),
|
METADATA: t.s('METADATA'),
|
||||||
NO_MATCH: t.s('No records matched your search.'),
|
NO_MATCH: t.s('No records matched your search.'),
|
||||||
NO_RECORDS: t.s('No external credentials available.'),
|
NO_RECORDS: t.s('No external credentials available.'),
|
||||||
|
SELECTED: t.s('selected'),
|
||||||
|
NONE_SELECTED: t.s('No credential selected'),
|
||||||
};
|
};
|
||||||
|
|
||||||
ns.add = {
|
ns.add = {
|
||||||
|
|||||||
@@ -29,9 +29,10 @@ export default {
|
|||||||
onNext: '=',
|
onNext: '=',
|
||||||
onSelect: '=',
|
onSelect: '=',
|
||||||
onTabSelect: '=',
|
onTabSelect: '=',
|
||||||
onRowClick: '=',
|
onItemSelect: '=',
|
||||||
onTest: '=',
|
onTest: '=',
|
||||||
selectedId: '=',
|
selectedId: '=',
|
||||||
|
selectedName: '=',
|
||||||
form: '=',
|
form: '=',
|
||||||
resultsFilter: '=',
|
resultsFilter: '=',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -13,6 +13,24 @@
|
|||||||
{{::vm.strings.get('inputSources.METADATA')}}
|
{{::vm.strings.get('inputSources.METADATA')}}
|
||||||
</at-tab>
|
</at-tab>
|
||||||
</at-tab-group>
|
</at-tab-group>
|
||||||
|
<div class="InputSourceLookup-selectedItem" ng-show="vm.tabs.credential._active">
|
||||||
|
<div class="InputSourceLookup-selectedItemLabel">
|
||||||
|
{{::vm.strings.get('inputSources.SELECTED')}}
|
||||||
|
</div>
|
||||||
|
<span>
|
||||||
|
<at-tag
|
||||||
|
ng-show="vm.selectedName"
|
||||||
|
tag="vm.selectedName"
|
||||||
|
icon="external"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
class="InputSourceLookup-selectedItemText"
|
||||||
|
ng-show="!vm.selectedName"
|
||||||
|
>
|
||||||
|
{{::vm.strings.get('inputSources.NONE_SELECTED')}}
|
||||||
|
</div>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<at-lookup-list
|
<at-lookup-list
|
||||||
ng-show="vm.tabs.credential._active"
|
ng-show="vm.tabs.credential._active"
|
||||||
resource-name="credential"
|
resource-name="credential"
|
||||||
@@ -24,8 +42,7 @@
|
|||||||
results-filter="vm.resultsFilter"
|
results-filter="vm.resultsFilter"
|
||||||
selected-id="vm.selectedId"
|
selected-id="vm.selectedId"
|
||||||
on-ready="vm.onReady"
|
on-ready="vm.onReady"
|
||||||
on-select="vm.onSelect"
|
on-item-select="vm.onItemSelect"
|
||||||
on-row-click="vm.onRowClick"
|
|
||||||
/>
|
/>
|
||||||
<at-form state="vm.form" autocomplete="off" id="input_source_form">
|
<at-form state="vm.form" autocomplete="off" id="input_source_form">
|
||||||
<at-input-group
|
<at-input-group
|
||||||
|
|||||||
@@ -42,8 +42,7 @@ export default {
|
|||||||
controller: LookupListController,
|
controller: LookupListController,
|
||||||
controllerAs: 'vm',
|
controllerAs: 'vm',
|
||||||
bindings: {
|
bindings: {
|
||||||
onSelect: '=',
|
onItemSelect: '=',
|
||||||
onRowClick: '=',
|
|
||||||
onReady: '=',
|
onReady: '=',
|
||||||
selectedId: '=',
|
selectedId: '=',
|
||||||
resourceName: '@',
|
resourceName: '@',
|
||||||
|
|||||||
@@ -63,13 +63,13 @@
|
|||||||
<input type="radio"
|
<input type="radio"
|
||||||
name="check_{{ vm.resourceName }}_{{ obj.id }}"
|
name="check_{{ vm.resourceName }}_{{ obj.id }}"
|
||||||
ng-checked="obj.id === vm.selectedId"
|
ng-checked="obj.id === vm.selectedId"
|
||||||
ng-click="vm.onRowClick(obj)"
|
ng-click="vm.onItemSelect(obj)"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="d-flex h-100">
|
<div class="d-flex h-100">
|
||||||
<div
|
<div
|
||||||
class="List-tableCell name-column col-sm-12"
|
class="List-tableCell name-column col-sm-12"
|
||||||
ng-click="vm.onRowClick(obj)"
|
ng-click="vm.onItemSelect(obj)"
|
||||||
>
|
>
|
||||||
{{ obj.name }}
|
{{ obj.name }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user