Skip to content

Commit

Permalink
Persistence page: Display filter configuration as footer
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 committed Jul 3, 2023
1 parent f035de2 commit 86cbee2
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
</f7-block-title>
<f7-list :media-list="isEditable" swipeout>
<f7-list-item v-for="(f, index) in persistence[ft.name]" :key="f.name" :title="f.name"
:link="isEditable"
:footer="(typeof ft.footerFn === 'function') ? ft.footerFn(f) : ''" :link="isEditable"
@click.native="(ev) => editFilter(ev, ft, index, f)" swipeout>
<f7-link slot="media" v-if="isEditable" icon-color="red" icon-aurora="f7:minus_circle_filled"
icon-ios="f7:minus_circle_filled" icon-md="material:remove_circle_outline"
Expand Down Expand Up @@ -281,7 +281,8 @@ export default {
required: false,
type: 'STRING'
}
]
],
footerFn: (f) => f.relative ? f.value + ' %' : (f.unit ? f.value + ' ' + f.unit : f.value)
},
{
name: 'timeFilters',
Expand All @@ -303,7 +304,8 @@ export default {
required: false,
type: 'STRING'
}
]
],
footerFn: (f) => f.value + ' ' + (f.unit || 's')
},
{
name: 'equalsFilters',
Expand All @@ -318,7 +320,8 @@ export default {
type: ''
},
filterInvertedParameter
]
],
footerFn: (f) => (f.inverted === true ? 'not ' : '') + 'equals ' + f.values.join(', ')
},
{
name: 'includeFilters',
Expand Down Expand Up @@ -349,7 +352,8 @@ export default {
type: 'STRING'
},
filterInvertedParameter
]
],
footerFn: (f) => (f.inverted === true ? ']' : '[') + f.lower + ';' + f.upper + (f.inverted === true ? '[' : ']' + (f.unit ? ' ' + f.unit : ''))
}
],
notEditableMgs: 'This persistence configuration is not editable because it has been provisioned from a file.'
Expand Down

0 comments on commit 86cbee2

Please sign in to comment.