2023-03-01 09:39:41 -06:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
|
|
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2020-10-29 14:38:09 -04:00
|
|
|
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}
|
|
|
|
|
*/
|
2022-04-13 14:17:46 -07:00
|
|
|
@computed('intl', 'model.currentScope.{isGlobal,isOrg}')
|
2020-10-29 14:38:09 -04:00
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|