This commit is contained in:
Qiuxia Fan 2022-05-12 15:28:32 +08:00
commit 218c4475e0
7 changed files with 8 additions and 15 deletions

View File

@ -247,7 +247,7 @@ limitations under the License. -->
(state.showMinutes = state.showSeconds = false) (state.showMinutes = state.showSeconds = false)
" "
:class="{ on: state.showHours }" :class="{ on: state.showHours }"
>{{ state.hour || dd }}</a >{{ dd(state.hour) }}</a
> >
<span>:</span> <span>:</span>
<a <a
@ -257,7 +257,7 @@ limitations under the License. -->
(state.showHours = state.showSeconds = false) (state.showHours = state.showSeconds = false)
" "
:class="{ on: state.showMinutes }" :class="{ on: state.showMinutes }"
>{{ state.minute || dd }}</a >{{ dd(state.minute) }}</a
> >
<span v-show="state.m !== 'D'"> <span v-show="state.m !== 'D'">
<span>:</span> <span>:</span>
@ -268,7 +268,7 @@ limitations under the License. -->
(state.showHours = state.showMinutes = false) (state.showHours = state.showMinutes = false)
" "
:class="{ on: state.showSeconds }" :class="{ on: state.showSeconds }"
>{{ state.second || dd }}</a >{{ dd(state.second) }}</a
> >
</span> </span>
</div> </div>
@ -464,7 +464,6 @@ const status = (
const minutes = time.getMinutes(); const minutes = time.getMinutes();
const seconds = time.getSeconds(); const seconds = time.getSeconds();
const milliseconds = time.getMilliseconds(); const milliseconds = time.getMilliseconds();
const dd = (t: number) => `0${t}`.slice(-2);
const map: { [key: string]: string | number } = { const map: { [key: string]: string | number } = {
YYYY: year, YYYY: year,
MM: dd(month + 1), MM: dd(month + 1),

View File

@ -48,9 +48,9 @@ export const queryEBPFTasks = {
}`, }`,
}; };
export const queryEBPFSchedules = { export const queryEBPFSchedules = {
variable: "$taskId: ID!, $duration: Duration!", variable: "$taskId: ID!",
query: ` query: `
eBPFSchedules: queryEBPFProfilingSchedules(taskId: $taskId, duration: $duration) { eBPFSchedules: queryEBPFProfilingSchedules(taskId: $taskId) {
scheduleId scheduleId
taskId taskId
process { process {
@ -60,7 +60,6 @@ export const queryEBPFSchedules = {
serviceName serviceName
instanceId instanceId
instanceName instanceName
layer
agentId agentId
detectType detectType
attributes { attributes {

View File

@ -41,7 +41,6 @@ export const Instances = {
label: name label: name
language language
instanceUUID instanceUUID
layer
attributes { attributes {
name name
value value
@ -83,7 +82,6 @@ export const getInstance = {
label: name label: name
language language
instanceUUID instanceUUID
layer
attributes { attributes {
name name
value value

View File

@ -134,7 +134,7 @@ const msg = {
taskId: "Task ID", taskId: "Task ID",
triggerType: "Trigger Type", triggerType: "Trigger Type",
targetType: "Target Type", targetType: "Target Type",
ebpfTip: "Don't have process could profiling", ebpfTip: "Don't have a process for profiling",
processSelect: "Click to select processes", processSelect: "Click to select processes",
hourTip: "Select Hour", hourTip: "Select Hour",
minuteTip: "Select Minute", minuteTip: "Select Minute",

View File

@ -103,14 +103,13 @@ export const ebpfStore = defineStore({
this.getEBPFSchedules({ taskId: this.taskList[0].taskId }); this.getEBPFSchedules({ taskId: this.taskList[0].taskId });
return res.data; return res.data;
}, },
async getEBPFSchedules(params: { taskId: string; duration?: Duration }) { async getEBPFSchedules(params: { taskId: string }) {
if (!params.taskId) { if (!params.taskId) {
return new Promise((resolve) => resolve({})); return new Promise((resolve) => resolve({}));
} }
const duration = useAppStoreWithOut().durationTime;
const res: AxiosResponse = await graphql const res: AxiosResponse = await graphql
.query("getEBPFSchedules") .query("getEBPFSchedules")
.params({ ...params, duration }); .params({ ...params });
if (res.data.errors) { if (res.data.errors) {
this.eBPFSchedules = []; this.eBPFSchedules = [];

1
src/types/ebpf.d.ts vendored
View File

@ -50,7 +50,6 @@ export type Process = {
serviceName: string; serviceName: string;
instanceId: string; instanceId: string;
instanceName: string; instanceName: string;
layer: string;
agentId: string; agentId: string;
detectType: string; detectType: string;
attributes: { name: string; value: string }; attributes: { name: string; value: string };

View File

@ -26,7 +26,6 @@ export type Service = {
export type Instance = { export type Instance = {
value: string; value: string;
label: string; label: string;
layer?: string;
language?: string; language?: string;
instanceUUID?: string; instanceUUID?: string;
attributes?: { name: string; value: string }[]; attributes?: { name: string; value: string }[];