mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 05:01:19 -03:30
show follow tip on first auto scroll hide
This commit is contained in:
parent
91bc39be6b
commit
516607551c
@ -15,6 +15,7 @@ export const JOB_STATUS_FINISHED = JOB_STATUS_COMPLETE.concat(JOB_STATUS_INCOMPL
|
||||
|
||||
export const OUTPUT_ELEMENT_CONTAINER = '.at-Stdout-container';
|
||||
export const OUTPUT_ELEMENT_TBODY = '#atStdoutResultTable';
|
||||
export const OUTPUT_ELEMENT_LAST = '#atStdoutMenuLast';
|
||||
export const OUTPUT_MAX_LAG = 120;
|
||||
export const OUTPUT_ORDER_BY = 'counter';
|
||||
export const OUTPUT_PAGE_CACHE = true;
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
import {
|
||||
EVENT_START_PLAY,
|
||||
EVENT_START_TASK,
|
||||
OUTPUT_ELEMENT_LAST,
|
||||
OUTPUT_PAGE_SIZE,
|
||||
} from './constants';
|
||||
|
||||
@ -485,6 +486,7 @@ function OutputIndexController (
|
||||
},
|
||||
});
|
||||
|
||||
let showFollowTip = true;
|
||||
const rates = [];
|
||||
stream.init({
|
||||
bufferAdd,
|
||||
@ -494,12 +496,19 @@ function OutputIndexController (
|
||||
rates.push(rate);
|
||||
rates.splice(0, rates.length - 5);
|
||||
|
||||
if (rates.every(value => value === 1)) {
|
||||
scroll.unlock();
|
||||
scroll.unhide();
|
||||
}
|
||||
|
||||
if (rate > 1 && vm.isFollowing) {
|
||||
scroll.lock();
|
||||
scroll.hide();
|
||||
} else if (rates.every(value => value === 1)) {
|
||||
scroll.unlock();
|
||||
scroll.unhide();
|
||||
|
||||
if (showFollowTip) {
|
||||
showFollowTip = false;
|
||||
$(OUTPUT_ELEMENT_LAST).trigger('mouseenter');
|
||||
}
|
||||
}
|
||||
},
|
||||
onStop () {
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
<div class="pull-right" ng-click="vm.menu.last()">
|
||||
<i class="at-Stdout-menuIcon--lg fa fa-angle-double-down"
|
||||
ng-class="{ 'at-Stdout-menuIcon--active': vm.isFollowing }"
|
||||
id="atStdoutMenuLast"
|
||||
data-placement="top"
|
||||
data-trigger="hover"
|
||||
data-tip-watch="vm.followTooltip"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user