add service layout

This commit is contained in:
Qiuxia Fan 2022-03-13 18:05:33 +08:00
parent 1ac8071285
commit fc981f678b

View File

@ -95,13 +95,11 @@ export const ServiceLayout = {
h: 36, h: 36,
i: "0", i: "0",
type: "Tab", type: "Tab",
widget: { widget: {},
title: "Title",
},
graph: {}, graph: {},
standard: {}, standard: {},
metrics: [""], metrics: [],
metricTypes: [""], metricTypes: [],
children: [ children: [
{ {
name: "Overview", name: "Overview",
@ -142,234 +140,254 @@ export const ServiceLayout = {
}, },
graph: { graph: {
type: "Card", type: "Card",
fontSize: 20,
}, },
standard: { standard: {
divide: "10000", divide: "10000",
}, },
}, },
{
x: 16,
y: 0,
w: 8,
h: 12,
i: "2",
metrics: ["service_sla"],
metricTypes: ["readMetricsValue"],
type: "Widget",
widget: {
title: "Successful Rate",
tips: "Tooltip",
},
graph: {
type: "Card",
fontSize: 20,
},
standard: {
unit: "%",
divide: "100",
},
},
{
x: 0,
y: 12,
w: 8,
h: 12,
i: "3",
metrics: ["service_cpm"],
metricTypes: ["readMetricsValue"],
type: "Widget",
widget: {
title: "Service Load",
tips: "For HTTP 1/2, gRPC, RPC services, this means Calls Per Minute (CPM), for TCP services, this means Packets Per Minute (PPM)",
},
graph: {
type: "Card",
fontSize: 20,
},
standard: {
unit: "CPM / PPM",
divide: "100",
},
},
{
x: 8,
y: 12,
w: 8,
h: 12,
i: "4",
metrics: ["service_cpm"],
metricTypes: ["readMetricsValues"],
type: "Widget",
widget: {
title: "Service cpm",
tips: "For HTTP 1/2, gRPC, RPC services, this means Calls Per Minute (CPM), for TCP services, this means Packets Per Minute (PPM)",
},
graph: {
type: "Line",
},
standard: {
unit: "CPM / PPM",
divide: "100",
},
},
{
x: 16,
y: 12,
w: 8,
h: 12,
i: "5",
metrics: ["service_resp_time"],
metricTypes: ["readMetricsValues"],
type: "Widget",
widget: {
title: "Service Avg Response Time",
},
graph: {
type: "Line",
},
standard: {
unit: "ms",
},
},
{
x: 0,
y: 24,
w: 8,
h: 12,
i: "6",
metrics: ["service_apdex"],
metricTypes: ["readMetricsValues"],
type: "Widget",
widget: {
title: "Service Apdex",
},
graph: {
type: "Line",
},
standard: {
divide: "10000",
},
},
{
x: 8,
y: 24,
w: 8,
h: 12,
i: "7",
metrics: ["service_sla"],
metricTypes: ["readMetricsValues"],
type: "Widget",
widget: {
title: "Successful Rate",
},
graph: {
type: "Line",
},
standard: {
divide: "100",
},
},
{
x: 16,
y: 24,
w: 8,
h: 12,
i: "8",
metrics: [
"service_throughput_received",
"service_throughput_sent",
],
metricTypes: ["readMetricsValues", "readMetricsValues"],
type: "Widget",
widget: {
title: "Service Throughput",
},
graph: {
type: "Line",
},
standard: {
unit: "Bytes",
tips: "This metrics is only avaible for TCP services",
},
},
{
x: 0,
y: 36,
w: 8,
h: 12,
i: "9",
metrics: ["service_mq_consume_count"],
metricTypes: ["readMetricsValues"],
type: "Widget",
widget: {
title: "Message Queue Consuming Count",
},
graph: {
type: "Line",
},
standard: {
tips: "The number of consumed messages.",
},
},
{
x: 8,
y: 36,
w: 8,
h: 12,
i: "10",
metrics: ["service_mq_consume_latency"],
metricTypes: ["readMetricsValues"],
type: "Widget",
widget: {
title: "Message Queue Consuming Count",
},
graph: {
type: "Line",
},
standard: {
unit: "ms",
tips: "The avg latency of message consuming. Latency = timestamp(received) - timestamp(producing)",
},
},
], ],
}, },
{ {
name: "Trace", name: "Trace",
children: [], children: [
{
x: 0,
y: 0,
w: 24,
h: 36,
i: "0",
metrics: [],
metricTypes: [],
type: "Trace",
widget: {},
graph: {},
standard: {},
},
],
},
{
name: "Profile",
children: [
{
x: 0,
y: 0,
w: 24,
h: 36,
i: "0",
metrics: [],
metricTypes: [],
type: "Profile",
widget: {},
graph: {},
standard: {},
},
],
},
{
name: "Log",
children: [
{
x: 0,
y: 0,
w: 24,
h: 36,
i: "0",
metrics: [],
metricTypes: [],
type: "Log",
widget: {},
graph: {},
standard: {},
},
],
}, },
], ],
}, },
], ],
}, },
}; };
// export const ServiceLayout = {
// id: "1",
// configuration: {
// name: "Service",
// isRoot: true,
// children: [
// {
// w: 8,
// h: 12,
// i: "0",
// metrics: ["service_apdex"],
// metricTypes: ["readMetricsValue"],
// type: "Widget",
// widget: {
// title: "Service Apdex",
// tips: "Tooltip",
// },
// graph: {
// type: "Card",
// },
// standard: {
// aggregation: "/",
// aggregationNum: "10000",
// },
// },
// {
// w: 8,
// h: 12,
// i: "1",
// metrics: ["service_sla"],
// metricTypes: ["readMetricsValue"],
// type: "Widget",
// widget: {
// title: "Successful Rate",
// tips: "Tooltip",
// },
// graph: {
// type: "Card",
// },
// standard: {
// unit: "%",
// aggregation: "/",
// aggregationNum: "100",
// },
// },
// {
// w: 8,
// h: 12,
// i: "2",
// metrics: ["service_cpm"],
// metricTypes: ["readMetricsValue"],
// type: "Widget",
// widget: {
// title: "Service Load",
// tips: "For HTTP 1/2, gRPC, RPC services, this means Calls Per Minute (CPM), for TCP services, this means Packets Per Minute (PPM)",
// },
// graph: {
// type: "Card",
// },
// standard: {
// unit: "CPM / PPM",
// aggregation: "/",
// aggregationNum: "100",
// },
// },
// {
// w: 8,
// h: 12,
// i: "3",
// metrics: ["service_cpm"],
// metricTypes: ["readMetricsValues"],
// type: "Widget",
// widget: {
// title: "Service cpm",
// tips: "For HTTP 1/2, gRPC, RPC services, this means Calls Per Minute (CPM), for TCP services, this means Packets Per Minute (PPM)",
// },
// graph: {
// type: "Card",
// },
// standard: {
// unit: "CPM / PPM",
// aggregation: "/",
// aggregationNum: "100",
// },
// },
// {
// w: 8,
// h: 12,
// i: "4",
// metrics: ["service_resp_time"],
// metricTypes: ["readMetricsValues"],
// type: "Widget",
// widget: {
// title: "Service Avg Response Time",
// },
// graph: {
// type: "Line",
// },
// standard: {
// unit: "ms",
// },
// },
// {
// w: 8,
// h: 12,
// i: "5",
// metrics: ["service_apdex"],
// metricTypes: ["readMetricsValues"],
// type: "Widget",
// widget: {
// title: "Service Apdex",
// },
// graph: {
// type: "Line",
// },
// standard: {
// aggregation: "/",
// aggregationNum: "10000",
// },
// },
// {
// w: 8,
// h: 12,
// i: "6",
// metrics: ["service_percentile"],
// metricTypes: ["readLabeledMetricsValues"],
// type: "Widget",
// metricLabels: "P50, P75, P90, P95, P99",
// labelsIndex: "0, 1, 2, 3, 4",
// widget: {
// title: "Service Response Time Percentile",
// },
// graph: {
// type: "Line",
// },
// standard: {
// unit: "ms",
// },
// },
// {
// w: 8,
// h: 12,
// i: "7",
// metrics: ["service_sla"],
// metricTypes: ["readMetricsValues"],
// type: "Widget",
// widget: {
// title: "Successful Rate",
// },
// graph: {
// type: "Line",
// },
// standard: {
// unit: "%",
// aggregation: "/",
// aggregationNum: "100",
// },
// },
// {
// w: 8,
// h: 12,
// i: "8",
// metrics: ["service_throughput_received", "service_throughput_sent"],
// metricTypes: ["readMetricsValues", "readMetricsValues"],
// type: "Widget",
// widget: {
// title: "Service Throughput",
// },
// graph: {
// type: "Line",
// },
// standard: {
// unit: "Bytes",
// tips: "This metrics is only avaible for TCP services",
// },
// },
// {
// w: 8,
// h: 12,
// i: "9",
// metrics: ["service_mq_consume_count"],
// metricTypes: ["readMetricsValues"],
// type: "Widget",
// widget: {
// title: "Message Queue Consuming Count",
// },
// graph: {
// type: "Line",
// },
// standard: {
// tips: "The number of consumed messages.",
// },
// },
// {
// w: 8,
// h: 12,
// i: "10",
// metrics: ["service_mq_consume_latency"],
// metricTypes: ["readMetricsValues"],
// type: "Widget",
// widget: {
// title: "Message Queue Consuming Count",
// },
// graph: {
// type: "Line",
// },
// standard: {
// unit: "ms",
// tips: "The avg latency of message consuming. Latency = timestamp(received) - timestamp(producing)",
// },
// },
// ],
// },
// };