mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-16 14:25:23 +00:00
search dashboards
This commit is contained in:
parent
43dda1b32b
commit
30fed5c83f
@ -20,6 +20,7 @@ limitations under the License. -->
|
||||
placeholder="Please input"
|
||||
class="input-with-search"
|
||||
size="small"
|
||||
@change="searchDashboards"
|
||||
>
|
||||
<template #append>
|
||||
<el-button size="small">
|
||||
@ -108,7 +109,7 @@ async function setList() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
dashboards.value = JSON.parse(sessionStorage.getItem("dashboards") || "");
|
||||
dashboards.value = JSON.parse(sessionStorage.getItem("dashboards") || "[]");
|
||||
}
|
||||
const handleEdit = (row: { name: string; layer: string; entity: string }) => {
|
||||
router.push(
|
||||
@ -125,6 +126,12 @@ const handleDelete = (
|
||||
`${row.layer}_${row.entity}_${row.name.split(" ").join("-")}`
|
||||
);
|
||||
};
|
||||
function searchDashboards() {
|
||||
const list = JSON.parse(sessionStorage.getItem("dashboards") || "[]");
|
||||
dashboards.value = list.filter((d: { name: string }) =>
|
||||
d.name.includes(searchText.value)
|
||||
);
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.header {
|
||||
|
@ -84,10 +84,10 @@ onBeforeMount(async () => {
|
||||
return { label: d, value: d };
|
||||
});
|
||||
});
|
||||
function changeLayer(opt: { label: string; value: string }[]) {
|
||||
function changeLayer(opt: { label: string; value: string }[] | any) {
|
||||
states.selectedLayer = opt[0].value;
|
||||
}
|
||||
function changeEntity(opt: { label: string; value: string }[]) {
|
||||
function changeEntity(opt: { label: string; value: string }[] | any) {
|
||||
states.entity = opt[0].value;
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user