diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index d05456072..888cb980b 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -233,7 +233,12 @@ target: none: title: No Targets Available description: No Targets to display yet. Contact your Boundary admin if you don't see a Target you expect access to. - connection-success: Successfully connected + connection-success: + title: Successfully Connected + connection-details: + title: Target Connection Details + proxy_url: + title: Proxy URL actions: create: New Target delete: Delete Target @@ -251,7 +256,3 @@ target: add: title: Add Host Sets description: Select host sets to assign to this target. - detail: - title: Target connection details - proxy_url: Proxy URL - credentials: Credentials diff --git a/addons/core/translations/states/en-us.yaml b/addons/core/translations/states/en-us.yaml index aca77b801..f3d441030 100644 --- a/addons/core/translations/states/en-us.yaml +++ b/addons/core/translations/states/en-us.yaml @@ -4,9 +4,6 @@ success: Success warning: Warning error: Error copied: Copied -connection: - success: - description: "Local proxy address ({protocol}): {address}:{port}" primary: Primary inactive: Inactive active-private: Private diff --git a/ui/desktop/app/components/dialog-detail/index.hbs b/ui/desktop/app/components/dialog-detail/index.hbs index 92cfbbb1b..8900cefcb 100644 --- a/ui/desktop/app/components/dialog-detail/index.hbs +++ b/ui/desktop/app/components/dialog-detail/index.hbs @@ -1,20 +1,12 @@ - {{yield - (hash - notification=(component - 'rose/notification' class='connection-dialog-notification' - ) - ) - }} + {{yield (hash notification=(component 'rose/notification'))}} {{yield (hash body=(component 'rose/anonymous'))}} diff --git a/ui/desktop/app/styles/app.scss b/ui/desktop/app/styles/app.scss index 729165e29..cc21ec36f 100644 --- a/ui/desktop/app/styles/app.scss +++ b/ui/desktop/app/styles/app.scss @@ -328,7 +328,7 @@ // Dialog Detail // These styles are a Work In Progress. Expect changes (lots of them) -.connection-dialog { +.dialog-detail { .rose-notification { border-left: 0; border-right: 0; @@ -337,6 +337,13 @@ margin-bottom: 0; } + .rose-dialog-body { + > :first-child { + margin-top: 0; + padding-top: 0; + } + } + .rose-dialog-footer { align-items: center; display: flex; diff --git a/ui/desktop/app/templates/scopes/scope/projects/targets.hbs b/ui/desktop/app/templates/scopes/scope/projects/targets.hbs index 166582725..bb75c19ab 100644 --- a/ui/desktop/app/templates/scopes/scope/projects/targets.hbs +++ b/ui/desktop/app/templates/scopes/scope/projects/targets.hbs @@ -6,40 +6,36 @@ {{#unless session.acknowledged}} - - -

{{t 'resources.target.host-set.detail.proxy_url'}}

+ +

{{t 'resources.target.messages.proxy_url.title'}} + ({{t 'resources.target.types.tcp'}})

