Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ui/src/core/lazy_lib/icons_use.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ import {
UserOutlined,
UserSwitchOutlined,
UploadOutlined,
VerticalAlignBottomOutlined,
VerticalAlignTopOutlined,
WarningOutlined,
WifiOutlined,
SolutionOutlined
Expand Down Expand Up @@ -326,6 +328,8 @@ export default {
app.component('UserOutlined', UserOutlined)
app.component('UserSwitchOutlined', UserSwitchOutlined)
app.component('UploadOutlined', UploadOutlined)
app.component('VerticalAlignBottomOutlined', VerticalAlignBottomOutlined)
app.component('VerticalAlignTopOutlined', VerticalAlignTopOutlined)
app.component('WarningOutlined', WarningOutlined)
app.component('WifiOutlined', WifiOutlined)
app.component('renderIcon', renderIcon)
Expand Down
22 changes: 22 additions & 0 deletions ui/src/views/network/AclListRulesTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@
</div>
</div>
<div class="list__actions">
<tooltip-button
v-if="element.id !== acls[0].id"
:tooltip="$t('label.move.to.top')"
icon="vertical-align-top-outlined"
@onClick="() => moveRuleToTop(element)" />
<tooltip-button
v-if="element.id !== acls[acls.length - 1].id"
:tooltip="$t('label.move.to.bottom')"
icon="vertical-align-bottom-outlined"
@onClick="() => moveRuleToBottom(element)" />
<tooltip-button :tooltip="$t('label.tags')" icon="tag-outlined" @onClick="() => openTagsModal(element)" />
<tooltip-button :tooltip="$t('label.edit')" icon="edit-outlined" @onClick="() => openEditRuleModal(element)" />
<tooltip-button
Expand Down Expand Up @@ -632,6 +642,12 @@ export default {

if (e.moved.newIndex + 1 < this.acls.length) nextaclruleid = this.acls[e.moved.newIndex + 1].id

this.moveRule(
id,
previousaclruleid,
nextaclruleid)
},
moveRule (id, previousaclruleid, nextaclruleid) {
this.fetchLoading = true
api('moveNetworkAclItem', {
id,
Expand Down Expand Up @@ -664,6 +680,12 @@ export default {
this.fetchLoading = false
})
},
moveRuleToTop (element) {
this.moveRule(element.id, null, this.acls[0].id)
},
moveRuleToBottom (element) {
this.moveRule(element.id, this.acls[this.acls.length - 1].id, null)
},
exportAclList () {
const csvData = this.csv({ data: this.acls })

Expand Down