diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 7ad5434d1..ff2dce9eb 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -104,6 +104,7 @@ host: session: title: Session title_plural: Sessions + active_plural: Active Sessions description: A session is a connection to a target initiated through Boundary. messages: none: diff --git a/ui/desktop/app/router.js b/ui/desktop/app/router.js index 8e4b8d71e..0af5b7e46 100644 --- a/ui/desktop/app/router.js +++ b/ui/desktop/app/router.js @@ -16,6 +16,7 @@ Router.map(function () { this.route('targets', function () { this.route('target', { path: ':target_id' }, function() { this.route('hosts'); + this.route('sessions'); }); }); this.route('sessions', function() {}); diff --git a/ui/desktop/app/routes/scopes/scope/projects/targets/target.js b/ui/desktop/app/routes/scopes/scope/projects/targets/target.js index 29efcc413..3c2be903f 100644 --- a/ui/desktop/app/routes/scopes/scope/projects/targets/target.js +++ b/ui/desktop/app/routes/scopes/scope/projects/targets/target.js @@ -14,11 +14,10 @@ export default class ScopesScopeProjectsTargetsTargetRoute extends Route { } /** - * Navigate to hostsets within a target. - * @param {TargetModel} model + * Navigate to sessions within a target. */ - afterModel(model) { - this.transitionTo('scopes.scope.projects.targets.target.hosts', model); + afterModel() { + this.transitionTo('scopes.scope.projects.targets.target.sessions'); } /** diff --git a/ui/desktop/app/routes/scopes/scope/projects/targets/target/sessions.js b/ui/desktop/app/routes/scopes/scope/projects/targets/target/sessions.js new file mode 100644 index 000000000..2b071e3a7 --- /dev/null +++ b/ui/desktop/app/routes/scopes/scope/projects/targets/target/sessions.js @@ -0,0 +1,12 @@ +import Route from '@ember/routing/route'; + +export default class ScopesScopeProjectsTargetsTargetSessionsRoute extends Route { + // =methods + + /** + * Loads all sessions and filter to current target. + * @return {Promise{[SessionModel]}} + */ + async model() { + } +} diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/-navigation.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/-navigation.hbs index bac5c17a3..12bfe97f8 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/-navigation.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/-navigation.hbs @@ -1,4 +1,7 @@ + + {{t 'resources.session.active_plural'}} + {{t 'resources.host.title_plural'}} diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/sessions.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/sessions.hbs new file mode 100644 index 000000000..c24cd6895 --- /dev/null +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/sessions.hbs @@ -0,0 +1 @@ +{{outlet}} diff --git a/ui/desktop/tests/unit/routes/scopes/scope/projects/targets/target/sessions-test.js b/ui/desktop/tests/unit/routes/scopes/scope/projects/targets/target/sessions-test.js new file mode 100644 index 000000000..2208beec8 --- /dev/null +++ b/ui/desktop/tests/unit/routes/scopes/scope/projects/targets/target/sessions-test.js @@ -0,0 +1,11 @@ +import { module, test } from 'qunit'; +import { setupTest } from 'ember-qunit'; + +module('Unit | Route | scopes/scope/projects/targets/target/sessions', function(hooks) { + setupTest(hooks); + + test('it exists', function(assert) { + let route = this.owner.lookup('route:scopes/scope/projects/targets/target/sessions'); + assert.ok(route); + }); +});