This commit is contained in:
Qiuxia Fan 2022-03-23 18:33:47 +08:00
parent 90ca98aedd
commit 708856fd46
2 changed files with 4 additions and 7 deletions

View File

@ -133,9 +133,6 @@ const { t } = useI18n();
const emit = defineEmits(["update", "loading"]); const emit = defineEmits(["update", "loading"]);
const dashboardStore = useDashboardStore(); const dashboardStore = useDashboardStore();
const { selectedGrid } = dashboardStore; const { selectedGrid } = dashboardStore;
const percentile = ref<boolean>(
dashboardStore.selectedGrid.metricTypes.includes("readLabeledMetricsValues")
);
const sortOrder = ref<string>(selectedGrid.standard.sortOrder || "DES"); const sortOrder = ref<string>(selectedGrid.standard.sortOrder || "DES");
function changeStandardOpt(param?: any) { function changeStandardOpt(param?: any) {

View File

@ -92,7 +92,6 @@ import Card from "./Card.vue";
import { EntityType } from "../data"; import { EntityType } from "../data";
import router from "@/router"; import router from "@/router";
import getDashboard from "@/hooks/useDashboardsSession"; import getDashboard from "@/hooks/useDashboardsSession";
import { number } from "echarts/core";
/*global defineProps */ /*global defineProps */
const props = defineProps({ const props = defineProps({
@ -119,10 +118,11 @@ const chartLoading = ref<boolean>(false);
const endpoints = ref<Endpoint[]>([]); const endpoints = ref<Endpoint[]>([]);
const searchEndpoints = ref<Endpoint[]>([]); const searchEndpoints = ref<Endpoint[]>([]);
const pageSize = 5; const pageSize = 5;
const total = 10;
const searchText = ref<string>(""); const searchText = ref<string>("");
if (props.needQuery) { if (props.needQuery) {
queryEndpoints(10); queryEndpoints(total);
} }
async function queryEndpoints(limit?: number) { async function queryEndpoints(limit?: number) {
chartLoading.value = true; chartLoading.value = true;
@ -184,7 +184,7 @@ function changePage(pageIndex: number) {
); );
} }
async function searchList() { async function searchList() {
const limit = searchText.value ? undefined : 10; const limit = searchText.value ? undefined : total;
await queryEndpoints(limit); await queryEndpoints(limit);
} }
watch( watch(
@ -198,7 +198,7 @@ watch(
watch( watch(
() => selectorStore.currentService, () => selectorStore.currentService,
() => { () => {
queryEndpoints(10); queryEndpoints(total);
} }
); );
</script> </script>