mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-16 18:45: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"
|
placeholder="Please input"
|
||||||
class="input-with-search"
|
class="input-with-search"
|
||||||
size="small"
|
size="small"
|
||||||
|
@change="searchDashboards"
|
||||||
>
|
>
|
||||||
<template #append>
|
<template #append>
|
||||||
<el-button size="small">
|
<el-button size="small">
|
||||||
@ -108,7 +109,7 @@ async function setList() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dashboards.value = JSON.parse(sessionStorage.getItem("dashboards") || "");
|
dashboards.value = JSON.parse(sessionStorage.getItem("dashboards") || "[]");
|
||||||
}
|
}
|
||||||
const handleEdit = (row: { name: string; layer: string; entity: string }) => {
|
const handleEdit = (row: { name: string; layer: string; entity: string }) => {
|
||||||
router.push(
|
router.push(
|
||||||
@ -125,6 +126,12 @@ const handleDelete = (
|
|||||||
`${row.layer}_${row.entity}_${row.name.split(" ").join("-")}`
|
`${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>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.header {
|
.header {
|
||||||
|
@ -84,10 +84,10 @@ onBeforeMount(async () => {
|
|||||||
return { label: d, value: d };
|
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;
|
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;
|
states.entity = opt[0].value;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user