fix: update function name

This commit is contained in:
Fine 2023-08-21 17:33:20 +08:00
parent 01fa56014f
commit 4d032d96ac
4 changed files with 10 additions and 13 deletions

View File

@ -318,7 +318,7 @@ export async function useExpressionsQueryPodsMetrics(
export function useQueryTopologyExpressionsProcessor(metrics: string[], instances: any[]) {
const appStore = useAppStoreWithOut();
function getNodeExpressionQuery() {
function getExpressionQuery() {
const conditions: { [key: string]: unknown } = {
duration: appStore.durationTime,
};
@ -364,5 +364,5 @@ export function useQueryTopologyExpressionsProcessor(metrics: string[], instance
return obj;
}
return { getNodeExpressionQuery, handleExpressionValues };
return { getExpressionQuery, handleExpressionValues };
}

View File

@ -382,11 +382,8 @@ export const topologyStore = defineStore({
if (!calls.length) {
return;
}
const { getNodeExpressionQuery, handleExpressionValues } = useQueryTopologyExpressionsProcessor(
expressions,
calls,
);
const param = getNodeExpressionQuery();
const { getExpressionQuery, handleExpressionValues } = useQueryTopologyExpressionsProcessor(expressions, calls);
const param = getExpressionQuery();
const res = await this.getNodeExpressionValue(param);
if (res.errors) {
ElMessage.error(res.errors);
@ -424,11 +421,11 @@ export const topologyStore = defineStore({
this.setNodeMetricValue({});
return;
}
const { getNodeExpressionQuery, handleExpressionValues } = useQueryTopologyExpressionsProcessor(
const { getExpressionQuery, handleExpressionValues } = useQueryTopologyExpressionsProcessor(
expressions,
this.nodes,
);
const param = getNodeExpressionQuery();
const param = getExpressionQuery();
const res = await this.getNodeExpressionValue(param);
if (res.errors) {
ElMessage.error(res.errors);

View File

@ -369,8 +369,8 @@ limitations under the License. -->
if (!topologyStore.nodes.length) {
return;
}
const { getNodeExpressionQuery } = useQueryTopologyExpressionsProcessor(names, topologyStore.nodes);
const param = getNodeExpressionQuery();
const { getExpressionQuery } = useQueryTopologyExpressionsProcessor(names, topologyStore.nodes);
const param = getExpressionQuery();
const res = await topologyStore.getNodeExpressionValue(param);
if (res.errors) {
ElMessage.error(res.errors);

View File

@ -378,8 +378,8 @@ limitations under the License. -->
return;
}
if (isExpression.value) {
const { getNodeExpressionQuery } = useQueryTopologyExpressionsProcessor(names, topologyStore.nodes);
const param = getNodeExpressionQuery();
const { getExpressionQuery } = useQueryTopologyExpressionsProcessor(names, topologyStore.nodes);
const param = getExpressionQuery();
const res = await topologyStore.getNodeExpressionValue(param);
if (res.errors) {
ElMessage.error(res.errors);