don't render playbook_on_notify or runner_on_ok events if they have no stdout

This commit is contained in:
Jake McDermott 2018-10-16 11:52:14 -04:00
parent 049d642df8
commit b3c5df193a
No known key found for this signature in database
GPG Key ID: 9A6F084352C3A0B7
2 changed files with 12 additions and 0 deletions

View File

@ -1,6 +1,8 @@
export const API_MAX_PAGE_SIZE = 200;
export const API_ROOT = '/api/v2/';
export const EVENT_NOTIFY_PLAYBOOK = 'playbook_on_notify';
export const EVENT_RUNNER_OK = 'runner_on_ok';
export const EVENT_START_TASK = 'playbook_on_task_start';
export const EVENT_START_PLAY = 'playbook_on_play_start';
export const EVENT_START_PLAYBOOK = 'playbook_on_start';

View File

@ -2,6 +2,8 @@ import Ansi from 'ansi-to-html';
import Entities from 'html-entities';
import {
EVENT_NOTIFY_PLAYBOOK,
EVENT_RUNNER_OK,
EVENT_START_PLAY,
EVENT_START_PLAYBOOK,
EVENT_STATS_PLAY,
@ -213,6 +215,14 @@ function JobRenderService ($q, $sce, $window) {
return { html: '', count: 0 };
}
if (event.stdout === '' && event.event === EVENT_NOTIFY_PLAYBOOK) {
return { html: '', count: 0 };
}
if (event.stdout === '' && event.event === EVENT_RUNNER_OK) {
return { html: '', count: 0 };
}
let html = '';
let count = lines.length;
let ln = event.start_line;