Skip to content

Commit b5a4381

Browse files
Hoang Nguyenhoangnm92rohityadavcloud
committed
image: register template action form (#92)
This implements a customer register registration form. Signed-off-by: Rohit Yadav <[email protected]> Co-authored-by: hoangnm <[email protected]> Co-authored-by: Rohit Yadav <[email protected]>
1 parent 5a43d49 commit b5a4381

File tree

7 files changed

+816
-9
lines changed

7 files changed

+816
-9
lines changed

ui/src/components/view/ActionButton.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
v-if="action.api in $store.getters.apis &&
3333
action.showBadge &&
3434
((!dataView && (action.listView || action.groupAction && selectedRowKeys.length > 0)) || (dataView && action.dataView)) &&
35-
('show' in action ? action.show(resource, $store.getters.userInfo, $store.getters.apis) : true)">
35+
('show' in action ? action.show(resource, $store.getters.userInfo) : true)">
3636
<a-button
3737
:icon="action.icon"
3838
:type="action.icon === 'delete' ? 'danger' : (action.icon === 'plus' ? 'primary' : 'default')"
@@ -44,7 +44,7 @@
4444
v-if="action.api in $store.getters.apis &&
4545
!action.showBadge &&
4646
((!dataView && (action.listView || action.groupAction && selectedRowKeys.length > 0)) || (dataView && action.dataView)) &&
47-
('show' in action ? action.show(resource, $store.getters.userInfo, $store.getters.apis) : true)"
47+
('show' in action ? action.show(resource, $store.getters.userInfo) : true)"
4848
:icon="action.icon"
4949
:type="action.icon === 'delete' ? 'danger' : (action.icon === 'plus' ? 'primary' : 'default')"
5050
shape="circle"

ui/src/components/view/ListView.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
<span v-if="$route.path.startsWith('/project')" style="margin-right: 5px">
6464
<a-button type="dashed" size="small" shape="circle" icon="login" @click="changeProject(record)" />
6565
</span>
66+
<os-logo v-if="record.ostypename" :osName="record.ostypename" size="1x" style="margin-right: 5px" />
6667
<console :resource="record" size="small" />
6768
<router-link :to="{ path: $route.path + '/' + record.id }" v-if="record.id">{{ text }}</router-link>
6869
<router-link :to="{ path: $route.path + '/' + record.name }" v-else>{{ text }}</router-link>
@@ -154,13 +155,15 @@
154155
<script>
155156
import { api } from '@/api'
156157
import Console from '@/components/widgets/Console'
158+
import OsLogo from '@/components/widgets/OsLogo'
157159
import Status from '@/components/widgets/Status'
158160
import InfoCard from '@/components/view/InfoCard'
159161
160162
export default {
161163
name: 'ListView',
162164
components: {
163165
Console,
166+
OsLogo,
164167
Status,
165168
InfoCard
166169
},

ui/src/components/widgets/OsLogo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{{ name }}
2222
</template>
2323
<font-awesome-icon :icon="['fab', logo]" :size="size" style="color: #666;" v-if="logo !== 'debian'" />
24-
<debian-icon v-else-if="logo === 'debian'" :style="{ height: size === '4x' ? '56px' : '18px', width: size === '4x' ? '56px' : '18px', marginBottom: '-4px' }" />
24+
<debian-icon v-else-if="logo === 'debian'" :style="{ height: size === '4x' ? '56px' : '16px', width: size === '4x' ? '56px' : '16px', marginBottom: '-4px' }" />
2525
</a-tooltip>
2626
</template>
2727

ui/src/config/section/image.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ export default {
5050
icon: 'plus',
5151
label: 'Create template',
5252
listView: true,
53-
args: ['url', 'name', 'displaytext', 'directdownload', 'zoneids', 'hypervisor', 'format', 'ostypeid', 'checksum', 'isextractable', 'passwordenabled', 'sshkeyenabled', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'isrouting', 'requireshvm']
53+
popup: true,
54+
component: () => import('@/views/image/RegisterTemplate.vue')
5455
},
5556
{
5657
api: 'getUploadParamsForTemplate',
@@ -138,7 +139,6 @@ export default {
138139
label: 'Register ISO',
139140
listView: true,
140141
popup: true,
141-
show: (record, user, apis) => { return 'registerIso' in apis },
142142
component: () => import('@/views/image/RegisterIso.vue')
143143
},
144144
{

ui/src/locales/en.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@
292292
"isCustomized": "Custom Disk Size",
293293
"isCustomizedIops": "Custom IOPS",
294294
"isDedicated": "Dedicate",
295-
"isExtractable": "Extractable",
296295
"isFeatured": "Featured",
297296
"isForced": "Force Delete",
298297
"isManaged": "Managed",
@@ -305,7 +304,7 @@
305304
"isdedicated": "Dedicated",
306305
"isdefault": "Is Default",
307306
"isdynamicallyscalable": "Dynamically Scalable",
308-
"isextractable": "extractable",
307+
"isextractable": "Extractable",
309308
"isfeatured": "Featured",
310309
"iso": "ISO",
311310
"isolatedpvlanId": "Secondary Isolated VLAN ID",
@@ -468,7 +467,7 @@
468467
"label.add.vpc.offering": "Add VPC Offering",
469468
"label.add.vpn.customer.gateway": "Add VPN Customer Gateway",
470469
"label.add.zone": "Add Zone",
471-
"label.all.zone": "All Zone",
470+
"label.all.zone": "All Zones",
472471
"label.archive": "Archive",
473472
"label.archive.alerts": "Archive alerts",
474473
"label.archive.events": "Archive events",
@@ -535,6 +534,8 @@
535534
"label.enable.vpc.offering": "Enable VPC offering",
536535
"label.enable.vpn": "Enable Remote Access VPN",
537536
"label.enter.token": "Enter token",
537+
"label.error.zone.combined": "All Zones cannot be combined with any other zone",
538+
"label.french.azerty.keyboard": "French AZERTY keyboard",
538539
"label.globo.dns.configuration": "GloboDNS Configuration",
539540
"label.gslb.assigned.lb.more": "Assign more load balancing",
540541
"label.gslb.delete": "Delete GSLB",
@@ -543,6 +544,7 @@
543544
"label.ha.disable": "Disable HA",
544545
"label.ha.enable": "Enable HA",
545546
"label.instanciate.template.associate.profile.blade": "Instanciate Template and Associate Profile to Blade",
547+
"label.japanese.keyboard": "Japanese keyboard",
546548
"label.link.domain.to.ldap": "Link Domain to LDAP",
547549
"label.make.project.owner": "Make account project owner",
548550
"label.metrics": "Metrics",
@@ -591,9 +593,12 @@
591593
"label.set.default.NIC": "Set default NIC",
592594
"label.shutdown.provider": "Shutdown provider",
593595
"label.snapshot.schedule": "Set up Recurring Snapshot",
596+
"label.standard.us.keyboard": "Standard (US) keyboard",
597+
"label.simplified.chinese.keyboard": "Simplified Chinese keyboard",
594598
"label.start.lb.vm": "Start LB VM",
595599
"label.stop.lb.vm": "Stop LB VM",
596600
"label.suspend.project": "Suspend Project",
601+
"label.uk.keyboard": "UK keyboard",
597602
"label.update.vmware.datacenter": "Update VMware datacenter",
598603
"label.upgrade.router.newer.template": "Upgrade Router to Use Newer Template",
599604
"label.upload": "Upload",
@@ -855,6 +860,7 @@
855860
"specifyipranges": "Specify IP ranges",
856861
"specifyvlan": "Specify VLAN",
857862
"sshkeypair": "New SSH Key Pair",
863+
"sshkeyenabled": "SSH Enabled",
858864
"startdate": "By date (start)",
859865
"startip": "Start IP",
860866
"startipv4": "IPv4 Start IP",

ui/src/views/image/RegisterIso.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export default {
206206
this.$emit('refresh-data')
207207
this.$notification.success({
208208
message: 'Register ISO',
209-
description: 'Sucessfully registered ISO'
209+
description: 'Sucessfully registered ISO ' + params.name
210210
})
211211
}).catch(error => {
212212
this.$notification.error({

0 commit comments

Comments
 (0)