diff --git a/src/graph/query/selector.ts b/src/graph/query/selector.ts index 1681ff5c..4231257a 100644 --- a/src/graph/query/selector.ts +++ b/src/graph/query/selector.ts @@ -17,7 +17,7 @@ import { Services, Layers, Endpoints, Instances } from "../fragments/selector"; export const queryServices = `query queryServices(${Services.variable}) {${Services.query}}`; -export const queryLayers = `query ${Layers.query}`; export const queryEndpoints = `query queryEndpoints(${Endpoints.variable}) {${Endpoints.query}}`; export const queryInstances = `query queryInstances(${Instances.variable}) {${Instances.query}}`; +export const queryLayers = `query listLayer {${Layers.query}}`; diff --git a/src/store/modules/selectors.ts b/src/store/modules/selectors.ts index 10453ae4..99edc2bf 100644 --- a/src/store/modules/selectors.ts +++ b/src/store/modules/selectors.ts @@ -33,7 +33,7 @@ export const selectorStore = defineStore({ async fetchLayers(): Promise { const res: AxiosResponse = await graph.query("queryLayers").params({}); - return res; + return res.data || {}; }, async fetchServices(layer: string): Promise { const res: AxiosResponse = await graph @@ -43,7 +43,7 @@ export const selectorStore = defineStore({ if (!res.data.errors) { this.services = res.data.data.services; } - return res; + return res.data; }, async getServiceInstances(params: { serviceId: string; diff --git a/src/views/dashboard/New.vue b/src/views/dashboard/New.vue index 7a7a5d0e..a40cb6eb 100644 --- a/src/views/dashboard/New.vue +++ b/src/views/dashboard/New.vue @@ -26,8 +26,8 @@ limitations under the License. -->
{{ t("layer") }}