mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-05-02 06:14:01 +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,
|
||||
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 {
|
||||
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: {
|
||||
scope: dashboardStore.entity,
|
||||
const entity = {
|
||||
scope: config.catalog,
|
||||
serviceName:
|
||||
dashboardStore.entity === "All"
|
||||
? undefined
|
||||
@ -137,15 +111,36 @@ export function useQueryProcessor(config: any) {
|
||||
: undefined,
|
||||
destEndpointName:
|
||||
dashboardStore.entity === "EndpointRelation"
|
||||
? selectorStore.currentDestPod &&
|
||||
selectorStore.currentDestPod.value
|
||||
? selectorStore.currentDestPod && selectorStore.currentDestPod.value
|
||||
: undefined,
|
||||
destProcessName: dashboardStore.entity.includes("ProcessRelation")
|
||||
? selectorStore.currentDestProcess &&
|
||||
selectorStore.currentDestProcess.value
|
||||
: 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) {
|
||||
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 {
|
||||
appStore.setIsMobile(false);
|
||||
}
|
||||
const isCollapse = ref(true);
|
||||
const isCollapse = ref(false);
|
||||
const controlMenu = () => {
|
||||
isCollapse.value = !isCollapse.value;
|
||||
};
|
||||
|
@ -145,6 +145,7 @@ export enum MetricCatalog {
|
||||
SERVICE_RELATION = "ServiceRelation",
|
||||
SERVICE_INSTANCE_RELATION = "ServiceInstanceRelation",
|
||||
ENDPOINT_RELATION = "EndpointRelation",
|
||||
PROCESS_RELATION = "ProcessRelation",
|
||||
}
|
||||
export const EntityType = [
|
||||
{ value: "Service", label: "Service", key: 1 },
|
||||
|
@ -43,7 +43,11 @@ limitations under the License. -->
|
||||
</div>
|
||||
<el-progress
|
||||
: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']"
|
||||
:show-text="false"
|
||||
/>
|
||||
|
@ -69,8 +69,8 @@ const activeNames = ref([0]);
|
||||
const conditionsList = ref<NetworkProfilingRequest[]>([
|
||||
{
|
||||
uriRegex: "",
|
||||
when4xx: InitTaskField.Whenxx[0].value,
|
||||
when5xx: InitTaskField.Whenxx[1].value,
|
||||
when4xx: InitTaskField.Whenxx[1].value,
|
||||
when5xx: InitTaskField.Whenxx[0].value,
|
||||
minDuration: NaN,
|
||||
},
|
||||
]);
|
||||
|
Loading…
Reference in New Issue
Block a user