diff --git a/src/components/index.ts b/src/components/index.ts index 6417e237..8d8a5a96 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import type { App } from "vue"; import Icon from "./Icon.vue"; import TimePicker from "./TimePicker.vue"; import Selector from "./Selector.vue"; import Graph from "./Graph.vue"; import Radio from "./Radio.vue"; import SelectSingle from "./SelectSingle.vue"; -import type { App } from "vue"; import VueGridLayout from "vue-grid-layout"; const components: { [key: string]: any } = { diff --git a/src/main.ts b/src/main.ts index f9694ae6..9e737946 100644 --- a/src/main.ts +++ b/src/main.ts @@ -20,7 +20,7 @@ import router from "./router"; import { store } from "./store"; import components from "@/components"; import i18n from "./locales"; -import "./styles/index.scss"; +import "./styles/index.ts"; const app = createApp(App); diff --git a/src/store/modules/ebpf.ts b/src/store/modules/ebpf.ts index 2135cd56..b666e2ce 100644 --- a/src/store/modules/ebpf.ts +++ b/src/store/modules/ebpf.ts @@ -1,4 +1,3 @@ -import { TaskListItem } from "./../../types/profile.d"; /** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -17,11 +16,11 @@ import { TaskListItem } from "./../../types/profile.d"; */ import { defineStore } from "pinia"; import { Duration, Option } from "@/types/app"; -import { ProfileAnalyzationTrees } from "@/types/profile"; import { EBPFTaskCreationRequest, EBPFProfilingSchedule, EBPFTaskList, + AnalyzationTrees, } from "@/types/ebpf"; import { Trace, Span } from "@/types/trace"; import { store } from "@/store"; @@ -34,8 +33,7 @@ interface EbpfStore { taskList: EBPFTaskList[]; eBPFSchedules: EBPFProfilingSchedule[]; currentSchedule: EBPFProfilingSchedule | Record; - analyzeTrees: ProfileAnalyzationTrees; - highlightTop: boolean; + analyzeTrees: AnalyzationTrees[]; labels: Option[]; couldProfiling: boolean; tip: string; @@ -49,7 +47,6 @@ export const ebpfStore = defineStore({ eBPFSchedules: [], currentSchedule: {}, analyzeTrees: [], - highlightTop: true, labels: [{ value: "", label: "" }], couldProfiling: false, tip: "", @@ -61,9 +58,6 @@ export const ebpfStore = defineStore({ setCurrentSchedule(s: Trace) { this.currentSchedule = s; }, - setHighlightTop() { - this.highlightTop = !this.highlightTop; - }, async getCreateTaskData(serviceId: string) { const res: AxiosResponse = await graphql .query("getCreateTaskData") @@ -73,7 +67,7 @@ export const ebpfStore = defineStore({ return res.data; } const json = res.data.data.createTaskData; - this.couldProfiling = json.couldProfiling || []; + this.couldProfiling = json.couldProfiling || false; this.labels = json.processLabels.map((d: string) => { return { label: d, value: d }; }); diff --git a/src/styles/index.scss b/src/styles/index.ts similarity index 77% rename from src/styles/index.scss rename to src/styles/index.ts index ce0421bb..4f098aa6 100644 --- a/src/styles/index.scss +++ b/src/styles/index.ts @@ -14,6 +14,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@import "./grid.scss"; -@import "./lib.scss"; -@import "./reset.scss"; +import "element-plus/es/components/message/style/css"; +import "element-plus/es/components/message-box/style/css"; +import "element-plus/es/components/notification/style/css"; +import "./grid.scss"; +import "./lib.scss"; +import "./reset.scss"; diff --git a/src/types/ebpf.d.ts b/src/types/ebpf.d.ts index 0ec01212..7ca3febc 100644 --- a/src/types/ebpf.d.ts +++ b/src/types/ebpf.d.ts @@ -66,5 +66,11 @@ export type StackElement = { stackType: string; value: number; children?: StackElement[]; - instanceName: string; +}; +export type AnalyzationTrees = { + id: string; + parentId: string; + symbol: string; + dumpCount: number; + stackType: string; }; diff --git a/src/views/dashboard/List.vue b/src/views/dashboard/List.vue index 99f62b50..5224bd37 100644 --- a/src/views/dashboard/List.vue +++ b/src/views/dashboard/List.vue @@ -44,7 +44,7 @@ limitations under the License. --> :style="{ fontSize: '13px', width: '100%' }" v-loading="loading" ref="multipleTableRef" - :default-sort="{ prop: 'name' }" + :default-sort="{ prop: 'name', order: 'ascending' }" @selection-change="handleSelectionChange" height="637px" size="small" diff --git a/src/views/dashboard/related/ebpf/components/NewTask.vue b/src/views/dashboard/related/ebpf/components/NewTask.vue index 6a0283ef..b7913cf5 100644 --- a/src/views/dashboard/related/ebpf/components/NewTask.vue +++ b/src/views/dashboard/related/ebpf/components/NewTask.vue @@ -110,6 +110,10 @@ function changeType(opt: any[]) { } async function createTask() { + if (!labels.value.length) { + ElMessage.warning("no labels"); + return; + } const date = monitorTime.value === "0" ? appStore.durationRow.start : time.value; const params = {