mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-12 15:52:57 +00:00
fix: call metrics
This commit is contained in:
parent
7cba0647a6
commit
6c8ae439d8
@ -345,3 +345,7 @@ export enum MetricModes {
|
|||||||
Expression = "Expression",
|
Expression = "Expression",
|
||||||
General = "General",
|
General = "General",
|
||||||
}
|
}
|
||||||
|
export enum CallTypes {
|
||||||
|
Server = "SERVER",
|
||||||
|
Client = "CLIENT",
|
||||||
|
}
|
||||||
|
@ -140,7 +140,7 @@ limitations under the License. -->
|
|||||||
import { useSelectorStore } from "@/store/modules/selectors";
|
import { useSelectorStore } from "@/store/modules/selectors";
|
||||||
import { useTopologyStore } from "@/store/modules/topology";
|
import { useTopologyStore } from "@/store/modules/topology";
|
||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
import { EntityType, DepthList, MetricModes } from "../../../data";
|
import { EntityType, DepthList, MetricModes, CallTypes } from "../../../data";
|
||||||
import router from "@/router";
|
import router from "@/router";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import Settings from "./Settings.vue";
|
import Settings from "./Settings.vue";
|
||||||
@ -224,8 +224,8 @@ limitations under the License. -->
|
|||||||
async function update() {
|
async function update() {
|
||||||
if (settings.value.metricMode === MetricModes.Expression) {
|
if (settings.value.metricMode === MetricModes.Expression) {
|
||||||
topologyStore.queryNodeExpressions(settings.value.nodeExpressions || []);
|
topologyStore.queryNodeExpressions(settings.value.nodeExpressions || []);
|
||||||
topologyStore.getLinkExpressions(settings.value.linkClientExpressions || []);
|
topologyStore.getLinkExpressions(settings.value.linkClientExpressions || [], CallTypes.Client);
|
||||||
topologyStore.getLinkExpressions(settings.value.linkServerExpressions || []);
|
topologyStore.getLinkExpressions(settings.value.linkServerExpressions || [], CallTypes.Server);
|
||||||
} else {
|
} else {
|
||||||
topologyStore.queryNodeMetrics(settings.value.nodeMetrics || []);
|
topologyStore.queryNodeMetrics(settings.value.nodeMetrics || []);
|
||||||
topologyStore.getLinkClientMetrics(settings.value.linkClientMetrics || []);
|
topologyStore.getLinkClientMetrics(settings.value.linkClientMetrics || []);
|
||||||
|
@ -69,7 +69,7 @@ limitations under the License. -->
|
|||||||
import { useDashboardStore } from "@/store/modules/dashboard";
|
import { useDashboardStore } from "@/store/modules/dashboard";
|
||||||
import { useSelectorStore } from "@/store/modules/selectors";
|
import { useSelectorStore } from "@/store/modules/selectors";
|
||||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||||
import { EntityType, DepthList, MetricModes } from "../../../data";
|
import { EntityType, DepthList, MetricModes, CallTypes } from "../../../data";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import Sankey from "./Sankey.vue";
|
import Sankey from "./Sankey.vue";
|
||||||
import Settings from "./Settings.vue";
|
import Settings from "./Settings.vue";
|
||||||
@ -121,8 +121,8 @@ limitations under the License. -->
|
|||||||
width.value = dom.width - 5;
|
width.value = dom.width - 5;
|
||||||
if (settings.value.metricMode === MetricModes.Expression) {
|
if (settings.value.metricMode === MetricModes.Expression) {
|
||||||
topologyStore.queryNodeExpressions(settings.value.nodeExpressions || []);
|
topologyStore.queryNodeExpressions(settings.value.nodeExpressions || []);
|
||||||
topologyStore.getLinkExpressions(settings.value.linkClientExpressions || []);
|
topologyStore.getLinkExpressions(settings.value.linkClientExpressions || [], CallTypes.Client);
|
||||||
topologyStore.getLinkExpressions(settings.value.linkServerExpressions || []);
|
topologyStore.getLinkExpressions(settings.value.linkServerExpressions || [], CallTypes.Server);
|
||||||
} else {
|
} else {
|
||||||
topologyStore.getLinkClientMetrics(settings.value.linkClientMetrics || []);
|
topologyStore.getLinkClientMetrics(settings.value.linkClientMetrics || []);
|
||||||
topologyStore.getLinkServerMetrics(settings.value.linkServerMetrics || []);
|
topologyStore.getLinkServerMetrics(settings.value.linkServerMetrics || []);
|
||||||
|
@ -277,6 +277,7 @@ limitations under the License. -->
|
|||||||
LegendOpt,
|
LegendOpt,
|
||||||
MetricsType,
|
MetricsType,
|
||||||
MetricModes,
|
MetricModes,
|
||||||
|
CallTypes,
|
||||||
} from "../../../data";
|
} from "../../../data";
|
||||||
import type { Option } from "@/types/app";
|
import type { Option } from "@/types/app";
|
||||||
import { useQueryTopologyMetrics } from "@/hooks/useMetricsProcessor";
|
import { useQueryTopologyMetrics } from "@/hooks/useMetricsProcessor";
|
||||||
@ -515,7 +516,7 @@ limitations under the License. -->
|
|||||||
topologyStore.setLinkServerMetrics({});
|
topologyStore.setLinkServerMetrics({});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
topologyStore.getLinkExpressions(states.linkServerExpressions, "SERVER");
|
topologyStore.getLinkExpressions(states.linkServerExpressions, CallTypes.Server);
|
||||||
}
|
}
|
||||||
function changeLinkClientExpressions(param: string[]) {
|
function changeLinkClientExpressions(param: string[]) {
|
||||||
if (!isExpression.value) {
|
if (!isExpression.value) {
|
||||||
@ -527,7 +528,7 @@ limitations under the License. -->
|
|||||||
topologyStore.changeLinkClientMetrics({});
|
topologyStore.changeLinkClientMetrics({});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
topologyStore.getLinkExpressions(states.linkClientExpressions, "CLIENT");
|
topologyStore.getLinkExpressions(states.linkClientExpressions, CallTypes.Client);
|
||||||
}
|
}
|
||||||
function updateLinkClientMetrics(options: Option[] | any) {
|
function updateLinkClientMetrics(options: Option[] | any) {
|
||||||
const opt = options.map((d: Option) => d.value);
|
const opt = options.map((d: Option) => d.value);
|
||||||
|
Loading…
Reference in New Issue
Block a user