mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-17 08:55:22 +00:00
fix query
This commit is contained in:
parent
12e3570171
commit
cdeb0c520b
@ -94,6 +94,9 @@ watch(
|
||||
}
|
||||
);
|
||||
async function getVersion() {
|
||||
if (appStore.version) {
|
||||
return;
|
||||
}
|
||||
const res = await appStore.fetchVersion();
|
||||
if (res.errors) {
|
||||
ElMessage.error(res.errors);
|
||||
|
@ -109,11 +109,14 @@ export default defineComponent({
|
||||
const selectorStore = useSelectorStore();
|
||||
const graph = computed(() => props.data.graph || {});
|
||||
const widget = computed(() => props.data.widget || {});
|
||||
const isList = ListChartTypes.includes(
|
||||
(props.data.graph && props.data.graph.type) || ""
|
||||
const isList = computed(() =>
|
||||
ListChartTypes.includes((props.data.graph && props.data.graph.type) || "")
|
||||
);
|
||||
|
||||
if ((props.needQuery || !dashboardStore.currentDashboard.id) && !isList) {
|
||||
if (
|
||||
(props.needQuery || !dashboardStore.currentDashboard.id) &&
|
||||
!isList.value
|
||||
) {
|
||||
queryMetrics();
|
||||
}
|
||||
|
||||
@ -162,11 +165,8 @@ export default defineComponent({
|
||||
if (props.data.i !== dashboardStore.selectedGrid.i) {
|
||||
return;
|
||||
}
|
||||
const isList = ListChartTypes.includes(
|
||||
(props.data.graph && props.data.graph.type) || ""
|
||||
);
|
||||
const chart = dashboardStore.selectedGrid.graph || {};
|
||||
if (ListChartTypes.includes(chart.type) || isList) {
|
||||
if (ListChartTypes.includes(chart.type) || isList.value) {
|
||||
return;
|
||||
}
|
||||
queryMetrics();
|
||||
@ -175,10 +175,7 @@ export default defineComponent({
|
||||
watch(
|
||||
() => [selectorStore.currentService, selectorStore.currentDestService],
|
||||
() => {
|
||||
const isList = ListChartTypes.includes(
|
||||
(props.data.graph && props.data.graph.type) || ""
|
||||
);
|
||||
if (isList) {
|
||||
if (isList.value) {
|
||||
return;
|
||||
}
|
||||
if (
|
||||
@ -195,12 +192,18 @@ export default defineComponent({
|
||||
if (dashboardStore.entity === EntityType[0].value) {
|
||||
return;
|
||||
}
|
||||
if (isList.value) {
|
||||
return;
|
||||
}
|
||||
queryMetrics();
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => appStore.durationTime,
|
||||
() => {
|
||||
if (isList.value) {
|
||||
return;
|
||||
}
|
||||
if (dashboardStore.entity === EntityType[1].value) {
|
||||
queryMetrics();
|
||||
}
|
||||
|
@ -245,9 +245,9 @@ async function setSourceSelector() {
|
||||
return;
|
||||
}
|
||||
const pod = params.podId || selectorStore.pods[0].id;
|
||||
const currentPod = selectorStore.pods.filter(
|
||||
const currentPod = selectorStore.pods.find(
|
||||
(d: { id: string }) => d.id === pod
|
||||
)[0];
|
||||
);
|
||||
if (currentPod) {
|
||||
selectorStore.setCurrentPod(currentPod);
|
||||
states.currentPod = currentPod.label;
|
||||
@ -278,6 +278,9 @@ async function setDestSelector() {
|
||||
}
|
||||
|
||||
async function getServices() {
|
||||
if (key.value === 10 || key.value === 0) {
|
||||
return;
|
||||
}
|
||||
if (!dashboardStore.layerId) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user