Skip to content

Commit 5a43d49

Browse files
Ritchie Vincentrohityadavcloud
authored andcommitted
Move actions buttons to title bar
Signed-off-by: Rohit Yadav <[email protected]>
1 parent 7155435 commit 5a43d49

File tree

1 file changed

+72
-59
lines changed

1 file changed

+72
-59
lines changed

ui/src/views/compute/InstanceHardware.vue

Lines changed: 72 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,67 @@
110110
</div>
111111
<div slot="title" class="title">
112112
<router-link :to="{ path: '/guestnetwork/' + item.networkid }">{{ item.networkname }} </router-link>
113-
<div class="tags">
114-
<a-tag v-if="item.isdefault">
115-
{{ $t('default') }}
116-
</a-tag>
117-
<a-tag v-if="item.type">
118-
{{ item.type }}
119-
</a-tag>
120-
<a-tag v-if="item.broadcasturi">
121-
{{ item.broadcasturi }}
122-
</a-tag>
123-
<a-tag v-if="item.isolationuri">
124-
{{ item.isolationuri }}
125-
</a-tag>
113+
<div class="title__details">
114+
<div class="actions">
115+
<a-popconfirm
116+
title="Please confirm that you would like to make this NIC the default for this VM."
117+
@confirm="setAsDefault(item)"
118+
okText="Yes"
119+
cancelText="No"
120+
>
121+
<a-button
122+
icon="arrow-right"
123+
size="small"
124+
shape="round" />
125+
</a-popconfirm>
126+
<a-tooltip placement="right" v-if="item.type !== 'L2'">
127+
<template slot="title">
128+
{{ "Change IP Address" }}
129+
</template>
130+
<a-button
131+
icon="swap"
132+
size="small"
133+
shape="round"
134+
@click="editIpAddressNic = item.id; showUpdateIpModal = true" />
135+
</a-tooltip>
136+
<a-tooltip placement="right" v-if="item.type !== 'L2'">
137+
<template slot="title">
138+
{{ "Manage Secondary IP Addresses" }}
139+
</template>
140+
<a-button
141+
icon="environment"
142+
size="small"
143+
shape="round"
144+
@click="fetchSecondaryIPs(item.id)" />
145+
</a-tooltip>
146+
<a-popconfirm
147+
:title="$t('message.network.removeNIC')"
148+
@confirm="removeNIC(item)"
149+
okText="Yes"
150+
cancelText="No"
151+
v-if="!item.isdefault"
152+
>
153+
<a-button
154+
type="danger"
155+
icon="delete"
156+
size="small"
157+
shape="round" />
158+
</a-popconfirm>
159+
</div>
160+
<div class="tags">
161+
<a-tag v-if="item.isdefault">
162+
{{ $t('default') }}
163+
</a-tag>
164+
<a-tag v-if="item.type">
165+
{{ item.type }}
166+
</a-tag>
167+
<a-tag v-if="item.broadcasturi">
168+
{{ item.broadcasturi }}
169+
</a-tag>
170+
<a-tag v-if="item.isolationuri">
171+
{{ item.isolationuri }}
172+
</a-tag>
173+
</div>
126174
</div>
127175
</div>
128176
</a-list-item-meta>
@@ -153,52 +201,6 @@
153201
<div><a-icon type="barcode"/> {{ item.id }}</div>
154202
</div>
155203
</div>
156-
<div slot="actions" class="actions">
157-
<a-popconfirm
158-
title="Please confirm that you would like to make this NIC the default for this VM."
159-
@confirm="setAsDefault(item)"
160-
okText="Yes"
161-
cancelText="No"
162-
>
163-
<a-button
164-
icon="arrow-right"
165-
size="small"
166-
shape="round" />
167-
</a-popconfirm>
168-
<a-tooltip placement="right" v-if="item.type !== 'L2'">
169-
<template slot="title">
170-
{{ "Change IP Address" }}
171-
</template>
172-
<a-button
173-
icon="swap"
174-
size="small"
175-
shape="round"
176-
@click="editIpAddressNic = item.id; showUpdateIpModal = true" />
177-
</a-tooltip>
178-
<a-tooltip placement="right" v-if="item.type !== 'L2'">
179-
<template slot="title">
180-
{{ "Manage Secondary IP Addresses" }}
181-
</template>
182-
<a-button
183-
icon="environment"
184-
size="small"
185-
shape="round"
186-
@click="fetchSecondaryIPs(item.id)" />
187-
</a-tooltip>
188-
<a-popconfirm
189-
:title="$t('message.network.removeNIC')"
190-
@confirm="removeNIC(item)"
191-
okText="Yes"
192-
cancelText="No"
193-
v-if="!item.isdefault"
194-
>
195-
<a-button
196-
type="danger"
197-
icon="delete"
198-
size="small"
199-
shape="round" />
200-
</a-popconfirm>
201-
</div>
202204
</a-list-item>
203205
</a-list>
204206
</a-collapse-panel>
@@ -662,10 +664,13 @@ export default {
662664
663665
.actions {
664666
display: flex;
667+
flex-wrap: wrap;
665668
666669
button {
667670
padding: 5px;
668671
height: auto;
672+
margin-bottom: 10px;
673+
align-self: flex-start;
669674
670675
&:not(:last-child) {
671676
margin-right: 10px;
@@ -703,6 +708,14 @@ export default {
703708
margin-bottom: 10px;
704709
}
705710
711+
&__details {
712+
display: flex;
713+
}
714+
715+
.tags {
716+
margin-left: 10px;
717+
}
718+
706719
}
707720
708721
.ant-list-item-meta-title {

0 commit comments

Comments
 (0)