Skip to content

Commit f16be94

Browse files
committed
ui: do not show deploy instance button for not ready images
Currently, InfoCard for a not ready template shows deploy instance button which is incorrect. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent a289bb0 commit f16be94

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ui/src/components/view/ImageDeployInstanceButton.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,16 @@ export default {
8383
computed: {
8484
allowed () {
8585
return (this.$route.meta.name === 'template' ||
86-
(this.$route.meta.name === 'iso' && this.resource.bootable))
86+
(this.$route.meta.name === 'iso' && this.resource?.bootable)) &&
87+
this.resource?.state === 'Ready'
8788
}
8889
},
8990
methods: {
9091
fetchData () {
9192
this.fetchResourceData()
9293
},
9394
fetchResourceData () {
94-
if (!this.resource || !this.resource.id) {
95+
if (!this.resource || !this.resource.id || this.resource.state !== 'Ready') {
9596
return
9697
}
9798
const params = {

0 commit comments

Comments
 (0)