feat: update data

This commit is contained in:
Fine 2023-06-03 23:24:01 +08:00
parent 7936403e5e
commit 0b06b1d6ba
7 changed files with 20 additions and 4 deletions

View File

@ -44,6 +44,8 @@ export interface LayoutConfig {
eventAssociate?: boolean;
filters?: Filters;
relatedTrace?: RelatedTrace;
subExpressions?: string[];
subTypesOfMQE?: string[];
}
export type RelatedTrace = {
duration: DurationTime;

View File

@ -38,6 +38,8 @@ limitations under the License. -->
metricMode: config.metricMode,
expressions: config.expressions || [],
typesOfMQE: config.typesOfMQE || [],
subExpressions: config.subExpressions || [],
subTypesOfMQE: config.subTypesOfMQE || [],
}"
:needQuery="true"
/>

View File

@ -33,7 +33,16 @@ limitations under the License. -->
:config="{
...graph,
legend: (dashboardStore.selectedGrid.graph || {}).legend,
...dashboardStore.selectedGrid,
i: dashboardStore.selectedGrid.i,
metrics: dashboardStore.selectedGrid.metrics,
metricTypes: dashboardStore.selectedGrid.metricTypes,
metricConfig: dashboardStore.selectedGrid.metricConfig,
relatedTrace: dashboardStore.selectedGrid.relatedTrace,
metricMode: dashboardStore.selectedGrid.metricMode,
expressions: dashboardStore.selectedGrid.expressions || [],
typesOfMQE: dashboardStore.selectedGrid.typesOfMQE || [],
subExpressions: dashboardStore.selectedGrid.subExpressions || [],
subTypesOfMQE: dashboardStore.selectedGrid.subTypesOfMQE || [],
}"
:needQuery="true"
/>

View File

@ -62,6 +62,8 @@ limitations under the License. -->
metricMode: data.metricMode,
expressions: data.expressions || [],
typesOfMQE: data.typesOfMQE || [],
subExpressions: data.subExpressions || [],
subTypesOfMQE: data.subTypesOfMQE || [],
}"
:needQuery="needQuery"
@click="clickHandle"

View File

@ -80,6 +80,8 @@ limitations under the License. -->
metricMode: string;
expressions: string[];
typesOfMQE: string[];
subExpressions: string[];
subTypesOfMQE: string[];
} & { metricConfig: MetricConfigOpt[] }
>,
default: () => ({
@ -166,11 +168,12 @@ limitations under the License. -->
async function queryEndpointExpressions(currentPods: Endpoint[]) {
const expressions = props.config.expressions || [];
const typesOfMQE = props.config.typesOfMQE || [];
const subExpressions = props.config.subExpressions || [];
if (expressions.length && expressions[0] && typesOfMQE.length && typesOfMQE[0]) {
const params = await useExpressionsQueryPodsMetrics(
currentPods,
{ ...props.config, metricConfig: metricConfig.value || [], typesOfMQE, expressions },
{ ...props.config, metricConfig: metricConfig.value || [], typesOfMQE, expressions, subExpressions },
EntityType[2].value,
);
endpoints.value = params.data;

View File

@ -204,7 +204,6 @@ limitations under the License. -->
const expressions = props.config.expressions || [];
const typesOfMQE = props.config.typesOfMQE || [];
const subExpressions = props.config.subExpressions || [];
const subTypesOfMQE = props.config.subTypesOfMQE || [];
if (expressions.length && expressions[0] && typesOfMQE.length && typesOfMQE[0]) {
const params = await useExpressionsQueryPodsMetrics(

View File

@ -252,7 +252,6 @@ limitations under the License. -->
const expressions = props.config.expressions || [];
const typesOfMQE = props.config.typesOfMQE || [];
const subExpressions = props.config.subExpressions || [];
const subTypesOfMQE = props.config.subTypesOfMQE || [];
if (expressions.length && expressions[0] && typesOfMQE.length && typesOfMQE[0]) {
const params = await useExpressionsQueryPodsMetrics(