-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implemented all permission locks in UI
- Loading branch information
Showing
25 changed files
with
298 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}> | ||
<div class="modal-body-container" ...attributes> | ||
<InputGroup @name={{t "iam.components.modals.role-form.role-name"}} @value={{@options.role.name}} @placeholder={{t "iam.components.modals.role-form.enter-name-for-this-role"}} /> | ||
<InputGroup @name={{t "iam.components.modals.role-form.role-name"}} @value={{@options.role.name}} @placeholder={{t "iam.components.modals.role-form.enter-name-for-this-role"}} @disabled={{cannot @options.formPermission}} /> | ||
<InputGroup | ||
@name={{t "iam.components.modals.role-form.role-description"}} | ||
@value={{@options.role.description}} | ||
@placeholder={{t "iam.components.modals.role-form.enter-description-your-role"}} | ||
@disabled={{cannot @options.formPermission}} | ||
/> | ||
<InputGroup @name={{t "iam.common.attach-policies"}}> | ||
<PolicyAttacher @onChange={{fn (mut @options.role.policies)}} @value={{@options.role.policies}} /> | ||
<PolicyAttacher @onChange={{fn (mut @options.role.policies)}} @value={{@options.role.policies}} @disabled={{cannot @options.formPermission}} /> | ||
</InputGroup> | ||
<InputGroup @name={{t "iam.components.modals.role-form.select-permission"}}> | ||
<PermissionPicker @selected={{@options.role.permissionsArray}} @onChange={{@options.setPermissions}} /> | ||
<PermissionPicker @selected={{@options.role.permissionsArray}} @onChange={{@options.setPermissions}} @disabled={{cannot @options.formPermission}} /> | ||
</InputGroup> | ||
</div> | ||
</Modal::Default> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div class="iam-metrics" ...attributes> | ||
<div class="flex flex-col"> | ||
<div class="flex flex-row items-center justify-between px-4 py-2 border dark:border-gray-700 border-gray-200 dark:bg-gray-800 bg-gray-50 rounded-lg shadow-sm"> | ||
<span class="text-base font-bold text-black dark:text-gray-100">{{t "iam.components.widget.metrics.title"}}</span> | ||
</div> | ||
|
||
<div class="mt-4"> | ||
{{#if this.getIamMetrics.isRunning}} | ||
<Spinner /> | ||
{{else}} | ||
<div class="grid grid-cols-2 lg:grid-cols-8 gap-4"> | ||
{{#each-in this.metrics as |title count|}} | ||
<Widget::Count @title={{smart-humanize title}} @value={{count}} class="lg:col-span-2 h-full" /> | ||
{{/each-in}} | ||
</div> | ||
{{/if}} | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import Component from '@glimmer/component'; | ||
import { tracked } from '@glimmer/tracking'; | ||
import { inject as service } from '@ember/service'; | ||
import { task } from 'ember-concurrency'; | ||
|
||
export default class WidgetIamMetricsComponent extends Component { | ||
/** | ||
* The widget ID to use for registering. | ||
* | ||
* @memberof WidgetIamMetricsComponent | ||
*/ | ||
static widgetId = 'iam-metrics-widget'; | ||
|
||
/** | ||
* Inject the fetch service. | ||
* | ||
* @memberof WidgetKeyMetricsComponent | ||
*/ | ||
@service fetch; | ||
|
||
/** | ||
* Property for loading metrics to. | ||
* | ||
* @memberof WidgetKeyMetricsComponent | ||
*/ | ||
@tracked metrics = {}; | ||
|
||
/** | ||
* Creates an instance of WidgetKeyMetricsComponent. | ||
* @memberof WidgetKeyMetricsComponent | ||
*/ | ||
constructor() { | ||
super(...arguments); | ||
this.getIamMetrics.perform(); | ||
} | ||
|
||
/** | ||
* Task which fetches key metrics. | ||
* | ||
* @memberof WidgetKeyMetricsComponent | ||
*/ | ||
@task *getIamMetrics() { | ||
try { | ||
this.metrics = yield this.fetch.get('metrics/iam'); | ||
} catch (error) { | ||
this.notifications.serverError(error); | ||
} | ||
} | ||
} |
Oops, something went wrong.