mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-04 16:45:22 +00:00
feat: remove graphql
This commit is contained in:
parent
eb30c11e2d
commit
291472b352
@ -68,12 +68,3 @@ export const deleteTemplate = {
|
||||
message
|
||||
}`,
|
||||
};
|
||||
export const TypeOfMQE = {
|
||||
variable: "$expression: String!",
|
||||
query: `
|
||||
metricType: returnTypeOfMQE(expression: $expression) {
|
||||
type
|
||||
error
|
||||
}
|
||||
`,
|
||||
};
|
||||
|
@ -21,7 +21,6 @@ import {
|
||||
addTemplate,
|
||||
changeTemplate,
|
||||
deleteTemplate,
|
||||
TypeOfMQE,
|
||||
} from "../fragments/dashboard";
|
||||
|
||||
export const queryTypeOfMetrics = `query typeOfMetrics(${TypeOfMetrics.variable}) {${TypeOfMetrics.query}}`;
|
||||
@ -35,5 +34,3 @@ export const updateTemplate = `mutation template(${changeTemplate.variable}) {${
|
||||
export const removeTemplate = `mutation template(${deleteTemplate.variable}) {${deleteTemplate.query}}`;
|
||||
|
||||
export const getTemplates = `query templates {${getAllTemplates.query}}`;
|
||||
|
||||
export const getTypeOfMQE = `query returnTypeOfMQE(${TypeOfMQE.variable}) {${TypeOfMQE.query}}`;
|
||||
|
@ -546,21 +546,10 @@ limitations under the License. -->
|
||||
async function changeExpression(event: any, index: number) {
|
||||
const params = (event.target.textContent || "").replace(/\s+/g, "");
|
||||
|
||||
if (params) {
|
||||
// const resp = await dashboardStore.getTypeOfMQE(params);
|
||||
states.metrics[index] = params;
|
||||
// states.metricTypes[index] = resp.data.metricType.type;
|
||||
// states.tips[index] = resp.data.metricType.error || "";
|
||||
} else {
|
||||
states.metrics[index] = params;
|
||||
// states.metricTypes[index] = "";
|
||||
// states.tips[index] = "";
|
||||
}
|
||||
|
||||
dashboardStore.selectWidget({
|
||||
...dashboardStore.selectedGrid,
|
||||
expressions: states.metrics,
|
||||
// typesOfMQE: states.metricTypes,
|
||||
});
|
||||
if (params) {
|
||||
await queryMetrics();
|
||||
@ -569,17 +558,7 @@ limitations under the License. -->
|
||||
async function changeSubExpression(event: any, index: number) {
|
||||
const params = (event.target.textContent || "").replace(/\s+/g, "");
|
||||
|
||||
if (params) {
|
||||
const resp = await dashboardStore.getTypeOfMQE(params);
|
||||
states.subMetrics[index] = params;
|
||||
states.subMetricTypes[index] = resp.data.metricType.type;
|
||||
states.subTips[index] = resp.data.metricType.error || "";
|
||||
} else {
|
||||
states.subMetrics[index] = params;
|
||||
states.subMetricTypes[index] = "";
|
||||
states.subTips[index] = "";
|
||||
}
|
||||
|
||||
dashboardStore.selectWidget({
|
||||
...dashboardStore.selectedGrid,
|
||||
subExpressions: states.subMetrics,
|
||||
|
Loading…
Reference in New Issue
Block a user