diff --git a/src/constants/data.ts b/src/constants/data.ts index 4aa4f82a..5a8bf137 100644 --- a/src/constants/data.ts +++ b/src/constants/data.ts @@ -23,6 +23,7 @@ export enum TimeType { export const Languages = [ { label: "English", value: "en" }, { label: "Chinese", value: "zh" }, + { label: "Spanish", value: "es" }, ]; export const RoutesMap: { [key: string]: string } = { diff --git a/src/graphql/fragments/alarm.ts b/src/graphql/fragments/alarm.ts index bf4421e8..49d1bbb5 100644 --- a/src/graphql/fragments/alarm.ts +++ b/src/graphql/fragments/alarm.ts @@ -45,6 +45,5 @@ export const Alarm = { endTime } } - total }`, }; diff --git a/src/graphql/fragments/ebpf.ts b/src/graphql/fragments/ebpf.ts index 7479b623..920065d4 100644 --- a/src/graphql/fragments/ebpf.ts +++ b/src/graphql/fragments/ebpf.ts @@ -75,9 +75,9 @@ export const queryEBPFSchedules = { export const analysisEBPFResult = { variable: - "$scheduleIdList: [ID!]!, $timeRanges: [EBPFProfilingAnalyzeTimeRange!]!", + "$scheduleIdList: [ID!]!, $timeRanges: [EBPFProfilingAnalyzeTimeRange!]!, $aggregateType: EBPFProfilingAnalyzeAggregateType", query: ` - analysisEBPFResult: analysisEBPFProfilingResult(scheduleIdList: $scheduleIdList, timeRanges: $timeRanges) { + analysisEBPFResult: analysisEBPFProfilingResult(scheduleIdList: $scheduleIdList, timeRanges: $timeRanges, aggregateType: $aggregateType) { tip trees { elements { diff --git a/src/graphql/fragments/event.ts b/src/graphql/fragments/event.ts index 00d5bb09..49262e45 100644 --- a/src/graphql/fragments/event.ts +++ b/src/graphql/fragments/event.ts @@ -35,6 +35,5 @@ export const FetchEvents = { startTime endTime } - total }`, }; diff --git a/src/graphql/fragments/log.ts b/src/graphql/fragments/log.ts index 78738d8e..e348668f 100644 --- a/src/graphql/fragments/log.ts +++ b/src/graphql/fragments/log.ts @@ -30,7 +30,6 @@ export const QueryBrowserErrorLogs = { stack grade } - total }`, }; @@ -54,7 +53,6 @@ export const QueryServiceLogs = { value } } - total }`, }; diff --git a/src/graphql/fragments/trace.ts b/src/graphql/fragments/trace.ts index 04f718e0..e1e0af9b 100644 --- a/src/graphql/fragments/trace.ts +++ b/src/graphql/fragments/trace.ts @@ -27,7 +27,6 @@ export const Traces = { isError traceIds } - total }`, }; diff --git a/src/layout/components/SideBar.vue b/src/layout/components/SideBar.vue index 278f8172..34ad6852 100644 --- a/src/layout/components/SideBar.vue +++ b/src/layout/components/SideBar.vue @@ -41,7 +41,7 @@ limitations under the License. --> - + {{ t(menu.meta.title) }} @@ -57,7 +57,7 @@ limitations under the License. --> :to="m.path" :exact="m.meta.exact || false" > - {{ t(m.meta.title) }} + {{ t(m.meta.title) }} @@ -82,7 +82,7 @@ limitations under the License. --> :to="menu.children[0].path" :exact="menu.meta.exact" > - {{ t(menu.meta.title) }} + {{ t(menu.meta.title) }} @@ -208,4 +208,11 @@ span.collapse { width: 100%; height: 60px; } + +.title { + display: inline-block; + max-width: 110px; + text-overflow: ellipsis; + overflow: hidden; +} diff --git a/src/locales/index.ts b/src/locales/index.ts index 4480c941..9d161104 100644 --- a/src/locales/index.ts +++ b/src/locales/index.ts @@ -17,10 +17,12 @@ import { createI18n } from "vue-i18n"; import zh from "./lang/zh"; import en from "./lang/en"; +import es from "./lang/es"; const messages = { en, zh, + es, }; const savedLanguage = window.localStorage.getItem("language"); diff --git a/src/locales/lang/en.ts b/src/locales/lang/en.ts index 6e3041e0..7f55d4a0 100644 --- a/src/locales/lang/en.ts +++ b/src/locales/lang/en.ts @@ -136,6 +136,7 @@ const msg = { targetType: "Target Type", ebpfTip: "Don't have a process for profiling", processSelect: "Click to select processes", + page: "Page", hourTip: "Select Hour", minuteTip: "Select Minute", secondTip: "Select Second", diff --git a/src/locales/lang/es.ts b/src/locales/lang/es.ts new file mode 100644 index 00000000..40ef1fda --- /dev/null +++ b/src/locales/lang/es.ts @@ -0,0 +1,333 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +const msg = { + general: "Servicio General", + services: "Servicios", + service: "Servicio", + traces: "Trazas", + metrics: "Métricas", + serviceMesh: "Malla de Servicios", + infrastructure: "Infraestructura", + virtualMachine: "Máquina Virtual", + dashboardNew: "Nuevo Panel", + dashboardList: "Listado Paneles", + logs: "Logs", + events: "Eventos", + alerts: "Alertas", + settings: "Ajustes", + dashboards: "Paneles", + profiles: "Perfiles", + database: "Base de Datos", + serviceName: "Nombre Servicio", + technologies: "Tecnologías", + generalServicePanel: "Panel Servicio General", + health: "Salud", + groupName: "Nombre Grupo", + topologies: "Topologías", + dataPanel: "Plano de Datos", + controlPanel: "Plano de Control", + eventList: "Listado Eventos", + newDashboard: "Crear panel nuevo", + dashboardEdit: "Editar el panel", + edit: "Editar", + delete: "Eliminar", + confirm: "Confirmar", + layer: "Capa", + endpoint: "Endpoint", + instance: "Instancia", + create: "Crear", + loading: "Cargando", + selectVisualization: "Visualiza tus métricas", + visualization: "Visualizaciones", + graphStyles: "Estilo de gráficas", + widgetOptions: "Opciones widget", + standardOptions: "Opciones estandar", + max: "Máx", + min: "Mín", + plus: "Más", + minus: "Menoss", + multiply: "Multiplcar", + divide: "Dividir", + convertToMilliseconds: "Convertir Unix Timestamp(milisegundos)", + convertToSeconds: "Convertir Unix Timestamp(segundos)", + smooth: "Suabe", + showSymbol: "Mostrar Símbolo", + step: "Paso", + showValues: "Mostrar Valores", + fontSize: "Tamaño Fuente", + showBackground: "Mostrar Fondo", + areaOpacity: "Opacidad Área", + 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", + 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", + endpointDashboard: "Nombre del panel relacionado con endpoints", + callSettings: "Ajustes Llamada", + nodeSettings: "Ajustes Nodo", + conditions: "Condiciones", + legendSettings: "Ajustes Leyenda", + setLegend: "Poner Leyenda", + backgroundColors: "Colores Fondo", + fontColors: "Colores Fuente", + iconTheme: "Tema Iconos", + default: "Por Defecto", + topSlow: "Top 5 lentos", + topChildren: "Top 5 hijos", + taskList: "Listado Tareas", + sampledTraces: "Trazas Muestreadas", + editTab: "Habilitar edición nombre pestanyas", + label: "Nombre Servicio", + id: "ID Servicio", + setRoot: "Ponerlo a raíz", + setNormal: "Ponerlo a normal", + export: "Exportar Plantilla Panel", + import: "Importar Plantilla Panel", + yes: "Sí", + no: "No", + tableHeaderCol1: "Nombre de la primera columna de la tabla", + tableHeaderCol2: "Nombre de la segunda columna de la tabla", + showXAxis: "Mostrar Eje X", + showYAxis: "Mostrar Eje Y", + nameError: "El nombre del panel no puede ser duplicado", + showGroup: "Mostrar Grupo", + noRoot: "Por favor ponga la raíz del panel", + noWidget: "Por favor añada widgets.", + rename: "Renombrar", + deleteTitle: "¿Está seguro que quiere eliminarlo?", + rootTitle: "¿Está seguro que quiere establecerlo?", + selfObservability: "Autoobservabilidad", + satellite: "Satéllite", + skyWalkingServer: "Servidor SkyWalking", + functions: "Funciones", + browser: "Navegador", + linux: "Linux", + editWarning: "Estás entrando en modo edición", + viewWarning: "Estás entrando en modo visualización", + virtualDatabase: "Base de Datos Virtual", + reloadDashboards: "Recargar Panel", + kubernetesService: "Servicio", + kubernetesCluster: "Cluster", + kubernetes: "Kubernetes", + textUrl: "Hipervínculo de Texto", + textAlign: "Alineación de Texto", + metricLabel: "Etiqueta de Métrica", + showUnit: "Mostrar Unidad", + noGraph: "Ningún Gráfico", + taskId: "ID Tarea", + triggerType: "Tipo de Disparador", + targetType: "Tipo de Objetivo", + ebpfTip: "Le falta el proceso para perfilar", + processSelect: "Click para seleccionar proceso", + page: "Página", + hourTip: "Seleccione Hora", + minuteTip: "Seleccione Minuto", + secondTip: "Seleccione Segundo", + second: "s", + yearSuffix: "Año", + monthsHead: "Ene_Feb_Mar_Abr_May_Jun_Jul_Ago_Set_Oct_Nov_Dic", + months: "Ene_Feb_Mar_Abr_May_Jun_Jul_Ago_Set_Oct_Nov_Dic", + weeks: "Lun_Mar_Mier_Jue_Vie_Sáb_Dom", + hello: "Hola", + helloMessage: "Bienvenido de vuelta, Apache SkyWalking APM System !", + username: "Usuario", + password: "Contraseña", + title: "Título", + width: "Ancho", + height: "Alto", + dashboard: "Panel", + topology: "Topología", + trace: "Traza", + alarm: "Alarmas", + auto: "Auto", + reload: "Recargar", + version: "Versión", + copy: "Copiar", + reset: "Resetear", + apply: "Aplicar", + template: "Plantilla", + cancel: "Cancelar", + createTab: "Crear Pestanya", + tabName: "Nombre de la Pestaña", + detectPoint: "Detectar Punto", + name: "Nombre", + types: "Tipos", + all: "Todo", + endpoints: "Endpoints", + cache: "Cache", + serviceinstance: "InstanciaServicio", + databaseaccess: "AccesoBaseDeDatos", + servicerelation: "RelaciónServicio", + serviceinstancerelation: "RelaciónInstanciaServicio", + endpointrelation: "RelaciónEndpoint", + status: "Estado", + endpointName: "Nombre Endpoint", + search: "Buscar", + clear: "Limpiar", + more: "Más", + traceID: "ID Traza", + range: "Rango", + timeRange: "Rango de Tiempo", + duration: "Duración", + startTime: "Hora Inicio", + start: "Incio", + spans: "Lapso", + spanInfo: "Info Lapso", + spanType: "Tipo de Lapso", + time: "Tiempo", + tags: "Etiquetas", + component: "Componente", + table: "Tabla", + list: "Lista", + tree: "Árbol", + filterScope: "Alcance de Filtro", + searchKeyword: "Palabra Clave", + quarterHourCutTip: "Últimos 15 mins", + halfHourCutTip: "Últimos 30 mins", + hourCutTip: "Última 1 hora", + dayCutTip: "Último 1 día", + weekCutTip: "Última 1 semana", + monthCutTip: "Última 1 mes", + serverZone: "Zona Horaria Servidor OAP", + exportImage: "Exportar imagen", + object: "Objecto", + profile: "Perfil", + newTask: "Nueva Tarea", + monitorTime: "Tiempo Monitorización", + monitorDuration: "Duración Monitorización", + minThreshold: "Mínn Umbral Duración", + dumpPeriod: "Volcar Periodo", + createTask: "Crear Tarea", + maxSamplingCount: "Máx Cantidad Mostreo", + analyze: "Analizar", + noData: "Ningún Dato", + taskInfo: "Información Tarea", + task: "Tarea", + operationType: "Tipo Operación", + operationTime: "Tiempo Operación", + taskView: "Ver Tarea", + includeChildren: "Incluir Hijos", + excludeChildren: "Excluir Hijos", + view: "Ver", + timeTips: "Intervalo de tiempo no puede excedir 60 dias", + entityType: "Tipo Entidad", + maxItemNum: "Máx número artículos", + unknownMetrics: "Métrica desconocida", + labels: "Etiquetas", + aggregation: "Cálculo", + unit: "Unidad", + labelsIndex: "Subíndice Etiqueta", + group: "Grupo Servicio", + browserView: "Navegador", + sortOrder: "Orden de clasificación", + chartType: "Tipo Gráfico", + currentDepth: "Profundidad actual", + showDepth: "Mostrar Selector Profundidad", + defaultDepth: "Profundidad Por Defecto", + traceTagsTip: `Solamente etiquetas definidas en core/default/searchableTracesTags pueden ser buscadas. + Más información en la página de Vocabulario de Configuración`, + logTagsTip: `Solamente etiquetas definidas en core/default/searchableLogsTags pueden ser buscadas. + Más información en la página de Vocabulario de Configuración`, + alarmTagsTip: `Solamente etiquetas definidas en core/default/searchableAlarmTags pueden ser buscadas. + Más información en la página de Vocabulario de Configuración`, + tagsLink: "Página de Vocabulario de Configuración", + addTag: "Por favor introduzca una etiqueta", + log: "Registro de Datos", + logCategory: "Categoría Registro de Datos", + errorCatalog: "Catálogo de Errores", + logDetail: "Detalle Registro de Datos", + timeReload: "Aviso: El intervalo de tiempo tiene que ser mayor que 0", + errorInfo: "Info Error", + stack: "Pila", + serviceVersion: "Versión Servicio", + errorPage: "Página de Error", + category: "Categoría", + grade: "Grado", + relatedTraceLogs: "Registro de Datos Relacionados", + setConditions: "Más Condiciones", + metricName: "Seleccionar Nombre Métrica", + keywordsOfContent: "Claves de Contenido", + excludingKeywordsOfContent: "Excluir Claves de Contenido", + return: "Volver", + isError: "Error", + contentType: "Tipo de Contenido", + content: "Contenido", + 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.", + setEvent: "Establecer Evento", + viewAttributes: "Ver", + serviceEvents: "Eventos Servico", + select: "Seleccionar", + eventID: "ID Evento", + eventName: "Nombre Evento", + endTime: "Hora Finalización", + instanceEvents: "Eventos Instancia", + endpointEvents: "Eventos Endpoint", + enableEvents: "Habilitar Eventos", + disableEvents: "Deshabilitar Eventos", + eventSeries: "Serie de Eventos", + eventsType: "Tipo de Evento", + eventsMessage: "Mensaje del Evento", + eventsParameters: "Parámetro del Evento", + eventDetail: "Detalle del Evento", + value: "Valor", + show: "Mostrar", + hide: "Oculatr", + statistics: "Estadísticas", + message: "Mensaje", + tooltipsContent: "Contenido de Información de Herramienta", + alarmDetail: "Detalle Alarma", + scope: "Alcance", + destService: "Servicio Destinación", + destServiceInstance: "Instancia Servicio Destinación", + destEndpoint: "Endpoint Destinación", + eventSource: "Fuente Envento", + modalTitle: "Inspección", + 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", + traceContext: "Registro de datos con contexto de traza", + traceSegmentId: "ID Segmento Traza", + spanId: "ID Lapso", + inputTraceSegmentId: "Por favor introduzca el ID del segmento de la traza", + inputSpanId: "Por favor introduzca el ID del lapso", + inputTraceId: "Por favor introduzca el ID de la traza", + dsl: "Entrada de guión para LAL", + logContentType: "Tipo del registro de datos", + logRespContent: "Contenido Registro de Datos", + analysis: "Análisis", + waitLoading: "Cargando", + dslEmpty: "Entrada de guión de LAL no puede estar vacio", + logContentEmpty: "El contenido del registro de datos no puede estar vacio.", + debug: "Debugar", + 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).", + conditionNotice: + "Aviso: Por favor presione Intro después de introducir una clave de contenido, excluir clave de contenido(clave=valor).", + language: "Lenguaje", +}; +export default msg; diff --git a/src/locales/lang/zh.ts b/src/locales/lang/zh.ts index a2d9ecd5..88af9d13 100644 --- a/src/locales/lang/zh.ts +++ b/src/locales/lang/zh.ts @@ -134,6 +134,7 @@ const msg = { targetType: "目标类型", processSelect: "点击选择进程", ebpfTip: "没有进程可以分析", + page: "页面", hourTip: "选择小时", minuteTip: "选择分钟", secondTip: "选择秒数", diff --git a/src/store/modules/ebpf.ts b/src/store/modules/ebpf.ts index 2e8cf124..f43c649f 100644 --- a/src/store/modules/ebpf.ts +++ b/src/store/modules/ebpf.ts @@ -22,7 +22,6 @@ import { EBPFTaskList, AnalyzationTrees, } from "@/types/ebpf"; -import { Trace, Span } from "@/types/trace"; import { store } from "@/store"; import graphql from "@/graphql"; import { AxiosResponse } from "axios"; @@ -35,6 +34,7 @@ interface EbpfStore { labels: Option[]; couldProfiling: boolean; tip: string; + selectedTask: Recordable; } export const ebpfStore = defineStore({ @@ -47,14 +47,18 @@ export const ebpfStore = defineStore({ labels: [{ value: "", label: "" }], couldProfiling: false, tip: "", + selectedTask: {}, }), actions: { - setCurrentSpan(span: Span) { - this.currentSpan = span; + setSelectedTask(task: EBPFTaskList) { + this.selectedTask = task; }, - setCurrentSchedule(s: Trace) { + setCurrentSchedule(s: EBPFProfilingSchedule) { this.currentSchedule = s; }, + setAnalyzeTrees(tree: AnalyzationTrees[]) { + this.analyzeTrees = tree; + }, async getCreateTaskData(serviceId: string) { const res: AxiosResponse = await graphql .query("getCreateTaskData") @@ -93,7 +97,7 @@ export const ebpfStore = defineStore({ if (res.data.errors) { return res.data; } - this.taskList = res.data.data.queryEBPFTasks.reverse() || []; + this.taskList = res.data.data.queryEBPFTasks || []; if (!this.taskList.length) { return res.data; } @@ -118,13 +122,14 @@ export const ebpfStore = defineStore({ this.eBPFSchedules = eBPFSchedules; if (!eBPFSchedules.length) { this.eBPFSchedules = []; + this.analyzeTrees = []; } - this.analyzeTrees = []; return res.data; }, async getEBPFAnalyze(params: { scheduleIdList: string[]; timeRanges: Array<{ start: number; end: number }>; + aggregateType: string; }) { if (!params.scheduleIdList.length) { return new Promise((resolve) => resolve({})); diff --git a/src/store/modules/event.ts b/src/store/modules/event.ts index 8adce8f5..01b6788a 100644 --- a/src/store/modules/event.ts +++ b/src/store/modules/event.ts @@ -25,7 +25,6 @@ import { useAppStoreWithOut } from "@/store/modules/app"; interface eventState { loading: boolean; events: Event[]; - total: number; services: Service[]; instances: Instance[]; endpoints: Endpoint[]; @@ -37,12 +36,11 @@ export const eventStore = defineStore({ state: (): eventState => ({ loading: false, events: [], - total: 0, services: [{ value: "", label: "All" }], instances: [{ value: "", label: "All" }], endpoints: [{ value: "", label: "All" }], condition: { - paging: { pageNum: 1, pageSize: 15, needTotal: true }, + paging: { pageNum: 1, pageSize: 15 }, }, }), actions: { @@ -117,7 +115,6 @@ export const eventStore = defineStore({ return item; } ); - this.total = res.data.data.fetchEvents.total; } return res.data; }, diff --git a/src/store/modules/log.ts b/src/store/modules/log.ts index a92981cc..ce1674d1 100644 --- a/src/store/modules/log.ts +++ b/src/store/modules/log.ts @@ -31,7 +31,6 @@ interface LogState { selectorStore: any; supportQueryLogsByKeywords: boolean; logs: any[]; - logsTotal: number; loadLogs: boolean; } @@ -43,12 +42,11 @@ export const logStore = defineStore({ endpoints: [{ value: "0", label: "All" }], conditions: { queryDuration: useAppStoreWithOut().durationTime, - paging: { pageNum: 1, pageSize: 15, needTotal: true }, + paging: { pageNum: 1, pageSize: 15 }, }, supportQueryLogsByKeywords: true, selectorStore: useSelectorStore(), logs: [], - logsTotal: 0, loadLogs: false, }), actions: { @@ -131,7 +129,6 @@ export const logStore = defineStore({ } this.logs = res.data.data.queryLogs.logs; - this.logsTotal = res.data.data.queryLogs.total; return res.data; }, async getBrowserLogs() { @@ -145,7 +142,6 @@ export const logStore = defineStore({ return res.data; } this.logs = res.data.data.queryBrowserErrorLogs.logs; - this.logsTotal = res.data.data.queryBrowserErrorLogs.total; return res.data; }, async getLogTagKeys() { diff --git a/src/store/modules/trace.ts b/src/store/modules/trace.ts index 25eacc6d..4e337351 100644 --- a/src/store/modules/trace.ts +++ b/src/store/modules/trace.ts @@ -28,12 +28,10 @@ interface TraceState { instances: Instance[]; endpoints: Endpoint[]; traceList: Trace[]; - traceTotal: number; traceSpans: Span[]; currentTrace: Trace | any; conditions: any; traceSpanLogs: any[]; - traceSpanLogsTotal: number; selectorStore: any; } @@ -45,16 +43,14 @@ export const traceStore = defineStore({ endpoints: [{ value: "0", label: "All" }], traceList: [], traceSpans: [], - traceTotal: 0, currentTrace: {}, conditions: { queryDuration: useAppStoreWithOut().durationTime, traceState: "ALL", queryOrder: "BY_START_TIME", - paging: { pageNum: 1, pageSize: 15, needTotal: true }, + paging: { pageNum: 1, pageSize: 20 }, }, traceSpanLogs: [], - traceSpanLogsTotal: 0, selectorStore: useSelectorStore(), }), actions: { @@ -115,7 +111,6 @@ export const traceStore = defineStore({ return res.data; } if (!res.data.data.data.traces.length) { - this.traceTotal = 0; this.traceList = []; this.setCurrentTrace({}); this.setTraceSpans([]); @@ -128,7 +123,6 @@ export const traceStore = defineStore({ }); return d; }); - this.traceTotal = res.data.data.data.total; this.setCurrentTrace(res.data.data.data.traces[0] || {}); return res.data; }, @@ -148,11 +142,9 @@ export const traceStore = defineStore({ .params(params); if (res.data.errors) { this.traceSpanLogs = []; - this.traceSpanLogsTotal = 0; return res.data; } this.traceSpanLogs = res.data.data.queryLogs.logs || []; - this.traceSpanLogsTotal = res.data.data.queryLogs.total; return res.data; }, async getTagKeys() { diff --git a/src/views/Settings.vue b/src/views/Settings.vue index 5e06286b..056c83e6 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -194,10 +194,11 @@ const setUTCMin = () => { } .label { - width: 160px; + width: 180px; display: inline-block; font-weight: 500; color: #000; + line-height: 25px; } } diff --git a/src/views/alarm/Header.vue b/src/views/alarm/Header.vue index 3b9bb4ca..15e9be6e 100644 --- a/src/views/alarm/Header.vue +++ b/src/views/alarm/Header.vue @@ -39,8 +39,8 @@ limitations under the License. --> @@ -235,7 +260,7 @@ watch( } .inputs { - width: 300px; + width: 350px; } .input-with-search { @@ -246,4 +271,12 @@ watch( .pagination { margin-top: 10px; } + +.selector { + width: 120px; +} + +.duration { + line-height: 30px; +} diff --git a/src/views/dashboard/related/ebpf/components/EBPFStack.vue b/src/views/dashboard/related/ebpf/components/EBPFStack.vue index a363b19f..adccea90 100644 --- a/src/views/dashboard/related/ebpf/components/EBPFStack.vue +++ b/src/views/dashboard/related/ebpf/components/EBPFStack.vue @@ -68,12 +68,13 @@ function drawGraph() { root.value = param[0]; root.dumpCount = param[1]; stackTree.value = root; - const w = (graph.value && graph.value.getBoundingClientRect().width) || 10; + const width = (graph.value && graph.value.getBoundingClientRect().width) || 0; + const w = width < 800 ? 802 : width; flameChart.value = flamegraph() .width(w - 15) .cellHeight(18) .transitionDuration(750) - .minFrameSize(5) + .minFrameSize(1) .transitionEase(d3.easeCubic as any) .sort(true) .title("") diff --git a/src/views/dashboard/related/ebpf/components/NewTask.vue b/src/views/dashboard/related/ebpf/components/NewTask.vue index f5d2597b..5313e33c 100644 --- a/src/views/dashboard/related/ebpf/components/NewTask.vue +++ b/src/views/dashboard/related/ebpf/components/NewTask.vue @@ -86,6 +86,7 @@ import { useSelectorStore } from "@/store/modules/selectors"; import { useAppStoreWithOut } from "@/store/modules/app"; import { ElMessage } from "element-plus"; import { InitTaskField, TargetTypes } from "./data"; + /* global defineEmits */ const emits = defineEmits(["close"]); const eBPFStore = useEbpfStore(); @@ -97,6 +98,7 @@ const type = ref(TargetTypes[0].value); const monitorTime = ref(InitTaskField.monitorTimeEn[0].value); const monitorDuration = ref(10); const time = ref(appStore.durationRow.start); +const disabled = ref(false); function changeMonitorTime(opt: string) { monitorTime.value = opt; @@ -111,19 +113,24 @@ function changeType(opt: any[]) { } async function createTask() { + if (disabled.value) { + return; + } + disabled.value = true; const date = monitorTime.value === "0" ? new Date() : time.value; const params = { serviceId: selectorStore.currentService.id, processLabels: labels.value, startTime: date.getTime(), duration: monitorDuration.value * 60, - targetType: "ON_CPU", + targetType: type.value, }; const res = await eBPFStore.createTask(params); if (res.errors) { ElMessage.error(res.errors); return; } + disabled.value = false; if (!res.data.createTaskData.status) { ElMessage.error(res.data.createTaskData.errorReason); return; diff --git a/src/views/dashboard/related/ebpf/components/TaskList.vue b/src/views/dashboard/related/ebpf/components/TaskList.vue index 65c93ce5..82427b88 100644 --- a/src/views/dashboard/related/ebpf/components/TaskList.vue +++ b/src/views/dashboard/related/ebpf/components/TaskList.vue @@ -34,7 +34,15 @@ limitations under the License. --> }" >
- {{ i.processLabels.join(" ") }} + + {{ + i.targetType + + ": " + + (i.processLabels.length + ? i.processLabels.join(" ") + : `All Processes`) + }} + @@ -74,7 +82,9 @@ limitations under the License. -->
{{ t("labels") }}: - {{ selectedTask.processLabels }} + + {{ selectedTask.processLabels.join(";") }} +
{{ t("monitorTime") }}: @@ -117,6 +127,7 @@ const viewDetail = ref(false); async function changeTask(item: EBPFTaskList) { selectedTask.value = item; + ebpfStore.setSelectedTask(item); const res = await ebpfStore.getEBPFSchedules({ taskId: item.taskId, }); @@ -128,6 +139,7 @@ watch( () => ebpfStore.taskList, () => { selectedTask.value = ebpfStore.taskList[0] || {}; + ebpfStore.setSelectedTask(selectedTask.value); } ); diff --git a/src/views/dashboard/related/ebpf/components/data.ts b/src/views/dashboard/related/ebpf/components/data.ts index a538897c..1ebc5f4c 100644 --- a/src/views/dashboard/related/ebpf/components/data.ts +++ b/src/views/dashboard/related/ebpf/components/data.ts @@ -28,7 +28,15 @@ export const NewTaskField = { maxSamplingCount: { key: 5, label: "5" }, }; -export const TargetTypes = [{ label: "ON_CPU", value: "ON_CPU" }]; +export const TargetTypes = [ + { label: "ON_CPU", value: "ON_CPU" }, + { label: "OFF_CPU", value: "OFF_CPU" }, +]; + +export const AggregateTypes = [ + { label: "Count", value: "COUNT" }, + { label: "Duration", value: "DURATION" }, +]; export const InitTaskField = { monitorTimeEn: [ diff --git a/src/views/dashboard/related/log/Header.vue b/src/views/dashboard/related/log/Header.vue index b03c84e9..fdafdb34 100644 --- a/src/views/dashboard/related/log/Header.vue +++ b/src/views/dashboard/related/log/Header.vue @@ -37,9 +37,9 @@ limitations under the License. --> />
- {{ isBrowser ? t("page") : t("endpoint") }}: + + {{ isBrowser ? t("page") : t("endpoint") }}: + @@ -35,7 +37,7 @@ limitations under the License. -->