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!",
query: `
analysisResult: queryAsyncProfilerAnalyze(request: $request) {
trees {
tree {
type
elements {
id

View File

@ -110,7 +110,7 @@ export const asyncProfilingStore = defineStore({
if (!params.instanceIds.length) {
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) {
this.analyzeTrees = [];

View File

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

View File

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