open-nomad/ui/app/components/job-subnav.js
2023-04-10 15:36:59 +00:00

20 lines
433 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { inject as service } from '@ember/service';
import Component from '@glimmer/component';
export default class JobSubnav extends Component {
@service can;
@service keyboard;
get shouldRenderClientsTab() {
const { job } = this.args;
return (
job?.hasClientStatus && !job?.hasChildren && this.can.can('read client')
);
}
}