mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-15 12:49:17 +00:00
feat: add a calculation and update selectors param (#53)
This commit is contained in:
@@ -203,8 +203,11 @@ function getLabel(metric: string, index: number) {
|
||||
return encodeURIComponent(metric);
|
||||
}
|
||||
watch(
|
||||
() => [props.config.metricTypes, props.config.metrics],
|
||||
async () => {
|
||||
() => [...(props.config.metricTypes || []), ...(props.config.metrics || [])],
|
||||
(data, old) => {
|
||||
if (JSON.stringify(data) === JSON.stringify(old)) {
|
||||
return;
|
||||
}
|
||||
queryEndpointMetrics(endpoints.value);
|
||||
}
|
||||
);
|
||||
@@ -214,6 +217,15 @@ watch(
|
||||
queryEndpoints();
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => [...(props.config.metricConfig || [])],
|
||||
(data, old) => {
|
||||
if (JSON.stringify(data) === JSON.stringify(old)) {
|
||||
return;
|
||||
}
|
||||
queryEndpointMetrics(endpoints.value);
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./style.scss";
|
||||
|
@@ -257,8 +257,11 @@ function getLabel(metric: string, index: number) {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
);
|
||||
@@ -268,6 +271,15 @@ watch(
|
||||
queryInstance();
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => [...(props.config.metricConfig || [])],
|
||||
(data, old) => {
|
||||
if (JSON.stringify(data) === JSON.stringify(old)) {
|
||||
return;
|
||||
}
|
||||
queryInstanceMetrics(instances.value);
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./style.scss";
|
||||
|
@@ -143,7 +143,6 @@ const sortServices = ref<(Service & { merge: boolean })[]>([]);
|
||||
const colMetrics = computed(() =>
|
||||
props.config.metrics.filter((d: string) => d)
|
||||
);
|
||||
|
||||
queryServices();
|
||||
|
||||
async function queryServices() {
|
||||
@@ -296,9 +295,22 @@ function getLabel(metric: string, index: number) {
|
||||
}
|
||||
return encodeURIComponent(metric);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user