Skip to content

Commit bb2e90d

Browse files
committed
Add UI support to clone disk and network offering
1 parent 44d47ac commit bb2e90d

File tree

5 files changed

+1973
-0
lines changed

5 files changed

+1973
-0
lines changed

ui/public/locales/en.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@
250250
"label.activate.project": "Activate project",
251251
"label.activeviewersessions": "Active sessions",
252252
"label.add": "Add",
253+
"label.addservices": "Add Services",
253254
"label.add.account": "Add Account",
254255
"label.add.acl.rule": "Add ACL rule",
255256
"label.add.acl": "Add ACL",
@@ -559,6 +560,8 @@
559560
"label.clear.notification": "Clear notification",
560561
"label.clientid": "Provider Client ID",
561562
"label.clone.compute.offering": "Clone Compute Offering",
563+
"label.clone.disk.offering": "Clone Disk Offering",
564+
"label.clone.network.offering": "Clone Network Offering",
562565
"label.clone.system.service.offering": "Clone System Service Offering",
563566
"label.close": "Close",
564567
"label.cloud.managed": "CloudManaged",
@@ -930,6 +933,7 @@
930933
"label.domains": "Domains",
931934
"label.done": "Done",
932935
"label.down": "Down",
936+
"label.dropservices": "Drop Services",
933937
"label.download": "Download",
934938
"label.download.csv": "Download CSV",
935939
"label.download.kubeconfig.cluster": "Download kubeconfig for the cluster <br><br> The <code><b>kubectl</b></code> command-line tool uses kubeconfig files to find the information it needs to choose a cluster and communicate with the API server of a cluster.",
@@ -3337,6 +3341,8 @@
33373341
"message.disable.webhook.ssl.verification": "Disabling SSL verification is not recommended",
33383342
"message.discovering.feature": "Discovering features, please wait...",
33393343
"message.disk.offering.created": "Disk offering created:",
3344+
"message.success.clone.disk.offering": "Successfully cloned disk offering:",
3345+
"message.success.clone.network.offering": "Successfully cloned network offering:",
33403346
"message.disk.usage.info.data.points": "Each data point represents the difference in read/write data since the last data point.",
33413347
"message.disk.usage.info.sum.of.disks": "The disk usage shown is made up of the sum of read/write data from all the disks in the Instance.",
33423348
"message.download.volume": "Please click the link to download the volume:<p><a href=\"#\">00000</a>",

ui/src/components/CheckBoxSelectPair.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ export default {
7474
type: Boolean,
7575
default: false
7676
},
77+
defaultSelectValue: {
78+
type: String,
79+
default: null
80+
},
7781
selectOptions: {
7882
type: Array,
7983
required: true
@@ -100,6 +104,9 @@ export default {
100104
},
101105
created () {
102106
this.checked = this.defaultCheckBoxValue
107+
if (this.defaultSelectValue) {
108+
this.selectedOption = this.defaultSelectValue
109+
}
103110
},
104111
watch: {
105112
selectOptions () {

ui/src/config/section/offering.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,14 @@ export default {
349349
},
350350
show: (record) => { return record.state === 'Active' },
351351
groupMap: (selection) => { return selection.map(x => { return { id: x, state: 'Inactive' } }) }
352+
}, {
353+
api: 'cloneDiskOffering',
354+
icon: 'copy-outlined',
355+
label: 'label.clone.disk.offering',
356+
docHelp: 'adminguide/service_offerings.html#creating-a-new-disk-offering',
357+
dataView: true,
358+
popup: true,
359+
component: shallowRef(defineAsyncComponent(() => import('@/views/offering/CloneDiskOffering.vue')))
352360
}]
353361
},
354362
{
@@ -504,6 +512,14 @@ export default {
504512
dataView: true,
505513
popup: true,
506514
component: shallowRef(defineAsyncComponent(() => import('@/views/offering/UpdateOfferingAccess.vue')))
515+
}, {
516+
api: 'cloneNetworkOffering',
517+
icon: 'copy-outlined',
518+
label: 'label.clone.network.offering',
519+
docHelp: 'adminguide/networking.html#creating-a-new-network-offering',
520+
dataView: true,
521+
popup: true,
522+
component: shallowRef(defineAsyncComponent(() => import('@/views/offering/CloneNetworkOffering.vue')))
507523
}, {
508524
api: 'deleteNetworkOffering',
509525
icon: 'delete-outlined',

0 commit comments

Comments
 (0)