Skip to content

Commit a2d5aa9

Browse files
authored
displaying info of the labels from form CreateSSHKeyPair (#9970)
1 parent c63c7ee commit a2d5aa9

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

ui/src/views/compute/CreateSSHKeyPair.vue

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,25 @@
2727
@finish="handleSubmit"
2828
layout="vertical">
2929
<a-form-item name="name" ref="name">
30-
<template #label :title="apiParams.name.description">
31-
{{ $t('label.name') }}
32-
<a-tooltip>
33-
<info-circle-outlined style="color: rgba(0,0,0,.45)" />
34-
</a-tooltip>
30+
<template #label>
31+
<tooltip-label :title="$t('label.name')" :tooltip="apiParams.name.description"/>
3532
</template>
3633
<a-input
3734
v-model:value="form.name"
3835
:placeholder="apiParams.name.description"
3936
v-focus="true" />
4037
</a-form-item>
4138
<a-form-item name="publickey" ref="publickey">
42-
<template #label :title="apiParams.publickey.description">
43-
{{ $t('label.publickey') }}
44-
<a-tooltip>
45-
<info-circle-outlined style="color: rgba(0,0,0,.45)" />
46-
</a-tooltip>
39+
<template #label>
40+
<tooltip-label :title="$t('label.publickey')" :tooltip="apiParams.publickey.description"/>
4741
</template>
4842
<a-input
4943
v-model:value="form.publickey"
5044
:placeholder="apiParams.publickey.description"/>
5145
</a-form-item>
5246
<a-form-item name="domainid" ref="domainid" v-if="isAdminOrDomainAdmin()">
53-
<template #label :title="apiParams.domainid.description">
54-
{{ $t('label.domainid') }}
55-
<a-tooltip>
56-
<info-circle-outlined style="color: rgba(0,0,0,.45)" />
57-
</a-tooltip>
47+
<template #label>
48+
<tooltip-label :title="$t('label.domainid')" :tooltip="apiParams.domainid.description"/>
5849
</template>
5950
<a-select
6051
id="domain-selection"
@@ -105,11 +96,15 @@
10596
import { ref, reactive, toRaw } from 'vue'
10697
import { api } from '@/api'
10798
import { mixinForm } from '@/utils/mixin'
99+
import TooltipLabel from '@/components/widgets/TooltipLabel'
108100
109101
export default {
110102
name: 'CreateSSHKeyPair',
111103
mixins: [mixinForm],
112104
props: {},
105+
components: {
106+
TooltipLabel
107+
},
113108
data () {
114109
return {
115110
domains: [],

0 commit comments

Comments
 (0)