mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-14 11:21:29 +00:00
feat: Implement task timeline and policy list widget for continous profiling (#280)
This commit is contained in:
@@ -33,9 +33,10 @@ export const createEBPFTask = {
|
||||
}`,
|
||||
};
|
||||
export const queryEBPFTasks = {
|
||||
variable: "$serviceId: ID, $serviceInstanceId: ID, $targets: [EBPFProfilingTargetType!]",
|
||||
variable:
|
||||
"$serviceId: ID, $serviceInstanceId: ID, $targets: [EBPFProfilingTargetType!], $triggerType: EBPFProfilingTriggerType",
|
||||
query: `
|
||||
queryEBPFTasks: queryEBPFProfilingTasks(serviceId: $serviceId, serviceInstanceId: $serviceInstanceId, targets: $targets) {
|
||||
queryEBPFTasks: queryEBPFProfilingTasks(serviceId: $serviceId, serviceInstanceId: $serviceInstanceId, targets: $targets, triggerType: $triggerType) {
|
||||
taskId
|
||||
serviceName
|
||||
serviceId
|
||||
@@ -111,3 +112,26 @@ export const keepNetworkProfiling = {
|
||||
errorReason
|
||||
}`,
|
||||
};
|
||||
|
||||
export const monitoringInstances = {
|
||||
variable: "$serviceId: ID!, $target: ContinuousProfilingTargetType!",
|
||||
query: `
|
||||
instances: queryContinuousProfilingMonitoringInstances(serviceId: $serviceId, target: $target) {
|
||||
id
|
||||
name
|
||||
attributes {
|
||||
name
|
||||
value
|
||||
}
|
||||
triggeredCount
|
||||
lastTriggerTimestamp
|
||||
processes {
|
||||
id
|
||||
name
|
||||
detectType
|
||||
labels
|
||||
lastTriggerTimestamp
|
||||
triggeredCount
|
||||
}
|
||||
}`,
|
||||
};
|
||||
|
@@ -123,3 +123,29 @@ export const GetProfileTaskLogs = {
|
||||
}
|
||||
`,
|
||||
};
|
||||
export const GetStrategyList = {
|
||||
variable: "$serviceId: ID!",
|
||||
query: `
|
||||
strategyList: queryContinuousProfilingServiceTargets(serviceId: $serviceId) {
|
||||
type
|
||||
checkItems {
|
||||
type
|
||||
threshold
|
||||
period
|
||||
count
|
||||
uriList
|
||||
uriRegex
|
||||
}
|
||||
}
|
||||
`,
|
||||
};
|
||||
|
||||
export const EditStrategy = {
|
||||
variable: "$request: ContinuousProfilingPolicyCreation!",
|
||||
query: `
|
||||
strategy: setContinuousProfilingPolicy(request: $request) {
|
||||
errorReason
|
||||
status
|
||||
}
|
||||
`,
|
||||
};
|
||||
|
@@ -23,6 +23,7 @@ import {
|
||||
analysisEBPFResult,
|
||||
createNetworkProfiling,
|
||||
keepNetworkProfiling,
|
||||
monitoringInstances,
|
||||
} from "../fragments/ebpf";
|
||||
|
||||
export const getCreateTaskData = `query queryCreateTaskData(${queryCreateTaskData.variable}) {${queryCreateTaskData.query}}`;
|
||||
@@ -38,3 +39,5 @@ export const getEBPFResult = `query analysisEBPFResult(${analysisEBPFResult.vari
|
||||
export const newNetworkProfiling = `mutation createNetworkProfiling(${createNetworkProfiling.variable}) {${createNetworkProfiling.query}}`;
|
||||
|
||||
export const aliveNetworkProfiling = `mutation keepNetworkProfiling(${keepNetworkProfiling.variable}) {${keepNetworkProfiling.query}}`;
|
||||
|
||||
export const getMonitoringInstances = `query continuousProfilingMonitoringInstances(${monitoringInstances.variable}) {${monitoringInstances.query}}`;
|
||||
|
@@ -21,6 +21,8 @@ import {
|
||||
GetProfileTaskSegmentList,
|
||||
GetProfileAnalyze,
|
||||
GetProfileTaskLogs,
|
||||
GetStrategyList,
|
||||
EditStrategy,
|
||||
} from "../fragments/profile";
|
||||
|
||||
export const saveProfileTask = `mutation createProfileTask(${CreateProfileTask.variable}) {${CreateProfileTask.query}}`;
|
||||
@@ -34,3 +36,7 @@ export const getProfileTaskSegmentList = `query getProfileTaskSegmentList(${GetP
|
||||
export const getProfileAnalyze = `query getProfileAnalyze(${GetProfileAnalyze.variable}) {${GetProfileAnalyze.query}}`;
|
||||
|
||||
export const getProfileTaskLogs = `query profileTaskLogs(${GetProfileTaskLogs.variable}) {${GetProfileTaskLogs.query}}`;
|
||||
|
||||
export const getStrategyList = `query getStrategyList(${GetStrategyList.variable}) {${GetStrategyList.query}}`;
|
||||
|
||||
export const editStrategy = `mutation editStrategy(${EditStrategy.variable}) {${EditStrategy.query}}`;
|
||||
|
Reference in New Issue
Block a user