style: format ui/core

This commit is contained in:
Susmitha Girumala committed 2020-09-16 14:33:04 -04:00
1 parent e3366998c5
commit f4daaa45a9
165 files changed
+1075 -785

No files matched your search

@@ -4,7 +4,6 @@ import { action } from '@ember/object';
import { next } from '@ember/runloop';
export default class FormAccountPasswordIndexComponent extends Component {
// =properties
/**
@@ -5,7 +5,6 @@ import { action } from '@ember/object';
import { next } from '@ember/runloop';
export default class FormAccountPasswordSetPasswordIndexComponent extends Component {
// =properties
/**
@@ -54,5 +53,4 @@ export default class FormAccountPasswordSetPasswordIndexComponent extends Compon
this.resetPassword();
fn();
}
}
@@ -3,7 +3,6 @@ import { computed, action } from '@ember/object';
import { A } from '@ember/array';
export default class FormGroupAddMembersComponent extends Component {
// =properties
/**
@@ -38,5 +37,4 @@ export default class FormGroupAddMembersComponent extends Component {
submit(fn) {
fn(this.selectedMemberIDs);
}
}
@@ -3,7 +3,6 @@ import { computed, action } from '@ember/object';
import { A } from '@ember/array';
export default class FormHostSetAddHostsIndexComponent extends Component {
// =properties
/**
@@ -28,7 +27,7 @@ export default class FormHostSetAddHostsIndexComponent extends Component {
*/
@computed('args.{model,hosts}')
get filteredHosts() {
const currentHostIDs = this.args.model.host_ids.map(host => host.value);
const currentHostIDs = this.args.model.host_ids.map((host) => host.value);
return this.args.hosts.filter(({ id }) => !currentHostIDs.includes(id));
}
@@ -2,7 +2,6 @@ import Component from '@glimmer/component';
import { computed } from '@ember/object';
export default class FormHostSetHostsComponent extends Component {
// =attributes
/**
@@ -14,10 +13,9 @@ export default class FormHostSetHostsComponent extends Component {
@computed('args.{hosts.[],model.host_ids.[]}')
get options() {
const { hosts, model: hostSet } = this.args;
return hosts.map(host => ({
return hosts.map((host) => ({
host,
selected: Boolean(hostSet.host_ids.findBy('value', host.id))
selected: Boolean(hostSet.host_ids.findBy('value', host.id)),
}));
}
}
@@ -3,8 +3,6 @@ import { computed, action } from '@ember/object';
import { A } from '@ember/array';
export default class FormRoleAddPrincipalsIndexComponent extends Component {
// =properties
/**
@@ -31,10 +29,16 @@ export default class FormRoleAddPrincipalsIndexComponent extends Component {
@computed('args.{model,users,groups}')
get filteredPrincipals() {
// Retrieve principal IDs assigned to current role
const currentPrincipalIDs = this.args.model.principals.map(principal => principal.principal_id);
const currentPrincipalIDs = this.args.model.principals.map(
(principal) => principal.principal_id
);
// Retrieve principal IDs not assigned to current role
const unassignedUsers = this.args.users.filter(({ id }) => !currentPrincipalIDs.includes(id));
const unassignedGroups = this.args.groups.filter(({ id }) => !currentPrincipalIDs.includes(id));
const unassignedUsers = this.args.users.filter(
({ id }) => !currentPrincipalIDs.includes(id)
);
const unassignedGroups = this.args.groups.filter(
({ id }) => !currentPrincipalIDs.includes(id)
);
return [...unassignedUsers, ...unassignedGroups];
}
@@ -53,5 +57,4 @@ export default class FormRoleAddPrincipalsIndexComponent extends Component {
submit(fn) {
fn(this.selectedPrincipalIDs);
}
}
@@ -3,7 +3,6 @@ import { tracked } from '@glimmer/tracking';
import { computed, action } from '@ember/object';
export default class FormRoleGrantsComponent extends Component {
// =attributes
/**
@@ -3,7 +3,6 @@ import { computed, action } from '@ember/object';
import { A } from '@ember/array';
export default class FormTargetAddHostSetsComponent extends Component {
// =properties
/**
@@ -19,10 +18,12 @@ export default class FormTargetAddHostSetsComponent extends Component {
@computed('args.{hostSets.[],model.host_sets.[]}')
get filteredHostSets() {
// Get IDs for host sets already added to the current target
const alreadyAddedHostSetIDs = this.args.model.host_sets
.map(({ host_set_id }) => host_set_id);
const notAddedHostSets = this.args.hostSets
.filter(({ id }) => !alreadyAddedHostSetIDs.includes(id));
const alreadyAddedHostSetIDs = this.args.model.host_sets.map(
({ host_set_id }) => host_set_id
);
const notAddedHostSets = this.args.hostSets.filter(
({ id }) => !alreadyAddedHostSetIDs.includes(id)
);
return notAddedHostSets;
}