Skip to content

Commit 40b4b2c

Browse files
authored
ui: Move resource icon to first colume for VM list view (#5465)
1 parent 8228ece commit 40b4b2c

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

ui/src/components/view/ListView.vue

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,13 @@
6161
-->
6262

6363
<span slot="name" slot-scope="text, record">
64-
<div style="min-width: 120px" >
64+
<span v-if="['vm'].includes($route.path.split('/')[1])">
65+
<span v-if="record.icon && record.icon.base64image">
66+
<resource-icon :image="record.icon.base64image" size="1x" style="margin-right: 5px"/>
67+
</span>
68+
<os-logo v-else :osId="record.ostypeid" :osName="record.ostypename" size="lg" style="margin-right: 5px" />
69+
</span>
70+
<span style="min-width: 120px" >
6571
<QuickView
6672
style="margin-left: 5px"
6773
:actions="actions"
@@ -97,7 +103,7 @@
97103
<router-link :to="{ path: $route.path + '/' + record.id }" v-if="record.id">{{ text }}</router-link>
98104
<router-link :to="{ path: $route.path + '/' + record.name }" v-else>{{ text }}</router-link>
99105
</span>
100-
</div>
106+
</span>
101107
</span>
102108
<a slot="templatetype" slot-scope="text, record" href="javascript:;">
103109
<router-link :to="{ path: $route.path + '/' + record.templatetype }">{{ text }}</router-link>
@@ -107,14 +113,6 @@
107113
<span v-else>{{ text }}</span>
108114
</template>
109115
<a slot="displayname" slot-scope="text, record" href="javascript:;">
110-
<span v-if="['vm'].includes($route.path.split('/')[1])">
111-
<span v-if="record.icon && record.icon.base64image">
112-
<resource-icon :image="record.icon.base64image" size="1x" style="margin-right: 5px"/>
113-
</span>
114-
<span v-else>
115-
<os-logo :osId="record.ostypeid" :osName="record.ostypename" size="lg" style="margin-right: 5px" />
116-
</span>
117-
</span>
118116
<QuickView
119117
style="margin-left: 5px"
120118
:actions="actions"

0 commit comments

Comments
 (0)