mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-07-20 01:21:21 +00:00
update tasks
This commit is contained in:
parent
659429ca18
commit
fdafeffc89
@ -14,13 +14,13 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
import type { App } from "vue";
|
||||||
import Icon from "./Icon.vue";
|
import Icon from "./Icon.vue";
|
||||||
import TimePicker from "./TimePicker.vue";
|
import TimePicker from "./TimePicker.vue";
|
||||||
import Selector from "./Selector.vue";
|
import Selector from "./Selector.vue";
|
||||||
import Graph from "./Graph.vue";
|
import Graph from "./Graph.vue";
|
||||||
import Radio from "./Radio.vue";
|
import Radio from "./Radio.vue";
|
||||||
import SelectSingle from "./SelectSingle.vue";
|
import SelectSingle from "./SelectSingle.vue";
|
||||||
import type { App } from "vue";
|
|
||||||
import VueGridLayout from "vue-grid-layout";
|
import VueGridLayout from "vue-grid-layout";
|
||||||
|
|
||||||
const components: { [key: string]: any } = {
|
const components: { [key: string]: any } = {
|
||||||
|
@ -20,7 +20,7 @@ import router from "./router";
|
|||||||
import { store } from "./store";
|
import { store } from "./store";
|
||||||
import components from "@/components";
|
import components from "@/components";
|
||||||
import i18n from "./locales";
|
import i18n from "./locales";
|
||||||
import "./styles/index.scss";
|
import "./styles/index.ts";
|
||||||
|
|
||||||
const app = createApp(App);
|
const app = createApp(App);
|
||||||
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { TaskListItem } from "./../../types/profile.d";
|
|
||||||
/**
|
/**
|
||||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* contributor license agreements. See the NOTICE file distributed with
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
@ -17,11 +16,11 @@ import { TaskListItem } from "./../../types/profile.d";
|
|||||||
*/
|
*/
|
||||||
import { defineStore } from "pinia";
|
import { defineStore } from "pinia";
|
||||||
import { Duration, Option } from "@/types/app";
|
import { Duration, Option } from "@/types/app";
|
||||||
import { ProfileAnalyzationTrees } from "@/types/profile";
|
|
||||||
import {
|
import {
|
||||||
EBPFTaskCreationRequest,
|
EBPFTaskCreationRequest,
|
||||||
EBPFProfilingSchedule,
|
EBPFProfilingSchedule,
|
||||||
EBPFTaskList,
|
EBPFTaskList,
|
||||||
|
AnalyzationTrees,
|
||||||
} from "@/types/ebpf";
|
} from "@/types/ebpf";
|
||||||
import { Trace, Span } from "@/types/trace";
|
import { Trace, Span } from "@/types/trace";
|
||||||
import { store } from "@/store";
|
import { store } from "@/store";
|
||||||
@ -34,8 +33,7 @@ interface EbpfStore {
|
|||||||
taskList: EBPFTaskList[];
|
taskList: EBPFTaskList[];
|
||||||
eBPFSchedules: EBPFProfilingSchedule[];
|
eBPFSchedules: EBPFProfilingSchedule[];
|
||||||
currentSchedule: EBPFProfilingSchedule | Record<string, never>;
|
currentSchedule: EBPFProfilingSchedule | Record<string, never>;
|
||||||
analyzeTrees: ProfileAnalyzationTrees;
|
analyzeTrees: AnalyzationTrees[];
|
||||||
highlightTop: boolean;
|
|
||||||
labels: Option[];
|
labels: Option[];
|
||||||
couldProfiling: boolean;
|
couldProfiling: boolean;
|
||||||
tip: string;
|
tip: string;
|
||||||
@ -49,7 +47,6 @@ export const ebpfStore = defineStore({
|
|||||||
eBPFSchedules: [],
|
eBPFSchedules: [],
|
||||||
currentSchedule: {},
|
currentSchedule: {},
|
||||||
analyzeTrees: [],
|
analyzeTrees: [],
|
||||||
highlightTop: true,
|
|
||||||
labels: [{ value: "", label: "" }],
|
labels: [{ value: "", label: "" }],
|
||||||
couldProfiling: false,
|
couldProfiling: false,
|
||||||
tip: "",
|
tip: "",
|
||||||
@ -61,9 +58,6 @@ export const ebpfStore = defineStore({
|
|||||||
setCurrentSchedule(s: Trace) {
|
setCurrentSchedule(s: Trace) {
|
||||||
this.currentSchedule = s;
|
this.currentSchedule = s;
|
||||||
},
|
},
|
||||||
setHighlightTop() {
|
|
||||||
this.highlightTop = !this.highlightTop;
|
|
||||||
},
|
|
||||||
async getCreateTaskData(serviceId: string) {
|
async getCreateTaskData(serviceId: string) {
|
||||||
const res: AxiosResponse = await graphql
|
const res: AxiosResponse = await graphql
|
||||||
.query("getCreateTaskData")
|
.query("getCreateTaskData")
|
||||||
@ -73,7 +67,7 @@ export const ebpfStore = defineStore({
|
|||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
const json = res.data.data.createTaskData;
|
const json = res.data.data.createTaskData;
|
||||||
this.couldProfiling = json.couldProfiling || [];
|
this.couldProfiling = json.couldProfiling || false;
|
||||||
this.labels = json.processLabels.map((d: string) => {
|
this.labels = json.processLabels.map((d: string) => {
|
||||||
return { label: d, value: d };
|
return { label: d, value: d };
|
||||||
});
|
});
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
@import "./grid.scss";
|
import "element-plus/es/components/message/style/css";
|
||||||
@import "./lib.scss";
|
import "element-plus/es/components/message-box/style/css";
|
||||||
@import "./reset.scss";
|
import "element-plus/es/components/notification/style/css";
|
||||||
|
import "./grid.scss";
|
||||||
|
import "./lib.scss";
|
||||||
|
import "./reset.scss";
|
8
src/types/ebpf.d.ts
vendored
8
src/types/ebpf.d.ts
vendored
@ -66,5 +66,11 @@ export type StackElement = {
|
|||||||
stackType: string;
|
stackType: string;
|
||||||
value: number;
|
value: number;
|
||||||
children?: StackElement[];
|
children?: StackElement[];
|
||||||
instanceName: string;
|
};
|
||||||
|
export type AnalyzationTrees = {
|
||||||
|
id: string;
|
||||||
|
parentId: string;
|
||||||
|
symbol: string;
|
||||||
|
dumpCount: number;
|
||||||
|
stackType: string;
|
||||||
};
|
};
|
||||||
|
@ -44,7 +44,7 @@ limitations under the License. -->
|
|||||||
:style="{ fontSize: '13px', width: '100%' }"
|
:style="{ fontSize: '13px', width: '100%' }"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
ref="multipleTableRef"
|
ref="multipleTableRef"
|
||||||
:default-sort="{ prop: 'name' }"
|
:default-sort="{ prop: 'name', order: 'ascending' }"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
height="637px"
|
height="637px"
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -110,6 +110,10 @@ function changeType(opt: any[]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function createTask() {
|
async function createTask() {
|
||||||
|
if (!labels.value.length) {
|
||||||
|
ElMessage.warning("no labels");
|
||||||
|
return;
|
||||||
|
}
|
||||||
const date =
|
const date =
|
||||||
monitorTime.value === "0" ? appStore.durationRow.start : time.value;
|
monitorTime.value === "0" ? appStore.durationRow.start : time.value;
|
||||||
const params = {
|
const params = {
|
||||||
|
Loading…
Reference in New Issue
Block a user