From ba73a89d8f8ac1cc9b821893bd1d0a221e0c029b Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Corvo Date: Wed, 10 Nov 2021 15:10:51 -0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Add=20breadcrumbs=20to?= =?UTF-8?q?=20managed=20groups?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add breadcrumbs to managed groups --- .../auth-methods/auth-method/managed-groups.js | 18 ++++++++++++++++++ .../managed-groups/managed-group.js | 13 +++++++++++++ .../auth-method/managed-groups/new.js | 17 +++++++++++++++++ .../auth-method/managed-groups-test.js | 17 +++++++++++++++++ .../managed-groups/managed-group-test.js | 17 +++++++++++++++++ .../auth-method/managed-groups/new-test.js | 17 +++++++++++++++++ 6 files changed, 99 insertions(+) create mode 100644 ui/admin/app/controllers/scopes/scope/auth-methods/auth-method/managed-groups.js create mode 100644 ui/admin/app/controllers/scopes/scope/auth-methods/auth-method/managed-groups/managed-group.js create mode 100644 ui/admin/app/controllers/scopes/scope/auth-methods/auth-method/managed-groups/new.js create mode 100644 ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups-test.js create mode 100644 ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups/managed-group-test.js create mode 100644 ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups/new-test.js diff --git a/ui/admin/app/controllers/scopes/scope/auth-methods/auth-method/managed-groups.js b/ui/admin/app/controllers/scopes/scope/auth-methods/auth-method/managed-groups.js new file mode 100644 index 000000000..8d72eb80d --- /dev/null +++ b/ui/admin/app/controllers/scopes/scope/auth-methods/auth-method/managed-groups.js @@ -0,0 +1,18 @@ +import Controller from '@ember/controller'; +import { inject as service } from '@ember/service'; + +export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsController extends Controller { + // =services + + @service intl; + + // =attributes + + /** + * Translated managed groups breadcrumb + * @type {string} + */ + get breadCrumb() { + return this.intl.t('resources.managed-group.title_plural'); + } +} diff --git a/ui/admin/app/controllers/scopes/scope/auth-methods/auth-method/managed-groups/managed-group.js b/ui/admin/app/controllers/scopes/scope/auth-methods/auth-method/managed-groups/managed-group.js new file mode 100644 index 000000000..4b770231b --- /dev/null +++ b/ui/admin/app/controllers/scopes/scope/auth-methods/auth-method/managed-groups/managed-group.js @@ -0,0 +1,13 @@ +import Controller from '@ember/controller'; + +export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsManagedGroupController extends Controller { + // =attributes + + /** + * A managed group breadcrumb + * @type {string} + */ + get breadCrumb() { + return this.model.displayName; + } +} diff --git a/ui/admin/app/controllers/scopes/scope/auth-methods/auth-method/managed-groups/new.js b/ui/admin/app/controllers/scopes/scope/auth-methods/auth-method/managed-groups/new.js new file mode 100644 index 000000000..cf16a4e94 --- /dev/null +++ b/ui/admin/app/controllers/scopes/scope/auth-methods/auth-method/managed-groups/new.js @@ -0,0 +1,17 @@ +import Controller from '@ember/controller'; +import { inject as service } from '@ember/service'; + +export default class ScopesScopeAuthMethodsAuthMethodManagedGroupsNewController extends Controller { + // =services + + @service intl; + + // =attributes + /** + * Translated new managed group breadcrumb + * @type {string} + */ + get breadCrumb() { + return this.intl.t('titles.new'); + } +} diff --git a/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups-test.js b/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups-test.js new file mode 100644 index 000000000..7f976529b --- /dev/null +++ b/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups-test.js @@ -0,0 +1,17 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module( + 'Unit | Controller | scopes/scope/auth-methods/auth-method/managed-groups', + function (hooks) { + setupTest(hooks); + + // TODO: Replace this with your real tests. + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/auth-methods/auth-method/managed-groups' + ); + assert.ok(controller); + }); + } +); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups/managed-group-test.js b/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups/managed-group-test.js new file mode 100644 index 000000000..22284a9cf --- /dev/null +++ b/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups/managed-group-test.js @@ -0,0 +1,17 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module( + 'Unit | Controller | scopes/scope/auth-methods/auth-method/managed-groups/managed-group', + function (hooks) { + setupTest(hooks); + + // TODO: Replace this with your real tests. + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/auth-methods/auth-method/managed-groups/managed-group' + ); + assert.ok(controller); + }); + } +); diff --git a/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups/new-test.js b/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups/new-test.js new file mode 100644 index 000000000..699d52e58 --- /dev/null +++ b/ui/admin/tests/unit/controllers/scopes/scope/auth-methods/auth-method/managed-groups/new-test.js @@ -0,0 +1,17 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module( + 'Unit | Controller | scopes/scope/auth-methods/auth-method/managed-groups/new', + function (hooks) { + setupTest(hooks); + + // TODO: Replace this with your real tests. + test('it exists', function (assert) { + let controller = this.owner.lookup( + 'controller:scopes/scope/auth-methods/auth-method/managed-groups/new' + ); + assert.ok(controller); + }); + } +);