-
{{
- i
- }}
+
{{ i }}
{{ j.i }}
v-for="(i, j) in local.months"
@click="
is($event) &&
- ((state.showMonths = state.m === 'M'),
- (state.month = j),
- state.m === 'M' && ok('m'))
+ ((state.showMonths = state.m === 'M'), (state.month = j), state.m === 'M' && ok('m'))
"
:class="[
- status(
- state.year,
- j,
- state.day,
- state.hour,
- state.minute,
- state.second,
- 'YYYYMM'
- ),
+ status(state.year, j, state.day, state.hour, state.minute, state.second, 'YYYYMM'),
]"
:key="j"
>{{ i }}
v-for="(i, j) in years"
@click="
is($event) &&
- ((state.showYears = state.m === 'Y'),
- (state.year = i),
- state.m === 'Y' && ok('y'))
+ ((state.showYears = state.m === 'Y'), (state.year = i), state.m === 'Y' && ok('y'))
"
:class="[
j === 0 || j === 11 ? `${state.pre}-date-out` : '',
- status(
- i,
- state.month,
- state.day,
- state.hour,
- state.minute,
- state.second,
- 'YYYY'
- ),
+ status(i, state.month, state.day, state.hour, state.minute, state.second, 'YYYY'),
]"
:key="j"
>{{ i }}
diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts
index 6681cd97..dbcc3d86 100644
--- a/src/locales/lang/en.ts
+++ b/src/locales/lang/en.ts
@@ -176,10 +176,8 @@ const msg = {
toTheRight: "To The Right",
legendValues: "Legend Values",
minDuration: "Minimal Request Duration",
- when4xx:
- "Sample HTTP requests and responses with tracing when response code between 400 and 499",
- when5xx:
- "Sample HTTP requests and responses with tracing when response code between 500 and 599",
+ when4xx: "Sample HTTP requests and responses with tracing when response code between 400 and 499",
+ when5xx: "Sample HTTP requests and responses with tracing when response code between 500 and 599",
taskTitle: "HTTP request and response collecting rules",
seconds: "Seconds",
hourTip: "Select Hour",
@@ -315,8 +313,7 @@ const msg = {
viewLogs: "View Logs",
logsTagsTip: `Only tags defined in the core/default/searchableLogsTags are searchable.
Check more details on the Configuration Vocabulary page`,
- keywordsOfContentLogTips:
- "Current storage of SkyWalking OAP server does not support this.",
+ keywordsOfContentLogTips: "Current storage of SkyWalking OAP server does not support this.",
setEvent: "Set Event",
viewAttributes: "View",
serviceEvents: "Service Events",
diff --git a/src/locales/lang/es.ts b/src/locales/lang/es.ts
index d6ef9bf6..42848cf7 100644
--- a/src/locales/lang/es.ts
+++ b/src/locales/lang/es.ts
@@ -77,10 +77,8 @@ const msg = {
editGraph: "Editar Opciones",
dashboardName: "Selecciona Nombre del Panel",
linkDashboard: "Nombre del panel relacionado con llamadas de la topología",
- linkServerMetrics:
- "Métricas de servidor relacionadas con llamadas de la topología",
- linkClientMetrics:
- "Métricas de cliente relacionadas con llamadas de la topología",
+ linkServerMetrics: "Métricas de servidor relacionadas con llamadas de la topología",
+ linkClientMetrics: "Métricas de cliente relacionadas con llamadas de la topología",
nodeDashboard: "Nombre del panel relacionado con nodos de la topología",
nodeMetrics: "Mêtricas relacionas con nodos de la topología",
instanceDashboard: "Nombre del panel relacionado con instancias de servicio",
@@ -315,8 +313,7 @@ const msg = {
viewLogs: "Ver Registro de Datos",
logsTagsTip: `Solamente etiquetas definidas en core/default/searchableLogsTags pueden ser buscadas.
Más información en la página de Vocabulario de Configuración`,
- keywordsOfContentLogTips:
- "El almacenamiento actual del servidor SkyWalking OAP no lo soporta.",
+ keywordsOfContentLogTips: "El almacenamiento actual del servidor SkyWalking OAP no lo soporta.",
setEvent: "Establecer Evento",
viewAttributes: "Ver",
serviceEvents: "Eventos Servico",
@@ -347,8 +344,7 @@ const msg = {
destEndpoint: "Endpoint Destinación",
eventSource: "Fuente Envento",
modalTitle: "Inspección",
- selectRedirectPage:
- "Quiere inspeccionar las Trazas or Registros de datos del servicio %s?",
+ selectRedirectPage: "Quiere inspeccionar las Trazas or Registros de datos del servicio %s?",
logAnalysis: "Lenguaje de Análisis de Registro de Datos",
logDataBody: "Contenido del Registro de Datos",
addType: "Por favor introduzca un tipo",
@@ -369,10 +365,8 @@ const msg = {
addTraceID: "Por favor introduzca el ID de la traza",
addTags: "Por favor introduzaca una etiqueta",
addKeywordsOfContent: "Por favor introduzca una clave de contenido",
- addExcludingKeywordsOfContent:
- "Por favor introduzca una clave excluyente de contenido",
- noticeTag:
- "Por favor presione Intro después de introducir una etiqueta(clave=valor).",
+ addExcludingKeywordsOfContent: "Por favor introduzca una clave excluyente de contenido",
+ noticeTag: "Por favor presione Intro después de introducir una etiqueta(clave=valor).",
conditionNotice:
"Aviso: Por favor presione Intro después de introducir una clave de contenido, excluir clave de contenido(clave=valor).",
language: "Lenguaje",
diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts
index 32252d93..a39382d1 100644
--- a/src/locales/lang/zh.ts
+++ b/src/locales/lang/zh.ts
@@ -368,8 +368,7 @@ const msg = {
addKeywordsOfContent: "请输入一个内容关键词",
addExcludingKeywordsOfContent: "请输入一个内容不包含的关键词",
noticeTag: "请输入一个标签(key=value)之后回车",
- conditionNotice:
- "请输入一个内容关键词或者内容不包含的关键词(key=value)之后回车",
+ conditionNotice: "请输入一个内容关键词或者内容不包含的关键词(key=value)之后回车",
language: "语言",
gateway: "网关",
virtualMQ: "虚拟消息队列",
diff --git a/src/router/alarm.ts b/src/router/alarm.ts
index 088b6eea..24101dd4 100644
--- a/src/router/alarm.ts
+++ b/src/router/alarm.ts
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { RouteRecordRaw } from "vue-router";
+import type { RouteRecordRaw } from "vue-router";
import Layout from "@/layout/Index.vue";
export const routesAlarm: Array
= [
diff --git a/src/router/dashboard.ts b/src/router/dashboard.ts
index 7b136642..4c7b558c 100644
--- a/src/router/dashboard.ts
+++ b/src/router/dashboard.ts
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { RouteRecordRaw } from "vue-router";
+import type { RouteRecordRaw } from "vue-router";
import Layout from "@/layout/Index.vue";
export const routesDashboard: Array = [
@@ -88,8 +88,7 @@ export const routesDashboard: Array = [
},
{
path: "",
- redirect:
- "/dashboard/related/:layerId/:entity/:serviceId/:destServiceId/:name",
+ redirect: "/dashboard/related/:layerId/:entity/:serviceId/:destServiceId/:name",
component: () => import("@/views/dashboard/Edit.vue"),
name: "ViewServiceRelation",
meta: {
@@ -131,8 +130,7 @@ export const routesDashboard: Array = [
},
{
path: "",
- redirect:
- "/dashboard/:layerId/:entity/:serviceId/:podId/:destServiceId/:destPodId/:name",
+ redirect: "/dashboard/:layerId/:entity/:serviceId/:podId/:destServiceId/:destPodId/:name",
component: () => import("@/views/dashboard/Edit.vue"),
name: "PodRelation",
meta: {
diff --git a/src/router/index.ts b/src/router/index.ts
index fe7f9e2b..cd32c322 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -14,7 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
+import type { RouteRecordRaw } from "vue-router";
+import { createRouter, createWebHistory } from "vue-router";
import { routesDashboard } from "./dashboard";
import { routesSetting } from "./setting";
import { routesAlarm } from "./alarm";
diff --git a/src/router/setting.ts b/src/router/setting.ts
index 50cb1fef..9ad4d455 100644
--- a/src/router/setting.ts
+++ b/src/router/setting.ts
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { RouteRecordRaw } from "vue-router";
+import type { RouteRecordRaw } from "vue-router";
import Layout from "@/layout/Index.vue";
export const routesSetting: Array = [
diff --git a/src/store/modules/alarm.ts b/src/store/modules/alarm.ts
index fbf18aaa..4550a96b 100644
--- a/src/store/modules/alarm.ts
+++ b/src/store/modules/alarm.ts
@@ -17,8 +17,8 @@
import { defineStore } from "pinia";
import { store } from "@/store";
import graphql from "@/graphql";
-import { AxiosResponse } from "axios";
-import { Alarm } from "@/types/alarm";
+import type { AxiosResponse } from "axios";
+import type { Alarm } from "@/types/alarm";
interface AlarmState {
loading: boolean;
@@ -35,9 +35,7 @@ export const alarmStore = defineStore({
}),
actions: {
async getAlarms(params: any) {
- const res: AxiosResponse = await graphql
- .query("queryAlarms")
- .params(params);
+ const res: AxiosResponse = await graphql.query("queryAlarms").params(params);
if (res.data.errors) {
return res.data;
}
diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts
index 3e17052f..f10e3bf5 100644
--- a/src/store/modules/app.ts
+++ b/src/store/modules/app.ts
@@ -17,9 +17,9 @@
import { defineStore } from "pinia";
import { store } from "@/store";
import graphql from "@/graphql";
-import { Duration, DurationTime } from "@/types/app";
+import type { Duration, DurationTime } from "@/types/app";
import getLocalTime from "@/utils/localtime";
-import { AxiosResponse } from "axios";
+import type { AxiosResponse } from "axios";
import dateFormatStep, { dateFormatTime } from "@/utils/dateFormat";
import { TimeType } from "@/constants/data";
/*global Nullable*/
@@ -93,8 +93,7 @@ export const appStore = defineStore({
break;
}
const utcSpace =
- (this.utcHour + new Date().getTimezoneOffset() / 60) * 3600000 +
- this.utcMin * 60000;
+ (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[] = [];
@@ -157,13 +156,11 @@ export const appStore = defineStore({
this.eventStack.forEach((event: any) => {
setTimeout(event(), 0);
}),
- 500
+ 500,
);
},
async queryOAPTimeInfo() {
- const res: AxiosResponse = await graphql
- .query("queryOAPTimeInfo")
- .params({});
+ const res: AxiosResponse = await graphql.query("queryOAPTimeInfo").params({});
if (res.data.errors) {
this.utc = -(new Date().getTimezoneOffset() / 60) + ":0";
} else {
@@ -176,9 +173,7 @@ export const appStore = defineStore({
return res.data;
},
async fetchVersion(): Promise {
- const res: AxiosResponse = await graphql
- .query("queryOAPVersion")
- .params({});
+ const res: AxiosResponse = await graphql.query("queryOAPVersion").params({});
if (res.data.errors) {
return res.data;
}
diff --git a/src/store/modules/dashboard.ts b/src/store/modules/dashboard.ts
index bad5e8ef..6f9bf525 100644
--- a/src/store/modules/dashboard.ts
+++ b/src/store/modules/dashboard.ts
@@ -16,13 +16,13 @@
*/
import { defineStore } from "pinia";
import { store } from "@/store";
-import { LayoutConfig } from "@/types/dashboard";
+import type { LayoutConfig } from "@/types/dashboard";
import graphql from "@/graphql";
import query from "@/graphql/fetch";
-import { DashboardItem } from "@/types/dashboard";
+import type { DashboardItem } from "@/types/dashboard";
import { useSelectorStore } from "@/store/modules/selectors";
import { NewControl, TextConfig, TimeRangeConfig } from "../data";
-import { AxiosResponse } from "axios";
+import type { AxiosResponse } from "axios";
import { ElMessage } from "element-plus";
import { useI18n } from "vue-i18n";
import { EntityType } from "@/views/dashboard/data";
@@ -106,23 +106,10 @@ export const dashboardStore = defineStore({
newItem.graph = {
showDepth: true,
depth:
- this.entity === EntityType[1].value
- ? 1
- : this.entity === EntityType[0].value
- ? 2
- : 3,
+ this.entity === EntityType[1].value ? 1 : this.entity === EntityType[0].value ? 2 : 3,
};
}
- if (
- [
- "Trace",
- "Profile",
- "Log",
- "DemandLog",
- "Ebpf",
- "NetworkProfiling",
- ].includes(type)
- ) {
+ if (["Trace", "Profile", "Log", "DemandLog", "Ebpf", "NetworkProfiling"].includes(type)) {
newItem.h = 36;
}
if (type === "Text") {
@@ -156,9 +143,7 @@ export const dashboardStore = defineStore({
},
addTabControls(type: string) {
const activedGridItem = this.activedGridItem.split("-")[0];
- const idx = this.layout.findIndex(
- (d: LayoutConfig) => d.i === activedGridItem
- );
+ const idx = this.layout.findIndex((d: LayoutConfig) => d.i === activedGridItem);
if (idx < 0) {
return;
}
@@ -184,16 +169,7 @@ export const dashboardStore = defineStore({
showDepth: true,
};
}
- if (
- [
- "Trace",
- "Profile",
- "Log",
- "DemandLog",
- "Ebpf",
- "NetworkProfiling",
- ].includes(type)
- ) {
+ if (["Trace", "Profile", "Log", "DemandLog", "Ebpf", "NetworkProfiling"].includes(type)) {
newItem.h = 32;
}
if (type === "Text") {
@@ -238,18 +214,14 @@ export const dashboardStore = defineStore({
},
removeControls(item: LayoutConfig) {
const actived = this.activedGridItem.split("-");
- const index = this.layout.findIndex(
- (d: LayoutConfig) => actived[0] === d.i
- );
+ const index = this.layout.findIndex((d: LayoutConfig) => actived[0] === d.i);
if (this.selectedGrid && this.selectedGrid.i === item.i) {
this.selectedGrid = null;
}
if (actived.length === 3) {
const tabIndex = Number(actived[1]);
- this.currentTabItems = this.currentTabItems.filter(
- (d: LayoutConfig) => actived[2] !== d.i
- );
+ this.currentTabItems = this.currentTabItems.filter((d: LayoutConfig) => actived[2] !== d.i);
this.layout[index].children[tabIndex].children = this.currentTabItems;
return;
}
@@ -285,21 +257,18 @@ export const dashboardStore = defineStore({
},
setConfigs(param: { [key: string]: unknown }) {
const actived = this.activedGridItem.split("-");
- const index = this.layout.findIndex(
- (d: LayoutConfig) => actived[0] === d.i
- );
+ const index = this.layout.findIndex((d: LayoutConfig) => actived[0] === d.i);
if (actived.length === 3) {
const tabIndex = Number(actived[1]);
- const itemIndex = this.layout[index].children[
- tabIndex
- ].children.findIndex((d: LayoutConfig) => actived[2] === d.i);
+ const itemIndex = this.layout[index].children[tabIndex].children.findIndex(
+ (d: LayoutConfig) => actived[2] === d.i,
+ );
this.layout[index].children[tabIndex].children[itemIndex] = {
...this.layout[index].children[tabIndex].children[itemIndex],
...param,
};
- this.selectedGrid =
- this.layout[index].children[tabIndex].children[itemIndex];
+ this.selectedGrid = this.layout[index].children[tabIndex].children[itemIndex];
this.setCurrentTabItems(this.layout[index].children[tabIndex].children);
return;
}
@@ -332,23 +301,16 @@ export const dashboardStore = defineStore({
}
},
async fetchMetricType(item: string) {
- const res: AxiosResponse = await graphql
- .query("queryTypeOfMetrics")
- .params({ name: item });
+ const res: AxiosResponse = await graphql.query("queryTypeOfMetrics").params({ name: item });
return res.data;
},
async fetchMetricList(regex: string) {
- const res: AxiosResponse = await graphql
- .query("queryMetrics")
- .params({ regex });
+ const res: AxiosResponse = await graphql.query("queryMetrics").params({ regex });
return res.data;
},
- async fetchMetricValue(param: {
- queryStr: string;
- conditions: { [key: string]: unknown };
- }) {
+ async fetchMetricValue(param: { queryStr: string; conditions: { [key: string]: unknown } }) {
const res: AxiosResponse = await query(param);
return res.data;
},
@@ -371,10 +333,7 @@ export const dashboardStore = defineStore({
name: c.name,
isRoot: c.isRoot,
});
- sessionStorage.setItem(
- key,
- JSON.stringify({ id: t.id, configuration: c })
- );
+ sessionStorage.setItem(key, JSON.stringify({ id: t.id, configuration: c }));
}
list = list.sort((a, b) => {
const nameA = a.name.toUpperCase();
@@ -399,9 +358,7 @@ export const dashboardStore = defineStore({
return;
}
}
- this.dashboards = JSON.parse(
- sessionStorage.getItem("dashboards") || "[]"
- );
+ this.dashboards = JSON.parse(sessionStorage.getItem("dashboards") || "[]");
},
async resetTemplates() {
const res = await this.fetchTemplates();
@@ -410,9 +367,7 @@ export const dashboardStore = defineStore({
ElMessage.error(res.errors);
return;
}
- this.dashboards = JSON.parse(
- sessionStorage.getItem("dashboards") || "[]"
- );
+ this.dashboards = JSON.parse(sessionStorage.getItem("dashboards") || "[]");
},
async updateDashboard(setting: { id: string; configuration: string }) {
const res: AxiosResponse = await graphql.query("updateTemplate").params({
@@ -454,7 +409,7 @@ export const dashboardStore = defineStore({
(d: DashboardItem) =>
d.name === this.currentDashboard.name &&
d.entity === this.currentDashboard.entity &&
- d.layer === this.currentDashboard.layerId
+ d.layer === this.currentDashboard.layerId,
);
if (index > -1) {
const { t } = useI18n();
@@ -487,7 +442,7 @@ export const dashboardStore = defineStore({
if (this.currentDashboard.id) {
sessionStorage.removeItem(key);
this.dashboards = this.dashboards.filter(
- (d: DashboardItem) => d.id !== this.currentDashboard.id
+ (d: DashboardItem) => d.id !== this.currentDashboard.id,
);
}
this.dashboards.push(this.currentDashboard);
@@ -511,9 +466,7 @@ export const dashboardStore = defineStore({
ElMessage.error(json.message);
return res.data;
}
- this.dashboards = this.dashboards.filter(
- (d: any) => d.id !== this.currentDashboard.id
- );
+ this.dashboards = this.dashboards.filter((d: any) => d.id !== this.currentDashboard.id);
const key = [
this.currentDashboard.layer,
this.currentDashboard.entity,
diff --git a/src/store/modules/demand-log.ts b/src/store/modules/demand-log.ts
index 3aa37ac7..14d04b6b 100644
--- a/src/store/modules/demand-log.ts
+++ b/src/store/modules/demand-log.ts
@@ -15,13 +15,13 @@
* limitations under the License.
*/
import { defineStore } from "pinia";
-import { Instance } from "@/types/selector";
+import type { Instance } from "@/types/selector";
import { store } from "@/store";
import graphql from "@/graphql";
-import { AxiosResponse } from "axios";
+import type { AxiosResponse } from "axios";
import { useAppStoreWithOut } from "@/store/modules/app";
import { useSelectorStore } from "@/store/modules/selectors";
-import { Conditions, Log } from "@/types/demand-log";
+import type { Conditions, Log } from "@/types/demand-log";
interface DemandLogState {
containers: Instance[];
@@ -75,16 +75,12 @@ export const demandLogStore = defineStore({
},
async getContainers(serviceInstanceId: string) {
if (!serviceInstanceId) {
- return new Promise((resolve) =>
- resolve({ errors: "No service instance" })
- );
+ return new Promise((resolve) => resolve({ errors: "No service instance" }));
}
const condition = {
serviceInstanceId,
};
- const res: AxiosResponse = await graphql
- .query("fetchContainers")
- .params({ condition });
+ const res: AxiosResponse = await graphql.query("fetchContainers").params({ condition });
if (res.data.errors) {
return res.data;
@@ -112,9 +108,7 @@ export const demandLogStore = defineStore({
return res.data;
}
this.total = res.data.data.logs.logs.length;
- const logs = res.data.data.logs.logs
- .map((d: Log) => d.content)
- .join("\n");
+ const logs = res.data.data.logs.logs.map((d: Log) => d.content).join("\n");
this.setLogs(logs);
return res.data;
},
diff --git a/src/store/modules/ebpf.ts b/src/store/modules/ebpf.ts
index e77e5706..f025e4b0 100644
--- a/src/store/modules/ebpf.ts
+++ b/src/store/modules/ebpf.ts
@@ -15,8 +15,8 @@
* limitations under the License.
*/
import { defineStore } from "pinia";
-import { Option } from "@/types/app";
-import {
+import type { Option } from "@/types/app";
+import type {
EBPFTaskCreationRequest,
EBPFProfilingSchedule,
EBPFTaskList,
@@ -24,7 +24,7 @@ import {
} from "@/types/ebpf";
import { store } from "@/store";
import graphql from "@/graphql";
-import { AxiosResponse } from "axios";
+import type { AxiosResponse } from "axios";
interface EbpfState {
taskList: EBPFTaskList[];
eBPFSchedules: EBPFProfilingSchedule[];
@@ -61,9 +61,7 @@ export const ebpfStore = defineStore({
this.analyzeTrees = tree;
},
async getCreateTaskData(serviceId: string) {
- const res: AxiosResponse = await graphql
- .query("getCreateTaskData")
- .params({ serviceId });
+ const res: AxiosResponse = await graphql.query("getCreateTaskData").params({ serviceId });
if (res.data.errors) {
return res.data;
@@ -76,9 +74,7 @@ export const ebpfStore = defineStore({
return res.data;
},
async createTask(param: EBPFTaskCreationRequest) {
- const res: AxiosResponse = await graphql
- .query("saveEBPFTask")
- .params({ request: param });
+ const res: AxiosResponse = await graphql.query("saveEBPFTask").params({ request: param });
if (res.data.errors) {
return res.data;
@@ -89,17 +85,11 @@ export const ebpfStore = defineStore({
});
return res.data;
},
- async getTaskList(params: {
- serviceId: string;
- serviceInstanceId: string;
- targets: string[];
- }) {
+ async getTaskList(params: { serviceId: string; serviceInstanceId: string; targets: string[] }) {
if (!params.serviceId) {
return new Promise((resolve) => resolve({}));
}
- const res: AxiosResponse = await graphql
- .query("getEBPFTasks")
- .params(params);
+ const res: AxiosResponse = await graphql.query("getEBPFTasks").params(params);
this.tip = "";
if (res.data.errors) {
@@ -118,9 +108,7 @@ export const ebpfStore = defineStore({
if (!params.taskId) {
return new Promise((resolve) => resolve({}));
}
- const res: AxiosResponse = await graphql
- .query("getEBPFSchedules")
- .params({ ...params });
+ const res: AxiosResponse = await graphql.query("getEBPFSchedules").params({ ...params });
if (res.data.errors) {
this.eBPFSchedules = [];
@@ -148,9 +136,7 @@ export const ebpfStore = defineStore({
if (!params.timeRanges.length) {
return new Promise((resolve) => resolve({}));
}
- const res: AxiosResponse = await graphql
- .query("getEBPFResult")
- .params(params);
+ const res: AxiosResponse = await graphql.query("getEBPFResult").params(params);
if (res.data.errors) {
this.analyzeTrees = [];
diff --git a/src/store/modules/event.ts b/src/store/modules/event.ts
index 82c8a829..6660a29d 100644
--- a/src/store/modules/event.ts
+++ b/src/store/modules/event.ts
@@ -17,9 +17,9 @@
import { defineStore } from "pinia";
import { store } from "@/store";
import graphql from "@/graphql";
-import { AxiosResponse } from "axios";
-import { Event, QueryEventCondition } from "@/types/events";
-import { Instance, Endpoint } from "@/types/selector";
+import type { AxiosResponse } from "axios";
+import type { Event, QueryEventCondition } from "@/types/events";
+import type { Instance, Endpoint } from "@/types/selector";
import { useAppStoreWithOut } from "@/store/modules/app";
import { useSelectorStore } from "@/store/modules/selectors";
@@ -94,22 +94,20 @@ export const eventStore = defineStore({
return res.data;
}
if (res.data.data.fetchEvents) {
- this.events = (res.data.data.fetchEvents.events || []).map(
- (item: Event) => {
- let scope = "Service";
- if (item.source.serviceInstance) {
- scope = "ServiceInstance";
- }
- if (item.source.endpoint) {
- scope = "Endpoint";
- }
- item.scope = scope;
- if (!item.endTime || item.endTime === item.startTime) {
- item.endTime = Number(item.startTime) + 60000;
- }
- return item;
+ this.events = (res.data.data.fetchEvents.events || []).map((item: Event) => {
+ let scope = "Service";
+ if (item.source.serviceInstance) {
+ scope = "ServiceInstance";
}
- );
+ if (item.source.endpoint) {
+ scope = "Endpoint";
+ }
+ item.scope = scope;
+ if (!item.endTime || item.endTime === item.startTime) {
+ item.endTime = Number(item.startTime) + 60000;
+ }
+ return item;
+ });
}
return res.data;
},
diff --git a/src/store/modules/log.ts b/src/store/modules/log.ts
index ea0c9c0f..cbce4125 100644
--- a/src/store/modules/log.ts
+++ b/src/store/modules/log.ts
@@ -15,10 +15,10 @@
* limitations under the License.
*/
import { defineStore } from "pinia";
-import { Instance, Endpoint, Service } from "@/types/selector";
+import type { Instance, Endpoint, Service } from "@/types/selector";
import { store } from "@/store";
import graphql from "@/graphql";
-import { AxiosResponse } from "axios";
+import type { AxiosResponse } from "axios";
import { useAppStoreWithOut } from "@/store/modules/app";
import { useSelectorStore } from "@/store/modules/selectors";
import { useDashboardStore } from "@/store/modules/dashboard";
@@ -82,10 +82,9 @@ 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) {
@@ -100,16 +99,13 @@ export const logStore = defineStore({
if (res.data.errors) {
return res.data;
}
- this.endpoints = [
+ this.endpoints = [{ value: "0", label: "All" }, ...res.data.data.pods] || [
{ value: "0", label: "All" },
- ...res.data.data.pods,
- ] || [{ value: "0", label: "All" }];
+ ];
return res.data;
},
async getLogsByKeywords() {
- const res: AxiosResponse = await graphql
- .query("queryLogsByKeywords")
- .params({});
+ const res: AxiosResponse = await graphql.query("queryLogsByKeywords").params({});
if (res.data.errors) {
return res.data;
diff --git a/src/store/modules/network-profiling.ts b/src/store/modules/network-profiling.ts
index 1e31feca..a799f748 100644
--- a/src/store/modules/network-profiling.ts
+++ b/src/store/modules/network-profiling.ts
@@ -15,12 +15,12 @@
* limitations under the License.
*/
import { defineStore } from "pinia";
-import { EBPFTaskList, ProcessNode } from "@/types/ebpf";
+import type { EBPFTaskList, ProcessNode } from "@/types/ebpf";
import { store } from "@/store";
import graphql from "@/graphql";
-import { AxiosResponse } from "axios";
-import { Call } from "@/types/topology";
-import { LayoutConfig } from "@/types/dashboard";
+import type { AxiosResponse } from "axios";
+import type { Call } from "@/types/topology";
+import type { LayoutConfig } from "@/types/dashboard";
import { ElMessage } from "element-plus";
interface NetworkProfilingState {
@@ -117,33 +117,25 @@ export const networkProfilingStore = defineStore({
when4xx: string;
when5xx: string;
minDuration: number;
- }[]
+ }[],
) {
- const res: AxiosResponse = await graphql
- .query("newNetworkProfiling")
- .params({
- request: {
- instanceId,
- samplings: params,
- },
- });
+ const res: AxiosResponse = await graphql.query("newNetworkProfiling").params({
+ request: {
+ instanceId,
+ samplings: params,
+ },
+ });
if (res.data.errors) {
return res.data;
}
return res.data;
},
- async getTaskList(params: {
- serviceId: string;
- serviceInstanceId: string;
- targets: string[];
- }) {
+ async getTaskList(params: { serviceId: string; serviceInstanceId: string; targets: string[] }) {
if (!params.serviceId) {
return new Promise((resolve) => resolve({}));
}
- const res: AxiosResponse = await graphql
- .query("getEBPFTasks")
- .params(params);
+ const res: AxiosResponse = await graphql.query("getEBPFTasks").params(params);
this.networkTip = "";
if (res.data.errors) {
@@ -162,9 +154,7 @@ export const networkProfilingStore = defineStore({
if (!taskId) {
return new Promise((resolve) => resolve({}));
}
- const res: AxiosResponse = await graphql
- .query("aliveNetworkProfiling")
- .params({ taskId });
+ const res: AxiosResponse = await graphql.query("aliveNetworkProfiling").params({ taskId });
this.aliveMessage = "";
if (res.data.errors) {
@@ -176,14 +166,9 @@ export const networkProfilingStore = defineStore({
}
return res.data;
},
- async getProcessTopology(params: {
- duration: any;
- serviceInstanceId: string;
- }) {
+ async getProcessTopology(params: { duration: any; serviceInstanceId: string }) {
this.loadNodes = true;
- const res: AxiosResponse = await graphql
- .query("getProcessTopology")
- .params(params);
+ const res: AxiosResponse = await graphql.query("getProcessTopology").params(params);
this.loadNodes = false;
if (res.data.errors) {
this.nodes = [];
diff --git a/src/store/modules/profile.ts b/src/store/modules/profile.ts
index 4f5d51c5..b1a3f241 100644
--- a/src/store/modules/profile.ts
+++ b/src/store/modules/profile.ts
@@ -15,18 +15,18 @@
* limitations under the License.
*/
import { defineStore } from "pinia";
-import { Endpoint } from "@/types/selector";
-import {
+import type { Endpoint } from "@/types/selector";
+import type {
TaskListItem,
SegmentSpan,
ProfileAnalyzationTrees,
TaskLog,
ProfileTaskCreationRequest,
} from "@/types/profile";
-import { Trace, Span } from "@/types/trace";
+import type { Trace, Span } from "@/types/trace";
import { store } from "@/store";
import graphql from "@/graphql";
-import { AxiosResponse } from "axios";
+import type { AxiosResponse } from "axios";
import { useAppStoreWithOut } from "@/store/modules/app";
interface ProfileState {
@@ -99,9 +99,7 @@ export const profileStore = defineStore({
return res.data;
},
async getTaskList() {
- const res: AxiosResponse = await graphql
- .query("getProfileTaskList")
- .params(this.condition);
+ const res: AxiosResponse = await graphql.query("getProfileTaskList").params(this.condition);
if (res.data.errors) {
return res.data;
@@ -122,9 +120,7 @@ export const profileStore = defineStore({
if (!params.taskID) {
return new Promise((resolve) => resolve({}));
}
- const res: AxiosResponse = await graphql
- .query("getProfileTaskSegmentList")
- .params(params);
+ const res: AxiosResponse = await graphql.query("getProfileTaskSegmentList").params(params);
if (res.data.errors) {
this.segmentList = [];
@@ -151,9 +147,7 @@ export const profileStore = defineStore({
if (!params.segmentId) {
return new Promise((resolve) => resolve({}));
}
- const res: AxiosResponse = await graphql
- .query("queryProfileSegment")
- .params(params);
+ const res: AxiosResponse = await graphql.query("queryProfileSegment").params(params);
if (res.data.errors) {
this.segmentSpans = [];
return res.data;
@@ -189,9 +183,7 @@ export const profileStore = defineStore({
if (!params.timeRanges.length) {
return new Promise((resolve) => resolve({}));
}
- const res: AxiosResponse = await graphql
- .query("getProfileAnalyze")
- .params(params);
+ const res: AxiosResponse = await graphql.query("getProfileAnalyze").params(params);
if (res.data.errors) {
this.analyzeTrees = [];
@@ -222,9 +214,7 @@ export const profileStore = defineStore({
return res.data;
},
async getTaskLogs(param: { taskID: string }) {
- const res: AxiosResponse = await graphql
- .query("getProfileTaskLogs")
- .params(param);
+ const res: AxiosResponse = await graphql.query("getProfileTaskLogs").params(param);
if (res.data.errors) {
return res.data;
diff --git a/src/store/modules/selectors.ts b/src/store/modules/selectors.ts
index 2e671d8e..25fb2831 100644
--- a/src/store/modules/selectors.ts
+++ b/src/store/modules/selectors.ts
@@ -15,10 +15,10 @@
* limitations under the License.
*/
import { defineStore } from "pinia";
-import { Service, Instance, Endpoint, Process } from "@/types/selector";
+import type { Service, Instance, Endpoint, Process } from "@/types/selector";
import { store } from "@/store";
import graphql from "@/graphql";
-import { AxiosResponse } from "axios";
+import type { AxiosResponse } from "axios";
import { useAppStoreWithOut } from "@/store/modules/app";
interface SelectorState {
services: Service[];
@@ -82,9 +82,7 @@ export const selectorStore = defineStore({
return res.data || {};
},
async fetchServices(layer: string): Promise {
- const res: AxiosResponse = await graphql
- .query("queryServices")
- .params({ layer });
+ const res: AxiosResponse = await graphql.query("queryServices").params({ layer });
if (!res.data.errors) {
this.services = res.data.data.services || [];
diff --git a/src/store/modules/topology.ts b/src/store/modules/topology.ts
index 8b2205e3..e2e2ef0d 100644
--- a/src/store/modules/topology.ts
+++ b/src/store/modules/topology.ts
@@ -16,12 +16,12 @@
*/
import { defineStore } from "pinia";
import { store } from "@/store";
-import { Service } from "@/types/selector";
-import { Node, Call } from "@/types/topology";
+import type { Service } from "@/types/selector";
+import type { Node, Call } from "@/types/topology";
import graphql from "@/graphql";
import { useSelectorStore } from "@/store/modules/selectors";
import { useAppStoreWithOut } from "@/store/modules/app";
-import { AxiosResponse } from "axios";
+import type { AxiosResponse } from "axios";
import query from "@/graphql/fetch";
import { useQueryTopologyMetrics } from "@/hooks/useMetricsProcessor";
import { ElMessage } from "element-plus";
@@ -139,9 +139,7 @@ export const topologyStore = defineStore({
if (depth > 3) {
const services = topo.nodes
.map((item: Node) => item.id)
- .filter(
- (d: string) => ![...ids, ...pods, ...serviceIds].includes(d)
- );
+ .filter((d: string) => ![...ids, ...pods, ...serviceIds].includes(d));
if (!services.length) {
const nodes = [...res.nodes, ...json.nodes, ...topo.nodes];
const calls = [...res.calls, ...json.calls, ...topo.calls];
@@ -152,23 +150,10 @@ export const topologyStore = defineStore({
if (depth > 4) {
const nodeIds = data.nodes
.map((item: Node) => item.id)
- .filter(
- (d: string) =>
- ![...services, ...ids, ...pods, ...serviceIds].includes(d)
- );
+ .filter((d: string) => ![...services, ...ids, ...pods, ...serviceIds].includes(d));
if (!nodeIds.length) {
- const nodes = [
- ...res.nodes,
- ...json.nodes,
- ...topo.nodes,
- ...data.nodes,
- ];
- const calls = [
- ...res.calls,
- ...json.calls,
- ...topo.calls,
- ...data.calls,
- ];
+ const nodes = [...res.nodes, ...json.nodes, ...topo.nodes, ...data.nodes];
+ const calls = [...res.calls, ...json.calls, ...topo.calls, ...data.calls];
this.setTopology({ nodes, calls });
return;
}
@@ -189,18 +174,8 @@ export const topologyStore = defineStore({
];
this.setTopology({ nodes, calls });
} else {
- const nodes = [
- ...res.nodes,
- ...json.nodes,
- ...topo.nodes,
- ...data.nodes,
- ];
- const calls = [
- ...res.calls,
- ...json.calls,
- ...topo.calls,
- ...data.calls,
- ];
+ const nodes = [...res.nodes, ...json.nodes, ...topo.nodes, ...data.nodes];
+ const calls = [...res.calls, ...json.calls, ...topo.calls, ...data.calls];
this.setTopology({ nodes, calls });
}
} else {
@@ -220,12 +195,10 @@ export const topologyStore = defineStore({
},
async getServicesTopology(serviceIds: string[]) {
const duration = useAppStoreWithOut().durationTime;
- const res: AxiosResponse = await graphql
- .query("getServicesTopology")
- .params({
- serviceIds,
- duration,
- });
+ const res: AxiosResponse = await graphql.query("getServicesTopology").params({
+ serviceIds,
+ duration,
+ });
if (res.data.errors) {
return res.data;
}
@@ -235,13 +208,11 @@ export const topologyStore = defineStore({
const serverServiceId = useSelectorStore().currentService.id;
const clientServiceId = useSelectorStore().currentDestService.id;
const duration = useAppStoreWithOut().durationTime;
- const res: AxiosResponse = await graphql
- .query("getInstanceTopology")
- .params({
- clientServiceId,
- serverServiceId,
- duration,
- });
+ const res: AxiosResponse = await graphql.query("getInstanceTopology").params({
+ clientServiceId,
+ serverServiceId,
+ duration,
+ });
if (!res.data.errors) {
this.setInstanceTopology(res.data.data.topology);
}
@@ -272,9 +243,7 @@ export const topologyStore = defineStore({
if (depth > 3) {
const endpoints = topo.nodes
.map((item: Node) => item.id)
- .filter(
- (d: string) => ![...ids, ...pods, ...endpointIds].includes(d)
- );
+ .filter((d: string) => ![...ids, ...pods, ...endpointIds].includes(d));
if (!endpoints.length) {
const nodes = [...res.nodes, ...json.nodes, ...topo.nodes];
const calls = [...res.calls, ...json.calls, ...topo.calls];
@@ -286,22 +255,11 @@ export const topologyStore = defineStore({
const nodeIds = data.nodes
.map((item: Node) => item.id)
.filter(
- (d: string) =>
- ![...endpoints, ...ids, ...pods, ...endpointIds].includes(d)
+ (d: string) => ![...endpoints, ...ids, ...pods, ...endpointIds].includes(d),
);
if (!nodeIds.length) {
- const nodes = [
- ...res.nodes,
- ...json.nodes,
- ...topo.nodes,
- ...data.nodes,
- ];
- const calls = [
- ...res.calls,
- ...json.calls,
- ...topo.calls,
- ...data.calls,
- ];
+ const nodes = [...res.nodes, ...json.nodes, ...topo.nodes, ...data.nodes];
+ const calls = [...res.calls, ...json.calls, ...topo.calls, ...data.calls];
this.setTopology({ nodes, calls });
return;
}
@@ -322,18 +280,8 @@ export const topologyStore = defineStore({
];
this.setTopology({ nodes, calls });
} else {
- const nodes = [
- ...res.nodes,
- ...json.nodes,
- ...topo.nodes,
- ...data.nodes,
- ];
- const calls = [
- ...res.calls,
- ...json.calls,
- ...topo.calls,
- ...data.calls,
- ];
+ const nodes = [...res.nodes, ...json.nodes, ...topo.nodes, ...data.nodes];
+ const calls = [...res.calls, ...json.calls, ...topo.calls, ...data.calls];
this.setTopology({ nodes, calls });
}
} else {
@@ -390,10 +338,7 @@ export const topologyStore = defineStore({
return { calls, nodes };
},
- async getNodeMetricValue(param: {
- queryStr: string;
- conditions: { [key: string]: unknown };
- }) {
+ async getNodeMetricValue(param: { queryStr: string; conditions: { [key: string]: unknown } }) {
const res: AxiosResponse = await query(param);
if (res.data.errors) {
@@ -454,10 +399,7 @@ export const topologyStore = defineStore({
ElMessage.error(res.errors);
}
},
- async getLegendMetrics(param: {
- queryStr: string;
- conditions: { [key: string]: unknown };
- }) {
+ async getLegendMetrics(param: { queryStr: string; conditions: { [key: string]: unknown } }) {
const res: AxiosResponse = await query(param);
if (res.data.errors) {
diff --git a/src/store/modules/trace.ts b/src/store/modules/trace.ts
index 640d10ad..63d33950 100644
--- a/src/store/modules/trace.ts
+++ b/src/store/modules/trace.ts
@@ -15,11 +15,11 @@
* limitations under the License.
*/
import { defineStore } from "pinia";
-import { Instance, Endpoint, Service } from "@/types/selector";
-import { Trace, Span } from "@/types/trace";
+import type { Instance, Endpoint, Service } from "@/types/selector";
+import type { Trace, Span } from "@/types/trace";
import { store } from "@/store";
import graphql from "@/graphql";
-import { AxiosResponse } from "axios";
+import type { AxiosResponse } from "axios";
import { useAppStoreWithOut } from "@/store/modules/app";
import { useSelectorStore } from "@/store/modules/selectors";
import { QueryOrders } from "@/views/dashboard/data";
@@ -169,9 +169,7 @@ export const traceStore = defineStore({
return res.data;
},
async getTraceSpans(params: { traceId: string }) {
- const res: AxiosResponse = await graphql
- .query("queryTrace")
- .params(params);
+ const res: AxiosResponse = await graphql.query("queryTrace").params(params);
if (res.data.errors) {
return res.data;
}
@@ -180,9 +178,7 @@ export const traceStore = defineStore({
return res.data;
},
async getSpanLogs(params: any) {
- const res: AxiosResponse = await graphql
- .query("queryServiceLogs")
- .params(params);
+ const res: AxiosResponse = await graphql.query("queryServiceLogs").params(params);
if (res.data.errors) {
this.traceSpanLogs = [];
return res.data;
diff --git a/src/types/dashboard.d.ts b/src/types/dashboard.d.ts
index a74d0819..b4c151ef 100644
--- a/src/types/dashboard.d.ts
+++ b/src/types/dashboard.d.ts
@@ -1,4 +1,3 @@
-import { DurationTime } from "@/types/app";
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
diff --git a/src/types/demand-log.ts b/src/types/demand-log.ts
index 44a24ab7..10bd8fd5 100644
--- a/src/types/demand-log.ts
+++ b/src/types/demand-log.ts
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { DurationTime } from "./app";
+import type { DurationTime } from "./app";
export interface Conditions {
container: string;
diff --git a/src/types/ebpf.d.ts b/src/types/ebpf.d.ts
index d46d0139..9a4e524a 100644
--- a/src/types/ebpf.d.ts
+++ b/src/types/ebpf.d.ts
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import { Process } from "./selector";
+import type { Process } from "./selector";
export interface EBPFTaskCreationRequest {
serviceId: string;
processLabels: string[];
diff --git a/src/types/index.d.ts b/src/types/index.d.ts
index 23de95bc..0f6148c0 100644
--- a/src/types/index.d.ts
+++ b/src/types/index.d.ts
@@ -38,7 +38,6 @@ declare interface ComponentElRef {
$el: T;
}
-declare type ComponentRef =
- ComponentElRef | null;
+declare type ComponentRef = ComponentElRef | null;
declare type ElRef = Nullable;
diff --git a/src/utils/dateFormat.ts b/src/utils/dateFormat.ts
index f9b597c7..5335ff5e 100644
--- a/src/utils/dateFormat.ts
+++ b/src/utils/dateFormat.ts
@@ -15,11 +15,7 @@
* limitations under the License.
*/
import dayjs from "dayjs";
-export default function dateFormatStep(
- date: Date,
- step: string,
- monthDayDiff?: boolean
-): string {
+export default function dateFormatStep(date: Date, step: string, monthDayDiff?: boolean): string {
const year = date.getFullYear();
const monthTemp = date.getMonth() + 1;
let month = `${monthTemp}`;
diff --git a/src/utils/event.ts b/src/utils/event.ts
index 4e5bf674..092b05e5 100644
--- a/src/utils/event.ts
+++ b/src/utils/event.ts
@@ -39,10 +39,7 @@ export function addResizeListener(element: any, fn: () => unknown): void {
export function removeResizeListener(element: any, fn: () => unknown): void {
if (!element || !element.__resizeListeners__) return;
- element.__resizeListeners__.splice(
- element.__resizeListeners__.indexOf(fn),
- 1
- );
+ element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
if (!element.__resizeListeners__.length) {
element.__ro__.disconnect();
}
diff --git a/src/utils/is.ts b/src/utils/is.ts
index 5f1be52f..c7521872 100644
--- a/src/utils/is.ts
+++ b/src/utils/is.ts
@@ -53,12 +53,7 @@ export function isNumber(val: unknown): val is number {
}
export function isPromise(val: unknown): val is Promise {
- return (
- is(val, "Promise") &&
- isObject(val) &&
- isFunction(val.then) &&
- isFunction(val.catch)
- );
+ return is(val, "Promise") && isObject(val) && isFunction(val.then) && isFunction(val.catch);
}
export function isString(val: unknown): val is string {
diff --git a/src/utils/timeFormat.ts b/src/utils/timeFormat.ts
index bb121891..cd6dda16 100644
--- a/src/utils/timeFormat.ts
+++ b/src/utils/timeFormat.ts
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { Duration } from "@/types/app";
+import type { Duration } from "@/types/app";
import { TimeType } from "@/constants/data";
const timeFormat = (time: Date[]): Duration => {
diff --git a/src/utils/vec2.ts b/src/utils/vec2.ts
index ceb32434..690bff74 100644
--- a/src/utils/vec2.ts
+++ b/src/utils/vec2.ts
@@ -17,11 +17,7 @@
class Vec2 extends Float32Array {
constructor(v?: unknown, y?: unknown) {
super(2);
- if (
- v instanceof Vec2 ||
- v instanceof Float32Array ||
- (v instanceof Array && v.length == 2)
- ) {
+ if (v instanceof Vec2 || v instanceof Float32Array || (v instanceof Array && v.length == 2)) {
this[0] = v[0];
this[1] = v[1];
} else if (typeof v === "number" && typeof y === "number") {
diff --git a/src/utils/vec3.ts b/src/utils/vec3.ts
index 55613d5d..3650fd06 100644
--- a/src/utils/vec3.ts
+++ b/src/utils/vec3.ts
@@ -17,19 +17,11 @@
class Vec3 extends Float32Array {
constructor(v?: unknown, y?: unknown, z?: unknown) {
super(3);
- if (
- v instanceof Vec3 ||
- v instanceof Float32Array ||
- (v instanceof Array && v.length == 3)
- ) {
+ if (v instanceof Vec3 || v instanceof Float32Array || (v instanceof Array && v.length == 3)) {
this[0] = v[0];
this[1] = v[1];
this[2] = v[2];
- } else if (
- typeof v === "number" &&
- typeof y === "number" &&
- typeof z === "number"
- ) {
+ } else if (typeof v === "number" && typeof y === "number" && typeof z === "number") {
this[0] = v;
this[1] = y;
this[2] = z;
@@ -158,17 +150,9 @@ class Vec3 extends Float32Array {
}
static norm(x: unknown, y: unknown, z: unknown): Vec3 {
const rtn = new Vec3();
- if (
- x instanceof Vec3 ||
- x instanceof Float32Array ||
- (x instanceof Array && x.length == 3)
- ) {
+ if (x instanceof Vec3 || x instanceof Float32Array || (x instanceof Array && x.length == 3)) {
rtn.copy(x);
- } else if (
- typeof x === "number" &&
- typeof y === "number" &&
- typeof z === "number"
- ) {
+ } else if (typeof x === "number" && typeof y === "number" && typeof z === "number") {
rtn.xyz(x, y, z);
}
return rtn.norm();
diff --git a/src/views/Alarm.vue b/src/views/Alarm.vue
index 88c00fe9..9fe35454 100644
--- a/src/views/Alarm.vue
+++ b/src/views/Alarm.vue
@@ -19,17 +19,17 @@ limitations under the License. -->
diff --git a/src/views/Event.vue b/src/views/Event.vue
index b308ce8c..c26b90a3 100644
--- a/src/views/Event.vue
+++ b/src/views/Event.vue
@@ -19,18 +19,18 @@ limitations under the License. -->