From 964423c35c0ae7b1ee180d76893c425dde205910 Mon Sep 17 00:00:00 2001 From: NatashaKab <133793701+NatashaKab@users.noreply.github.com> Date: Thu, 3 Aug 2023 11:20:49 -0400 Subject: [PATCH] Icu 10368 use hds table in desktop targets list (#1817) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: 💡 Use HDS tables in user accounts * refactor: 💡 Use HDS tables in desktop targets list * refactor: 💡 Fixed indentantion problem suggested by cameron --- .../scopes/scope/projects/targets/index.hbs | 117 +++++++++--------- .../tests/acceptance/projects/targets-test.js | 2 +- ui/desktop/tests/acceptance/scopes-test.js | 2 +- 3 files changed, 62 insertions(+), 59 deletions(-) diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/index.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/index.hbs index 6001e9289..243d15edd 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/index.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/index.hbs @@ -97,75 +97,78 @@ {{/if}} {{#if @model}} - - - - {{t 'form.name.label'}} - {{t 'form.id.label'}} - {{t 'form.type.label'}} - {{t 'resources.project.title'}} - - - - - {{#each @model as |model|}} - - - {{#if (can 'read model' model)}} + + + <:body as |B|> + + + + {{#if (can 'read model' B.data)}} - {{model.displayName}} + {{B.data.displayName}} {{else}} - {{model.displayName}} + {{B.data.displayName}} {{/if}} - {{#if model.description}} -

{{model.description}}

+ {{#if B.data.description}} +

{{B.data.description}}

{{/if}} -
- + + + + + {{B.data.id}} + + + + {{#if B.data.type}} + + {{/if}} + + +
- {{model.id}} + {{B.data.project.id}} - - - {{#if model.type}} - - {{/if}} - - -
- - {{model.project.id}} - -
- -
- - {{#if (can 'connect target' model)}} - - {{/if}} - - - {{/each}} - - +
+ +
+ + {{#if (can 'connect target' B.data)}} + + {{/if}} + + + + + {{else}} diff --git a/ui/desktop/tests/acceptance/projects/targets-test.js b/ui/desktop/tests/acceptance/projects/targets-test.js index 5c48b697a..51cb15134 100644 --- a/ui/desktop/tests/acceptance/projects/targets-test.js +++ b/ui/desktop/tests/acceptance/projects/targets-test.js @@ -179,7 +179,7 @@ module('Acceptance | projects | targets', function (hooks) { test('visiting a target', async function (assert) { assert.expect(1); await visit(urls.targets); - await click('tbody tr th a'); + await click('tbody tr td span a'); assert.strictEqual(currentURL(), urls.sessions); }); diff --git a/ui/desktop/tests/acceptance/scopes-test.js b/ui/desktop/tests/acceptance/scopes-test.js index 1a8c2970f..7a1e45cf9 100644 --- a/ui/desktop/tests/acceptance/scopes-test.js +++ b/ui/desktop/tests/acceptance/scopes-test.js @@ -232,7 +232,7 @@ module('Acceptance | scopes', function (hooks) { test('visiting a target', async function (assert) { assert.expect(1); await visit(urls.targets); - await click('tbody tr th a'); + await click('tbody tr td span a'); assert.strictEqual(currentURL(), urls.targetSessions); });