chore: 🤖 manual merge from develop
This commit is contained in:
99 files changed
+1541
-130
No files matched your search
@@ -1,7 +1,6 @@
|
||||
{{#if this.isClipboardLibrarySupported}}
|
||||
<span
|
||||
id={{this.id}}
|
||||
aria-labelledby={{this.copyableButtonId}}
|
||||
class="copyable"
|
||||
{{did-insert this.register}}
|
||||
{{will-destroy this.destroy}}
|
||||
@@ -12,10 +11,12 @@
|
||||
|
||||
<Rose::Button
|
||||
id={{this.copyableButtonId}}
|
||||
aria-describedby={{this.id}}
|
||||
class="copyable-button"
|
||||
@style="ghost"
|
||||
@iconOnly={{this.icon}}
|
||||
>{{@text}}</Rose::Button>
|
||||
title={{this.copyableButtonText}}
|
||||
>{{this.copyableButtonText}}</Rose::Button>
|
||||
</span>
|
||||
{{else}}
|
||||
{{yield}}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import Component from '@glimmer/component';
|
||||
import ClipboardJS from 'clipboard';
|
||||
import { action } from '@ember/object';
|
||||
import { tracked } from '@glimmer/tracking';
|
||||
import { generateComponentID } from 'rose/utilities/component-auto-id';
|
||||
import { task, timeout } from 'ember-concurrency';
|
||||
import { set } from '@ember/object';
|
||||
@@ -12,11 +11,9 @@ export default class CopyableComponent extends Component {
|
||||
// =attributes
|
||||
|
||||
id = generateComponentID();
|
||||
copyableButtonId = `copyable-button-${this.id}`;
|
||||
icon = 'copy-action';
|
||||
|
||||
@tracked text;
|
||||
@tracked clipboard;
|
||||
copyableButtonId = `copyable-button-${this.id}`;
|
||||
copyableButtonText = this.args.buttonText;
|
||||
|
||||
/**
|
||||
* A Ember Concurrency-based task that updates copy icon to a success state
|
||||
@@ -30,8 +27,10 @@ export default class CopyableComponent extends Component {
|
||||
*/
|
||||
@task(function * () {
|
||||
set(this, 'icon', 'copy-success');
|
||||
set(this, 'copyableButtonText', this.args.acknowledgeText);
|
||||
yield timeout(1000);
|
||||
set(this, 'icon', 'copy-action');
|
||||
set(this, 'copyableButtonText', this.args.buttonText);
|
||||
}).drop() successIconTimer;
|
||||
|
||||
// =methods
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
@value={{@model.attributes.login_name}}
|
||||
@label={{t "form.login_name.label"}}
|
||||
@error={{@model.errors.login_name}}
|
||||
@helperText={{t "form.login_name.help"}}
|
||||
readonly={{false}}
|
||||
as |field|>
|
||||
{{#if @model.errors.login_name}}
|
||||
@@ -74,7 +73,6 @@
|
||||
@value={{this.password}}
|
||||
@label={{t "form.password.label"}}
|
||||
@error={{@model.errors.password}}
|
||||
@helperText={{t "form.password.help"}}
|
||||
readonly={{false}}
|
||||
autocomplete="new-password"
|
||||
as |field|>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<row.headerCell>{{t 'form.id.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.name.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.type.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'resources.host-catalog.title_plural'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'resources.host-catalog.title'}}</row.headerCell>
|
||||
</header.row>
|
||||
</table.header>
|
||||
<table.body as |body|>
|
||||
@@ -57,4 +57,4 @@
|
||||
</message.link>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
@@ -0,0 +1,56 @@
|
||||
{{#if this.hasAvailableAccounts}}
|
||||
<Rose::Form
|
||||
class="full-width"
|
||||
@onSubmit={{fn this.submit @submit}}
|
||||
@cancel={{@cancel}}
|
||||
@disabled={{@model.isSaving}}
|
||||
@error={{@model.errors.base}}
|
||||
as |form|
|
||||
>
|
||||
|
||||
<form.actions
|
||||
@submitText={{t "resources.user.actions.add-accounts"}}
|
||||
@cancelText={{t "actions.cancel"}} />
|
||||
|
||||
<Rose::Table as |table|>
|
||||
<table.header as |header|>
|
||||
<header.row as |row|>
|
||||
<row.headerCell>{{t 'form.id.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.username.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'resources.auth-method.title'}}</row.headerCell>
|
||||
</header.row>
|
||||
</table.header>
|
||||
<table.body as |body|>
|
||||
{{#each this.filteredAccounts as |account|}}
|
||||
<body.row as |row|>
|
||||
<row.cell>
|
||||
<form.checkbox
|
||||
@label={{account.id}}
|
||||
@description={{account.description}}
|
||||
onChange={{fn this.toggleAccount account}} />
|
||||
</row.cell>
|
||||
<row.cell>{{account.username}}</row.cell>
|
||||
<row.cell>
|
||||
<code>{{account.auth_method_id}}</code>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
</table.body>
|
||||
</Rose::Table>
|
||||
|
||||
</Rose::Form>
|
||||
{{/if}}
|
||||
|
||||
{{#unless this.hasAvailableAccounts}}
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Message @title={{t "resources.user.messages.no-accounts.title"}} as |message|>
|
||||
<message.description>
|
||||
{{t "resources.user.messages.no-accounts.description"}}
|
||||
</message.description>
|
||||
<message.link @route="scopes.scope.users.user.accounts">
|
||||
<Rose::Icon @name="chevron-left" />
|
||||
{{t "actions.back"}}
|
||||
</message.link>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
{{/unless}}
|
||||
@@ -0,0 +1,53 @@
|
||||
import Component from '@glimmer/component';
|
||||
import { computed, action } from '@ember/object';
|
||||
import { A } from '@ember/array';
|
||||
|
||||
export default class FormUserAddAccountsComponent extends Component {
|
||||
// =properties
|
||||
|
||||
/**
|
||||
* Array of selected account IDs.
|
||||
* @type {EmberArray}
|
||||
*/
|
||||
selectedAccountIDs = A();
|
||||
|
||||
/**
|
||||
* Checks for unassigned accounts.
|
||||
* @param {[AccountModel]} filteredAccounts
|
||||
* @type {boolean}
|
||||
*/
|
||||
@computed('filteredAccounts')
|
||||
get hasAvailableAccounts() {
|
||||
return this.filteredAccounts.length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accounts not already added to the user.
|
||||
* @type {[AccountModel]}
|
||||
*/
|
||||
@computed('args.{accounts.[],model.account_ids.[]}')
|
||||
get filteredAccounts() {
|
||||
// Get IDs for accounts already added to the current user
|
||||
const alreadyAddedAccountIDs = this.args.model.account_ids;
|
||||
const notAddedAccounts = this.args.accounts.filter(
|
||||
({ id }) => !alreadyAddedAccountIDs.includes(id)
|
||||
);
|
||||
return notAddedAccounts;
|
||||
}
|
||||
|
||||
// =actions
|
||||
|
||||
@action
|
||||
toggleAccount(account) {
|
||||
if (!this.selectedAccountIDs.includes(account.id)) {
|
||||
this.selectedAccountIDs.addObject(account.id);
|
||||
} else {
|
||||
this.selectedAccountIDs.removeObject(account.id);
|
||||
}
|
||||
}
|
||||
|
||||
@action
|
||||
submit(fn) {
|
||||
fn(this.selectedAccountIDs);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import Controller from '@ember/controller';
|
||||
import { inject as service } from '@ember/service';
|
||||
|
||||
export default class ScopesScopeUsersUserAddAccountsController extends Controller {
|
||||
// =services
|
||||
|
||||
@service intl;
|
||||
|
||||
// =attributes
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
get breadCrumb() {
|
||||
return this.intl.t('resources.user.messages.add-accounts.title');
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,10 @@ Router.map(function () {
|
||||
});
|
||||
|
||||
this.route('users', function () {
|
||||
this.route('user', { path: ':user_id' }, function () {});
|
||||
this.route('user', { path: ':user_id' }, function () {
|
||||
this.route('accounts');
|
||||
this.route('add-accounts');
|
||||
});
|
||||
this.route('new');
|
||||
});
|
||||
|
||||
@@ -94,6 +97,7 @@ Router.map(function () {
|
||||
});
|
||||
|
||||
this.route('account', function() {
|
||||
this.route('change-password');
|
||||
// Enable after full account feature implementation
|
||||
// this.route('change-password');
|
||||
});
|
||||
});
|
||||
@@ -12,4 +12,27 @@ export default class ScopesScopeUsersUserRoute extends Route {
|
||||
async model({ user_id }) {
|
||||
return this.store.findRecord('user', user_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the route-set specific page sections
|
||||
* @override
|
||||
*/
|
||||
renderTemplate() {
|
||||
super.renderTemplate(...arguments);
|
||||
|
||||
this.render('scopes/scope/users/user/-header', {
|
||||
into: 'scopes/scope/users/user',
|
||||
outlet: 'header',
|
||||
});
|
||||
|
||||
this.render('scopes/scope/users/user/-actions', {
|
||||
into: 'scopes/scope/users/user',
|
||||
outlet: 'actions',
|
||||
});
|
||||
|
||||
this.render('scopes/scope/users/user/-navigation', {
|
||||
into: 'scopes/scope/users/user',
|
||||
outlet: 'navigation',
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import Route from '@ember/routing/route';
|
||||
import { action } from '@ember/object';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { hash, all } from 'rsvp';
|
||||
import loading from 'ember-loading/decorator';
|
||||
|
||||
export default class ScopesScopeUsersUserAccountsRoute extends Route {
|
||||
// =services
|
||||
|
||||
@service intl;
|
||||
@service notify;
|
||||
|
||||
// =methods
|
||||
|
||||
/**
|
||||
* Returns users associated with this user.
|
||||
* @return {Promise{user: UserModel, accounts: Promise{[AccountModel]}}}
|
||||
*/
|
||||
model() {
|
||||
const { id: scopeID } = this.modelFor('scopes.scope');
|
||||
const user = this.modelFor('scopes.scope.users.user');
|
||||
return hash({
|
||||
user,
|
||||
accounts: all(
|
||||
user.account_ids.map((id) =>
|
||||
this.store.findRecord('account', id, { adapterOptions: { scopeID } })
|
||||
)
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
// =actions
|
||||
|
||||
/**
|
||||
* Remove a account from the current role and redirect to accounts index.
|
||||
* @param {UserModel} user
|
||||
* @param {AccountModel} account
|
||||
*/
|
||||
@action
|
||||
@loading
|
||||
async removeAccount(user, account) {
|
||||
try {
|
||||
await user.removeAccount(account.id);
|
||||
await this.refresh();
|
||||
this.notify.success(this.intl.t('notifications.remove-success'));
|
||||
} catch (error) {
|
||||
// TODO: replace with translated strings
|
||||
this.notify.error(error.message, { closeAfter: null });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
import Route from '@ember/routing/route';
|
||||
import { inject as service } from '@ember/service';
|
||||
import { action } from '@ember/object';
|
||||
import { all } from 'rsvp';
|
||||
import loading from 'ember-loading/decorator';
|
||||
|
||||
export default class ScopesScopeUsersUserAddAccountsRoute extends Route {
|
||||
// =services
|
||||
|
||||
@service intl;
|
||||
@service notify;
|
||||
|
||||
// =methods
|
||||
|
||||
/**
|
||||
* Emtpy out any previously loaded acconuts.
|
||||
*/
|
||||
beforeModel() {
|
||||
this.store.unloadAll('account');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current target, all host catalogs, and all host sets.
|
||||
* @return {{target: TargetModel, hostCatalogs: [HostCatalogModel], hostSets: [HostSetModel]}}
|
||||
*/
|
||||
async model() {
|
||||
const user = this.modelFor('scopes.scope.users.user');
|
||||
const { id: scope_id } = this.modelFor('scopes.scope');
|
||||
const authMethods = await this.store.query('auth-method', { scope_id });
|
||||
await all(
|
||||
authMethods.map(({ id: auth_method_id }) =>
|
||||
this.store.query('account', { auth_method_id })
|
||||
)
|
||||
);
|
||||
const accounts = this.store.peekAll('account');
|
||||
return { user, authMethods, accounts };
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the route-set specific page sections
|
||||
* @override
|
||||
*/
|
||||
renderTemplate() {
|
||||
super.renderTemplate(...arguments);
|
||||
|
||||
this.render('scopes/scope/users/user/add-accounts/-header', {
|
||||
into: 'scopes/scope/users/user',
|
||||
outlet: 'header',
|
||||
});
|
||||
|
||||
this.render('-empty', {
|
||||
into: 'scopes/scope/users/user',
|
||||
outlet: 'actions',
|
||||
});
|
||||
|
||||
this.render('-empty', {
|
||||
into: 'scopes/scope/users/user',
|
||||
outlet: 'navigation',
|
||||
});
|
||||
}
|
||||
|
||||
// =actions
|
||||
|
||||
/**
|
||||
* Adds accounts to the user and saves, replaces with the accounts index
|
||||
* route, and notifies the user of success or error.
|
||||
* @param {UserModel} user
|
||||
* @param {[string]} accountIDs
|
||||
*/
|
||||
@action
|
||||
@loading
|
||||
async addAccounts(user, accountIDs) {
|
||||
try {
|
||||
await user.addAccounts(accountIDs);
|
||||
await this.replaceWith('scopes.scope.users.user.accounts');
|
||||
this.notify.success(this.intl.t('notifications.add-success'));
|
||||
} catch (error) {
|
||||
// TODO: replace with translated strings
|
||||
this.notify.error(error.message, { closeAfter: null });
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirect to user accounts as if nothing ever happened.
|
||||
*/
|
||||
@action
|
||||
cancel() {
|
||||
this.replaceWith('scopes.scope.users.user.accounts');
|
||||
}
|
||||
}
|
||||
@@ -61,19 +61,19 @@
|
||||
.ember-notify-show {
|
||||
-webkit-animation-duration: 500ms;
|
||||
-webkit-animation-name: ember-notify-show;
|
||||
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
-webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1.275);
|
||||
animation-duration: 500ms;
|
||||
animation-name: ember-notify-show;
|
||||
animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
animation-timing-function: cubic-bezier(.175, .885, .32, 1.275);
|
||||
}
|
||||
|
||||
.ember-notify-hide {
|
||||
-webkit-animation-duration: 250ms;
|
||||
-webkit-animation-name: ember-notify-hide;
|
||||
-webkit-animation-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045);
|
||||
-webkit-animation-timing-function: cubic-bezier(.6, -.28, .735, .045);
|
||||
animation-duration: 250ms;
|
||||
animation-name: ember-notify-hide;
|
||||
animation-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045);
|
||||
animation-timing-function: cubic-bezier(.6, -.28, .735, .045);
|
||||
|
||||
&:hover {
|
||||
-moz-animation-play-state: paused;
|
||||
|
||||
+16
-12
@@ -65,17 +65,16 @@
|
||||
|
||||
&.loading {
|
||||
&::after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 3px;
|
||||
|
||||
background: repeating-linear-gradient(to right, var(--subtle), var(--subtle), var(--info), var(--subtle), var(--subtle));
|
||||
background-size: 200% auto;
|
||||
background-position: 0 100%;
|
||||
animation: gradient 1s linear infinite;
|
||||
background: repeating-linear-gradient(to right, var(--white), var(--white), var(--info), var(--white), var(--white));
|
||||
background-position: 0 100%;
|
||||
background-size: 200% auto;
|
||||
content: ' ';
|
||||
height: 3px;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 100%;
|
||||
|
||||
@keyframes gradient {
|
||||
0% { background-position: 0 0; }
|
||||
@@ -85,6 +84,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.copyable .copyable-button {
|
||||
padding: 0rem;
|
||||
.copyable {
|
||||
.copyable-button {
|
||||
position: relative;
|
||||
top: -2px;
|
||||
padding: 0 sizing.rems(xxs);
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@
|
||||
@iconOnly={{true}}
|
||||
@icon="boundary-icons/user-profile" as |dropdown|
|
||||
>
|
||||
<dropdown.link @route="account.change-password">
|
||||
{{!-- <dropdown.link @route="account.change-password">
|
||||
{{t 'actions.change-password'}}
|
||||
</dropdown.link>
|
||||
</dropdown.link> --}}
|
||||
<dropdown.button
|
||||
{{on "click" (route-action "invalidateSession")}}
|
||||
>
|
||||
@@ -37,6 +37,17 @@
|
||||
{{outlet}}
|
||||
</layout.body>
|
||||
|
||||
<layout.footer>
|
||||
<Rose::Footer as |footer|>
|
||||
<footer.brand @logo="logo-hashi" @text={{t "hashicorp.title"}} />
|
||||
<footer.text>{{t "hashicorp.copyright"}}</footer.text>
|
||||
<footer.text>{{t "hashicorp.product"}}</footer.text>
|
||||
<footer.nav as |nav|>
|
||||
<nav.link @href={{t "hashicorp.documentation.link"}}>{{t "hashicorp.documentation.title"}}</nav.link>
|
||||
</footer.nav>
|
||||
</Rose::Footer>
|
||||
</layout.footer>
|
||||
|
||||
</Rose::Layout::Global>
|
||||
|
||||
<EmberNotify @closeAfter={{this.notifyTimeout}} as |message close|>
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<h2>{{t "resources.auth-method.title"}}</h2>
|
||||
<p>{{t "resources.auth-method.description"}}</p>
|
||||
<p><code>{{@model.id}}</code></p>
|
||||
<Copyable
|
||||
@text={{@model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{@model.id}}</code>
|
||||
</Copyable>
|
||||
+7
-1
@@ -1,2 +1,8 @@
|
||||
<h2>{{t "resources.account.title"}}</h2>
|
||||
<p><code>{{@model.id}}</code></p>
|
||||
<Copyable
|
||||
@text={{@model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{@model.id}}</code>
|
||||
</Copyable>
|
||||
+7
-1
@@ -1,3 +1,9 @@
|
||||
<h2>{{t "resources.account.title"}}</h2>
|
||||
<p>{{t 'resources.account.messages.set-password.description'}}</p>
|
||||
<p><code>{{@model.id}}</code></p>
|
||||
<Copyable
|
||||
@text={{@model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{@model.id}}</code>
|
||||
</Copyable>
|
||||
@@ -4,7 +4,7 @@
|
||||
<table.header as |header|>
|
||||
<header.row as |row|>
|
||||
<row.headerCell>{{t 'form.name.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.login_name.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.username.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.id.label'}}</row.headerCell>
|
||||
</header.row>
|
||||
</table.header>
|
||||
@@ -24,7 +24,13 @@
|
||||
{{account.username}}
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<code>{{account.id}}</code>
|
||||
<Copyable
|
||||
@text={{account.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{account.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
|
||||
@@ -46,7 +46,13 @@
|
||||
</Rose::Badge>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<code>{{authMethod.id}}</code>
|
||||
<Copyable
|
||||
@text={{authMethod.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{authMethod.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<h2>{{t "resources.group.title"}}</h2>
|
||||
<p>{{t "resources.group.description"}}</p>
|
||||
<p><code>{{@model.id}}</code></p>
|
||||
<Copyable
|
||||
@text={{@model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{@model.id}}</code>
|
||||
</Copyable>
|
||||
@@ -17,7 +17,13 @@
|
||||
{{member.displayName}}
|
||||
</row.headerCell>
|
||||
<row.cell>
|
||||
<code>{{member.id}}</code>
|
||||
<Copyable
|
||||
@text={{member.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{member.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<Rose::Dropdown
|
||||
|
||||
@@ -39,7 +39,13 @@
|
||||
<p>{{group.description}}</p>
|
||||
</row.headerCell>
|
||||
<row.cell>
|
||||
<code>{{group.id}}</code>
|
||||
<Copyable
|
||||
@text={{group.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{group.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
|
||||
+7
-1
@@ -1,3 +1,9 @@
|
||||
<h2>{{t "resources.host-catalog.title"}}</h2>
|
||||
<p>{{t "resources.host-catalog.description"}}</p>
|
||||
<p><code>{{@model.id}}</code></p>
|
||||
<Copyable
|
||||
@text={{@model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{@model.id}}</code>
|
||||
</Copyable>
|
||||
+7
-1
@@ -1,3 +1,9 @@
|
||||
<h2>{{t "resources.host-set.title"}}</h2>
|
||||
<p>{{t "resources.host-set.description"}}</p>
|
||||
<p><code>{{@model.id}}</code></p>
|
||||
<Copyable
|
||||
@text={{@model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{@model.id}}</code>
|
||||
</Copyable>
|
||||
+7
-1
@@ -25,7 +25,13 @@
|
||||
<Rose::Badge>{{host.type}}</Rose::Badge>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<code>{{host.id}}</code>
|
||||
<Copyable
|
||||
@text={{host.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{host.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<Rose::Dropdown
|
||||
|
||||
+7
-1
@@ -26,7 +26,13 @@
|
||||
</Rose::Badge>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<code>{{hostSet.id}}</code>
|
||||
<Copyable
|
||||
@text={{hostSet.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{hostSet.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
|
||||
+7
-1
@@ -1,3 +1,9 @@
|
||||
<h2>{{t "resources.host.title"}}</h2>
|
||||
<p>{{t "resources.host.description"}}</p>
|
||||
<p><code>{{@model.id}}</code></p>
|
||||
<Copyable
|
||||
@text={{@model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{@model.id}}</code>
|
||||
</Copyable>
|
||||
+7
-1
@@ -27,7 +27,13 @@
|
||||
</Rose::Badge>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<code>{{host.id}}</code>
|
||||
<Copyable
|
||||
@text={{host.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{host.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<code>{{host.attributes.address}}</code>
|
||||
|
||||
@@ -47,7 +47,13 @@
|
||||
</Rose::Badge>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<code>{{hostCatalog.id}}</code>
|
||||
<Copyable
|
||||
@text={{hostCatalog.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{hostCatalog.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
|
||||
@@ -7,7 +7,13 @@
|
||||
<page.header>
|
||||
<h2>{{t "resources.project.title"}}</h2>
|
||||
<p>{{t "resources.project.description"}}</p>
|
||||
<p><code>{{@model.id}}</code></p>
|
||||
<Copyable
|
||||
@text={{@model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{@model.id}}</code>
|
||||
</Copyable>
|
||||
</page.header>
|
||||
|
||||
<page.navigation>
|
||||
|
||||
@@ -28,7 +28,13 @@
|
||||
{{#each @model as |sessionAggregate|}}
|
||||
<body.row as |row|>
|
||||
<row.headerCell>
|
||||
<code>{{sessionAggregate.session.id}}</code>
|
||||
<Copyable
|
||||
@text={{sessionAggregate.session.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{sessionAggregate.session.id}}</code>
|
||||
</Copyable>
|
||||
</row.headerCell>
|
||||
<row.cell>{{sessionAggregate.user.displayName}}</row.cell>
|
||||
<row.cell>{{sessionAggregate.target.displayName}}</row.cell>
|
||||
|
||||
@@ -51,7 +51,13 @@
|
||||
{{/if}}
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<code>{{target.id}}</code>
|
||||
<Copyable
|
||||
@text={{target.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{target.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<h2>{{t "resources.target.title"}}</h2>
|
||||
<p>{{t "resources.target.description"}}</p>
|
||||
<p><code>{{@model.id}}</code></p>
|
||||
<Copyable
|
||||
@text={{@model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{@model.id}}</code>
|
||||
</Copyable>
|
||||
@@ -22,7 +22,13 @@
|
||||
<Rose::Badge>{{t (concat 'resources.host-set.types.' hostSet.model.type)}}</Rose::Badge>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<code>{{hostSet.model.id}}</code>
|
||||
<Copyable
|
||||
@text={{hostSet.model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{hostSet.model.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<Rose::Dropdown
|
||||
|
||||
@@ -41,7 +41,13 @@
|
||||
<p>{{role.description}}</p>
|
||||
</row.headerCell>
|
||||
<row.cell>
|
||||
<code>{{role.id}}</code>
|
||||
<Copyable
|
||||
@text={{role.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{role.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<h2>{{t "resources.role.title"}}</h2>
|
||||
<p>{{t "resources.role.description"}}</p>
|
||||
<p><code>{{@model.id}}</code></p>
|
||||
<Copyable
|
||||
@text={{@model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{@model.id}}</code>
|
||||
</Copyable>
|
||||
@@ -1,3 +1,9 @@
|
||||
<h2>{{t "resources.role.title"}}</h2>
|
||||
<p>{{t "resources.role.grant.description"}}</p>
|
||||
<p><code>{{@model.id}}</code></p>
|
||||
<Copyable
|
||||
@text={{@model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{@model.id}}</code>
|
||||
</Copyable>
|
||||
@@ -21,7 +21,13 @@
|
||||
{{t (concat 'resources.role.principal.types.' principal.type)}}
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<code>{{principal.model.id}}</code>
|
||||
<Copyable
|
||||
@text={{principal.model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{principal.model.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<Rose::Dropdown
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<h2>{{t "resources.role.title"}}</h2>
|
||||
<p>{{t "resources.role.principal.description"}}</p>
|
||||
<p><code>{{@model.role.id}}</code></p>
|
||||
<Copyable
|
||||
@text={{@model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{@model.id}}</code>
|
||||
</Copyable>
|
||||
@@ -41,7 +41,13 @@
|
||||
<p>{{user.description}}</p>
|
||||
</row.headerCell>
|
||||
<row.cell>
|
||||
<code>{{user.id}}</code>
|
||||
<Copyable
|
||||
@text={{user.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{user.id}}</code>
|
||||
</Copyable>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
{{title @model.displayName}}
|
||||
|
||||
{{outlet}}
|
||||
<Rose::Layout::Page as |page|>
|
||||
|
||||
<page.breadcrumbs>
|
||||
<BreadCrumbs />
|
||||
</page.breadcrumbs>
|
||||
|
||||
<page.header>
|
||||
{{outlet "header"}}
|
||||
</page.header>
|
||||
|
||||
<page.navigation>
|
||||
{{outlet "navigation"}}
|
||||
</page.navigation>
|
||||
|
||||
<page.actions>
|
||||
{{outlet "actions"}}
|
||||
</page.actions>
|
||||
|
||||
<page.body>
|
||||
{{outlet}}
|
||||
</page.body>
|
||||
|
||||
</Rose::Layout::Page>
|
||||
@@ -0,0 +1,12 @@
|
||||
<Rose::Dropdown @text="{{t 'actions.manage'}}" @dropdownRight={{true}} as |dropdown|>
|
||||
<dropdown.link @route="scopes.scope.users.user.add-accounts">
|
||||
{{t "resources.user.actions.add-accounts"}}
|
||||
</dropdown.link>
|
||||
<dropdown.button
|
||||
@style="danger"
|
||||
@disabled={{@model.canSave}}
|
||||
{{on "click" (route-action "delete" @model)}}
|
||||
>
|
||||
{{t 'actions.delete-user'}}
|
||||
</dropdown.button>
|
||||
</Rose::Dropdown>
|
||||
@@ -0,0 +1,9 @@
|
||||
<h2>{{t "resources.user.title"}}</h2>
|
||||
<p>{{t "resources.user.description"}}</p>
|
||||
<Copyable
|
||||
@text={{@model.id}}
|
||||
@buttonText={{t "actions.copy-to-clipboard"}}
|
||||
@acknowledgeText={{t "states.copied"}}
|
||||
>
|
||||
<code>{{@model.id}}</code>
|
||||
</Copyable>
|
||||
@@ -0,0 +1,8 @@
|
||||
<Rose::Nav::Tabs as |nav|>
|
||||
<nav.link @route='scopes.scope.users.user.index'>
|
||||
{{t 'titles.details'}}
|
||||
</nav.link>
|
||||
<nav.link @route='scopes.scope.users.user.accounts'>
|
||||
{{t 'resources.user.messages.accounts.title'}}
|
||||
</nav.link>
|
||||
</Rose::Nav::Tabs>
|
||||
@@ -0,0 +1,53 @@
|
||||
{{title (t 'resources.user.messages.accounts.title')}}
|
||||
|
||||
{{#if @model.accounts}}
|
||||
|
||||
<Rose::Table as |table|>
|
||||
<table.header as |header|>
|
||||
<header.row as |row|>
|
||||
<row.headerCell>{{t 'form.username.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t 'form.id.label'}}</row.headerCell>
|
||||
<row.headerCell>{{t "titles.actions"}}</row.headerCell>
|
||||
</header.row>
|
||||
</table.header>
|
||||
<table.body as |body|>
|
||||
{{#each @model.accounts as |account|}}
|
||||
<body.row as |row|>
|
||||
<row.headerCell>
|
||||
{{account.username}}
|
||||
</row.headerCell>
|
||||
<row.cell>
|
||||
<code>{{account.id}}</code>
|
||||
</row.cell>
|
||||
<row.cell>
|
||||
<Rose::Dropdown
|
||||
@icon="more-horizontal"
|
||||
@iconOnly={{true}}
|
||||
@showCaret={{false}}
|
||||
@dropdownRight={{true}}
|
||||
@text="{{t "actions.manage"}}" as |dropdown|
|
||||
>
|
||||
<dropdown.button
|
||||
@style="danger"
|
||||
{{on "click" (route-action "removeAccount" @model.user account)}}
|
||||
>
|
||||
{{t "actions.remove"}}
|
||||
</dropdown.button>
|
||||
</Rose::Dropdown>
|
||||
</row.cell>
|
||||
</body.row>
|
||||
{{/each}}
|
||||
</table.body>
|
||||
</Rose::Table>
|
||||
|
||||
{{else}}
|
||||
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Message @title={{t "resources.user.messages.accounts.title"}} as |message|>
|
||||
<message.description>
|
||||
{{t "resources.user.messages.accounts.description"}}
|
||||
</message.description>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
|
||||
{{/if}}
|
||||
@@ -0,0 +1,25 @@
|
||||
{{title (t 'resources.user.actions.add-accounts')}}
|
||||
|
||||
{{#if @model.accounts}}
|
||||
<Form::User::AddAccounts
|
||||
@model={{@model.user}}
|
||||
@authMethods={{@model.authMethods}}
|
||||
@accounts={{@model.accounts}}
|
||||
@submit={{route-action "addAccounts" @model.user}}
|
||||
@cancel={{route-action "cancel"}}
|
||||
/>
|
||||
{{/if}}
|
||||
|
||||
{{#unless @model.accounts}}
|
||||
<Rose::Layout::Centered>
|
||||
<Rose::Message @title={{t "resources.user.messages.no-accounts.title"}} as |message|>
|
||||
<message.description>
|
||||
{{t "resources.user.messages.no-accounts.description"}}
|
||||
</message.description>
|
||||
<message.link @route="scopes.scope.users.user.accounts">
|
||||
<Rose::Icon @name="chevron-left" />
|
||||
{{t "actions.back"}}
|
||||
</message.link>
|
||||
</Rose::Message>
|
||||
</Rose::Layout::Centered>
|
||||
{{/unless}}
|
||||
@@ -0,0 +1,2 @@
|
||||
<h2>{{t "resources.user.messages.add-accounts.title"}}</h2>
|
||||
<p>{{t "resources.user.messages.add-accounts.description"}}</p>
|
||||
@@ -1,41 +1,5 @@
|
||||
<Rose::Layout::Page as |page|>
|
||||
|
||||
<page.breadcrumbs>
|
||||
<BreadCrumbs />
|
||||
</page.breadcrumbs>
|
||||
|
||||
<page.header>
|
||||
<h2>{{t "resources.user.title"}}</h2>
|
||||
<p>{{t "resources.user.description"}}</p>
|
||||
<p><code>{{@model.id}}</code></p>
|
||||
</page.header>
|
||||
|
||||
<page.actions>
|
||||
<Rose::Dropdown @text="{{t 'actions.manage'}}" @dropdownRight={{true}} as |dropdown|>
|
||||
<dropdown.button
|
||||
@style="danger"
|
||||
@disabled={{@model.canSave}}
|
||||
{{on "click" (route-action "delete" @model)}}
|
||||
>
|
||||
{{t 'actions.delete-user'}}
|
||||
</dropdown.button>
|
||||
</Rose::Dropdown>
|
||||
</page.actions>
|
||||
|
||||
<page.navigation>
|
||||
<Rose::Nav::Tabs as |nav|>
|
||||
<nav.link @route='scopes.scope.users.user'>
|
||||
{{t 'titles.details'}}
|
||||
</nav.link>
|
||||
</Rose::Nav::Tabs>
|
||||
</page.navigation>
|
||||
|
||||
<page.body>
|
||||
<Form::User
|
||||
@model={{@model}}
|
||||
@submit={{route-action "save" @model}}
|
||||
@cancel={{route-action "cancel" @model}}
|
||||
/>
|
||||
</page.body>
|
||||
|
||||
</Rose::Layout::Page>
|
||||
<Form::User
|
||||
@model={{@model}}
|
||||
@submit={{route-action "save" @model}}
|
||||
@cancel={{route-action "cancel" @model}}
|
||||
/>
|
||||
Reference in new issue
Block a user