mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Added bracketSpacing into prettier (#627)
This commit is contained in:
@@ -6,10 +6,11 @@ import apiService from "./apiService";
|
||||
// Get list of kubectl contexts configured locally
|
||||
function useGetKubectlContexts(options?: UseQueryOptions<KubectlContexts>) {
|
||||
return useQuery<KubectlContexts>({
|
||||
queryKey:["k8s", "contexts"],
|
||||
queryFn:() => apiService.fetchWithDefaults<KubectlContexts>("/api/k8s/contexts"),
|
||||
...(options ?? {})
|
||||
});
|
||||
queryKey: ["k8s", "contexts"],
|
||||
queryFn: () =>
|
||||
apiService.fetchWithDefaults<KubectlContexts>("/api/k8s/contexts"),
|
||||
...(options ?? {}),
|
||||
});
|
||||
}
|
||||
|
||||
// Get resources information
|
||||
@@ -21,12 +22,12 @@ function useGetK8sResource(
|
||||
) {
|
||||
return useQuery<K8sResource>({
|
||||
queryKey: ["k8s", kind, "get", name, namespace],
|
||||
queryFn:() =>
|
||||
queryFn: () =>
|
||||
apiService.fetchWithDefaults<K8sResource>(
|
||||
`/api/k8s/${kind}/get?name=${name}&namespace=${namespace}`
|
||||
),
|
||||
...(options ?? {})}
|
||||
);
|
||||
...(options ?? {}),
|
||||
});
|
||||
}
|
||||
|
||||
// Get list of resources
|
||||
@@ -36,10 +37,10 @@ function useGetK8sResourceList(
|
||||
) {
|
||||
return useQuery<K8sResourceList>({
|
||||
queryKey: ["k8s", kind, "list"],
|
||||
queryFn:() =>
|
||||
queryFn: () =>
|
||||
apiService.fetchWithDefaults<K8sResourceList>(`/api/k8s/${kind}/list`),
|
||||
...(options ?? {})}
|
||||
);
|
||||
...(options ?? {}),
|
||||
});
|
||||
}
|
||||
|
||||
// Get describe text for kubernetes resource
|
||||
@@ -50,8 +51,8 @@ function useGetK8sResourceDescribe(
|
||||
options?: UseQueryOptions<string>
|
||||
) {
|
||||
return useQuery<string>({
|
||||
queryKey:["k8s", kind, "describe", name, namespace],
|
||||
queryFn:() =>
|
||||
queryKey: ["k8s", kind, "describe", name, namespace],
|
||||
queryFn: () =>
|
||||
apiService.fetchWithDefaults<string>(
|
||||
`/api/k8s/${kind}/describe?name=${name}&namespace=${namespace}`,
|
||||
{
|
||||
@@ -60,6 +61,6 @@ function useGetK8sResourceDescribe(
|
||||
},
|
||||
}
|
||||
),
|
||||
...(options ?? {})}
|
||||
);
|
||||
...(options ?? {}),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user