@@ -102,10 +83,7 @@ limitations under the License. -->
{{ i }}
@@ -142,17 +110,7 @@ limitations under the License. -->
{{ i }}
@@ -164,17 +122,7 @@ limitations under the License. -->
{{ i }}
@@ -185,18 +133,14 @@ limitations under the License. -->
{{ dd(state.hour) }}
:
{{ dd(state.minute) }}
@@ -204,10 +148,7 @@ limitations under the License. -->
:
{{ dd(state.second) }}
@@ -416,10 +357,7 @@ limitations under the License. -->
s: seconds,
S: milliseconds,
};
- return (format || props.format).replace(
- /Y+|M+|D+|H+|h+|m+|s+|S+/g,
- (str: string) => map[str],
- );
+ return (format || props.format).replace(/Y+|M+|D+|H+|h+|m+|s+|S+/g, (str: string) => map[str]);
};
const classObj: any = {};
let flag = false;
@@ -431,10 +369,8 @@ limitations under the License. -->
flag = tf(props.value, format) === tf(time, format);
}
classObj[`${state.pre}-date`] = true;
- classObj[`${state.pre}-date-disabled`] =
- (props.right && t < start.value) || props.disabledDate(time, format);
- classObj[`${state.pre}-date-on`] =
- (props.left && t > start.value) || (props.right && t < end.value);
+ classObj[`${state.pre}-date-disabled`] = (props.right && t < start.value) || props.disabledDate(time, format);
+ classObj[`${state.pre}-date-on`] = (props.left && t > start.value) || (props.right && t < end.value);
classObj[`${state.pre}-date-selected`] = flag;
return classObj;
};
diff --git a/src/components/Graph.vue b/src/components/Graph.vue
index bb348167..24fb20e2 100644
--- a/src/components/Graph.vue
+++ b/src/components/Graph.vue
@@ -78,9 +78,7 @@ limitations under the License. -->
});
const available = computed(
() =>
- (Array.isArray(props.option.series) &&
- props.option.series[0] &&
- props.option.series[0].data) ||
+ (Array.isArray(props.option.series) && props.option.series[0] && props.option.series[0].data) ||
(Array.isArray(props.option.series.data) && props.option.series.data[0]),
);
onMounted(async () => {
diff --git a/src/components/Selector.vue b/src/components/Selector.vue
index e325f8c2..d1141165 100644
--- a/src/components/Selector.vue
+++ b/src/components/Selector.vue
@@ -27,12 +27,7 @@ limitations under the License. -->
:remote-method="remoteMethod"
:filterable="filterable"
>
-
+
diff --git a/src/components/__tests__/HelloWorld.spec.ts b/src/components/__tests__/HelloWorld.spec.ts
index f67ca96d..5c41d5dd 100644
--- a/src/components/__tests__/HelloWorld.spec.ts
+++ b/src/components/__tests__/HelloWorld.spec.ts
@@ -1,4 +1,4 @@
-import { describe, it, expect } from "vitest";
+import { describe, it } from "vitest";
// import { mount } from '@vue/test-utils'
// import HelloWorld from '../HelloWorld.vue'
diff --git a/src/graphql/fragments/alarm.ts b/src/graphql/fragments/alarm.ts
index 49d1bbb5..85580955 100644
--- a/src/graphql/fragments/alarm.ts
+++ b/src/graphql/fragments/alarm.ts
@@ -16,8 +16,7 @@
*/
export const Alarm = {
- variable:
- "$keyword: String, $scope: Scope, $duration:Duration!, $tags:[AlarmTag], $paging: Pagination!",
+ variable: "$keyword: String, $scope: Scope, $duration:Duration!, $tags:[AlarmTag], $paging: Pagination!",
query: `
getAlarm(keyword: $keyword, scope: $scope, duration: $duration, paging: $paging, tags: $tags) {
items: msgs {
diff --git a/src/graphql/query/topology.ts b/src/graphql/query/topology.ts
index bb5333b2..fc627c8c 100644
--- a/src/graphql/query/topology.ts
+++ b/src/graphql/query/topology.ts
@@ -14,12 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import {
- InstanceTopology,
- EndpointTopology,
- ServicesTopology,
- ProcessTopology,
-} from "../fragments/topology";
+import { InstanceTopology, EndpointTopology, ServicesTopology, ProcessTopology } from "../fragments/topology";
export const getInstanceTopology = `query queryData(${InstanceTopology.variable}) {${InstanceTopology.query}}`;
export const getEndpointTopology = `query queryData(${EndpointTopology.variable}) {${EndpointTopology.query}}`;
diff --git a/src/hooks/useEcharts.ts b/src/hooks/useEcharts.ts
index bb3ba82a..a9772e55 100644
--- a/src/hooks/useEcharts.ts
+++ b/src/hooks/useEcharts.ts
@@ -14,12 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import type {
- BarSeriesOption,
- LineSeriesOption,
- HeatmapSeriesOption,
- SankeySeriesOption,
-} from "echarts/charts";
+import type { BarSeriesOption, LineSeriesOption, HeatmapSeriesOption, SankeySeriesOption } from "echarts/charts";
import type {
TitleComponentOption,
TooltipComponentOption,
@@ -48,10 +43,7 @@ export type ECOption = echarts.ComposeOption<
| SankeySeriesOption
>;
-export function useECharts(
- elRef: Ref,
- theme: "light" | "dark" | "default" = "default",
-): any {
+export function useECharts(elRef: Ref, theme: "light" | "dark" | "default" = "default"): any {
const getDarkMode = computed(() => {
return theme === "default" ? "light" : theme;
});
diff --git a/src/hooks/useLegendProcessor.ts b/src/hooks/useLegendProcessor.ts
index 01528142..58ab6172 100644
--- a/src/hooks/useLegendProcessor.ts
+++ b/src/hooks/useLegendProcessor.ts
@@ -39,9 +39,7 @@ export default function useLegendProcess(legend?: LegendOptions) {
}
function aggregations(data: { [key: string]: number[] }, intervalTime: string[]) {
const source: { [key: string]: unknown }[] = [];
- const keys = Object.keys(data || {}).filter(
- (i: any) => Array.isArray(data[i]) && data[i].length,
- );
+ const keys = Object.keys(data || {}).filter((i: any) => Array.isArray(data[i]) && data[i].length);
const headers = [];
for (const [key, value] of keys.entries()) {
@@ -55,10 +53,7 @@ export default function useLegendProcess(legend?: LegendOptions) {
value: d,
};
})
- .sort(
- (a: { key: string; value: number }, b: { key: string; value: number }) =>
- b.value - a.value,
- )
+ .sort((a: { key: string; value: number }, b: { key: string; value: number }) => b.value - a.value)
.filter((_: unknown, index: number) => index < 10),
};
if (legend) {
diff --git a/src/hooks/useListConfig.ts b/src/hooks/useListConfig.ts
index f88a2f2f..61b09248 100644
--- a/src/hooks/useListConfig.ts
+++ b/src/hooks/useListConfig.ts
@@ -18,16 +18,13 @@ import { MetricQueryTypes, Calculations } from "./data";
export function useListConfig(config: any, index: string) {
const i = Number(index);
const types = [Calculations.Average, Calculations.ApdexAvg, Calculations.PercentageAvg];
- const calculation =
- config.metricConfig && config.metricConfig[i] && config.metricConfig[i].calculation;
+ const calculation = config.metricConfig && config.metricConfig[i] && config.metricConfig[i].calculation;
const isLinear =
- [MetricQueryTypes.ReadMetricsValues, MetricQueryTypes.ReadLabeledMetricsValues].includes(
- config.metricTypes[i],
- ) && !types.includes(calculation);
+ [MetricQueryTypes.ReadMetricsValues, MetricQueryTypes.ReadLabeledMetricsValues].includes(config.metricTypes[i]) &&
+ !types.includes(calculation);
const isAvg =
- [MetricQueryTypes.ReadMetricsValues, MetricQueryTypes.ReadLabeledMetricsValues].includes(
- config.metricTypes[i],
- ) && types.includes(calculation);
+ [MetricQueryTypes.ReadMetricsValues, MetricQueryTypes.ReadLabeledMetricsValues].includes(config.metricTypes[i]) &&
+ types.includes(calculation);
return {
isLinear,
isAvg,
diff --git a/src/hooks/useMetricsProcessor.ts b/src/hooks/useMetricsProcessor.ts
index 6d38ba81..4c08a575 100644
--- a/src/hooks/useMetricsProcessor.ts
+++ b/src/hooks/useMetricsProcessor.ts
@@ -42,12 +42,9 @@ export function useQueryProcessor(config: any) {
duration: appStore.durationTime,
};
const variables: string[] = [`$duration: Duration!`];
- const isRelation = [
- "ServiceRelation",
- "ServiceInstanceRelation",
- "EndpointRelation",
- "ProcessRelation",
- ].includes(dashboardStore.entity);
+ const isRelation = ["ServiceRelation", "ServiceInstanceRelation", "EndpointRelation", "ProcessRelation"].includes(
+ dashboardStore.entity,
+ );
if (isRelation && !selectorStore.currentDestService) {
return;
}
@@ -58,9 +55,7 @@ export function useQueryProcessor(config: any) {
variables.push(`$condition${index}: TopNCondition!`);
conditions[`condition${index}`] = {
name,
- parentService: ["All"].includes(dashboardStore.entity)
- ? null
- : selectorStore.currentService.value,
+ parentService: ["All"].includes(dashboardStore.entity) ? null : selectorStore.currentService.value,
normal: selectorStore.currentService ? selectorStore.currentService.normal : true,
scope: config.catalog,
topN: c.topN || 10,
@@ -69,14 +64,11 @@ export function useQueryProcessor(config: any) {
} else {
const entity = {
scope: config.catalog,
- serviceName:
- dashboardStore.entity === "All" ? undefined : selectorStore.currentService.value,
+ serviceName: dashboardStore.entity === "All" ? undefined : selectorStore.currentService.value,
normal: dashboardStore.entity === "All" ? undefined : selectorStore.currentService.normal,
- serviceInstanceName: [
- "ServiceInstance",
- "ServiceInstanceRelation",
- "ProcessRelation",
- ].includes(dashboardStore.entity)
+ serviceInstanceName: ["ServiceInstance", "ServiceInstanceRelation", "ProcessRelation"].includes(
+ dashboardStore.entity,
+ )
? selectorStore.currentPod && selectorStore.currentPod.value
: undefined,
endpointName: dashboardStore.entity.includes("Endpoint")
@@ -87,9 +79,7 @@ export function useQueryProcessor(config: any) {
: undefined,
destNormal: isRelation ? selectorStore.currentDestService.normal : undefined,
destServiceName: isRelation ? selectorStore.currentDestService.value : undefined,
- destServiceInstanceName: ["ServiceInstanceRelation", "ProcessRelation"].includes(
- dashboardStore.entity,
- )
+ destServiceInstanceName: ["ServiceInstanceRelation", "ProcessRelation"].includes(dashboardStore.entity)
? selectorStore.currentDestPod && selectorStore.currentDestPod.value
: undefined,
destEndpointName:
@@ -111,9 +101,7 @@ export function useQueryProcessor(config: any) {
} else {
entity.scope = dashboardStore.entity;
if (metricType === MetricQueryTypes.ReadLabeledMetricsValues) {
- const labels = (c.labelsIndex || "")
- .split(",")
- .map((item: string) => item.replace(/^\s*|\s*$/g, ""));
+ const labels = (c.labelsIndex || "").split(",").map((item: string) => item.replace(/^\s*|\s*$/g, ""));
variables.push(`$labels${index}: [String!]!`);
conditions[`labels${index}`] = labels;
}
@@ -161,21 +149,14 @@ export function useSourceProcessor(
const c = (config.metricConfig && config.metricConfig[index]) || {};
if (type === MetricQueryTypes.ReadMetricsValues) {
- source[c.label || m] =
- (resp.data[keys[index]] && calculateExp(resp.data[keys[index]].values.values, c)) || [];
+ source[c.label || m] = (resp.data[keys[index]] && calculateExp(resp.data[keys[index]].values.values, c)) || [];
}
if (type === MetricQueryTypes.ReadLabeledMetricsValues) {
const resVal = Object.values(resp.data)[0] || [];
- const labels = (c.label || "")
- .split(",")
- .map((item: string) => item.replace(/^\s*|\s*$/g, ""));
- const labelsIdx = (c.labelsIndex || "")
- .split(",")
- .map((item: string) => item.replace(/^\s*|\s*$/g, ""));
+ const labels = (c.label || "").split(",").map((item: string) => item.replace(/^\s*|\s*$/g, ""));
+ const labelsIdx = (c.labelsIndex || "").split(",").map((item: string) => item.replace(/^\s*|\s*$/g, ""));
for (const item of resVal) {
- const values = item.values.values.map((d: { value: number }) =>
- aggregation(Number(d.value), c),
- );
+ const values = item.values.values.map((d: { value: number }) => aggregation(Number(d.value), c));
const indexNum = labelsIdx.findIndex((d: string) => d === item.label);
if (labels[indexNum] && indexNum > -1) {
source[labels[indexNum]] = values;
@@ -189,11 +170,7 @@ export function useSourceProcessor(
}
if (
(
- [
- MetricQueryTypes.ReadRecords,
- MetricQueryTypes.ReadSampledRecords,
- MetricQueryTypes.SortMetrics,
- ] as string[]
+ [MetricQueryTypes.ReadRecords, MetricQueryTypes.ReadSampledRecords, MetricQueryTypes.SortMetrics] as string[]
).includes(type)
) {
source[m] = (Object.values(resp.data)[0] || []).map((d: { value: unknown; name: string }) => {
@@ -216,10 +193,7 @@ export function useSourceProcessor(
});
let buckets = [] as any;
if (resVal.buckets.length) {
- buckets = [
- resVal.buckets[0].min,
- ...resVal.buckets.map((item: { min: string; max: string }) => item.max),
- ];
+ buckets = [resVal.buckets[0].min, ...resVal.buckets.map((item: { min: string; max: string }) => item.max)];
}
source[m] = { nodes, buckets }; // nodes: number[][]
@@ -253,37 +227,33 @@ export function useQueryPodsMetrics(
};
const variables: string[] = [`$duration: Duration!`];
const currentService = selectorStore.currentService || {};
- const fragmentList = pods.map(
- (d: (Instance | Endpoint | Service) & { normal: boolean }, index: number) => {
- const param = {
- scope,
- serviceName: scope === "Service" ? d.label : currentService.label,
- serviceInstanceName: scope === "ServiceInstance" ? d.label : undefined,
- endpointName: scope === "Endpoint" ? d.label : undefined,
- normal: scope === "Service" ? d.normal : currentService.normal,
+ const fragmentList = pods.map((d: (Instance | Endpoint | Service) & { normal: boolean }, index: number) => {
+ const param = {
+ scope,
+ serviceName: scope === "Service" ? d.label : currentService.label,
+ serviceInstanceName: scope === "ServiceInstance" ? d.label : undefined,
+ endpointName: scope === "Endpoint" ? d.label : undefined,
+ normal: scope === "Service" ? d.normal : currentService.normal,
+ };
+ const f = metrics.map((name: string, idx: number) => {
+ const metricType = metricTypes[idx] || "";
+ variables.push(`$condition${index}${idx}: MetricsCondition!`);
+ conditions[`condition${index}${idx}`] = {
+ name,
+ entity: param,
};
- const f = metrics.map((name: string, idx: number) => {
- const metricType = metricTypes[idx] || "";
- variables.push(`$condition${index}${idx}: MetricsCondition!`);
- conditions[`condition${index}${idx}`] = {
- name,
- entity: param,
- };
- let labelStr = "";
- if (metricType === MetricQueryTypes.ReadLabeledMetricsValues) {
- const c = config.metricConfig[idx] || {};
- variables.push(`$labels${index}${idx}: [String!]!`);
- labelStr = `labels: $labels${index}${idx}, `;
- const labels = (c.labelsIndex || "")
- .split(",")
- .map((item: string) => item.replace(/^\s*|\s*$/g, ""));
- conditions[`labels${index}${idx}`] = labels;
- }
- return `${name}${index}${idx}: ${metricType}(condition: $condition${index}${idx}, ${labelStr}duration: $duration)${RespFields[metricType]}`;
- });
- return f;
- },
- );
+ let labelStr = "";
+ if (metricType === MetricQueryTypes.ReadLabeledMetricsValues) {
+ const c = config.metricConfig[idx] || {};
+ variables.push(`$labels${index}${idx}: [String!]!`);
+ labelStr = `labels: $labels${index}${idx}, `;
+ const labels = (c.labelsIndex || "").split(",").map((item: string) => item.replace(/^\s*|\s*$/g, ""));
+ conditions[`labels${index}${idx}`] = labels;
+ }
+ return `${name}${index}${idx}: ${metricType}(condition: $condition${index}${idx}, ${labelStr}duration: $duration)${RespFields[metricType]}`;
+ });
+ return f;
+ });
const fragment = fragmentList.flat(1).join(" ");
const queryStr = `query queryData(${variables}) {${fragment}}`;
@@ -320,16 +290,10 @@ export function usePodsSource(
}
if (config.metricTypes[index] === MetricQueryTypes.ReadMetricsValues) {
d[name] = {};
- if (
- [Calculations.Average, Calculations.ApdexAvg, Calculations.PercentageAvg].includes(
- c.calculation,
- )
- ) {
+ if ([Calculations.Average, Calculations.ApdexAvg, Calculations.PercentageAvg].includes(c.calculation)) {
d[name]["avg"] = calculateExp(resp.data[key].values.values, c);
}
- d[name]["values"] = resp.data[key].values.values.map((val: { value: number }) =>
- aggregation(val.value, c),
- );
+ d[name]["values"] = resp.data[key].values.values.map((val: { value: number }) => aggregation(val.value, c));
if (idx === 0) {
names.push(name);
metricConfigArr.push(c);
@@ -338,17 +302,11 @@ export function usePodsSource(
}
if (config.metricTypes[index] === MetricQueryTypes.ReadLabeledMetricsValues) {
const resVal = resp.data[key] || [];
- const labels = (c.label || "")
- .split(",")
- .map((item: string) => item.replace(/^\s*|\s*$/g, ""));
- const labelsIdx = (c.labelsIndex || "")
- .split(",")
- .map((item: string) => item.replace(/^\s*|\s*$/g, ""));
+ const labels = (c.label || "").split(",").map((item: string) => item.replace(/^\s*|\s*$/g, ""));
+ const labelsIdx = (c.labelsIndex || "").split(",").map((item: string) => item.replace(/^\s*|\s*$/g, ""));
for (let i = 0; i < resVal.length; i++) {
const item = resVal[i];
- const values = item.values.values.map((d: { value: number }) =>
- aggregation(Number(d.value), c),
- );
+ const values = item.values.values.map((d: { value: number }) => aggregation(Number(d.value), c));
const indexNum = labelsIdx.findIndex((d: string) => d === item.label);
let key = item.label;
if (labels[indexNum] && indexNum > -1) {
@@ -357,11 +315,7 @@ export function usePodsSource(
if (!d[key]) {
d[key] = {};
}
- if (
- [Calculations.Average, Calculations.ApdexAvg, Calculations.PercentageAvg].includes(
- c.calculation,
- )
- ) {
+ if ([Calculations.Average, Calculations.ApdexAvg, Calculations.PercentageAvg].includes(c.calculation)) {
d[key]["avg"] = calculateExp(item.values.values, c);
}
d[key]["values"] = values;
@@ -402,10 +356,7 @@ export function useQueryTopologyMetrics(metrics: string[], ids: string[]) {
return { queryStr, conditions };
}
-function calculateExp(
- arr: { value: number }[],
- config: { calculation?: string },
-): (number | string)[] {
+function calculateExp(arr: { value: number }[], config: { calculation?: string }): (number | string)[] {
const sum = arr.map((d: { value: number }) => d.value).reduce((a, b) => a + b);
let data: (number | string)[] = [];
switch (config.calculation) {
@@ -480,11 +431,9 @@ export async function useGetMetricEntity(metric: string, metricType: any) {
let catalog = "";
const dashboardStore = useDashboardStore();
if (
- [
- MetricQueryTypes.ReadSampledRecords,
- MetricQueryTypes.SortMetrics,
- MetricQueryTypes.ReadRecords,
- ].includes(metricType)
+ [MetricQueryTypes.ReadSampledRecords, MetricQueryTypes.SortMetrics, MetricQueryTypes.ReadRecords].includes(
+ metricType,
+ )
) {
const res = await dashboardStore.fetchMetricList(metric);
if (res.errors) {
diff --git a/src/layout/components/NavBar.vue b/src/layout/components/NavBar.vue
index 1bf5ad6e..fc9c0526 100644
--- a/src/layout/components/NavBar.vue
+++ b/src/layout/components/NavBar.vue
@@ -23,20 +23,12 @@ limitations under the License. -->
format="YYYY-MM-DD HH:mm"
@input="changeTimeRange"
/>
-
- UTC{{ appStore.utcHour >= 0 ? "+" : "" }}{{ `${appStore.utcHour}:${appStore.utcMin}` }}
-
+ UTC{{ appStore.utcHour >= 0 ? "+" : "" }}{{ `${appStore.utcHour}:${appStore.utcMin}` }}
-
+
diff --git a/src/layout/components/SideBar.vue b/src/layout/components/SideBar.vue
index 930cb63c..4e0e79f0 100644
--- a/src/layout/components/SideBar.vue
+++ b/src/layout/components/SideBar.vue
@@ -84,9 +84,7 @@ limitations under the License. -->
const appStore = useAppStoreWithOut();
const { t } = useI18n();
const name = ref(String(useRouter().currentRoute.value.name));
- const theme = ["VirtualMachine", "Kubernetes"].includes(name.value || "")
- ? ref("light")
- : ref("black");
+ const theme = ["VirtualMachine", "Kubernetes"].includes(name.value || "") ? ref("light") : ref("black");
const routes = ref(useRouter().options.routes);
if (/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {
appStore.setIsMobile(true);
diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts
index dbcc3d86..39578bfd 100644
--- a/src/locales/lang/en.ts
+++ b/src/locales/lang/en.ts
@@ -367,8 +367,7 @@ const msg = {
addKeywordsOfContent: "Please input a keyword of content",
addExcludingKeywordsOfContent: "Please input a keyword of excluding content",
noticeTag: "Please press Enter after inputting a tag(key=value).",
- conditionNotice:
- "Notice: Please press Enter after inputting a key of content, exclude key of content(key=value).",
+ conditionNotice: "Notice: Please press Enter after inputting a key of content, exclude key of content(key=value).",
language: "Language",
gateway: "Gateway",
virtualMQ: "Virtual MQ",
diff --git a/src/locales/lang/es.ts b/src/locales/lang/es.ts
index 42848cf7..df736930 100644
--- a/src/locales/lang/es.ts
+++ b/src/locales/lang/es.ts
@@ -178,10 +178,8 @@ const msg = {
asTable: "Como tabla",
toTheRight: "Derecha",
minDuration: "Duración mínima de la solicitud",
- when4xx:
- "Ejemplo de solicitud y respuesta http con seguimiento cuando el Código de respuesta está entre 400 y 499",
- when5xx:
- "Ejemplo de solicitud y respuesta http con seguimiento cuando el Código de respuesta está entre 500 y 599",
+ when4xx: "Ejemplo de solicitud y respuesta http con seguimiento cuando el Código de respuesta está entre 400 y 499",
+ when5xx: "Ejemplo de solicitud y respuesta http con seguimiento cuando el Código de respuesta está entre 500 y 599",
taskTitle: "Reglas de recolección de peticiones y respuestas HTTP",
second: "s",
yearSuffix: "Año",
diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts
index a39382d1..28c06f86 100644
--- a/src/locales/lang/zh.ts
+++ b/src/locales/lang/zh.ts
@@ -282,12 +282,9 @@ const msg = {
chartType: "图表类型",
currentDepth: "当前深度",
defaultDepth: "默认深度",
- traceTagsTip:
- "只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。",
- logTagsTip:
- "只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。",
- alarmTagsTip:
- "只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。",
+ traceTagsTip: "只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。",
+ logTagsTip: "只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。",
+ alarmTagsTip: "只有core/default/searchableTracesTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。",
tagsLink: "配置词汇页",
addTag: "请添加标签",
logCategory: "日志类别",
@@ -310,8 +307,7 @@ const msg = {
contentType: "内容类型",
content: "内容",
viewLogs: "查看日志",
- logsTagsTip:
- "只有core/default/searchableLogsTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。",
+ logsTagsTip: "只有core/default/searchableLogsTags中定义的标记才可搜索。查看配置词汇表页面上的更多详细信息。",
keywordsOfContentLogTips: "SkyWalking OAP服务器的当前存储不支持此操作",
setEvent: "设置事件",
viewAttributes: "查看",
diff --git a/src/router/index.ts b/src/router/index.ts
index cd32c322..f86f4aaf 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -21,12 +21,7 @@ import { routesSetting } from "./setting";
import { routesAlarm } from "./alarm";
import routesLayers from "./layer";
-const routes: Array = [
- ...routesLayers,
- ...routesDashboard,
- ...routesAlarm,
- ...routesSetting,
-];
+const routes: Array = [...routesLayers, ...routesDashboard, ...routesAlarm, ...routesSetting];
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts
index f10e3bf5..f55853df 100644
--- a/src/store/modules/app.ts
+++ b/src/store/modules/app.ts
@@ -92,8 +92,7 @@ export const appStore = defineStore({
this.duration.start.getMonth());
break;
}
- const utcSpace =
- (this.utcHour + new Date().getTimezoneOffset() / 60) * 3600000 + this.utcMin * 60000;
+ const utcSpace = (this.utcHour + new Date().getTimezoneOffset() / 60) * 3600000 + this.utcMin * 60000;
const startUnix: number = this.duration.start.getTime();
const endUnix: number = this.duration.end.getTime();
const timeIntervals: number[] = [];
diff --git a/src/store/modules/event.ts b/src/store/modules/event.ts
index 6660a29d..5b2c097e 100644
--- a/src/store/modules/event.ts
+++ b/src/store/modules/event.ts
@@ -45,9 +45,7 @@ export const eventStore = defineStore({
this.condition = data;
},
async getInstances() {
- const serviceId = useSelectorStore().currentService
- ? useSelectorStore().currentService.id
- : "";
+ const serviceId = useSelectorStore().currentService ? useSelectorStore().currentService.id : "";
const res: AxiosResponse = await graphql.query("queryInstances").params({
serviceId,
duration: useAppStoreWithOut().durationTime,
@@ -56,15 +54,11 @@ export const eventStore = defineStore({
if (res.data.errors) {
return res.data;
}
- this.instances = [{ value: "", label: "All" }, ...res.data.data.pods] || [
- { value: "", label: "All" },
- ];
+ this.instances = [{ value: "", label: "All" }, ...res.data.data.pods] || [{ value: "", label: "All" }];
return res.data;
},
async getEndpoints() {
- const serviceId = useSelectorStore().currentService
- ? useSelectorStore().currentService.id
- : "";
+ const serviceId = useSelectorStore().currentService ? useSelectorStore().currentService.id : "";
if (!serviceId) {
return;
}
@@ -76,9 +70,7 @@ export const eventStore = defineStore({
if (res.data.errors) {
return res.data;
}
- this.endpoints = [{ value: "", label: "All" }, ...res.data.data.pods] || [
- { value: "", label: "All" },
- ];
+ this.endpoints = [{ value: "", label: "All" }, ...res.data.data.pods] || [{ value: "", label: "All" }];
return res.data;
},
async getEvents() {
diff --git a/src/store/modules/log.ts b/src/store/modules/log.ts
index cbce4125..3509084b 100644
--- a/src/store/modules/log.ts
+++ b/src/store/modules/log.ts
@@ -71,9 +71,7 @@ export const logStore = defineStore({
return res.data;
},
async getInstances(id: string) {
- const serviceId = this.selectorStore.currentService
- ? this.selectorStore.currentService.id
- : id;
+ const serviceId = this.selectorStore.currentService ? this.selectorStore.currentService.id : id;
const res: AxiosResponse = await graphql.query("queryInstances").params({
serviceId,
duration: useAppStoreWithOut().durationTime,
@@ -82,15 +80,11 @@ export const logStore = defineStore({
if (res.data.errors) {
return res.data;
}
- this.instances = [{ value: "0", label: "All" }, ...res.data.data.pods] || [
- { value: " 0", label: "All" },
- ];
+ this.instances = [{ value: "0", label: "All" }, ...res.data.data.pods] || [{ value: " 0", label: "All" }];
return res.data;
},
async getEndpoints(id: string, keyword?: string) {
- const serviceId = this.selectorStore.currentService
- ? this.selectorStore.currentService.id
- : id;
+ const serviceId = this.selectorStore.currentService ? this.selectorStore.currentService.id : id;
const res: AxiosResponse = await graphql.query("queryEndpoints").params({
serviceId,
duration: useAppStoreWithOut().durationTime,
@@ -99,9 +93,7 @@ export const logStore = defineStore({
if (res.data.errors) {
return res.data;
}
- this.endpoints = [{ value: "0", label: "All" }, ...res.data.data.pods] || [
- { value: "0", label: "All" },
- ];
+ this.endpoints = [{ value: "0", label: "All" }, ...res.data.data.pods] || [{ value: "0", label: "All" }];
return res.data;
},
async getLogsByKeywords() {
@@ -123,9 +115,7 @@ export const logStore = defineStore({
},
async getServiceLogs() {
this.loadLogs = true;
- const res: AxiosResponse = await graphql
- .query("queryServiceLogs")
- .params({ condition: this.conditions });
+ const res: AxiosResponse = await graphql.query("queryServiceLogs").params({ condition: this.conditions });
this.loadLogs = false;
if (res.data.errors) {
return res.data;
@@ -136,9 +126,7 @@ export const logStore = defineStore({
},
async getBrowserLogs() {
this.loadLogs = true;
- const res: AxiosResponse = await graphql
- .query("queryBrowserErrorLogs")
- .params({ condition: this.conditions });
+ const res: AxiosResponse = await graphql.query("queryBrowserErrorLogs").params({ condition: this.conditions });
this.loadLogs = false;
if (res.data.errors) {
diff --git a/src/store/modules/selectors.ts b/src/store/modules/selectors.ts
index 25fb2831..ae836099 100644
--- a/src/store/modules/selectors.ts
+++ b/src/store/modules/selectors.ts
@@ -90,10 +90,7 @@ export const selectorStore = defineStore({
}
return res.data;
},
- async getServiceInstances(param?: {
- serviceId: string;
- isRelation: boolean;
- }): Promise> {
+ async getServiceInstances(param?: { serviceId: string; isRelation: boolean }): Promise> {
const serviceId = param ? param.serviceId : this.currentService?.id;
if (!serviceId) {
return null;
@@ -111,10 +108,7 @@ export const selectorStore = defineStore({
}
return res.data;
},
- async getProcesses(param?: {
- instanceId: string;
- isRelation: boolean;
- }): Promise> {
+ async getProcesses(param?: { instanceId: string; isRelation: boolean }): Promise> {
const instanceId = param ? param.instanceId : this.currentPod?.id;
if (!instanceId) {
return null;
diff --git a/src/types/global.d.ts b/src/types/global.d.ts
index 1b6e5b5f..eb18a953 100644
--- a/src/types/global.d.ts
+++ b/src/types/global.d.ts
@@ -110,7 +110,5 @@ declare global {
}
declare module "vue" {
- export type JSXComponent =
- | { new (): ComponentPublicInstance }
- | FunctionalComponent;
+ export type JSXComponent = { new (): ComponentPublicInstance } | FunctionalComponent;
}
diff --git a/src/utils/dateFormat.ts b/src/utils/dateFormat.ts
index 5335ff5e..7347f19b 100644
--- a/src/utils/dateFormat.ts
+++ b/src/utils/dateFormat.ts
@@ -97,5 +97,4 @@ export const dateFormatTime = (date: Date, step: string): string => {
return "";
};
-export const dateFormat = (date: number, pattern = "YYYY-MM-DD HH:mm:ss") =>
- dayjs(new Date(date)).format(pattern);
+export const dateFormat = (date: number, pattern = "YYYY-MM-DD HH:mm:ss") => dayjs(new Date(date)).format(pattern);
diff --git a/src/views/Layer.vue b/src/views/Layer.vue
index 7fad678a..a8260375 100644
--- a/src/views/Layer.vue
+++ b/src/views/Layer.vue
@@ -41,9 +41,7 @@ limitations under the License. -->
await dashboardStore.setDashboards();
const item = dashboardStore.dashboards.find(
(d: { name: string; isRoot: boolean; layer: string; entity: string }) =>
- d.layer === dashboardStore.layerId &&
- [EntityType[0].value, EntityType[1].value].includes(d.entity) &&
- d.isRoot,
+ d.layer === dashboardStore.layerId && [EntityType[0].value, EntityType[1].value].includes(d.entity) && d.isRoot,
);
if (!item) {
appStore.setPageTitle(dashboardStore.layer);
diff --git a/src/views/Settings.vue b/src/views/Settings.vue
index 32af66e9..0ff46106 100644
--- a/src/views/Settings.vue
+++ b/src/views/Settings.vue
@@ -30,24 +30,10 @@ limitations under the License. -->
UTC
{{ utcHour >= 0 ? "+" : "" }}
-
+
:
{{ utcMin > 9 || utcMin === 0 ? null : 0 }}
-
+
diff --git a/src/views/alarm/Content.vue b/src/views/alarm/Content.vue
index dfaaa4cf..a107a399 100644
--- a/src/views/alarm/Content.vue
+++ b/src/views/alarm/Content.vue
@@ -58,20 +58,12 @@ limitations under the License. -->
-
+
{{ t(i.text) }}
-
+
{{ dateFormat(event[d.class]) }}
@@ -97,9 +89,7 @@ limitations under the License. -->
{{ t(eventKey.text) }}
-
- {{ d.key }}={{ d.value }};
-
+ {{ d.key }}={{ d.value }};
{{ dateFormat(currentEvent[eventKey.class]) }}
diff --git a/src/views/alarm/Header.vue b/src/views/alarm/Header.vue
index 56404b8a..8c006914 100644
--- a/src/views/alarm/Header.vue
+++ b/src/views/alarm/Header.vue
@@ -28,12 +28,7 @@ limitations under the License. -->
{{ t("searchKeyword") }}:
-
+
-
refreshAlarms({ pageNum: 1, tagsMap: data.tagsMap })"
- />
+ refreshAlarms({ pageNum: 1, tagsMap: data.tagsMap })" />