feat: update

This commit is contained in:
Fine 2023-06-07 07:42:28 +08:00
parent d7bc79310d
commit 0b8f40bab5
5 changed files with 10 additions and 6 deletions

View File

@ -20,11 +20,11 @@ import graphql from "@/graphql";
import type { AxiosResponse } from "axios"; import type { AxiosResponse } from "axios";
import type { EBPFTaskList } from "@/types/ebpf"; import type { EBPFTaskList } from "@/types/ebpf";
import { useNetworkProfilingStore } from "@/store/modules/network-profiling"; import { useNetworkProfilingStore } from "@/store/modules/network-profiling";
// import { EBPFProfilingTriggerType } from "../data";
interface taskTimelineState { interface taskTimelineState {
loading: boolean; loading: boolean;
taskList: EBPFTaskList[]; taskList: EBPFTaskList[];
selectedTask: Recordable<EBPFTaskList>;
} }
export const taskTimelineStore = defineStore({ export const taskTimelineStore = defineStore({
@ -32,8 +32,12 @@ export const taskTimelineStore = defineStore({
state: (): taskTimelineState => ({ state: (): taskTimelineState => ({
loading: false, loading: false,
taskList: [], taskList: [],
selectedTask: {},
}), }),
actions: { actions: {
setSelectedTask(task: Recordable<EBPFTaskList>) {
this.selectedTask = task || {};
},
async getContinousTaskList(params: { async getContinousTaskList(params: {
serviceId: string; serviceId: string;
serviceInstanceId: string; serviceInstanceId: string;

View File

@ -32,7 +32,7 @@ limitations under the License. -->
defineProps({ defineProps({
config: { config: {
type: Object as PropType<any>, type: Object as PropType<any>,
default: () => ({ graph: {} }), default: () => ({}),
}, },
}); });
</script> </script>

View File

@ -34,7 +34,7 @@ limitations under the License. -->
defineProps({ defineProps({
config: { config: {
type: Object as PropType<any>, type: Object as PropType<any>,
default: () => ({ graph: {} }), default: () => ({}),
}, },
}); });
const networkProfilingStore = useNetworkProfilingStore(); const networkProfilingStore = useNetworkProfilingStore();

View File

@ -27,7 +27,7 @@ limitations under the License. -->
defineProps({ defineProps({
config: { config: {
type: Object as PropType<any>, type: Object as PropType<any>,
default: () => ({ graph: {} }), default: () => ({}),
}, },
}); });
</script> </script>

View File

@ -18,11 +18,11 @@ limitations under the License. -->
<script lang="ts" setup> <script lang="ts" setup>
import type { PropType } from "vue"; import type { PropType } from "vue";
/* global defineProps */ /*global defineProps */
defineProps({ defineProps({
config: { config: {
type: Object as PropType<any>, type: Object as PropType<any>,
default: () => ({ graph: {} }), default: () => ({}),
}, },
}); });
</script> </script>