Merge pull request #553 from hashicorp/chore-desktop-hbs-prettier
upgrade prettier and apply HBS formatting to desktop
This commit is contained in:
32 files changed
+275
-225
No files matched your search
@@ -1,7 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
extends: 'octane',
|
||||
plugins: ['ember-template-lint-plugin-prettier'],
|
||||
extends: ['octane', 'ember-template-lint-plugin-prettier:recommended'],
|
||||
rules: {
|
||||
'no-bare-strings': true,
|
||||
'no-curly-component-invocation': { allow: ['app-name'] },
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="branded-card">
|
||||
<h2 class="branded-card-title h1">{{@title}}</h2>
|
||||
<p class="branded-card-description">{{@description}}</p>
|
||||
<div class='branded-card'>
|
||||
<h2 class='branded-card-title h1'>{{@title}}</h2>
|
||||
<p class='branded-card-description'>{{@description}}</p>
|
||||
{{yield}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,16 +1,16 @@
|
||||
<span
|
||||
id={{this.id}}
|
||||
class="copyable"
|
||||
class='copyable'
|
||||
{{did-insert this.register}}
|
||||
{{will-destroy this.tearDown}}
|
||||
>
|
||||
|
||||
{{#if this.copied}}
|
||||
<mark class="copyable-content">
|
||||
<mark class='copyable-content'>
|
||||
{{yield}}
|
||||
</mark>
|
||||
{{else}}
|
||||
<span class="copyable-content">
|
||||
<span class='copyable-content'>
|
||||
{{yield}}
|
||||
</span>
|
||||
{{/if}}
|
||||
@@ -19,12 +19,12 @@
|
||||
<Rose::Button
|
||||
id={{this.copyableButtonId}}
|
||||
aria-describedby={{this.id}}
|
||||
class="copyable-button"
|
||||
@style="ghost"
|
||||
class='copyable-button'
|
||||
@style='ghost'
|
||||
@iconOnly={{if this.copied this.successIcon this.actionIcon}}
|
||||
title={{if this.copied this.successText this.actionText}}
|
||||
>
|
||||
{{this.actionText}}
|
||||
</Rose::Button>
|
||||
{{/if}}
|
||||
</span>
|
||||
</span>
|
||||
@@ -3,43 +3,48 @@
|
||||
<Rose::Layout::Global as |layout|>
|
||||
|
||||
<layout.header>
|
||||
<Rose::Header class="{{if (is-loading) " loading"}}" as |header|>
|
||||
<header.brand @logo="logo-app" @text={{app-name}} />
|
||||
<Rose::Header class='{{if (is-loading) ' loading'}}' as |header|>
|
||||
<header.brand @logo='logo-app' @text={{app-name}} />
|
||||
|
||||
{{#if this.session.isAuthenticated}}
|
||||
<header.nav>
|
||||
{{outlet "header-nav"}}
|
||||
{{outlet 'header-nav'}}
|
||||
</header.nav>
|
||||
|
||||
<header.utilities as |utilities|>
|
||||
<utilities.dropdown
|
||||
@text={{this.session.data.authenticated.username}}
|
||||
@icon="app-icons/user-profile"
|
||||
@icon='app-icons/user-profile'
|
||||
as |dropdown|
|
||||
>
|
||||
<dropdown.button
|
||||
{{on "click" (route-action "invalidateSession")}}
|
||||
>
|
||||
<dropdown.button {{on 'click' (route-action 'invalidateSession')}}>
|
||||
{{t 'actions.deauthenticate'}}
|
||||
</dropdown.button>
|
||||
|
||||
<dropdown.separator />
|
||||
|
||||
<dropdown.section @title={{t "titles.toggle-color-theme"}}>
|
||||
<dropdown.section @title={{t 'titles.toggle-color-theme'}}>
|
||||
<Rose::Form as |form|>
|
||||
<form.radioGroup
|
||||
@name="theme"
|
||||
@name='theme'
|
||||
@selectedValue={{this.session.data.theme}}
|
||||
@changed={{route-action "toggleTheme"}}
|
||||
as |radioGroup|>
|
||||
@changed={{route-action 'toggleTheme'}}
|
||||
as |radioGroup|
|
||||
>
|
||||
<dropdown.item>
|
||||
<radioGroup.radio @label={{t "themes.system"}} />
|
||||
<radioGroup.radio @label={{t 'themes.system'}} />
|
||||
</dropdown.item>
|
||||
<dropdown.item>
|
||||
<radioGroup.radio @label={{t "themes.light"}} @value="light" />
|
||||
<radioGroup.radio
|
||||
@label={{t 'themes.light'}}
|
||||
@value='light'
|
||||
/>
|
||||
</dropdown.item>
|
||||
<dropdown.item>
|
||||
<radioGroup.radio @label={{t "themes.dark"}} @value="dark" />
|
||||
<radioGroup.radio
|
||||
@label={{t 'themes.dark'}}
|
||||
@value='dark'
|
||||
/>
|
||||
</dropdown.item>
|
||||
</form.radioGroup>
|
||||
</Rose::Form>
|
||||
@@ -72,21 +77,23 @@
|
||||
<PendingConfirmations as |confirmation accept deny|>
|
||||
{{#if confirmation.options.isConnectSuccess}}
|
||||
<Rose::Dialog
|
||||
@heading={{t "states.success"}}
|
||||
@dismissButtonText={{t "actions.ok"}}
|
||||
@icon="check-circle-fill"
|
||||
@style="success"
|
||||
@heading={{t 'states.success'}}
|
||||
@dismissButtonText={{t 'actions.ok'}}
|
||||
@icon='check-circle-fill'
|
||||
@style='success'
|
||||
@modal={{true}}
|
||||
@dismiss={{deny}}
|
||||
as |dialog|>
|
||||
as |dialog|
|
||||
>
|
||||
<dialog.body>
|
||||
|
||||
<Copyable
|
||||
@text={{concat confirmation.text.address ":" confirmation.text.port}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
@text={{concat confirmation.text.address ':' confirmation.text.port}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
{{t 'states.connection.success.description'
|
||||
{{t
|
||||
'states.connection.success.description'
|
||||
port=confirmation.text.port
|
||||
address=confirmation.text.address
|
||||
protocol=confirmation.text.protocol
|
||||
@@ -95,57 +102,59 @@
|
||||
|
||||
</dialog.body>
|
||||
<dialog.footer>
|
||||
<Rose::Button @style="primary" {{on "click" accept}}>
|
||||
{{t "actions.ok"}}
|
||||
<Rose::Button @style='primary' {{on 'click' accept}}>
|
||||
{{t 'actions.ok'}}
|
||||
</Rose::Button>
|
||||
</dialog.footer>
|
||||
</Rose::Dialog>
|
||||
{{else if confirmation.options.isConnectError}}
|
||||
<Rose::Dialog
|
||||
@heading={{t "states.error"}}
|
||||
@dismissButtonText={{t "actions.ok"}}
|
||||
@icon="cancel-square-fill"
|
||||
@style="error"
|
||||
@heading={{t 'states.error'}}
|
||||
@dismissButtonText={{t 'actions.ok'}}
|
||||
@icon='cancel-square-fill'
|
||||
@style='error'
|
||||
@modal={{true}}
|
||||
@dismiss={{deny}}
|
||||
as |dialog|>
|
||||
as |dialog|
|
||||
>
|
||||
<dialog.body>
|
||||
<p>
|
||||
{{confirmation.text}}
|
||||
</p>
|
||||
<p>
|
||||
{{t "questions.retry-confirm"}}
|
||||
{{t 'questions.retry-confirm'}}
|
||||
</p>
|
||||
</dialog.body>
|
||||
<dialog.footer>
|
||||
<Rose::Button @style="primary" {{on "click" accept}}>
|
||||
{{t "actions.retry"}}
|
||||
<Rose::Button @style='primary' {{on 'click' accept}}>
|
||||
{{t 'actions.retry'}}
|
||||
</Rose::Button>
|
||||
<Rose::Button @style="secondary" {{on "click" deny}}>
|
||||
{{t "actions.cancel"}}
|
||||
<Rose::Button @style='secondary' {{on 'click' deny}}>
|
||||
{{t 'actions.cancel'}}
|
||||
</Rose::Button>
|
||||
</dialog.footer>
|
||||
</Rose::Dialog>
|
||||
{{else}}
|
||||
<Rose::Dialog
|
||||
@heading={{t "actions.confirm"}}
|
||||
@dismissButtonText={{t "actions.cancel"}}
|
||||
@icon="alert-triangle"
|
||||
@style="warning"
|
||||
@heading={{t 'actions.confirm'}}
|
||||
@dismissButtonText={{t 'actions.cancel'}}
|
||||
@icon='alert-triangle'
|
||||
@style='warning'
|
||||
@modal={{true}}
|
||||
@dismiss={{deny}}
|
||||
as |dialog|>
|
||||
as |dialog|
|
||||
>
|
||||
<dialog.body>
|
||||
<p>{{confirmation.text}}</p>
|
||||
</dialog.body>
|
||||
<dialog.footer>
|
||||
<Rose::Button @style="primary" {{on "click" accept}}>
|
||||
{{t "actions.ok"}}
|
||||
<Rose::Button @style='primary' {{on 'click' accept}}>
|
||||
{{t 'actions.ok'}}
|
||||
</Rose::Button>
|
||||
<Rose::Button @style="secondary" {{on "click" deny}}>
|
||||
{{t "actions.cancel"}}
|
||||
<Rose::Button @style='secondary' {{on 'click' deny}}>
|
||||
{{t 'actions.cancel'}}
|
||||
</Rose::Button>
|
||||
</dialog.footer>
|
||||
</Rose::Dialog>
|
||||
{{/if}}
|
||||
</PendingConfirmations>
|
||||
</PendingConfirmations>
|
||||
@@ -1,4 +1,4 @@
|
||||
{{page-title (t "errors.generic.title") }}
|
||||
{{page-title (t 'errors.generic.title')}}
|
||||
|
||||
<main>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
</Rose::Layout::Centered>
|
||||
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Button @style="primary" {{on "click" (route-action "disconnect")}}>
|
||||
{{t "actions.disconnect"}}
|
||||
<Rose::Button @style='primary' {{on 'click' (route-action 'disconnect')}}>
|
||||
{{t 'actions.disconnect'}}
|
||||
</Rose::Button>
|
||||
</Rose::Layout::Centered>
|
||||
|
||||
</main>
|
||||
</main>
|
||||
@@ -1,2 +1,2 @@
|
||||
{{outlet}}
|
||||
{{@model.message}}
|
||||
{{@model.message}}
|
||||
@@ -4,22 +4,21 @@
|
||||
@description={{t 'descriptions.origin-initialization'}}
|
||||
>
|
||||
<Rose::Form
|
||||
class="full-width"
|
||||
@onSubmit={{route-action "setOrigin" this.origin}}
|
||||
class='full-width'
|
||||
@onSubmit={{route-action 'setOrigin' this.origin}}
|
||||
@cancel={{false}}
|
||||
@disabled={{is-loading}}
|
||||
as |form|
|
||||
>
|
||||
<form.input
|
||||
@name="host"
|
||||
@type="text"
|
||||
@name='host'
|
||||
@type='text'
|
||||
@value={{this.origin}}
|
||||
@label={{t "form.origin.label"}}
|
||||
@helperText={{t "form.origin.description"}}
|
||||
{{autofocus}} />
|
||||
<form.actions
|
||||
@submitText={{t "actions.submit"}}
|
||||
@showCancel={{false}} />
|
||||
@label={{t 'form.origin.label'}}
|
||||
@helperText={{t 'form.origin.description'}}
|
||||
{{autofocus}}
|
||||
/>
|
||||
<form.actions @submitText={{t 'actions.submit'}} @showCancel={{false}} />
|
||||
</Rose::Form>
|
||||
</BrandedCard>
|
||||
</main>
|
||||
</main>
|
||||
@@ -1 +1 @@
|
||||
{{outlet}}
|
||||
{{outlet}}
|
||||
@@ -1 +1 @@
|
||||
{{outlet}}
|
||||
{{outlet}}
|
||||
@@ -1,16 +1,21 @@
|
||||
<Rose::Dropdown
|
||||
@text={{this.scopes.selectedOrg.displayName}}
|
||||
@icon={{if this.scopes.selectedOrg.isGlobal "app-icons/global" "app-icons/org"}} as |dropdown|
|
||||
@icon={{if
|
||||
this.scopes.selectedOrg.isGlobal
|
||||
'app-icons/global'
|
||||
'app-icons/org'
|
||||
}}
|
||||
as |dropdown|
|
||||
>
|
||||
{{!-- {{#if this.session.data.authenticated.isGlobal}} --}}
|
||||
<dropdown.link @route="scopes.scope" @model="global">
|
||||
{{t "titles.global"}}
|
||||
</dropdown.link>
|
||||
<dropdown.separator />
|
||||
<dropdown.link @route='scopes.scope' @model='global'>
|
||||
{{t 'titles.global'}}
|
||||
</dropdown.link>
|
||||
<dropdown.separator />
|
||||
{{!-- {{/if}} --}}
|
||||
{{#each this.scopes.orgs as |scope|}}
|
||||
<dropdown.link @route="scopes.scope" @model={{scope.id}}>
|
||||
<dropdown.link @route='scopes.scope' @model={{scope.id}}>
|
||||
{{scope.displayName}}
|
||||
</dropdown.link>
|
||||
{{/each}}
|
||||
</Rose::Dropdown>
|
||||
</Rose::Dropdown>
|
||||
@@ -1,20 +1,24 @@
|
||||
{{page-title (t "actions.authenticate")}}
|
||||
{{page-title (t 'actions.authenticate')}}
|
||||
|
||||
<main>
|
||||
<BrandedCard
|
||||
@title={{t 'actions.authenticate'}}
|
||||
@description={{t 'auth.descriptions.authenticating-with-org' name=@model.scope.displayName}}
|
||||
@description={{t
|
||||
'auth.descriptions.authenticating-with-org'
|
||||
name=@model.scope.displayName
|
||||
}}
|
||||
>
|
||||
|
||||
<Rose::Dropdown
|
||||
@text={{t "actions.choose-different-org"}}
|
||||
@icon="user-organization"
|
||||
as |dropdown|>
|
||||
<dropdown.link @route="scopes.scope.authenticate" @model="global">
|
||||
{{t "titles.global"}}
|
||||
@text={{t 'actions.choose-different-org'}}
|
||||
@icon='user-organization'
|
||||
as |dropdown|
|
||||
>
|
||||
<dropdown.link @route='scopes.scope.authenticate' @model='global'>
|
||||
{{t 'titles.global'}}
|
||||
</dropdown.link>
|
||||
{{#each this.sortedScopes as |scope|}}
|
||||
<dropdown.link @route="scopes.scope.authenticate" @model={{scope.id}}>
|
||||
<dropdown.link @route='scopes.scope.authenticate' @model={{scope.id}}>
|
||||
{{scope.displayName}}
|
||||
</dropdown.link>
|
||||
{{/each}}
|
||||
@@ -24,16 +28,22 @@
|
||||
{{#if (feature-flag 'oidc')}}
|
||||
{{! OIDC enable: list all auth methods }}
|
||||
{{#each @model.authMethods as |authMethod|}}
|
||||
<nav.link @route="scopes.scope.authenticate.method" @model={{authMethod.id}}>
|
||||
{{t (concat "resources.auth-method.types." authMethod.type)}}
|
||||
<nav.link
|
||||
@route='scopes.scope.authenticate.method'
|
||||
@model={{authMethod.id}}
|
||||
>
|
||||
{{t (concat 'resources.auth-method.types.' authMethod.type)}}
|
||||
</nav.link>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
{{! OIDC disabled: filter out OIDC auth methods}}
|
||||
{{#each @model.authMethods as |authMethod|}}
|
||||
{{#unless authMethod.isOIDC}}
|
||||
<nav.link @route="scopes.scope.authenticate.method" @model={{authMethod.id}}>
|
||||
{{t (concat "resources.auth-method.types." authMethod.type)}}
|
||||
<nav.link
|
||||
@route='scopes.scope.authenticate.method'
|
||||
@model={{authMethod.id}}
|
||||
>
|
||||
{{t (concat 'resources.auth-method.types.' authMethod.type)}}
|
||||
</nav.link>
|
||||
{{/unless}}
|
||||
{{/each}}
|
||||
@@ -43,12 +53,12 @@
|
||||
{{#if @model.authMethods}}
|
||||
{{outlet}}
|
||||
|
||||
<p class="change-origin">
|
||||
{{t "origin.connected-to"}}:
|
||||
<p class='change-origin'>
|
||||
{{t 'origin.connected-to'}}:
|
||||
<code>{{this.origin}}</code>
|
||||
<br>
|
||||
<LinkTo @route="origin">
|
||||
{{t "actions.change-origin"}}
|
||||
<br />
|
||||
<LinkTo @route='origin'>
|
||||
{{t 'actions.change-origin'}}
|
||||
</LinkTo>
|
||||
</p>
|
||||
|
||||
@@ -56,15 +66,16 @@
|
||||
{{#unless @model.authMethods}}
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Message
|
||||
@title={{t "resources.auth-method.messages.none.title"}}
|
||||
@icon="alert-circle-outline"
|
||||
as |message|>
|
||||
@title={{t 'resources.auth-method.messages.none.title'}}
|
||||
@icon='alert-circle-outline'
|
||||
as |message|
|
||||
>
|
||||
<message.description>
|
||||
{{t "resources.auth-method.messages.none.description"}}
|
||||
{{t 'resources.auth-method.messages.none.description'}}
|
||||
</message.description>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
{{/unless}}
|
||||
|
||||
</BrandedCard>
|
||||
</main>
|
||||
</main>
|
||||
@@ -1,12 +1,13 @@
|
||||
{{#unless @model}}
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Message
|
||||
@title={{t "resources.auth-method.messages.none.title"}}
|
||||
@icon="alert-circle-outline"
|
||||
as |message|>
|
||||
@title={{t 'resources.auth-method.messages.none.title'}}
|
||||
@icon='alert-circle-outline'
|
||||
as |message|
|
||||
>
|
||||
<message.description>
|
||||
{{t "resources.auth-method.messages.none.description"}}
|
||||
{{t 'resources.auth-method.messages.none.description'}}
|
||||
</message.description>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
@@ -1 +1 @@
|
||||
{{outlet}}
|
||||
{{outlet}}
|
||||
@@ -2,7 +2,7 @@
|
||||
{{! OIDC enabled: show form for any auth method}}
|
||||
<Form::Authenticate
|
||||
@model={{@model}}
|
||||
@submit={{route-action "authenticate"}}
|
||||
@submit={{route-action 'authenticate'}}
|
||||
@disabled={{is-loading}}
|
||||
/>
|
||||
{{else}}
|
||||
@@ -10,8 +10,8 @@
|
||||
{{#unless @model.isOIDC}}
|
||||
<Form::Authenticate
|
||||
@model={{@model}}
|
||||
@submit={{route-action "authenticate"}}
|
||||
@submit={{route-action 'authenticate'}}
|
||||
@disabled={{is-loading}}
|
||||
/>
|
||||
{{/unless}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -6,18 +6,14 @@
|
||||
<p>{{t 'resources.auth-method.messages.pending.description'}}</p>
|
||||
<p>
|
||||
{{t 'resources.auth-method.questions.no-see-window'}}
|
||||
<a
|
||||
href="{{this.authURL}}"
|
||||
target="_blank"
|
||||
rel="noreferrer noopener"
|
||||
>
|
||||
<a href='{{this.authURL}}' target='_blank' rel='noreferrer noopener'>
|
||||
{{t 'actions.retry'}}
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
<LinkTo @route="scopes.scope.authenticate.method">
|
||||
<LinkTo @route='scopes.scope.authenticate.method'>
|
||||
{{t 'actions.cancel'}}
|
||||
</LinkTo>
|
||||
</p>
|
||||
</:body>
|
||||
</Rose::Dialog::Cover>
|
||||
</Rose::Dialog::Cover>
|
||||
@@ -1 +1 @@
|
||||
{{outlet}}
|
||||
{{outlet}}
|
||||
@@ -1,18 +1,14 @@
|
||||
<Rose::Layout::Sidebar as |sidebarLayout|>
|
||||
<sidebarLayout.sidebar>
|
||||
<Rose::Nav::Sidebar as |nav|>
|
||||
<nav.link @route="scopes.scope.projects.targets">
|
||||
<Rose::Icon
|
||||
@name="app-icons/target"
|
||||
@size="medium" />
|
||||
{{t "resources.target.title_plural"}}
|
||||
<nav.link @route='scopes.scope.projects.targets'>
|
||||
<Rose::Icon @name='app-icons/target' @size='medium' />
|
||||
{{t 'resources.target.title_plural'}}
|
||||
</nav.link>
|
||||
|
||||
<nav.link @route="scopes.scope.projects.sessions">
|
||||
<Rose::Icon
|
||||
@name="app-icons/action-session"
|
||||
@size="medium" />
|
||||
{{t "resources.session.title_plural"}}
|
||||
<nav.link @route='scopes.scope.projects.sessions'>
|
||||
<Rose::Icon @name='app-icons/action-session' @size='medium' />
|
||||
{{t 'resources.session.title_plural'}}
|
||||
</nav.link>
|
||||
</Rose::Nav::Sidebar>
|
||||
</sidebarLayout.sidebar>
|
||||
@@ -22,4 +18,4 @@
|
||||
{{outlet}}
|
||||
</main>
|
||||
</sidebarLayout.body>
|
||||
</Rose::Layout::Sidebar>
|
||||
</Rose::Layout::Sidebar>
|
||||
@@ -1,10 +1,10 @@
|
||||
{{page-title (t "errors.generic.title") }}
|
||||
{{page-title (t 'errors.generic.title')}}
|
||||
|
||||
{{! Most error types will land here }}
|
||||
{{#if @model.errors}}
|
||||
<Rose::Layout::Centered>
|
||||
{{#each @model.errors as |error|}}
|
||||
<Error::Message @status={{error.status}}/>
|
||||
<Error::Message @status={{error.status}} />
|
||||
{{/each}}
|
||||
</Rose::Layout::Centered>
|
||||
{{/if}}
|
||||
@@ -16,8 +16,8 @@
|
||||
</Rose::Layout::Centered>
|
||||
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Button @style="primary" {{on "click" (route-action "disconnect")}}>
|
||||
{{t "actions.disconnect"}}
|
||||
<Rose::Button @style='primary' {{on 'click' (route-action 'disconnect')}}>
|
||||
{{t 'actions.disconnect'}}
|
||||
</Rose::Button>
|
||||
</Rose::Layout::Centered>
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
<page.header>
|
||||
<h2>
|
||||
{{t "resources.session.title_plural"}}
|
||||
<DocLink @doc="sessions" @iconSize="large" />
|
||||
{{t 'resources.session.title_plural'}}
|
||||
<DocLink @doc='sessions' @iconSize='large' />
|
||||
</h2>
|
||||
<p>{{t "resources.session.description"}}</p>
|
||||
<p>{{t 'resources.session.description'}}</p>
|
||||
</page.header>
|
||||
|
||||
<page.body>
|
||||
@@ -15,33 +15,34 @@
|
||||
<Rose::Table as |table|>
|
||||
<table.header as |header|>
|
||||
<header.row as |row|>
|
||||
<row.headerCell>{{t "form.id.label"}}</row.headerCell>
|
||||
<row.headerCell>{{t "resources.target.title"}}</row.headerCell>
|
||||
<row.headerCell>{{t "form.proxy.label"}}</row.headerCell>
|
||||
<row.headerCell>{{t "form.started.label"}}</row.headerCell>
|
||||
<row.headerCell>{{t "form.status.label"}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.id.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'resources.target.title'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.proxy.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.started.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.status.label'}}</row.headerCell>
|
||||
<row.headerCell />
|
||||
</header.row>
|
||||
</table.header>
|
||||
<table.body as |body|>
|
||||
{{#each this.sorted as |model|}}
|
||||
<body.row as |row|>
|
||||
<row.headerCell class="nowrap">
|
||||
<row.headerCell class='nowrap'>
|
||||
<Rose::Icon
|
||||
class={{concat "session-status-" model.status}}
|
||||
@name="app-icons/action-session"
|
||||
@size="medium" />
|
||||
class={{concat 'session-status-' model.status}}
|
||||
@name='app-icons/action-session'
|
||||
@size='medium'
|
||||
/>
|
||||
<Copyable
|
||||
@text={{model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{model.id}}</code>
|
||||
</Copyable>
|
||||
</row.headerCell>
|
||||
<row.cell>{{model.target.displayName}}</row.cell>
|
||||
<row.cell>
|
||||
{{!--
|
||||
{{!
|
||||
Two if's here because:
|
||||
1) Local proxy info is only relevant if the session is
|
||||
active or pending (aka isCancelable). Once the session
|
||||
@@ -51,13 +52,13 @@
|
||||
with it. It's possible for the user to start sessions
|
||||
from other devices (or even another tab), in which case we
|
||||
won't have the local proxy info available here.
|
||||
--}}
|
||||
}}
|
||||
{{#if model.isCancelable}}
|
||||
{{#if model.proxy}}
|
||||
<Copyable
|
||||
@text={{model.proxy}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{model.proxy}}</code>
|
||||
</Copyable>
|
||||
@@ -74,8 +75,11 @@
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
{{#if model.isCancelable}}
|
||||
<Rose::Button @style="secondary" {{on "click" (route-action "cancelSession" model)}}>
|
||||
{{t "actions.cancel"}}
|
||||
<Rose::Button
|
||||
@style='secondary'
|
||||
{{on 'click' (route-action 'cancelSession' model)}}
|
||||
>
|
||||
{{t 'actions.cancel'}}
|
||||
</Rose::Button>
|
||||
{{/if}}
|
||||
</row.cell>
|
||||
@@ -87,9 +91,12 @@
|
||||
{{else}}
|
||||
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Message @title={{t "resources.session.messages.none-friendly.title"}} as |message|>
|
||||
<Rose::Message
|
||||
@title={{t 'resources.session.messages.none-friendly.title'}}
|
||||
as |message|
|
||||
>
|
||||
<message.description>
|
||||
{{t "resources.session.messages.none-friendly.description"}}
|
||||
{{t 'resources.session.messages.none-friendly.description'}}
|
||||
</message.description>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
@@ -98,4 +105,4 @@
|
||||
|
||||
</page.body>
|
||||
|
||||
</Rose::Layout::Page>
|
||||
</Rose::Layout::Page>
|
||||
@@ -1,3 +1,3 @@
|
||||
{{page-title (t 'resources.target.title_plural')}}
|
||||
|
||||
{{outlet}}
|
||||
{{outlet}}
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
<page.header>
|
||||
<h2>
|
||||
{{t "resources.target.title_plural"}}
|
||||
<DocLink @doc="targets" @iconSize="large" />
|
||||
{{t 'resources.target.title_plural'}}
|
||||
<DocLink @doc='targets' @iconSize='large' />
|
||||
</h2>
|
||||
<p>{{t "resources.target.description"}}</p>
|
||||
<p>{{t 'resources.target.description'}}</p>
|
||||
</page.header>
|
||||
|
||||
<page.body>
|
||||
@@ -13,10 +13,10 @@
|
||||
<Rose::Table as |table|>
|
||||
<table.header as |header|>
|
||||
<header.row as |row|>
|
||||
<row.headerCell>{{t "form.name.label"}}</row.headerCell>
|
||||
<row.headerCell>{{t "form.id.label"}}</row.headerCell>
|
||||
<row.headerCell>{{t "form.type.label"}}</row.headerCell>
|
||||
<row.headerCell>{{t "resources.project.title"}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.name.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.id.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.type.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'resources.project.title'}}</row.headerCell>
|
||||
<row.headerCell />
|
||||
</header.row>
|
||||
</table.header>
|
||||
@@ -25,7 +25,7 @@
|
||||
<body.row as |row|>
|
||||
<row.headerCell>
|
||||
<LinkTo
|
||||
@route="scopes.scope.projects.targets.target"
|
||||
@route='scopes.scope.projects.targets.target'
|
||||
@model={{model.id}}
|
||||
>
|
||||
{{model.displayName}}
|
||||
@@ -34,16 +34,16 @@
|
||||
<p>{{model.target.description}}</p>
|
||||
{{/if}}
|
||||
{{#if model.target.isActive}}
|
||||
<Rose::Badge @style="success">
|
||||
{{t "states.active"}}
|
||||
<Rose::Badge @style='success'>
|
||||
{{t 'states.active'}}
|
||||
</Rose::Badge>
|
||||
{{/if}}
|
||||
</row.headerCell>
|
||||
<row.cell>
|
||||
<Copyable
|
||||
@text={{model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{model.id}}</code>
|
||||
</Copyable>
|
||||
@@ -51,7 +51,7 @@
|
||||
<row.cell>
|
||||
{{#if model.type}}
|
||||
<Rose::Badge>
|
||||
{{t (concat "resources.target.types." model.type)}}
|
||||
{{t (concat 'resources.target.types.' model.type)}}
|
||||
</Rose::Badge>
|
||||
{{/if}}
|
||||
</row.cell>
|
||||
@@ -59,8 +59,8 @@
|
||||
<div>
|
||||
<Copyable
|
||||
@text={{model.project.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{model.project.id}}</code>
|
||||
</Copyable>
|
||||
@@ -70,8 +70,11 @@
|
||||
</Rose::Badge>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<Rose::Button @style="secondary" {{on "click" (route-action "connect" model)}}>
|
||||
{{t "resources.session.actions.connect"}}
|
||||
<Rose::Button
|
||||
@style='secondary'
|
||||
{{on 'click' (route-action 'connect' model)}}
|
||||
>
|
||||
{{t 'resources.session.actions.connect'}}
|
||||
</Rose::Button>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
@@ -81,9 +84,12 @@
|
||||
{{else}}
|
||||
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Message @title={{t "resources.target.messages.none.title"}} as |message|>
|
||||
<Rose::Message
|
||||
@title={{t 'resources.target.messages.none.title'}}
|
||||
as |message|
|
||||
>
|
||||
<message.description>
|
||||
{{t "resources.target.messages.none.description"}}
|
||||
{{t 'resources.target.messages.none.description'}}
|
||||
</message.description>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
@@ -91,4 +97,4 @@
|
||||
{{/if}}
|
||||
</page.body>
|
||||
|
||||
</Rose::Layout::Page>
|
||||
</Rose::Layout::Page>
|
||||
@@ -3,19 +3,19 @@
|
||||
<Rose::Layout::Page as |page|>
|
||||
|
||||
<page.header>
|
||||
{{outlet "header"}}
|
||||
{{outlet 'header'}}
|
||||
</page.header>
|
||||
|
||||
<page.actions>
|
||||
{{outlet "actions"}}
|
||||
{{outlet 'actions'}}
|
||||
</page.actions>
|
||||
|
||||
<page.navigation>
|
||||
{{outlet "navigation"}}
|
||||
{{outlet 'navigation'}}
|
||||
</page.navigation>
|
||||
|
||||
<page.body>
|
||||
{{outlet}}
|
||||
</page.body>
|
||||
|
||||
</Rose::Layout::Page>
|
||||
</Rose::Layout::Page>
|
||||
@@ -1,3 +1,3 @@
|
||||
<Rose::Button @style="primary" {{on "click" (route-action "connect" @model)}}>
|
||||
{{t "resources.session.actions.connect"}}
|
||||
</Rose::Button>
|
||||
<Rose::Button @style='primary' {{on 'click' (route-action 'connect' @model)}}>
|
||||
{{t 'resources.session.actions.connect'}}
|
||||
</Rose::Button>
|
||||
@@ -2,8 +2,8 @@
|
||||
{{@model.displayName}}
|
||||
{{#if @model.isActive}}
|
||||
|
||||
<Rose::Badge @style="success">
|
||||
{{t "states.active"}}
|
||||
<Rose::Badge @style='success'>
|
||||
{{t 'states.active'}}
|
||||
</Rose::Badge>
|
||||
{{/if}}
|
||||
</h2>
|
||||
@@ -11,9 +11,9 @@
|
||||
<p>
|
||||
<Copyable
|
||||
@text={{@model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{@model.id}}</code>
|
||||
</Copyable>
|
||||
</p>
|
||||
</p>
|
||||
@@ -5,4 +5,4 @@
|
||||
<nav.link @route='scopes.scope.projects.targets.target.hosts'>
|
||||
{{t 'resources.host.title_plural'}}
|
||||
</nav.link>
|
||||
</Rose::Nav::Tabs>
|
||||
</Rose::Nav::Tabs>
|
||||
@@ -1,4 +1,4 @@
|
||||
{{page-title (t "resources.host-set.title_plural")}}
|
||||
{{page-title (t 'resources.host-set.title_plural')}}
|
||||
|
||||
{{#if @model.hosts}}
|
||||
|
||||
@@ -13,19 +13,24 @@
|
||||
<row.cell>
|
||||
<Copyable
|
||||
@text={{host.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{host.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
<row.cell>{{host.attributes.address}}</row.cell>
|
||||
<row.cell>
|
||||
<Rose::Badge>{{t (concat 'resources.host.types.' host.type)}}</Rose::Badge>
|
||||
<Rose::Badge>{{t
|
||||
(concat 'resources.host.types.' host.type)
|
||||
}}</Rose::Badge>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<Rose::Button @style="secondary" {{on "click" (route-action "connect" @model.target host)}}>
|
||||
{{t "resources.session.actions.connect"}}
|
||||
<Rose::Button
|
||||
@style='secondary'
|
||||
{{on 'click' (route-action 'connect' @model.target host)}}
|
||||
>
|
||||
{{t 'resources.session.actions.connect'}}
|
||||
</Rose::Button>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
@@ -36,11 +41,14 @@
|
||||
{{else}}
|
||||
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Message @title={{t "resources.host.messages.none-friendly.title"}} as |message|>
|
||||
<Rose::Message
|
||||
@title={{t 'resources.host.messages.none-friendly.title'}}
|
||||
as |message|
|
||||
>
|
||||
<message.description>
|
||||
{{t "resources.host.messages.none-friendly.description"}}
|
||||
{{t 'resources.host.messages.none-friendly.description'}}
|
||||
</message.description>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -1 +1 @@
|
||||
{{outlet}}
|
||||
{{outlet}}
|
||||
@@ -3,9 +3,9 @@
|
||||
<Rose::Table as |table|>
|
||||
<table.header as |header|>
|
||||
<header.row as |row|>
|
||||
<row.headerCell>{{t "form.id.label"}}</row.headerCell>
|
||||
<row.headerCell>{{t "form.proxy.label"}}</row.headerCell>
|
||||
<row.headerCell>{{t "form.started.label"}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.id.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.proxy.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.started.label'}}</row.headerCell>
|
||||
<row.headerCell />
|
||||
</header.row>
|
||||
</table.header>
|
||||
@@ -14,15 +14,16 @@
|
||||
{{#each this.cancelableUserSessions as |session|}}
|
||||
<body.row as |row|>
|
||||
|
||||
<row.cell class="nowrap">
|
||||
<row.cell class='nowrap'>
|
||||
<Rose::Icon
|
||||
class={{concat "session-status-" session.status}}
|
||||
@name="app-icons/action-session"
|
||||
@size="medium" />
|
||||
class={{concat 'session-status-' session.status}}
|
||||
@name='app-icons/action-session'
|
||||
@size='medium'
|
||||
/>
|
||||
<Copyable
|
||||
@text={{session.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{session.id}}</code>
|
||||
</Copyable>
|
||||
@@ -33,8 +34,8 @@
|
||||
{{#if session.proxy}}
|
||||
<Copyable
|
||||
@text={{session.proxy}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
>
|
||||
<code>{{session.proxy}}</code>
|
||||
</Copyable>
|
||||
@@ -50,10 +51,10 @@
|
||||
<row.cell>
|
||||
{{#if session.isCancelable}}
|
||||
<Rose::Button
|
||||
@style="secondary"
|
||||
{{on "click" (route-action "cancelSession" session)}}
|
||||
@style='secondary'
|
||||
{{on 'click' (route-action 'cancelSession' session)}}
|
||||
>
|
||||
{{t "actions.cancel"}}
|
||||
{{t 'actions.cancel'}}
|
||||
</Rose::Button>
|
||||
{{/if}}
|
||||
</row.cell>
|
||||
@@ -67,11 +68,14 @@
|
||||
{{else}}
|
||||
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Message @title={{t "resources.session.messages.none-active-friendly.title"}} as |message|>
|
||||
<Rose::Message
|
||||
@title={{t 'resources.session.messages.none-active-friendly.title'}}
|
||||
as |message|
|
||||
>
|
||||
<message.description>
|
||||
{{t "resources.session.messages.none-active-friendly.description"}}
|
||||
{{t 'resources.session.messages.none-active-friendly.description'}}
|
||||
</message.description>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
@@ -46,7 +46,8 @@ const findUpdateArchive = (version) => {
|
||||
|
||||
// Create update config using downloaded archive
|
||||
const createAppUpdaterConfig = (url, version, destination) => {
|
||||
if (debug) console.log(`[app-updater] url: ${url}, destination: ${destination}`);
|
||||
if (debug)
|
||||
console.log(`[app-updater] url: ${url}, destination: ${destination}`);
|
||||
const json = { url, version };
|
||||
const config = JSON.stringify(json);
|
||||
const configPath = `${destination}/feed.json`;
|
||||
@@ -144,7 +145,10 @@ module.exports = {
|
||||
const location = process.env.APP_UPDATER_LATEST_VERSION_LOCATION;
|
||||
if (debug && location) {
|
||||
// Support hosted url and file paths
|
||||
displayDownloadPrompt(latestVersion, location.match(/^http/i) ? location : `file://${location}`);
|
||||
displayDownloadPrompt(
|
||||
latestVersion,
|
||||
location.match(/^http/i) ? location : `file://${location}`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ handle('resetOrigin', async (requestOrigin) => {
|
||||
*/
|
||||
handle('openExternal', async (href) => {
|
||||
const isSecure = href.startsWith('https://');
|
||||
const isLocalhost = href.startsWith('http://localhost')
|
||||
|| href.startsWith('http://127.0.0.1');
|
||||
const isLocalhost =
|
||||
href.startsWith('http://localhost') || href.startsWith('http://127.0.0.1');
|
||||
if (isSecure || isLocalhost || isDev) {
|
||||
// openExternal is necessary in order to display documentation and to
|
||||
// support arbitrary OIDC flows. The protocol is validated (see above).
|
||||
|
||||
@@ -4,6 +4,7 @@ const EmberApp = require('ember-cli/lib/broccoli/ember-app');
|
||||
|
||||
module.exports = function (defaults) {
|
||||
let app = new EmberApp(defaults, {
|
||||
hinting: false,
|
||||
'ember-cli-babel': {
|
||||
includeExternalHelpers: true,
|
||||
},
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"lint:sass": "stylelint '**/*.scss'",
|
||||
"lint:electron": "electronegativity -r -i ./electron-app",
|
||||
"format": "npm-run-all format:*",
|
||||
"format:hbs": "prettier --write 'app/**/*.hbs'",
|
||||
"format:js": "prettier --write '{app,config,stories,tests,electron-app/src}/**/*.js' *.js",
|
||||
"format:sass": "prettier --write app/**/*.scss",
|
||||
"lint:js:fix": "eslint . --fix",
|
||||
@@ -81,6 +82,7 @@
|
||||
"ember-resolver": "^8.0.2",
|
||||
"ember-source": "~3.24.0",
|
||||
"ember-template-lint": "^2.15.0",
|
||||
"ember-template-lint-plugin-prettier": "^2.0.0",
|
||||
"eslint": "^7.17.0",
|
||||
"eslint-config-prettier": "^7.1.0",
|
||||
"eslint-plugin-ember": "^10.1.1",
|
||||
@@ -89,7 +91,7 @@
|
||||
"faker": "^5.5.3",
|
||||
"loader.js": "^4.7.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.2.1",
|
||||
"prettier": "^2.3.0",
|
||||
"qunit": "^2.13.0",
|
||||
"qunit-dom": "^1.6.0",
|
||||
"rose": "*",
|
||||
|
||||
Reference in new issue
Block a user