This commit is contained in:
Fine 2024-11-25 19:08:31 +08:00
parent 5f8af6df38
commit d5b5bf484f
2 changed files with 5 additions and 5 deletions

View File

@ -17,7 +17,7 @@
import { defineStore } from "pinia"; import { defineStore } from "pinia";
import type { Option } from "@/types/app"; import type { Option } from "@/types/app";
import type { import type {
AsyncProfilingTaskList, AsyncProfilingTask,
AsyncProfileTaskCreationRequest, AsyncProfileTaskCreationRequest,
AsyncProfilerStackElement, AsyncProfilerStackElement,
AsyncProfilerTaskProgress, AsyncProfilerTaskProgress,
@ -29,10 +29,10 @@ import type { AxiosResponse } from "axios";
import type { Instance } from "@/types/selector"; import type { Instance } from "@/types/selector";
interface AsyncProfilingState { interface AsyncProfilingState {
taskList: Array<Recordable<AsyncProfilingTaskList>>; taskList: Array<Recordable<AsyncProfilingTask>>;
labels: Option[]; labels: Option[];
asyncProfilingTips: string; asyncProfilingTips: string;
selectedTask: Recordable<AsyncProfilingTaskList>; selectedTask: Recordable<AsyncProfilingTask>;
taskProgress: Recordable<AsyncProfilerTaskProgress>; taskProgress: Recordable<AsyncProfilerTaskProgress>;
instances: Instance[]; instances: Instance[];
analyzeTrees: AsyncProfilerStackElement[]; analyzeTrees: AsyncProfilerStackElement[];
@ -50,7 +50,7 @@ export const asyncProfilingStore = defineStore({
analyzeTrees: [], analyzeTrees: [],
}), }),
actions: { actions: {
setSelectedTask(task: Recordable<AsyncProfilingTaskList>) { setSelectedTask(task: Recordable<AsyncProfilingTask>) {
this.selectedTask = task || {}; this.selectedTask = task || {};
}, },
async getTaskList(params: { serviceId: string; startTime: number; endTime: number }) { async getTaskList(params: { serviceId: string; startTime: number; endTime: number }) {

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
export type AsyncProfilingTaskList = { export type AsyncProfilingTask = {
id: string; id: string;
serviceId: string; serviceId: string;
serviceInstanceIds: string[]; serviceInstanceIds: string[];