fix query

This commit is contained in:
Fine 2024-11-26 15:50:33 +08:00
parent 6fc0c89239
commit a828e1b016
4 changed files with 10 additions and 6 deletions

View File

@ -65,7 +65,7 @@ export const GetAsyncProfileAnalyze = {
variable: "$request: AsyncProfilerAnalyzationRequest!", variable: "$request: AsyncProfilerAnalyzationRequest!",
query: ` query: `
analysisResult: queryAsyncProfilerAnalyze(request: $request) { analysisResult: queryAsyncProfilerAnalyze(request: $request) {
trees { tree {
type type
elements { elements {
id id

View File

@ -110,7 +110,7 @@ export const asyncProfilingStore = defineStore({
if (!params.instanceIds.length) { if (!params.instanceIds.length) {
return new Promise((resolve) => resolve({})); return new Promise((resolve) => resolve({}));
} }
const res: AxiosResponse = await graphql.query("GetAsyncProfileAnalyze").params(params); const res: AxiosResponse = await graphql.query("getAsyncProfileAnalyze").params({ request: params });
if (res.data.errors) { if (res.data.errors) {
this.analyzeTrees = []; this.analyzeTrees = [];

View File

@ -69,7 +69,6 @@ limitations under the License. -->
.filter { .filter {
height: 90px; height: 90px;
border-bottom: 1px solid $disabled-color;
padding-right: 10px; padding-right: 10px;
} }
</style> </style>

View File

@ -24,7 +24,7 @@ limitations under the License. -->
@change="changeInstances" @change="changeInstances"
/> />
<Selector <Selector
class="filter-selector" class="filter-events"
:value="selectedEventType" :value="selectedEventType"
size="small" size="small"
:options="eventTypes" :options="eventTypes"
@ -49,7 +49,7 @@ limitations under the License. -->
const serviceInstanceIds = ref<string[]>([]); const serviceInstanceIds = ref<string[]>([]);
const selectedEventType = ref<string>(""); const selectedEventType = ref<string>("");
const eventTypes = computed(() => const eventTypes = computed(() =>
(asyncProfilingStore.selectedTask.eventTypes ?? []).map((d: string) => ({ label: d, value: d })), (asyncProfilingStore.selectedTask.events ?? []).map((d: string) => ({ label: d, value: d })),
); );
const instances = computed(() => const instances = computed(() =>
asyncProfilingStore.instances.filter((d: Instance) => asyncProfilingStore.instances.filter((d: Instance) =>
@ -79,7 +79,12 @@ limitations under the License. -->
</script> </script>
<style> <style>
.filter-selector { .filter-selector {
width: 300px; width: 400px;
margin-right: 10px;
}
.filter-events {
width: 200px;
margin-right: 10px; margin-right: 10px;
} }
</style> </style>