* [COMPLIANCE] Add Copyright and License Headers * chore: 🤖 update Copyright headers to satisfy our lint rules --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
33 lines
749 B
JavaScript
33 lines
749 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import Controller from '@ember/controller';
|
|
import { inject as service } from '@ember/service';
|
|
import { computed } from '@ember/object';
|
|
|
|
export default class ScopesScopeScopesController extends Controller {
|
|
// =services
|
|
|
|
@service intl;
|
|
|
|
// =attributes
|
|
|
|
/**
|
|
* @type {string}
|
|
*/
|
|
@computed('intl', 'model.currentScope.{isGlobal,isOrg}')
|
|
get breadCrumb() {
|
|
if (this.model.currentScope.isGlobal) {
|
|
return this.intl.t('resources.org.title_plural');
|
|
}
|
|
/* istanbul ignore else */
|
|
if (this.model.currentScope.isOrg) {
|
|
return this.intl.t('resources.project.title_plural');
|
|
}
|
|
/* istanbul ignore next */
|
|
return null;
|
|
}
|
|
}
|