github.com/hernad/nomad@v1.6.112/ui/app/components/job-subnav.js (about) 1 /** 2 * Copyright (c) HashiCorp, Inc. 3 * SPDX-License-Identifier: MPL-2.0 4 */ 5 6 import { inject as service } from '@ember/service'; 7 import Component from '@glimmer/component'; 8 9 export default class JobSubnav extends Component { 10 @service can; 11 @service keyboard; 12 13 get shouldRenderClientsTab() { 14 const { job } = this.args; 15 return ( 16 job?.hasClientStatus && !job?.hasChildren && this.can.can('read client') 17 ); 18 } 19 20 // Periodic and Parameterized jobs "parents" are not jobs unto themselves, but more like summaries. 21 // They should not have tabs for allocations, evaluations, etc. 22 // but their child jobs, and other job types generally, should. 23 get shouldHideNonParentTabs() { 24 return this.args.job?.hasChildren; 25 } 26 }