From 508d66e375f94c75c6875fe1733d5054081d6dd7 Mon Sep 17 00:00:00 2001 From: Devon Anderson Date: Wed, 5 Jul 2023 11:03:32 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Removing=20status=20badgi?= =?UTF-8?q?ng=20from=20desktop=20client=20(#1749)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 🐛 Removing status badging from desktop client Removed status badges for `targets` and `sessions` in desktop client app. ✅ Closes: ICU-9790 * refactor: 💡 Bring back status badging for session Session status badging can stay due to session can only be canceled by the user in desktop client and does give an immediate status to the session. ✅ Closes: ICU-9790 * refactor: 💡 merge changes --- .../scopes/scope/projects/targets/index.hbs | 7 --- .../scopes/scope/projects/targets/target.hbs | 4 -- .../scope/projects/targets/target/-header.hbs | 4 -- .../projects/targets/sessions-test.js | 47 ------------------- 4 files changed, 62 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 51414095b..7f151fd87 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/index.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/index.hbs @@ -124,13 +124,6 @@ {{#if model.description}}

{{model.description}}

{{/if}} - {{#if model.isActive}} - - {{/if}}

{{@model.displayName}} - {{#if @model.isActive}} -   - - {{/if}}

{{@model.description}}

diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets/target/-header.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets/target/-header.hbs index d1ea7b212..17a0eacf5 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets/target/-header.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets/target/-header.hbs @@ -5,10 +5,6 @@

{{@model.displayName}} - {{#if @model.isActive}} -   - - {{/if}}

{{@model.description}}

diff --git a/ui/desktop/tests/acceptance/projects/targets/sessions-test.js b/ui/desktop/tests/acceptance/projects/targets/sessions-test.js index ffc460e88..45a73fbf7 100644 --- a/ui/desktop/tests/acceptance/projects/targets/sessions-test.js +++ b/ui/desktop/tests/acceptance/projects/targets/sessions-test.js @@ -193,53 +193,6 @@ module('Acceptance | projects | targets | sessions', function (hooks) { ); }); - test('can identify target with active sessions', async function (assert) { - assert.expect(1); - - stubs.ipcService.withArgs('cliExists').returns(true); - stubs.ipcService.withArgs('connect').returns({ - session_id: instances.session.id, - address: 'a_123', - port: 'p_123', - protocol: 'tcp', - }); - const confirmService = this.owner.lookup('service:confirm'); - confirmService.enabled = true; - - await visit(urls.sessions); - await click('.rose-layout-page-actions button', 'Activate connect mode'); - await click('.rose-dialog-footer .rose-button-secondary'); - assert.ok(find('.rose-layout-page-header .hds-badge--color-success')); - }); - - test('can identify target with pending sessions', async function (assert) { - assert.expect(1); - - instances.session.update({ status: 'pending' }); - stubs.ipcService.withArgs('cliExists').returns(true); - stubs.ipcService.withArgs('connect').returns({ - session_id: instances.session.id, - address: 'a_123', - port: 'p_123', - protocol: 'tcp', - }); - const confirmService = this.owner.lookup('service:confirm'); - confirmService.enabled = true; - - await visit(urls.sessions); - await click('.rose-layout-page-actions button', 'Activate connect mode'); - await click('.rose-dialog-footer .rose-button-secondary'); - assert.ok(find('.rose-layout-page-header .hds-badge--color-success')); - }); - - test('cannot identify target with terminated sessions', async function (assert) { - assert.expect(1); - instances.session.update({ status: 'terminated' }); - - await visit(urls.sessions); - assert.notOk(find('.rose-layout-page-header .hds-badge--color-success')); - }); - test('cancelling a session', async function (assert) { assert.expect(2);