feat: Add /target/sessions route
This commit is contained in:
7 files changed
+32
-4
No files matched your search
@@ -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:
|
||||
|
||||
@@ -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() {});
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() {
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,7 @@
|
||||
<Rose::Nav::Tabs as |nav|>
|
||||
<nav.link @route='scopes.scope.projects.targets.target.sessions'>
|
||||
{{t 'resources.session.active_plural'}}
|
||||
</nav.link>
|
||||
<nav.link @route='scopes.scope.projects.targets.target.hosts'>
|
||||
{{t 'resources.host.title_plural'}}
|
||||
</nav.link>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{{outlet}}
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user