Skip to content

Commit 6fa8538

Browse files
authored
Adding placeholders for custom NSP vues (#5620)
* Adding placeholders for custom NSP vues * Fix decorator * Fixing gslbproviderprivateip description
1 parent ee9c05b commit 6fa8538

File tree

6 files changed

+46
-1
lines changed

6 files changed

+46
-1
lines changed

plugins/network-elements/netscaler/src/main/java/com/cloud/api/commands/AddNetscalerLoadBalancerCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public class AddNetscalerLoadBalancerCmd extends BaseAsyncCmd {
8383
@Parameter(name = ApiConstants.GSLB_PROVIDER_PUBLIC_IP, type = CommandType.STRING, required = false, description = "public IP of the site")
8484
private String gslbSitePublicIp;
8585

86-
@Parameter(name = ApiConstants.GSLB_PROVIDER_PRIVATE_IP, type = CommandType.STRING, required = false, description = "public IP of the site")
86+
@Parameter(name = ApiConstants.GSLB_PROVIDER_PRIVATE_IP, type = CommandType.STRING, required = false, description = "private IP of the site")
8787
private String gslbSitePrivateIp;
8888

8989
@Parameter(name = ApiConstants.EXCLUSIVE_GSLB_PROVIDER,

ui/src/views/infra/network/providers/AddF5LoadBalancer.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<a-col :md="24" :lg="24">
2626
<a-form-item :label="$t('label.ip')">
2727
<a-input
28+
:placeholder="apiParams.url.description"
2829
autoFocus
2930
v-decorator="['ip', {
3031
rules: [{ required: true, message: $t('message.error.required.input') }]
@@ -36,6 +37,7 @@
3637
<a-col :md="24" :lg="24">
3738
<a-form-item :label="$t('label.username')">
3839
<a-input
40+
:placeholder="apiParams.username.description"
3941
v-decorator="['username', {
4042
rules: [{ required: true, message: $t('message.error.required.input') }]
4143
}]" />
@@ -46,6 +48,7 @@
4648
<a-col :md="24" :lg="24">
4749
<a-form-item :label="$t('label.password')">
4850
<a-input-password
51+
:placeholder="apiParams.password.description"
4952
v-decorator="['password', {
5053
rules: [{ required: true, message: $t('message.error.required.input') }]
5154
}]" />
@@ -56,6 +59,7 @@
5659
<a-col :md="24" :lg="24">
5760
<a-form-item :label="$t('label.networkdevicetype')">
5861
<a-select
62+
:placeholder="apiParams.networkdevicetype.description"
5963
v-decorator="['networkdevicetype', {
6064
rules: [{ required: true, message: $t('message.error.select') }]
6165
}]"
@@ -135,6 +139,7 @@ export default {
135139
},
136140
data () {
137141
return {
142+
apiParams: {},
138143
loading: false,
139144
nsp: {}
140145
}
@@ -153,6 +158,9 @@ export default {
153158
beforeCreate () {
154159
this.form = this.$form.createForm(this)
155160
},
161+
created () {
162+
this.apiParams = this.$getApiParams('addF5LoadBalancer')
163+
},
156164
mounted () {
157165
if (this.resource && Object.keys(this.resource).length > 0) {
158166
this.nsp = this.resource

ui/src/views/infra/network/providers/AddNetscalerLoadBalancer.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<a-col :md="24" :lg="24">
2626
<a-form-item :label="$t('label.ip')">
2727
<a-input
28+
:placeholder="apiParams.url.description"
2829
autoFocus
2930
v-decorator="['ip', {
3031
rules: [{ required: true, message: $t('message.error.required.input') }]
@@ -36,6 +37,7 @@
3637
<a-col :md="24" :lg="24">
3738
<a-form-item :label="$t('label.username')">
3839
<a-input
40+
:placeholder="apiParams.username.description"
3941
v-decorator="['username', {
4042
rules: [{ required: true, message: $t('message.error.required.input') }]
4143
}]" />
@@ -46,6 +48,7 @@
4648
<a-col :md="24" :lg="24">
4749
<a-form-item :label="$t('label.password')">
4850
<a-input-password
51+
:placeholder="apiParams.password.description"
4952
v-decorator="['password', {
5053
rules: [{ required: true, message: $t('message.error.required.input') }]
5154
}]" />
@@ -56,6 +59,7 @@
5659
<a-col :md="24" :lg="24">
5760
<a-form-item :label="$t('label.networkdevicetype')">
5861
<a-select
62+
:placeholder="apiParams.networkdevicetype.description"
5963
v-decorator="['networkdevicetype', {
6064
rules: [{ required: true, message: $t('message.error.select') }]
6165
}]"
@@ -91,6 +95,7 @@
9195
<a-col :md="24" :lg="24">
9296
<a-form-item :label="$t('label.gslbprovider')">
9397
<a-switch
98+
:placeholder="apiParams.gslbprovider.description"
9499
v-decorator="['gslbprovider', { initialValue: false }]" />
95100
</a-form-item>
96101
</a-col>
@@ -99,6 +104,7 @@
99104
<a-col :md="24" :lg="24">
100105
<a-form-item :label="$t('label.gslbproviderpublicip')">
101106
<a-input
107+
:placeholder="apiParams.gslbproviderpublicip.description"
102108
v-decorator="['gslbproviderpublicip']" />
103109
</a-form-item>
104110
</a-col>
@@ -107,6 +113,7 @@
107113
<a-col :md="24" :lg="24">
108114
<a-form-item :label="$t('label.gslbproviderprivateip')">
109115
<a-input
116+
:placeholder="apiParams.gslbproviderprivateip.description"
110117
v-decorator="['gslbproviderprivateip']" />
111118
</a-form-item>
112119
</a-col>
@@ -159,6 +166,7 @@ export default {
159166
},
160167
data () {
161168
return {
169+
apiParams: {},
162170
loading: false,
163171
nsp: {}
164172
}
@@ -185,6 +193,9 @@ export default {
185193
beforeCreate () {
186194
this.form = this.$form.createForm(this)
187195
},
196+
created () {
197+
this.apiParams = this.$getApiParams('addNetscalerLoadBalancer')
198+
},
188199
mounted () {
189200
if (this.resource && Object.keys(this.resource).length > 0) {
190201
this.nsp = this.resource

ui/src/views/infra/network/providers/AddNiciraNvpDevice.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<a-form-item :label="$t('label.ip')">
2727
<a-input
2828
autoFocus
29+
:placeholder="apiParams.hostname.description"
2930
v-decorator="['ip', {
3031
rules: [{ required: true, message: $t('message.error.required.input') }]
3132
}]" />
@@ -36,6 +37,7 @@
3637
<a-col :md="24" :lg="24">
3738
<a-form-item :label="$t('label.username')">
3839
<a-input
40+
:placeholder="apiParams.username.description"
3941
v-decorator="['username', {
4042
rules: [{ required: true, message: $t('message.error.required.input') }]
4143
}]" />
@@ -46,6 +48,7 @@
4648
<a-col :md="24" :lg="24">
4749
<a-form-item :label="$t('label.password')">
4850
<a-input-password
51+
:placeholder="apiParams.password.description"
4952
v-decorator="['password', {
5053
rules: [{ required: true, message: $t('message.error.required.input') }]
5154
}]" />
@@ -65,6 +68,7 @@
6568
<a-col :md="24" :lg="24">
6669
<a-form-item :label="$t('label.transportzoneuuid')">
6770
<a-input
71+
:placeholder="apiParams.transportzoneuuid.description"
6872
v-decorator="['transportzoneuuid']" />
6973
</a-form-item>
7074
</a-col>
@@ -73,6 +77,7 @@
7377
<a-col :md="24" :lg="24">
7478
<a-form-item :label="$t('label.l3gatewayserviceuuid')">
7579
<a-input
80+
:placeholder="apiParams.l3gatewayserviceuuid.description"
7681
v-decorator="['l3gatewayserviceuuid']" />
7782
</a-form-item>
7883
</a-col>
@@ -81,6 +86,7 @@
8186
<a-col :md="24" :lg="24">
8287
<a-form-item :label="$t('label.l2gatewayserviceuuid')">
8388
<a-input
89+
:placeholder="apiParams.l2gatewayserviceuuid.description"
8490
v-decorator="['l2gatewayserviceuuid']" />
8591
</a-form-item>
8692
</a-col>
@@ -110,13 +116,17 @@ export default {
110116
},
111117
data () {
112118
return {
119+
apiParams: {},
113120
loading: false,
114121
nsp: {}
115122
}
116123
},
117124
beforeCreate () {
118125
this.form = this.$form.createForm(this)
119126
},
127+
created () {
128+
this.apiParams = this.$getApiParams('addNiciraNvpDevice')
129+
},
120130
mounted () {
121131
if (this.resource && Object.keys(this.resource).length > 0) {
122132
this.nsp = this.resource

ui/src/views/infra/network/providers/AddPaloAltoFirewall.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<a-form-item :label="$t('label.ip')">
2727
<a-input
2828
autoFocus
29+
:placeholder="apiParams.url.description"
2930
v-decorator="['ip', {
3031
rules: [{ required: true, message: $t('message.error.required.input') }]
3132
}]" />
@@ -36,6 +37,7 @@
3637
<a-col :md="24" :lg="24">
3738
<a-form-item :label="$t('label.username')">
3839
<a-input
40+
:placeholder="apiParams.username.description"
3941
v-decorator="['username', {
4042
rules: [{ required: true, message: $t('message.error.required.input') }]
4143
}]" />
@@ -46,6 +48,7 @@
4648
<a-col :md="24" :lg="24">
4749
<a-form-item :label="$t('label.password')">
4850
<a-input-password
51+
:placeholder="apiParams.password.description"
4952
v-decorator="['password', {
5053
rules: [{ required: true, message: $t('message.error.required.input') }]
5154
}]" />
@@ -56,6 +59,7 @@
5659
<a-col :md="24" :lg="24">
5760
<a-form-item :label="$t('label.networkdevicetype')">
5861
<a-select
62+
:placeholder="apiParams.networkdevicetype.description"
5963
v-decorator="['networkdevicetype', {
6064
rules: [{ required: true, message: $t('message.error.select') }]
6165
}]"
@@ -182,6 +186,7 @@ export default {
182186
},
183187
data () {
184188
return {
189+
apiParams: {},
185190
loading: false,
186191
nsp: {}
187192
}
@@ -200,6 +205,9 @@ export default {
200205
beforeCreate () {
201206
this.form = this.$form.createForm(this)
202207
},
208+
created () {
209+
this.apiParams = this.$getApiParams('addPaloAltoFirewall')
210+
},
203211
mounted () {
204212
if (this.resource && Object.keys(this.resource).length > 0) {
205213
this.nsp = this.resource

ui/src/views/infra/network/providers/AddSrxFirewall.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<a-col :md="24" :lg="24">
2626
<a-form-item :label="$t('label.ip')">
2727
<a-input
28+
:placeholder="apiParams.url.description"
2829
autoFocus
2930
v-decorator="['ip', {
3031
rules: [{ required: true, message: $t('message.error.required.input') }]
@@ -36,6 +37,7 @@
3637
<a-col :md="24" :lg="24">
3738
<a-form-item :label="$t('label.username')">
3839
<a-input
40+
:placeholder="apiParams.username.description"
3941
v-decorator="['username', {
4042
rules: [{ required: true, message: $t('message.error.required.input') }]
4143
}]" />
@@ -46,6 +48,7 @@
4648
<a-col :md="24" :lg="24">
4749
<a-form-item :label="$t('label.password')">
4850
<a-input-password
51+
:placeholder="apiParams.password.description"
4952
v-decorator="['password', {
5053
rules: [{ required: true, message: $t('message.error.required.input') }]
5154
}]" />
@@ -56,6 +59,7 @@
5659
<a-col :md="24" :lg="24">
5760
<a-form-item :label="$t('label.networkdevicetype')">
5861
<a-select
62+
:placeholder="apiParams.networkdevicetype.description"
5963
v-decorator="['networkdevicetype', {
6064
rules: [{ required: true, message: $t('message.error.select') }]
6165
}]"
@@ -160,6 +164,7 @@ export default {
160164
},
161165
data () {
162166
return {
167+
apiParams: {},
163168
loading: false,
164169
nsp: {}
165170
}
@@ -178,6 +183,9 @@ export default {
178183
beforeCreate () {
179184
this.form = this.$form.createForm(this)
180185
},
186+
created () {
187+
this.apiParams = this.$getApiParams('addSrxFirewall')
188+
},
181189
mounted () {
182190
if (this.resource && Object.keys(this.resource).length > 0) {
183191
this.nsp = this.resource

0 commit comments

Comments
 (0)