- {{t - 'states.connection.success.description' - port=session.proxy_port - address=session.proxy_address - protocol='tcp' - }} + {{session.proxy_address}}:{{session.proxy_port}} - {{!-- + {{! -

{{t 'resources.target.host-set.detail.credentials'}}

--}} +

Credentials

}} -
- +
+
}}
- +
{{/unless}} {{/if}} diff --git a/ui/desktop/electron-app/src/config/menu.js b/ui/desktop/electron-app/src/config/menu.js index 67a2d5449..071927442 100644 --- a/ui/desktop/electron-app/src/config/menu.js +++ b/ui/desktop/electron-app/src/config/menu.js @@ -15,7 +15,8 @@ const generateMenuTemplate = () => { type: 'none', message: config.productName, detail: `${appVersion}\n${appCommit}\n\n${cliVersion}\n\n${copyright}`, - }); + }; + dialog.showMessageBox(dialogOpts); }; return [ diff --git a/ui/desktop/tests/acceptance/projects/targets-test.js b/ui/desktop/tests/acceptance/projects/targets-test.js index 70574f123..81dfbb22b 100644 --- a/ui/desktop/tests/acceptance/projects/targets-test.js +++ b/ui/desktop/tests/acceptance/projects/targets-test.js @@ -227,7 +227,7 @@ module('Acceptance | projects | targets', function (hooks) { 'tbody tr:first-child td:last-child button', 'Activate connect mode' ); - assert.ok(find('.connection-dialog'), 'Success dialog'); + assert.ok(find('.dialog-detail'), 'Success dialog'); assert.equal(findAll('.rose-dialog-footer button').length, 1); assert.equal( find('.rose-dialog-footer button').textContent.trim(), @@ -236,7 +236,7 @@ module('Acceptance | projects | targets', function (hooks) { ); assert.equal( find('.rose-dialog-body .copyable-content').textContent.trim(), - 'Local proxy address (tcp): a_123:p_123' + 'a_123:p_123' ); }, 750); await visit(urls.targets); diff --git a/ui/desktop/tests/acceptance/projects/targets/hosts-test.js b/ui/desktop/tests/acceptance/projects/targets/hosts-test.js index 326832ff6..3b6fda1ea 100644 --- a/ui/desktop/tests/acceptance/projects/targets/hosts-test.js +++ b/ui/desktop/tests/acceptance/projects/targets/hosts-test.js @@ -219,7 +219,7 @@ module('Acceptance | projects | targets | hosts', function (hooks) { 'tbody tr:first-child td:last-child button', 'Activate connect mode' ); - assert.ok(find('.connection-dialog'), 'Success dialog'); + assert.ok(find('.dialog-detail'), 'Success dialog'); assert.equal( find('.rose-dialog-footer .rose-button-secondary').textContent.trim(), 'Close', @@ -227,7 +227,7 @@ module('Acceptance | projects | targets | hosts', function (hooks) { ); assert.equal( find('.rose-dialog-body .copyable-content').textContent.trim(), - 'Local proxy address (tcp): a_123:p_123' + 'a_123:p_123' ); }, 750); await visit(urls.hosts); diff --git a/ui/desktop/tests/acceptance/projects/targets/sessions-test.js b/ui/desktop/tests/acceptance/projects/targets/sessions-test.js index a4704307b..6bfe8bd89 100644 --- a/ui/desktop/tests/acceptance/projects/targets/sessions-test.js +++ b/ui/desktop/tests/acceptance/projects/targets/sessions-test.js @@ -295,7 +295,7 @@ module('Acceptance | projects | targets | sessions', function (hooks) { later(async () => { run.cancelTimers(); await click('.rose-layout-page-actions button', 'Activate connect mode'); - assert.ok(find('.connection-dialog'), 'Success dialog'); + assert.ok(find('.dialog-detail'), 'Success dialog'); assert.equal( find('.rose-dialog-footer .rose-button-secondary').textContent.trim(), 'Close', @@ -303,7 +303,7 @@ module('Acceptance | projects | targets | sessions', function (hooks) { ); assert.equal( find('.rose-dialog-body .copyable-content').textContent.trim(), - 'Local proxy address (tcp): a_123:p_123' + 'a_123:p_123' ); }, 750); await visit(urls.sessions); @@ -325,7 +325,7 @@ module('Acceptance | projects | targets | sessions', function (hooks) { run.cancelTimers(); instances.session.update('status', 'active'); await click('.rose-layout-page-actions button', 'Activate connect mode'); - assert.ok(find('.connection-dialog'), 'Success dialog'); + assert.ok(find('.dialog-detail'), 'Success dialog'); await click('.rose-dialog-dismiss'); assert.equal( find( diff --git a/ui/desktop/tests/acceptance/scopes-test.js b/ui/desktop/tests/acceptance/scopes-test.js index 646bf9f67..93ec928bb 100644 --- a/ui/desktop/tests/acceptance/scopes-test.js +++ b/ui/desktop/tests/acceptance/scopes-test.js @@ -292,7 +292,7 @@ module('Acceptance | scopes', function (hooks) { 'tbody tr:first-child td:last-child button', 'Activate connect mode' ); - assert.ok(find('.connection-dialog'), 'Success dialog'); + assert.ok(find('.dialog-detail'), 'Success dialog'); assert.equal(findAll('.rose-dialog-footer button').length, 1); assert.equal( find('.rose-dialog-footer button').textContent.trim(), diff --git a/ui/desktop/tests/integration/components/dialog-detail-test.js b/ui/desktop/tests/integration/components/dialog-detail-test.js index d3a617ffb..e3e483325 100644 --- a/ui/desktop/tests/integration/components/dialog-detail-test.js +++ b/ui/desktop/tests/integration/components/dialog-detail-test.js @@ -8,7 +8,7 @@ module('Integration | Component | dialog-detail', function (hooks) { test('it renders', async function (assert) { await render(hbs``); - assert.ok(find('.connection-dialog')); + assert.ok(find('.dialog-detail')); }); test('it renders with content', async function (assert) { @@ -22,7 +22,7 @@ module('Integration | Component | dialog-detail', function (hooks) { `); - assert.ok(find('.connection-dialog')); + assert.ok(find('.dialog-detail')); assert.ok(find('.rose-dialog-header')); assert.ok(find('.rose-dialog-body')); assert.ok(find('.rose-dialog-footer'));