mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-02 17:04:48 +00:00
fix: add ProcessRelation
to entity types (#194)
This commit is contained in:
parent
d8f91bbdf3
commit
5be106fc4f
@ -73,35 +73,9 @@ export function useQueryProcessor(config: any) {
|
|||||||
topN: c.topN || 10,
|
topN: c.topN || 10,
|
||||||
order: c.sortOrder || "DES",
|
order: c.sortOrder || "DES",
|
||||||
};
|
};
|
||||||
} else if ([MetricQueryTypes.ReadRecords].includes(metricType)) {
|
|
||||||
variables.push(`$condition${index}: RecordCondition!`);
|
|
||||||
conditions[`condition${index}`] = {
|
|
||||||
name,
|
|
||||||
parentEntity: {
|
|
||||||
scope: config.catalog,
|
|
||||||
normal: selectorStore.currentService
|
|
||||||
? selectorStore.currentService.normal
|
|
||||||
: true,
|
|
||||||
serviceName: ["All"].includes(dashboardStore.entity)
|
|
||||||
? null
|
|
||||||
: selectorStore.currentService.value,
|
|
||||||
},
|
|
||||||
topN: c.topN || 10,
|
|
||||||
order: c.sortOrder || "DES",
|
|
||||||
};
|
|
||||||
} else {
|
} else {
|
||||||
if (metricType === MetricQueryTypes.ReadLabeledMetricsValues) {
|
const entity = {
|
||||||
const labels = (c.labelsIndex || "")
|
scope: config.catalog,
|
||||||
.split(",")
|
|
||||||
.map((item: string) => item.replace(/^\s*|\s*$/g, ""));
|
|
||||||
variables.push(`$labels${index}: [String!]!`);
|
|
||||||
conditions[`labels${index}`] = labels;
|
|
||||||
}
|
|
||||||
variables.push(`$condition${index}: MetricsCondition!`);
|
|
||||||
conditions[`condition${index}`] = {
|
|
||||||
name,
|
|
||||||
entity: {
|
|
||||||
scope: dashboardStore.entity,
|
|
||||||
serviceName:
|
serviceName:
|
||||||
dashboardStore.entity === "All"
|
dashboardStore.entity === "All"
|
||||||
? undefined
|
? undefined
|
||||||
@ -137,15 +111,36 @@ export function useQueryProcessor(config: any) {
|
|||||||
: undefined,
|
: undefined,
|
||||||
destEndpointName:
|
destEndpointName:
|
||||||
dashboardStore.entity === "EndpointRelation"
|
dashboardStore.entity === "EndpointRelation"
|
||||||
? selectorStore.currentDestPod &&
|
? selectorStore.currentDestPod && selectorStore.currentDestPod.value
|
||||||
selectorStore.currentDestPod.value
|
|
||||||
: undefined,
|
: undefined,
|
||||||
destProcessName: dashboardStore.entity.includes("ProcessRelation")
|
destProcessName: dashboardStore.entity.includes("ProcessRelation")
|
||||||
? selectorStore.currentDestProcess &&
|
? selectorStore.currentDestProcess &&
|
||||||
selectorStore.currentDestProcess.value
|
selectorStore.currentDestProcess.value
|
||||||
: undefined,
|
: undefined,
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
if ([MetricQueryTypes.ReadRecords].includes(metricType)) {
|
||||||
|
variables.push(`$condition${index}: RecordCondition!`);
|
||||||
|
conditions[`condition${index}`] = {
|
||||||
|
name,
|
||||||
|
parentEntity: entity,
|
||||||
|
topN: c.topN || 10,
|
||||||
|
order: c.sortOrder || "DES",
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
entity.scope = dashboardStore.entity;
|
||||||
|
if (metricType === MetricQueryTypes.ReadLabeledMetricsValues) {
|
||||||
|
const labels = (c.labelsIndex || "")
|
||||||
|
.split(",")
|
||||||
|
.map((item: string) => item.replace(/^\s*|\s*$/g, ""));
|
||||||
|
variables.push(`$labels${index}: [String!]!`);
|
||||||
|
conditions[`labels${index}`] = labels;
|
||||||
|
}
|
||||||
|
variables.push(`$condition${index}: MetricsCondition!`);
|
||||||
|
conditions[`condition${index}`] = {
|
||||||
|
name,
|
||||||
|
entity,
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (metricType === MetricQueryTypes.ReadLabeledMetricsValues) {
|
if (metricType === MetricQueryTypes.ReadLabeledMetricsValues) {
|
||||||
return `${name}${index}: ${metricType}(condition: $condition${index}, labels: $labels${index}, duration: $duration)${RespFields[metricType]}`;
|
return `${name}${index}: ${metricType}(condition: $condition${index}, labels: $labels${index}, duration: $duration)${RespFields[metricType]}`;
|
||||||
|
@ -107,7 +107,7 @@ if (/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {
|
|||||||
} else {
|
} else {
|
||||||
appStore.setIsMobile(false);
|
appStore.setIsMobile(false);
|
||||||
}
|
}
|
||||||
const isCollapse = ref(true);
|
const isCollapse = ref(false);
|
||||||
const controlMenu = () => {
|
const controlMenu = () => {
|
||||||
isCollapse.value = !isCollapse.value;
|
isCollapse.value = !isCollapse.value;
|
||||||
};
|
};
|
||||||
|
@ -145,6 +145,7 @@ export enum MetricCatalog {
|
|||||||
SERVICE_RELATION = "ServiceRelation",
|
SERVICE_RELATION = "ServiceRelation",
|
||||||
SERVICE_INSTANCE_RELATION = "ServiceInstanceRelation",
|
SERVICE_INSTANCE_RELATION = "ServiceInstanceRelation",
|
||||||
ENDPOINT_RELATION = "EndpointRelation",
|
ENDPOINT_RELATION = "EndpointRelation",
|
||||||
|
PROCESS_RELATION = "ProcessRelation",
|
||||||
}
|
}
|
||||||
export const EntityType = [
|
export const EntityType = [
|
||||||
{ value: "Service", label: "Service", key: 1 },
|
{ value: "Service", label: "Service", key: 1 },
|
||||||
|
@ -43,7 +43,11 @@ limitations under the License. -->
|
|||||||
</div>
|
</div>
|
||||||
<el-progress
|
<el-progress
|
||||||
:stroke-width="6"
|
:stroke-width="6"
|
||||||
:percentage="(i.value / maxValue) * 100"
|
:percentage="
|
||||||
|
isNaN(Number(i.value) / maxValue)
|
||||||
|
? 0
|
||||||
|
: (Number(i.value) / maxValue) * 100
|
||||||
|
"
|
||||||
:color="TextColors[config.color || 'purple']"
|
:color="TextColors[config.color || 'purple']"
|
||||||
:show-text="false"
|
:show-text="false"
|
||||||
/>
|
/>
|
||||||
|
@ -69,8 +69,8 @@ const activeNames = ref([0]);
|
|||||||
const conditionsList = ref<NetworkProfilingRequest[]>([
|
const conditionsList = ref<NetworkProfilingRequest[]>([
|
||||||
{
|
{
|
||||||
uriRegex: "",
|
uriRegex: "",
|
||||||
when4xx: InitTaskField.Whenxx[0].value,
|
when4xx: InitTaskField.Whenxx[1].value,
|
||||||
when5xx: InitTaskField.Whenxx[1].value,
|
when5xx: InitTaskField.Whenxx[0].value,
|
||||||
minDuration: NaN,
|
minDuration: NaN,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
Loading…
Reference in New Issue
Block a user