1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 06:51:10 +03:00

hide counter badges for output only jobs

This commit is contained in:
Jake McDermott 2018-08-14 17:09:59 -04:00
parent 15480a56db
commit 897fb96f94
No known key found for this signature in database
GPG Key ID: 9A6F084352C3A0B7
3 changed files with 13 additions and 9 deletions

View File

@ -17,6 +17,7 @@ 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_NO_COUNT_JOB_TYPES = ['ad_hoc_command', 'system_job', 'inventory_update'];
export const OUTPUT_ORDER_BY = 'counter';
export const OUTPUT_PAGE_CACHE = true;
export const OUTPUT_PAGE_LIMIT = 5;

View File

@ -1,3 +1,5 @@
import { OUTPUT_NO_COUNT_JOB_TYPES } from './constants';
const templateUrl = require('~features/output/stats.partial.html');
let vm;
@ -21,6 +23,7 @@ function JobStatsController (strings, { subscribe }) {
};
vm.$onInit = () => {
vm.hideCounts = OUTPUT_NO_COUNT_JOB_TYPES.includes(vm.resource.model.get('type'));
vm.download = vm.resource.model.get('related.stdout');
vm.tooltips.toggleExpand = vm.expanded ?
strings.get('tooltips.COLLAPSE_OUTPUT') :

View File

@ -1,16 +1,16 @@
<!-- todo: styling, markup, css etc. - disposition according to project lib conventions -->
<div class="at-u-floatRight">
<span class="at-Panel-label">plays</span>
<span ng-show="vm.running" class="at-Panel-headingTitleBadge">...</span>
<span ng-show="!vm.running" class="at-Panel-headingTitleBadge">{{ vm.plays || 0 }}</span>
<span ng-show="!vm.hideCounts" class="at-Panel-label">plays</span>
<span ng-show="!vm.hideCounts && vm.running" class="at-Panel-headingTitleBadge">...</span>
<span ng-show="!vm.hideCounts && !vm.running" class="at-Panel-headingTitleBadge">{{ vm.plays || 0 }}</span>
<span class="at-Panel-label">tasks</span>
<span ng-show="vm.running" class="at-Panel-headingTitleBadge">...</span>
<span ng-show="!vm.running" class="at-Panel-headingTitleBadge">{{ vm.tasks || 0 }}</span>
<span ng-show="!vm.hideCounts" class="at-Panel-label">tasks</span>
<span ng-show="!vm.hideCounts && vm.running" class="at-Panel-headingTitleBadge">...</span>
<span ng-show="!vm.hideCounts && !vm.running" class="at-Panel-headingTitleBadge">{{ vm.tasks || 0 }}</span>
<span class="at-Panel-label">{{:: vm.strings.get('stats.HOSTS')}}</span>
<span ng-show="vm.running" class="at-Panel-headingTitleBadge">...</span>
<span ng-show="!vm.running" class="at-Panel-headingTitleBadge">{{ vm.hosts || 1 }}</span>
<span ng-show="!vm.hideCounts" class="at-Panel-label">{{:: vm.strings.get('stats.HOSTS')}}</span>
<span ng-show="!vm.hideCounts && vm.running" class="at-Panel-headingTitleBadge">...</span>
<span ng-show="!vm.hideCounts && !vm.running" class="at-Panel-headingTitleBadge">{{ vm.hosts || 1 }}</span>
<span class="at-Panel-label">{{:: vm.strings.get('stats.ELAPSED') }}</span>
<span ng-show="vm.running" class="at-Panel-headingTitleBadge">...</span>