Merge branch 'main' into chore-support-cli-json-updates

This commit is contained in:
Randall Morey authored and GitHub committed 2021-02-27 08:19:15 -05:00
commit 31c985d8d1
11 files changed
+55 -117

No files matched your search

+3 -1
View File
@@ -14,7 +14,9 @@ jobs:
- name: Trigger Release job
env:
TAG: ${{ github.event.release.tag_name }}
TEST_REF: ${{ github.ref }}
run: |
echo "($TAG), ($TEST_REF)"
curl -u ${{ secrets.CIRCLE_TOKEN }}: -X POST --header "Content-Type: application/json" \
-d '{ "branch": "main", "parameters": {"TAG": "${TAG}" }}' \
-d '{ "branch": "main", "parameters": {"TAG": "'${TAG}'" }}' \
https://circleci.com/api/v2/project/github/hashicorp/boundary-ui-releases/pipeline
+1 -1
View File
@@ -120,7 +120,7 @@ To provide a signing identify for macOS build, use `BOUNDARY_DESKTOP_SIGNING_IDE
environment variable to set signing certificate name (e.g Developer ID Application: * (*)).
Assets are saved to `ui/desktop/electron-app/out/make/`.
DMG packaged desktop UI is available at asset location as `Boundary Desktop.dmg`.
DMG packaged desktop UI is available at asset location as `boundary.dmg`.
### Committing
+1 -35
View File
@@ -1,20 +1,14 @@
import Route from '@ember/routing/route';
/* eslint-disable-next-line ember/no-mixins */
import ApplicationRouteMixin from 'ember-simple-auth/mixins/application-route-mixin';
import Ember from 'ember';
import { getOwner } from '@ember/application';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
import { later } from '@ember/runloop';
import loading from 'ember-loading/decorator';
import { A } from '@ember/array';
/**
* Entry route for the application.
*/
export default class ApplicationRoute extends Route.extend(
ApplicationRouteMixin
) {
export default class ApplicationRoute extends Route {
// =services
@service session;
@@ -31,34 +25,6 @@ export default class ApplicationRoute extends Route.extend(
this.toggleTheme(theme);
}
/**
* After becoming authenticated, does nothing. This overrides the default
* behavior of the ApplicationRouteMixin, which is to redirect after auth.
* We'll handle this redirect manually in sub routes.
* @override
*/
sessionAuthenticated() {
// no op
}
/**
* When the session ends, redirect to authenticate and reload the page to
* purge any in-memory state.
*/
async sessionInvalidated() {
// Catch error in this transition, since it will be aborted by the
// scope auth route when it redirects to the first auth method.
await this.transitionTo(this.routeIfUnauthenticated).catch(() => {});
// The Ember way of accessing globals...
const document = getOwner(this).lookup('service:-document').documentElement;
// defaultView === window, but without using globals directly
const { location } = document.parentNode.defaultView;
// Wait a beat, then reload the page...
// This is mostly to give the deauth request a chance to fire.
/* istanbul ignore if */
if (!Ember.testing) later(location, location.reload, 150);
}
// =actions
/**
@@ -5,7 +5,7 @@ import {
fillIn,
click,
find,
findAll,
//findAll,
getRootElement,
//setupOnerror,
} from '@ember/test-helpers';
@@ -282,23 +282,26 @@ module('Acceptance | authentication', function (hooks) {
assert.ok(currentSession().isAuthenticated);
});
test('deauthentication redirects to first global authenticate method', async function (assert) {
assert.expect(3);
await visit(authMethodAuthenticateURL);
await fillIn('[name="identification"]', 'test');
await fillIn('[name="password"]', 'test');
await click('[type="submit"]');
assert.ok(currentSession().isAuthenticated);
// Open header utilities dropdown
await click('.rose-header-utilities .rose-dropdown summary');
// Find and click on last element in dropdown - should be deauthenticate button
const menu = findAll(
'.rose-header-utilities .rose-dropdown .rose-dropdown-content button'
);
await click(menu[menu.length - 1]);
assert.notOk(currentSession().isAuthenticated);
assert.equal(currentURL(), authMethodGlobalAuthenticateURL);
});
// This test is disabled because it is no longer relevant. On deauth,
// the page is reloaded. If the user was viewing a route requiring
// authentication, they will be redirected accordingly.
// test('deauthentication redirects to first global authenticate method', async function (assert) {
// assert.expect(3);
// await visit(authMethodAuthenticateURL);
// await fillIn('[name="identification"]', 'test');
// await fillIn('[name="password"]', 'test');
// await click('[type="submit"]');
// assert.ok(currentSession().isAuthenticated);
// // Open header utilities dropdown
// await click('.rose-header-utilities .rose-dropdown summary');
// // Find and click on last element in dropdown - should be deauthenticate button
// const menu = findAll(
// '.rose-header-utilities .rose-dropdown .rose-dropdown-content button'
// );
// await click(menu[menu.length - 1]);
// assert.notOk(currentSession().isAuthenticated);
// assert.equal(currentURL(), authMethodGlobalAuthenticateURL);
// });
test('401 responses result in deauthentication', async function (assert) {
assert.expect(2);
+1
View File
@@ -11,6 +11,7 @@ Canonical reference for changes, improvements, and bugfixes for Boundary Desktop
### Changes/Deprecations
- Boundary Desktop is now simply "Boundary". This change affects macOS asset filenames, as well as the title used within the application. Documentation will continue to refer to "Boundary Desktop" to avoid confusion with the core binary. ([PR](https://github.com/hashicorp/boundary-ui/pull/481))
- Boundary origin validation now occurs via Electron's built-in net request module, ensuring the validation request is made via chromium's networking library rather than Node's. ([PR](https://github.com/hashicorp/boundary-ui/pull/480))
## v1.0.0-alpha (2021.02.16)
+1 -35
View File
@@ -1,18 +1,12 @@
import Route from '@ember/routing/route';
import Ember from 'ember';
import jQuery from 'jquery';
/* eslint-disable-next-line ember/no-mixins */
import ApplicationRouteMixin from 'ember-simple-auth/mixins/application-route-mixin';
import { inject as service } from '@ember/service';
import { action } from '@ember/object';
import { A } from '@ember/array';
import { getOwner } from '@ember/application';
import { later } from '@ember/runloop';
import loading from 'ember-loading/decorator';
export default class ApplicationRoute extends Route.extend(
ApplicationRouteMixin
) {
export default class ApplicationRoute extends Route {
// =services
@service session;
@@ -49,34 +43,6 @@ export default class ApplicationRoute extends Route.extend(
});
}
/**
* After becoming authenticated, does nothing. This overrides the default
* behavior of the ApplicationRouteMixin, which is to redirect after auth.
* We'll handle this redirect manually in sub routes.
* @override
*/
sessionAuthenticated() {
// no op
}
/**
* When the session ends, redirect to authenticate and reload the page to
* purge any in-memory state.
*/
async sessionInvalidated() {
// Catch error in this transition, since it will be aborted by the
// scope auth route when it redirects to the first auth method.
await this.transitionTo(this.routeIfUnauthenticated).catch(() => {});
// The Ember way of accessing globals...
const document = getOwner(this).lookup('service:-document').documentElement;
// defaultView === window, but without using globals directly
const { location } = document.parentNode.defaultView;
// Wait a beat, then reload the page...
// This is mostly to give the deauth request a chance to fire.
/* istanbul ignore if */
if (!Ember.testing) later(location, location.reload, 150);
}
// =actions
/**
+1 -1
View File
@@ -10,7 +10,7 @@ const artifactDestination = path.resolve(__dirname, '..', 'cli');
const downloadArtifact = version => {
const url = `https://releases.hashicorp.com/boundary/${version}/boundary_${version}_darwin_amd64.zip`;
return new Promise((resolve, reject) => {
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'boundary-desktop-artifact-'))
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'boundary-artifact-'))
console.log('Create tmp artifact directory: ', tmpDir);
const artifactFileName = url.split('/').pop();
@@ -25,7 +25,7 @@ module.exports = {
"/ember-test(/|$)",
"/tests(/|$)"
],
name: "Boundary Desktop",
name: "Boundary",
appBundleId: "com.electron.boundary",
// TODO: where should the client version number come from?
appVersion: `${formattedAppVersion}${formattedCLIVersion}\n`,
@@ -44,7 +44,7 @@ module.exports = {
name: "@electron-forge/maker-dmg",
config: {
title: "Boundary",
name: "boundary-desktop",
name: "boundary",
icon: "./config/macos/disk.icns",
background: "./config/macos/background.png"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "desktop",
"productName": "Boundary Desktop",
"productName": "Boundary",
"version": "0.0.0",
"private": true,
"description": "Electron UI for client for Boundary.",
+2 -2
View File
@@ -4,7 +4,7 @@ const generateMenuTemplate = () => {
return [
// { role: 'appMenu' }
{
label: 'Boundary Desktop',
label: 'Boundary',
submenu: [
{ role: 'about' },
{ type: 'separator' },
@@ -86,4 +86,4 @@ const generateMenuTemplate = () => {
module.exports = {
generateMenuTemplate: generateMenuTemplate
};
};
+21 -21
View File
@@ -9,64 +9,64 @@
<path fill-rule="evenodd" clip-rule="evenodd" d="M47.8574 -1.62475C47.6504 -1.26599 47.7734 -0.807321 48.1321 -0.600283L167.399 68.2279C167.758 68.4349 168.216 68.3119 168.424 67.9531C168.631 67.5944 168.508 67.1357 168.149 66.9287L48.8819 -1.89947C48.5231 -2.1065 48.0644 -1.98351 47.8574 -1.62475Z" fill="url(#paint3_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M63.7667 -1.62481C63.5596 -1.26607 63.6825 -0.807393 64.0413 -0.60032L175.336 63.6416C175.695 63.8487 176.153 63.7257 176.36 63.367C176.567 63.0083 176.444 62.5496 176.086 62.3425L64.7912 -1.89943C64.4324 -2.1065 63.9737 -1.98355 63.7667 -1.62481Z" fill="url(#paint4_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M84.6327 0.695792C84.4256 1.05451 84.5484 1.5132 84.9072 1.72032L188.229 61.3761C188.588 61.5832 189.047 61.4603 189.254 61.1016C189.461 60.7429 189.338 60.2842 188.98 60.077L85.6572 0.421292C85.2985 0.214178 84.8398 0.337076 84.6327 0.695792Z" fill="url(#paint5_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M159.152 -1.62479C158.945 -1.26604 159.068 -0.807367 159.427 -0.600307L231.001 40.7107C231.36 40.9177 231.818 40.7948 232.025 40.436C232.232 40.0773 232.11 39.6186 231.751 39.4116L160.177 -1.89944C159.818 -2.1065 159.359 -1.98354 159.152 -1.62479ZM143.278 -1.62493C143.071 -1.26623 143.194 -0.807523 143.552 -0.600387L215.091 40.7106C215.45 40.9177 215.909 40.7949 216.116 40.4362C216.323 40.0775 216.2 39.6188 215.842 39.4116L144.303 -1.89936C143.944 -2.1065 143.485 -1.98363 143.278 -1.62493Z" fill="#F1565C"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M175.061 -1.62493C174.854 -1.26623 174.977 -0.807524 175.336 -0.600387L246.875 40.7106C247.234 40.9177 247.692 40.7949 247.899 40.4362C248.106 40.0775 247.984 39.6188 247.625 39.4116L176.086 -1.89936C175.727 -2.1065 175.269 -1.98363 175.061 -1.62493Z" fill="#F1565C"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M159.152 -1.62479C158.945 -1.26604 159.068 -0.807367 159.427 -0.600307L231.001 40.7107C231.36 40.9177 231.818 40.7948 232.025 40.436C232.232 40.0773 232.11 39.6186 231.751 39.4116L160.177 -1.89944C159.818 -2.1065 159.359 -1.98354 159.152 -1.62479ZM143.278 -1.62493C143.071 -1.26623 143.194 -0.807523 143.552 -0.600387L215.091 40.7106C215.45 40.9177 215.909 40.7949 216.116 40.4362C216.323 40.0775 216.2 39.6188 215.842 39.4116L144.303 -1.89936C143.944 -2.1065 143.485 -1.98363 143.278 -1.62493Z" fill="#F04E54"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M175.061 -1.62493C174.854 -1.26623 174.977 -0.807524 175.336 -0.600387L246.875 40.7106C247.234 40.9177 247.692 40.7949 247.899 40.4362C248.106 40.0775 247.984 39.6188 247.625 39.4116L176.086 -1.89936C175.727 -2.1065 175.269 -1.98363 175.061 -1.62493Z" fill="#F04E54"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M232.025 39.6862C231.818 39.3274 231.36 39.2045 231.001 39.4115L159.427 80.7225C159.068 80.9296 158.945 81.3883 159.152 81.747C159.359 82.1058 159.818 82.2287 160.177 82.0217L231.751 40.7107C232.11 40.5036 232.232 40.0449 232.025 39.6862Z" fill="url(#paint6_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M216.116 39.686C215.909 39.3273 215.45 39.2045 215.091 39.4116L143.553 80.7226C143.194 80.9297 143.071 81.3884 143.278 81.7471C143.485 82.1059 143.944 82.2287 144.303 82.0216L215.842 40.7106C216.2 40.5035 216.323 40.0447 216.116 39.686Z" fill="url(#paint7_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M247.899 39.686C247.692 39.3273 247.234 39.2045 246.875 39.4116L175.336 80.7226C174.977 80.9297 174.854 81.3884 175.061 81.7471C175.269 82.1059 175.727 82.2287 176.086 82.0216L247.625 40.7106C247.984 40.5035 248.106 40.0447 247.899 39.686Z" fill="url(#paint8_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M247.899 48.8583C247.692 48.4996 247.233 48.3769 246.875 48.5841L191.245 80.7227C190.886 80.9299 190.764 81.3886 190.971 81.7473C191.178 82.1059 191.637 82.2287 191.995 82.0215L247.625 49.8829C247.984 49.6757 248.106 49.217 247.899 48.8583Z" fill="url(#paint9_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M247.899 58.0307C247.692 57.6721 247.233 57.5493 246.875 57.7565L207.119 80.7227C206.76 80.9299 206.638 81.3886 206.845 81.7473C207.052 82.1059 207.511 82.2287 207.869 82.0215L247.625 59.0553C247.984 58.8481 248.106 58.3894 247.899 58.0307Z" fill="url(#paint10_linear)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M222.754 -1.62469C222.547 -1.26591 222.67 -0.807252 223.029 -0.600248L246.875 13.1583C247.234 13.3653 247.692 13.2423 247.9 12.8835C248.107 12.5247 247.983 12.0661 247.625 11.8591L223.778 -1.8995C223.42 -2.10651 222.961 -1.98347 222.754 -1.62469ZM190.971 -1.62475C190.764 -1.26599 190.887 -0.807319 191.245 -0.600282L246.875 31.5031C247.234 31.7101 247.692 31.5871 247.899 31.2283C248.107 30.8696 247.984 30.4109 247.625 30.2039L191.995 -1.89947C191.636 -2.1065 191.178 -1.98351 190.971 -1.62475ZM206.88 -1.62485C206.673 -1.26613 206.796 -0.80744 207.155 -0.600344L246.875 22.3306C247.234 22.5377 247.692 22.4148 247.899 22.0561C248.107 21.6973 247.984 21.2386 247.625 21.0315L207.904 -1.89941C207.546 -2.1065 207.087 -1.98358 206.88 -1.62485Z" fill="#F1565C"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M222.754 -1.62469C222.547 -1.26591 222.67 -0.807252 223.029 -0.600248L246.875 13.1583C247.234 13.3653 247.692 13.2423 247.9 12.8835C248.107 12.5247 247.983 12.0661 247.625 11.8591L223.778 -1.8995C223.42 -2.10651 222.961 -1.98347 222.754 -1.62469ZM190.971 -1.62475C190.764 -1.26599 190.887 -0.807319 191.245 -0.600282L246.875 31.5031C247.234 31.7101 247.692 31.5871 247.899 31.2283C248.107 30.8696 247.984 30.4109 247.625 30.2039L191.995 -1.89947C191.636 -2.1065 191.178 -1.98351 190.971 -1.62475ZM206.88 -1.62485C206.673 -1.26613 206.796 -0.80744 207.155 -0.600344L246.875 22.3306C247.234 22.5377 247.692 22.4148 247.899 22.0561C248.107 21.6973 247.984 21.2386 247.625 21.0315L207.904 -1.89941C207.546 -2.1065 207.087 -1.98358 206.88 -1.62485Z" fill="#F04E54"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M247.899 67.2027C247.692 66.8442 247.233 66.7216 246.874 66.929L223.028 80.7229C222.669 80.9303 222.547 81.3891 222.754 81.7476C222.962 82.1062 223.421 82.2287 223.779 82.0213L247.625 68.2275C247.984 68.0201 248.106 67.5613 247.899 67.2027Z" fill="url(#paint11_linear)"/>
</g>
<defs>
<linearGradient id="paint0_linear" x1="144.179" y1="40.0474" x2="0.54483" y2="40.0474" gradientUnits="userSpaceOnUse">
<stop stop-color="#F1565C" stop-opacity="0"/>
<stop offset="0.601279" stop-color="#F1565C"/>
<stop stop-color="#F04E54" stop-opacity="0"/>
<stop offset="0.601279" stop-color="#F04E54"/>
</linearGradient>
<linearGradient id="paint1_linear" x1="152.129" y1="37.7521" x2="16.4447" y2="37.7521" gradientUnits="userSpaceOnUse">
<stop stop-color="#F1565C" stop-opacity="0"/>
<stop offset="0.597199" stop-color="#F1565C"/>
<stop stop-color="#F04E54" stop-opacity="0"/>
<stop offset="0.597199" stop-color="#F04E54"/>
</linearGradient>
<linearGradient id="paint2_linear" x1="160.078" y1="35.4568" x2="32.3459" y2="35.4568" gradientUnits="userSpaceOnUse">
<stop stop-color="#F1565C" stop-opacity="0"/>
<stop offset="0.592611" stop-color="#F1565C"/>
<stop stop-color="#F04E54" stop-opacity="0"/>
<stop offset="0.592611" stop-color="#F04E54"/>
</linearGradient>
<linearGradient id="paint3_linear" x1="168.028" y1="33.1615" x2="48.2463" y2="33.1615" gradientUnits="userSpaceOnUse">
<stop stop-color="#F1565C" stop-opacity="0"/>
<stop offset="0.587415" stop-color="#F1565C"/>
<stop stop-color="#F04E54" stop-opacity="0"/>
<stop offset="0.587415" stop-color="#F04E54"/>
</linearGradient>
<linearGradient id="paint4_linear" x1="175.978" y1="30.8662" x2="64.1465" y2="30.8662" gradientUnits="userSpaceOnUse">
<stop stop-color="#F1565C" stop-opacity="0"/>
<stop offset="0.581479" stop-color="#F1565C"/>
<stop stop-color="#F04E54" stop-opacity="0"/>
<stop offset="0.581479" stop-color="#F04E54"/>
</linearGradient>
<linearGradient id="paint5_linear" x1="188.884" y1="30.8916" x2="85.004" y2="30.8916" gradientUnits="userSpaceOnUse">
<stop stop-color="#F1565C" stop-opacity="0"/>
<stop offset="0.574635" stop-color="#F1565C"/>
<stop stop-color="#F04E54" stop-opacity="0"/>
<stop offset="0.574635" stop-color="#F04E54"/>
</linearGradient>
<linearGradient id="paint6_linear" x1="195.59" y1="81.6273" x2="195.59" y2="39.7836" gradientUnits="userSpaceOnUse">
<stop offset="0.1119" stop-color="#CF4A4F"/>
<stop offset="0.6877" stop-color="#F1565C"/>
<stop offset="0.6877" stop-color="#F04E54"/>
</linearGradient>
<linearGradient id="paint7_linear" x1="179.69" y1="81.6268" x2="179.69" y2="39.7838" gradientUnits="userSpaceOnUse">
<stop offset="0.1119" stop-color="#CF4A4F"/>
<stop offset="0.6877" stop-color="#F1565C"/>
<stop offset="0.6877" stop-color="#F04E54"/>
</linearGradient>
<linearGradient id="paint8_linear" x1="211.492" y1="81.6267" x2="211.492" y2="39.7836" gradientUnits="userSpaceOnUse">
<stop offset="0.1119" stop-color="#CF4A4F"/>
<stop offset="0.6877" stop-color="#F1565C"/>
<stop offset="0.6877" stop-color="#F04E54"/>
</linearGradient>
<linearGradient id="paint9_linear" x1="219.441" y1="81.6273" x2="219.441" y2="48.9628" gradientUnits="userSpaceOnUse">
<stop offset="0.1119" stop-color="#CF4A4F"/>
<stop offset="0.6877" stop-color="#F1565C"/>
<stop offset="0.6877" stop-color="#F04E54"/>
</linearGradient>
<linearGradient id="paint10_linear" x1="227.389" y1="81.6274" x2="227.389" y2="58.1437" gradientUnits="userSpaceOnUse">
<stop offset="0.1119" stop-color="#CF4A4F"/>
<stop offset="0.6877" stop-color="#F1565C"/>
<stop offset="0.6877" stop-color="#F04E54"/>
</linearGradient>
<linearGradient id="paint11_linear" x1="235.337" y1="81.6273" x2="235.337" y2="67.3245" gradientUnits="userSpaceOnUse">
<stop offset="0.1119" stop-color="#CF4A4F"/>
<stop offset="0.6877" stop-color="#F1565C"/>
<stop offset="0.6877" stop-color="#F04E54"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB