Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class CreateRoleCmd extends RoleCmd {
/////////////////////////////////////////////////////

@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true,
description = "creates a role with this unique name", validations = {ApiArgValidator.NotNullOrEmpty})
description = "Creates a role with this unique name", validations = {ApiArgValidator.NotNullOrEmpty})
private String roleName;

@Parameter(name = ApiConstants.ROLE_ID, type = CommandType.UUID, entityType = RoleResponse.class,
Expand Down
2 changes: 2 additions & 0 deletions ui/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@
"label.baremetalmac": "Host MAC",
"label.baremetalmemory": "Memory (in MB)",
"label.based.on": "Based on",
"label.based.on.role.id.or.type": "Creates a role based on either role id or type",
"label.basic": "Basic",
"label.basic.mode": "Basic Mode",
"label.basicsetup": "Basic setup",
Expand Down Expand Up @@ -1827,6 +1828,7 @@
"label.rule.number": "Rule Number",
"label.rules": "Rules",
"label.rules.file": "Rules File",
"label.rules.file.to.import": "Rule defintions CSV file to import",
"label.rules.file.import.description": "Click or drag rule defintions CSV file to import",
"label.run.proxy.locally": "Run proxy locally",
"label.running": "Running VMs",
Expand Down
40 changes: 35 additions & 5 deletions ui/src/views/iam/CreateRole.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,39 @@
:form="form"
@submit="handleSubmit"
layout="vertical">
<a-form-item :label="$t('label.name')">
<a-form-item>
<span slot="label">
{{ $t('label.name') }}
<a-tooltip :title="createRoleApiParams.name.description">
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
</a-tooltip>
</span>
<a-input
v-decorator="['name', {
rules: [{ required: true, message: $t('message.error.required.input') }]
}]"
:placeholder="createRoleApiParams.name.description" />
</a-form-item>

<a-form-item :label="$t('label.description')">
<a-form-item>
<span slot="label">
{{ $t('label.description') }}
<a-tooltip :title="createRoleApiParams.description.description">
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
</a-tooltip>
</span>
<a-input
v-decorator="['description']"
:placeholder="createRoleApiParams.description.description" />
</a-form-item>

<a-form-item :label="$t('label.based.on')" v-if="'roleid' in createRoleApiParams">
<a-form-item v-if="'roleid' in createRoleApiParams">
<span slot="label">
{{ $t('label.based.on') }}
<a-tooltip :title="$t('label.based.on.role.id.or.type')">
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
</a-tooltip>
</span>
<a-radio-group
v-decorator="['using', {
initialValue: this.createRoleUsing
Expand All @@ -52,7 +70,13 @@
</a-radio-group>
</a-form-item>

<a-form-item :label="$t('label.type')" v-if="this.createRoleUsing === 'type'">
<a-form-item v-if="this.createRoleUsing === 'type'">
<span slot="label">
{{ $t('label.type') }}
<a-tooltip :title="createRoleApiParams.type.description">
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
</a-tooltip>
</span>
<a-select
v-decorator="['type', {
rules: [{ required: true, message: $t('message.error.select') }]
Expand All @@ -64,7 +88,13 @@
</a-select>
</a-form-item>

<a-form-item :label="$t('label.role')" v-if="this.createRoleUsing === 'role'">
<a-form-item v-if="this.createRoleUsing === 'role'">
<span slot="label">
{{ $t('label.role') }}
<a-tooltip :title="createRoleApiParams.roleid.description">
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
</a-tooltip>
</span>
<a-select
v-decorator="['roleid', {
rules: [{ required: true, message: $t('message.error.select') }]
Expand Down
40 changes: 35 additions & 5 deletions ui/src/views/iam/ImportRole.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@
:form="form"
@submit="handleSubmit"
layout="vertical">
<a-form-item :label="$t('label.rules.file')">
<a-form-item>
<span slot="label">
{{ $t('label.rules.file') }}
<a-tooltip :title="$t('label.rules.file.to.import')">
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
</a-tooltip>
</span>
<a-upload-dragger
:multiple="false"
:fileList="fileList"
Expand All @@ -45,21 +51,39 @@
</p>
</a-upload-dragger>
</a-form-item>
<a-form-item :label="$t('label.name')">
<a-form-item>
<span slot="label">
{{ $t('label.name') }}
<a-tooltip :title="importRoleApiParams.name.description">
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
</a-tooltip>
</span>
<a-input
v-decorator="['name', {
rules: [{ required: true, message: $t('message.error.required.input') }]
}]"
:placeholder="importRoleApiParams.name.description" />
</a-form-item>

<a-form-item :label="$t('label.description')">
<a-form-item>
<span slot="label">
{{ $t('label.description') }}
<a-tooltip :title="importRoleApiParams.description.description">
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
</a-tooltip>
</span>
<a-input
v-decorator="['description']"
:placeholder="importRoleApiParams.description.description" />
</a-form-item>

<a-form-item :label="$t('label.type')">
<a-form-item>
<span slot="label">
{{ $t('label.type') }}
<a-tooltip :title="importRoleApiParams.type.description">
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
</a-tooltip>
</span>
<a-select
v-decorator="['type', {
rules: [{ required: true, message: $t('message.error.select') }]
Expand All @@ -71,7 +95,13 @@
</a-select>
</a-form-item>

<a-form-item :label="$t('label.forced')">
<a-form-item>
<span slot="label">
{{ $t('label.forced') }}
<a-tooltip :title="importRoleApiParams.forced.description">
<a-icon type="info-circle" style="color: rgba(0,0,0,.45)" />
</a-tooltip>
</span>
<a-switch
v-decorator="['forced', {
initialValue: false
Expand Down