diff --git a/src/store/modules/async-profiling.ts b/src/store/modules/async-profiling.ts index 2ce5b0b6..a0041f18 100644 --- a/src/store/modules/async-profiling.ts +++ b/src/store/modules/async-profiling.ts @@ -35,6 +35,7 @@ interface AsyncProfilingState { instances: Instance[]; analyzeTrees: AsyncProfilerStackElement[]; loadingTree: boolean; + loadingTasks: boolean; } export const asyncProfilingStore = defineStore({ @@ -46,6 +47,7 @@ export const asyncProfilingStore = defineStore({ instances: [], analyzeTrees: [], loadingTree: false, + loadingTasks: false, }), actions: { setSelectedTask(task: Recordable) { @@ -55,15 +57,15 @@ export const asyncProfilingStore = defineStore({ this.analyzeTrees = tree; }, async getTaskList() { - const { duration } = useAppStoreWithOut(); const selectorStore = useSelectorStore(); + this.loadingTasks = true; const res: AxiosResponse = await graphql.query("getAsyncTaskList").params({ request: { - startTime: duration.start.getTime(), - endTime: duration.end.getTime(), serviceId: selectorStore.currentService.id, + limit: 10000, }, }); + this.loadingTasks = false; if (res.data.errors) { return res.data; } diff --git a/src/views/dashboard/related/async-profiling/components/NewTask.vue b/src/views/dashboard/related/async-profiling/components/NewTask.vue index 461cc740..ca114b5e 100644 --- a/src/views/dashboard/related/async-profiling/components/NewTask.vue +++ b/src/views/dashboard/related/async-profiling/components/NewTask.vue @@ -35,7 +35,13 @@ limitations under the License. -->
{{ t("profilingEvents") }}
- +
@@ -103,10 +109,11 @@ limitations under the License. --> const selectorStore = useSelectorStore(); const { t } = useI18n(); const serviceInstanceIds = ref([]); - const asyncEvents = ref([ProfilingEvents[0].value]); + const asyncEvents = ref([]); const duration = ref(DurationOptions[0].value); const execArgs = ref(""); const loading = ref(false); + const PartofEvents = [ProfilingEvents[3], ProfilingEvents[4], ProfilingEvents[5]]; function changeDuration(val: string) { duration.value = val; @@ -116,11 +123,26 @@ limitations under the License. --> serviceInstanceIds.value = options.map((d: Option) => d.value); } + function disableEvents(item: string) { + if (asyncEvents.value.includes(ProfilingEvents[0]) && PartofEvents.includes(item)) { + return true; + } + if (item === ProfilingEvents[0]) { + for (const event of PartofEvents) { + if (asyncEvents.value.includes(event)) { + return true; + } + } + } + + return false; + } + async function createTask() { const params = { serviceId: selectorStore.currentService.id, serviceInstanceIds: serviceInstanceIds.value, - duration: Number(duration.value), + duration: Number(duration.value) * 60, events: asyncEvents.value, execArgs: execArgs.value, }; diff --git a/src/views/dashboard/related/async-profiling/components/TaskList.vue b/src/views/dashboard/related/async-profiling/components/TaskList.vue index ff629260..5730f786 100644 --- a/src/views/dashboard/related/async-profiling/components/TaskList.vue +++ b/src/views/dashboard/related/async-profiling/components/TaskList.vue @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->