mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-20 15:17:37 +00:00
fix re-fetch query
This commit is contained in:
parent
cdeb0c520b
commit
412f5d78f2
@ -66,7 +66,7 @@ const theme = ref<string>("light");
|
|||||||
getVersion();
|
getVersion();
|
||||||
const setConfig = (value: string) => {
|
const setConfig = (value: string) => {
|
||||||
pageName.value = value || "";
|
pageName.value = value || "";
|
||||||
theme.value = route.path.includes("/infrastructure/") ? "dark" : "light";
|
// theme.value = route.path.includes("/infrastructure/") ? "dark" : "light";
|
||||||
};
|
};
|
||||||
const time = computed(() => [
|
const time = computed(() => [
|
||||||
appStore.durationRow.start,
|
appStore.durationRow.start,
|
||||||
|
@ -203,8 +203,11 @@ function getLabel(metric: string, index: number) {
|
|||||||
return encodeURIComponent(metric);
|
return encodeURIComponent(metric);
|
||||||
}
|
}
|
||||||
watch(
|
watch(
|
||||||
() => [props.config.metricTypes, props.config.metrics],
|
() => [...(props.config.metricTypes || []), ...(props.config.metrics || [])],
|
||||||
async () => {
|
(data, old) => {
|
||||||
|
if (JSON.stringify(data) === JSON.stringify(old)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
queryEndpointMetrics(endpoints.value);
|
queryEndpointMetrics(endpoints.value);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -214,6 +217,15 @@ watch(
|
|||||||
queryEndpoints();
|
queryEndpoints();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
watch(
|
||||||
|
() => [...(props.config.metricConfig || [])],
|
||||||
|
(data, old) => {
|
||||||
|
if (JSON.stringify(data) === JSON.stringify(old)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
queryEndpointMetrics(endpoints.value);
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "./style.scss";
|
@import "./style.scss";
|
||||||
|
@ -257,8 +257,11 @@ function getLabel(metric: string, index: number) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => [props.config.metricTypes, props.config.metrics],
|
() => [...(props.config.metricTypes || []), ...(props.config.metrics || [])],
|
||||||
() => {
|
(data, old) => {
|
||||||
|
if (JSON.stringify(data) === JSON.stringify(old)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
queryInstanceMetrics(instances.value);
|
queryInstanceMetrics(instances.value);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -268,6 +271,15 @@ watch(
|
|||||||
queryInstance();
|
queryInstance();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
watch(
|
||||||
|
() => [...(props.config.metricConfig || [])],
|
||||||
|
(data, old) => {
|
||||||
|
if (JSON.stringify(data) === JSON.stringify(old)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
queryInstanceMetrics(instances.value);
|
||||||
|
}
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "./style.scss";
|
@import "./style.scss";
|
||||||
|
@ -143,7 +143,6 @@ const sortServices = ref<(Service & { merge: boolean })[]>([]);
|
|||||||
const colMetrics = computed(() =>
|
const colMetrics = computed(() =>
|
||||||
props.config.metrics.filter((d: string) => d)
|
props.config.metrics.filter((d: string) => d)
|
||||||
);
|
);
|
||||||
|
|
||||||
queryServices();
|
queryServices();
|
||||||
|
|
||||||
async function queryServices() {
|
async function queryServices() {
|
||||||
@ -296,9 +295,22 @@ function getLabel(metric: string, index: number) {
|
|||||||
}
|
}
|
||||||
return encodeURIComponent(metric);
|
return encodeURIComponent(metric);
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => [props.config.metricTypes, props.config.metrics],
|
() => [...(props.config.metricTypes || []), ...(props.config.metrics || [])],
|
||||||
() => {
|
(data, old) => {
|
||||||
|
if (JSON.stringify(data) === JSON.stringify(old)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
queryServiceMetrics(services.value);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
watch(
|
||||||
|
() => [...(props.config.metricConfig || [])],
|
||||||
|
(data, old) => {
|
||||||
|
if (JSON.stringify(data) === JSON.stringify(old)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
queryServiceMetrics(services.value);
|
queryServiceMetrics(services.value);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user