ui: Added info / tooltip for add role and import role dialogs in the UI (#4836)

This commit is contained in:
sureshanaparti 2021-03-18 13:13:08 +05:30 committed by GitHub
parent 45e6800501
commit b658cf12d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 73 additions and 11 deletions

View File

@ -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,

View File

@ -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",
@ -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",

View File

@ -22,7 +22,13 @@
: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') }]
@ -30,13 +36,25 @@
: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
@ -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') }]
@ -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') }]

View File

@ -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"
@ -45,7 +51,13 @@
</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') }]
@ -53,13 +65,25 @@
: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') }]
@ -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