diff --git a/src/store/modules/async-profiling.ts b/src/store/modules/async-profiling.ts index b4beb1a1..2ce5b0b6 100644 --- a/src/store/modules/async-profiling.ts +++ b/src/store/modules/async-profiling.ts @@ -34,6 +34,7 @@ interface AsyncProfilingState { taskProgress: Recordable; instances: Instance[]; analyzeTrees: AsyncProfilerStackElement[]; + loadingTree: boolean; } export const asyncProfilingStore = defineStore({ @@ -44,6 +45,7 @@ export const asyncProfilingStore = defineStore({ taskProgress: {}, instances: [], analyzeTrees: [], + loadingTree: false, }), actions: { setSelectedTask(task: Recordable) { @@ -111,8 +113,9 @@ export const asyncProfilingStore = defineStore({ if (!params.instanceIds.length) { return new Promise((resolve) => resolve({})); } + this.loadingTree = true; const res: AxiosResponse = await graphql.query("getAsyncProfileAnalyze").params({ request: params }); - + this.loadingTree = false; if (res.data.errors) { this.analyzeTrees = []; return res.data; diff --git a/src/views/dashboard/related/async-profiling/Content.vue b/src/views/dashboard/related/async-profiling/Content.vue index a0e8b079..f8768ff8 100644 --- a/src/views/dashboard/related/async-profiling/Content.vue +++ b/src/views/dashboard/related/async-profiling/Content.vue @@ -19,7 +19,7 @@ limitations under the License. -->
-
+
diff --git a/src/views/dashboard/related/async-profiling/components/NewTask.vue b/src/views/dashboard/related/async-profiling/components/NewTask.vue index 0c486092..b89b4249 100644 --- a/src/views/dashboard/related/async-profiling/components/NewTask.vue +++ b/src/views/dashboard/related/async-profiling/components/NewTask.vue @@ -43,7 +43,7 @@ limitations under the License. -->
- + {{ t("createTask") }}
@@ -67,6 +67,7 @@ limitations under the License. --> const asyncEvents = ref([ProfilingEvents[0].value]); const duration = ref(DurationOptions[0].value); const execArgs = ref(""); + const loading = ref(false); function changeDuration(val: string) { duration.value = val; @@ -84,7 +85,9 @@ limitations under the License. --> events: asyncEvents.value, execArgs: execArgs.value, }; + loading.value = true; const res = await asyncProfilingStore.createTask(params); + loading.value = false; if (res.errors) { ElMessage.error(res.errors); return; @@ -118,7 +121,7 @@ limitations under the License. --> } .create-task-btn { - width: 300px; + width: 600px; margin-top: 50px; } diff --git a/src/views/dashboard/related/async-profiling/components/TaskList.vue b/src/views/dashboard/related/async-profiling/components/TaskList.vue index 05e373de..205bf594 100644 --- a/src/views/dashboard/related/async-profiling/components/TaskList.vue +++ b/src/views/dashboard/related/async-profiling/components/TaskList.vue @@ -13,42 +13,40 @@ 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. -->