mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 20:30:46 -03:30
add tooltip
This commit is contained in:
parent
25e503219f
commit
46eb1727ad
@ -46,7 +46,11 @@ function ComponentsStrings (BaseString) {
|
||||
ns.truncate = {
|
||||
DEFAULT: t.s('Copy full revision to clipboard.'),
|
||||
COPIED: t.s('Copied to clipboard.')
|
||||
}
|
||||
};
|
||||
|
||||
ns.capacityBar = {
|
||||
IS_OFFLINE: t.s('Unavailable to run jobs.')
|
||||
};
|
||||
}
|
||||
|
||||
ComponentsStrings.$inject = ['BaseStringService'];
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
export default ['templateUrl',
|
||||
function (templateUrl) {
|
||||
export default ['templateUrl', 'ComponentsStrings',
|
||||
function (templateUrl, strings) {
|
||||
return {
|
||||
scope: {
|
||||
capacity: '=',
|
||||
@ -13,8 +13,10 @@ export default ['templateUrl',
|
||||
scope.$watch('totalCapacity', function(val) {
|
||||
if (val === 0) {
|
||||
scope.isOffline = true;
|
||||
scope.offlineTip = strings.get(`capacityBar.IS_OFFLINE`);
|
||||
} else {
|
||||
scope.isOffline = false;
|
||||
scope.offlineTip = null;
|
||||
}
|
||||
}, true);
|
||||
|
||||
|
||||
@ -1,5 +1,10 @@
|
||||
<div class="CapacityBar"
|
||||
ng-class="{'CapacityBar--offline': isOffline}">
|
||||
ng-class="{'CapacityBar--offline': isOffline}"
|
||||
aw-tool-tip="{{ offlineTip }}"
|
||||
data-tip-watch="offlineTip"
|
||||
data-placement="top"
|
||||
data-trigger="hover"
|
||||
data-container="body">
|
||||
<div class="CapacityBar-remaining" ng-style="CapacityStyle"></div>
|
||||
<div class="CapacityBar-consumed"></div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user