mirror of
https://github.com/ansible/awx.git
synced 2026-03-23 11:55:04 -02:30
Fix add button display property and add tooltips
* Add tooltips to list add buttons of instance groups, instances, and applications.
This commit is contained in:
@@ -16,6 +16,10 @@ function ApplicationsStrings (BaseString) {
|
|||||||
USERS: t.s('Tokens')
|
USERS: t.s('Tokens')
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ns.tooltips = {
|
||||||
|
ADD: t.s('Create a new Application')
|
||||||
|
};
|
||||||
|
|
||||||
ns.add = {
|
ns.add = {
|
||||||
PANEL_TITLE: t.s('NEW APPLICATION')
|
PANEL_TITLE: t.s('NEW APPLICATION')
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ function ListApplicationsController (
|
|||||||
vm.applicationsCount = dataset.count;
|
vm.applicationsCount = dataset.count;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
vm.tooltips = {
|
||||||
|
add: strings.get('tooltips.ADD')
|
||||||
|
};
|
||||||
|
|
||||||
vm.getModified = app => {
|
vm.getModified = app => {
|
||||||
const modified = _.get(app, 'modified');
|
const modified = _.get(app, 'modified');
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,8 @@
|
|||||||
ui-sref="applications.add"
|
ui-sref="applications.add"
|
||||||
class="at-Button--add"
|
class="at-Button--add"
|
||||||
id="button-add"
|
id="button-add"
|
||||||
|
aw-tool-tip="{{vm.tooltips.add}}"
|
||||||
|
data-placement="top"
|
||||||
aria-haspopup="true"
|
aria-haspopup="true"
|
||||||
aria-expanded="false">
|
aria-expanded="false">
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
border: none;
|
border: none;
|
||||||
display: flex;
|
display: inline-flex;
|
||||||
margin-left: @at-space-4x;
|
margin-left: @at-space-4x;
|
||||||
|
|
||||||
&[aria-expanded="true"] {
|
&[aria-expanded="true"] {
|
||||||
|
|||||||
@@ -19,6 +19,11 @@ function InstanceGroupsStrings (BaseString) {
|
|||||||
JOBS: t.s('JOBS')
|
JOBS: t.s('JOBS')
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ns.tooltips = {
|
||||||
|
ADD_INSTANCE_GROUP: t.s('Create a new Instance Group'),
|
||||||
|
ASSOCIATE_INSTANCES: t.s('Associate an existing Instance')
|
||||||
|
};
|
||||||
|
|
||||||
ns.instance = {
|
ns.instance = {
|
||||||
PANEL_TITLE: t.s('SELECT INSTANCE')
|
PANEL_TITLE: t.s('SELECT INSTANCE')
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -29,6 +29,8 @@
|
|||||||
class="at-Button--add"
|
class="at-Button--add"
|
||||||
id="button-add"
|
id="button-add"
|
||||||
ng-show="vm.isSuperuser"
|
ng-show="vm.isSuperuser"
|
||||||
|
aw-tool-tip="{{vm.tooltips.add}}"
|
||||||
|
data-placement="top"
|
||||||
aria-expanded="false">
|
aria-expanded="false">
|
||||||
</button>
|
</button>
|
||||||
<div ui-view="modal"></div>
|
<div ui-view="modal"></div>
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ function InstancesController ($scope, $state, $http, models, Instance, strings,
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vm.tooltips = {
|
||||||
|
add: strings.get('tooltips.ASSOCIATE_INSTANCES')
|
||||||
|
};
|
||||||
|
|
||||||
vm.rowAction = {
|
vm.rowAction = {
|
||||||
toggle: {
|
toggle: {
|
||||||
_disabled: !vm.isSuperuser
|
_disabled: !vm.isSuperuser
|
||||||
|
|||||||
@@ -33,6 +33,10 @@ export default ['$scope', '$filter', '$state', 'Alert', 'resolvedModels', 'Datas
|
|||||||
vm.activeId = parseInt($state.params.instance_group_id);
|
vm.activeId = parseInt($state.params.instance_group_id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
vm.tooltips = {
|
||||||
|
add: strings.get('tooltips.ADD_INSTANCE_GROUP')
|
||||||
|
};
|
||||||
|
|
||||||
vm.rowAction = {
|
vm.rowAction = {
|
||||||
trash: instance_group => {
|
trash: instance_group => {
|
||||||
return vm.isSuperuser && instance_group.name !== 'tower';
|
return vm.isSuperuser && instance_group.name !== 'tower';
|
||||||
|
|||||||
@@ -25,6 +25,8 @@
|
|||||||
class="at-Button--add"
|
class="at-Button--add"
|
||||||
id="button-add"
|
id="button-add"
|
||||||
ng-show="vm.isSuperuser"
|
ng-show="vm.isSuperuser"
|
||||||
|
aw-tool-tip="{{vm.tooltips.add}}"
|
||||||
|
data-placement="top"
|
||||||
aria-haspopup="true"
|
aria-haspopup="true"
|
||||||
aria-expanded="false">
|
aria-expanded="false">
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -121,9 +121,9 @@ module.exports = {
|
|||||||
return this.navigate();
|
return this.navigate();
|
||||||
},
|
},
|
||||||
selectAdd (name) {
|
selectAdd (name) {
|
||||||
this.api.waitForElementVisible('button[id="button-add"]');
|
this.api.waitForElementVisible('#button-add');
|
||||||
this.expect.element('button[id="button-add"]').enabled;
|
this.expect.element('#button-add').enabled;
|
||||||
this.api.click('button[id="button-add"]');
|
this.api.click('#button-add');
|
||||||
|
|
||||||
this.api.useXpath();
|
this.api.useXpath();
|
||||||
this.api.waitForElementVisible(`.//a[normalize-space(text())="${name}"]`);
|
this.api.waitForElementVisible(`.//a[normalize-space(text())="${name}"]`);
|
||||||
|
|||||||
Reference in New Issue
Block a user