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